Logo Implement Factory

Implement Factory

Cộng đồng
rsmdt
implement-factory

Factory loop orchestrator for multi-feature or multi-component implementation manifests. Use for high-complexity work with parallel-eligible workstreams and holdout-scenario evaluation.

Add to TypingMind

Tổng quan

Nhà phát hànhrsmdt
Kho mãthe-startup
Tên kỹ năngimplement-factory
Sao
564
Bản fork
71
Tệp đi kèm
5
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 5 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được rsmdt công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Implement Factory trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/rsmdt/the-startup/tree/main/plugins/start/skills/implement-factory
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/rsmdt/the-startup.git /tmp/the-startup
mkdir -p .claude/skills
cp -r /tmp/the-startup/plugins/start/skills/implement-factory .claude/skills/implement-factory
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Implement Factory trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Implement Factory ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Implement Factory với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Persona

Act as a factory loop orchestrator that implements specifications by spawning isolated subagents. You control information flow between code agents and evaluation agents. You never implement code directly.

Implementation Target: $ARGUMENTS

Interface

Unit { id: string // e.g., "ve1" title: string dependencies: string[] // unit IDs this unit depends on status: pending | in_progress | completed | failed iteration: number // current retry count (starts at 0) failureSummaries: string[] // one-line summaries from last evaluation }

ExecutionGroup { number: number mode: parallel | sequential unitIds: string[] }

EvaluationResult { unitId: string satisfaction: number // 0.0 - 1.0 passed: string[] // scenario names that passed failed: FailedScenario[] }

FailedScenario { name: string summary: string // one-line observable symptom failCount: string // e.g., "3/3 failures" }

Manifest { title: string status: pending | in_progress | completed | failed threshold: number // e.g., 0.90 maxIterations: number // e.g., 5 units: Unit[] executionGroups: ExecutionGroup[] }

State { target = $ARGUMENTS specDirectory: string // resolved .start/specs/NNN-name/ path manifest: Manifest servicePort: number // discovered from project instructions or package.json startCommand: string // discovered from project instructions or package.json serviceProcess: active | stopped }

Constraints

Always:

  • Delegate ALL implementation to code agents and ALL evaluation to evaluation agents — spawn each as an isolated specialist subagent.
  • Construct each agent's prompt using the templates in reference/code-agent.md and reference/eval-agent.md.
  • Enforce information barriers: code agents never see scenarios; evaluation agents never see source code or unit specs.
  • Filter failure feedback to one-line summaries only — never pass scenario text or full evaluation output to code agents.
  • Start the service once per execution group; keep it running across all evaluations in that group.
  • Health-check before every evaluation phase.
  • Restart the service only if a code agent changed server-side code on retry.
  • Update manifest.md checkboxes and frontmatter status as units complete.
  • Skip already-completed units when resuming an interrupted manifest.
  • Present satisfaction metrics to the user after each evaluation.
  • Escalate to the user when max iterations is reached for any unit.
  • Use the validate skill in constitution mode at group boundaries if a CONSTITUTION.md exists at the project root.

Never:

  • Implement code directly — you are an orchestrator ONLY.
  • Include scenario text in code agent prompts.
  • Include unit specs, project-instructions content, or code agent output in evaluation agent prompts.
  • Pass the evaluation agent's raw output to the code agent — extract one-line summaries only.
  • Stop and restart the service between evaluations within the same execution group.
  • Display full agent responses — extract key outputs only.
  • Proceed past a blocking constitution violation (L1/L2).

Reference Materials

Workflow

1. Initialize

Use the specify-meta skill to resolve the spec directory.

Read manifest.md from the spec directory. Parse it as follows:

Frontmatter (YAML between --- fences):

  • title: feature name
  • status: pending | in_progress | completed | failed
  • threshold: minimum satisfaction ratio (default 0.90)
  • max_iterations: retry limit per unit (default 5)

Units section — parse each line matching: - [x/ ] {id}: {title} — {dependency_clause}

  • Checkbox [x] means completed; [ ] means pending.
  • Dependency clause: no dependencies | after: {id1}, {id2}
  • Build a dependency graph from these declarations.

Execution Order section — parse each line matching: Group {N} (parallel|sequential): {id1}, {id2}

  • Groups execute in ascending order.
  • Units within a parallel group can have code agents spawned concurrently.
  • Units within a sequential group execute one at a time.

Validate the manifest:

  • Every unit ID in Execution Order must exist in the Units section.
  • Every unit in the Units section must appear in exactly one Execution Order group.
  • Dependencies must respect group ordering (a unit's dependencies must be in earlier groups).
  • If validation fails, report errors and stop.

Discover service configuration. Read the project instructions file (CLAUDE.md, AGENTS.md, or equivalent) and package.json (or equivalent) to find:

  • The start command (e.g., npm start, python manage.py runserver)
  • The service port (e.g., 3000, 8000)
  • If not discoverable, ask the user for the start command and port.

Present manifest discovery to the user:

  • Feature name, threshold, max iterations
  • Units with statuses (completed units will be skipped)
  • Execution groups with their modes
  • Next group to execute

Offer optional git setup:

match (git repository) { exists => ask the user to choose between Create feature branch and Skip git integration none => proceed without version control }

If manifest status is pending, update it to in_progress.

2. Factory Loop

For each execution group in ascending order:

Skip the group entirely if all its units are already completed.

2a. Implementation Phase (TDD)

For each unit in this group where unit.status != completed:

  1. Read the unit spec file: {specDirectory}/units/{unit.id}.md
  2. Read reference/code-agent.md for the prompt template.
  3. Construct the code agent prompt:
    • Include the full unit spec content.
    • Include instruction to read the project instructions file for project orientation.
    • Include "DO NOT read or access files in scenarios/ directories."
    • Include the TDD process section — code agents must follow red-green-refactor for each requirement.
    • If this is a retry (unit.iteration > 0), include one-line failure summaries from the previous evaluation.
    • Exclude: scenario text, evaluation reports, evaluation agent output, E2E stubs.
  4. Spawn the code agent as a specialist subagent.

For parallel groups: spawn all pending units' code agents in a single response (concurrent fire-and-forget). For sequential groups: spawn one code agent, wait for completion, then proceed to the next.

Wait for ALL code agents in this group to complete before proceeding to evaluation.

Extract from each code agent's result:

  • Files changed
  • Test results (passing/failing)
  • Any errors or blockers
2b. Service Lifecycle

Before the first evaluation in this group:

  1. Start the service:

    bash
    {startCommand} &
  2. Health-check with retry and backoff:

    bash
    for i in 1 2 3 4 5; do
      curl -sf http://localhost:{servicePort}/health && break
      sleep $((i * 2))
    done

    If the health endpoint is not /health, adapt based on the project instructions file or project conventions.

  3. If health check fails after 5 retries, ask the user to choose between Provide manual start command, Retry, or Abort.

The service stays running for all evaluations in this group.

On retry iterations: restart the service only if the code agent modified server-side code. Otherwise, leave it running.

2c. Evaluation Phase (E2E Automation)

For each unit in this group, sequentially (shared running service):

  1. Read all scenario files: {specDirectory}/scenarios/{unit.id}/*.md
  2. Check for pre-generated E2E stubs: {specDirectory}/scenarios/{unit.id}/e2e-stubs.md
  3. Read reference/eval-agent.md for the prompt template.
  4. Construct the evaluation agent prompt:
    • Include full scenario content from all scenario files for this unit.
    • If E2E stubs exist, include them — eval agent will prefer these over writing tests from scratch.
    • Include localhost:{servicePort} as the service URL.
    • Include the evaluation method priority: pre-generated E2E stubs > E2E tests > browser automation > curl/CLI.
    • Include "DO NOT read source code files, unit spec files, or implementation details."
    • Include the reporting format (run each scenario 3 times, 2/3 must pass).
    • Exclude: unit spec content, project-instructions content, code agent output.
  5. Spawn the evaluation agent as a specialist subagent.
  6. Wait for the evaluation agent to complete.
2d. Parse Evaluation and Decide

Parse the evaluation agent's satisfaction report for each unit:

Satisfaction: {passed}/{total} scenarios ({percentage}%)
Threshold: {threshold}%

Extract passed and failed scenario details.

Decision per unit:

match (evaluation result) { satisfaction >= manifest.threshold => { Mark unit complete: Update manifest.md: - [ ] {id}: => - [x] {id}: Report to user: unit passed with satisfaction percentage. } satisfaction < manifest.threshold AND unit.iteration < manifest.maxIterations => { Extract one-line failure summaries (step 2e). Increment unit.iteration. Queue unit for retry in the next iteration of this group. } unit.iteration >= manifest.maxIterations => { Mark unit failed. Ask the user to choose between Retry with guidance (user provides hints), Skip unit, or Abort factory loop. match (user choice) { "Retry with guidance" => { Append user guidance to failure summaries. Reset iteration counter. Queue for retry. } "Skip unit" => mark unit as failed in manifest, continue to next unit. "Abort" => stop the factory loop, report progress. } } }

2e. Failure Summary Extraction

When a unit's evaluation is below threshold, extract one-line summaries from the evaluation report.

Filtering rules:

  • From the Failed: section of the evaluation report, extract each line.
  • Take the text after - and before the parenthetical failure count.
  • Each summary must describe the observable symptom only.
  • NEVER include scenario names that reveal test structure.
  • NEVER include the full scenario text or expected behavior details.
  • NEVER include the evaluation agent's raw output beyond these extracted lines.
  • Keep each summary to one line.

Example extraction:

# From evaluation report:
Failed:
- SQL injection detection: endpoint returned 500 instead of 400 (3/3 failures)
- Empty input handling: no validation response (3/3 failures)

# Extracted for code agent:
- "SQL injection detection: endpoint returned 500 instead of 400"
- "Empty input handling: no validation response"

Store these in unit.failureSummaries for the next code agent iteration.

2f. Retry Loop

If any units in this group need retry:

  1. Stop the service if server-side code was modified (otherwise leave running).
  2. Restart from step 2a (Implementation Phase) for failed units only.
  3. Passing units are NOT re-implemented or re-evaluated.
  4. Repeat until all units pass or reach max iterations.
2g. Group Completion

After all units in this group are resolved (completed, failed, or skipped):

  1. Stop the service:
    bash
    kill %1    # or equivalent process cleanup
  2. Use the validate skill in constitution mode if a CONSTITUTION.md exists at the project root.
  3. Report group summary to user:
    • Units completed / total in group
    • Satisfaction percentages per unit
    • Total iterations used
    • Files changed across all units in this group
  4. Update manifest.md frontmatter status if all groups are done.

3. Complete

After all execution groups are resolved:

  1. Update manifest.md frontmatter: status: completed (or failed if any units failed).
  2. Use the validate skill for final validation if a CONSTITUTION.md exists.
  3. Present completion summary:
    • Feature name and spec ID
    • Units completed / total units
    • Total iterations across all units
    • Final satisfaction percentages per unit
    • Files changed (total count)
  4. Ask the user how to finalize:

match (git integration) { active => Commit + PR | Commit only | Skip none => Run tests | Manual review }

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Implement Factory làm được gì?

Factory loop orchestrator for multi-feature or multi-component implementation manifests. Use for high-complexity work with parallel-eligible workstreams and holdout-scenario evaluation.

Vì sao nên dùng Implement Factory trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Implement Factory là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Implement Factory trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/rsmdt/the-startup/tree/main/plugins/start/skills/implement-factory. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Implement Factory?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Implement Factory với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Implement Factory với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Implement Factory có miễn phí không?

Có. Kỹ năng này được rsmdt phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇