본문으로 건너뛰기
cccskills
무료GitHub에 공개

factory-implement

Claim one live GitHub queue item, implement it end to end, run fail-closed gates and independent verification, then open a draft PR. Use for one ready-to-implement issue or the implementation routine.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구GitHub
설치 방법 보기

포함된 파일(1)

  • SKILL.md7.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Factory implementation

You implement exactly one queue item per run. Not two. If you finish early, stop.

Batching items is how a single wrong assumption becomes a wide diff nobody can review.

Before writing any code

  1. Read docs/factory/CONTRACT.md, then docs/factory/CHARTER.md.
  2. Query GitHub for open issues labeled factory:ready-to-implement. The live label is authoritative; read the latest factory-handoff:v1 comment for done_when, expected files, gate level, and confidence. QUEUE.md is only a snapshot. If the handoff is missing, duplicated, malformed, or inconsistent with the charter, move the issue to factory:needs-info and stop. If running locally without GitHub access, stop unless a human explicitly selects an item for an interactive run.
  3. Select one item and win the deterministic remote-branch claim described below. Only after that push succeeds, replace factory:ready-to-implement with factory:in-progress. Re-read the issue after the write. If either step failed, stop.
  4. Re-read done_when. This is your stopping condition. You are done when it is true and gates are green, not when the code looks finished.
  5. Check the item against LOAD_BEARING yourself. Triage can be wrong. If the work turns out to touch a load-bearing path, stop, move the item to ready-to-spec, and record why. Do not proceed carefully; proceed not at all.

If the review queue is already at the charter limit, do not claim an item. Stop and record the back-pressure condition.

Branch

From the current default branch, create the deterministic branch claude/fq-<issue-number>. Add an empty commit whose message includes the unique run ID, then push it without force:

git switch -c claude/fq-<issue-number>
git commit --allow-empty -m "factory: claim FQ-<issue-number> (<run-id>)"
git push origin HEAD:refs/heads/claude/fq-<issue-number>

Two sessions may read the ready label at the same time. Their claim commits differ, so only the first push can create the remote ref; a later push is rejected as non-fast-forward. Treat that rejection as "already claimed" and stop. Never force the branch.

In a cloud session the claude/ prefix is accepted for pushes. Do not add a slug or use a different branch: the deterministic name is the lock.

Implementing

Work in the smallest diff that satisfies done_when.

Write the failing test first. Not as ceremony: the test is what converts "I believe this works" into a machine-checkable fact, and it is the artifact the verifier uses to decide whether you actually fixed anything. If you cannot write a test that fails before your change and passes after, say so explicitly in the PR body and flag the item for a human read.

Rules while implementing:

  • Do not modify existing test files in an unattended run. In an interactive session, stop and obtain explicit human approval before doing so. The PR stays draft and requires a human read.
  • Do not add abstractions the item does not need. One caller means no interface.
  • Do not clean up unrelated code. Note it for the queue instead.
  • Do not add dependencies. If one is genuinely required, stop; that is a ready-to-spec decision.
  • Stay inside files_expected where possible. Every file beyond it is a signal that the triage estimate was wrong, and if the count exceeds the charter's limit, stop.

Gates

Run the gate level the queue item specifies:

./.claude/scripts/gates.sh full

Iterate until the final line reads status=GREEN. status=MISCONFIGURED blocks the run; do not edit the gate configuration yourself to make it pass.

You must quote the FACTORY_GATES: line verbatim in your PR body. You may not describe the result in your own words instead, and you may not report success if that line says status=RED. If gates go red twice in a row on the same item, stop and hand it back per the charter's STOP_IF.

Report optional skipped gates in the PR body. A required skip produces MISCONFIGURED, so it cannot be mistaken for green.

Commit the scoped implementation and test after gates are green, then confirm both the index and working tree are clean. The verifier's reversible negative-test proof refuses a dirty checkout so it cannot hide or overwrite unrelated work.

Independent verification

When gates are green, delegate verification to the factory-verifier subagent using the Agent tool. Give it the queue item, branch name, and verified base SHA, not your account of what you did. The verifier reads the diff cold and reaches its own verdict.

You may not skip this step because you are confident. Confidence is what it is checking.

If the verifier returns verdict: rejected, fix what it names and re-run gates and commit the corrected diff before verification. After two rejections on the same item, stop and hand it to a human. Do not argue with the verifier in a third pass; two failed attempts means the item was misclassified.

The verifier uses ./.factory/scripts/prove-test.sh from a clean committed branch for the negative test. Do not substitute git stash.

Pull request

Open a PR only after gates are green and the verifier returns verdict: accepted.

PR body template. Fill every field. Empty fields are how unreviewed work gets merged.

## What
<one sentence>

## Queue item
FQ-<n> - <link to issue>
done_when: <copied verbatim from the queue>

## Why this is safe
<the thing a reviewer would otherwise have to work out for themselves>

## Gates
<paste the FACTORY_GATES line verbatim>
Skipped gates: <list, or "none">

## Verification
Verifier verdict: accepted
<the verifier's one-line reasoning>

## Human read required
<yes + reason, or no>

## Not done
<anything in scope you deliberately left out, or "nothing">

Mark the PR as draft if any of these hold:

  • the change touches a load-bearing path
  • an existing test file was modified
  • a gate was skipped
  • the verifier accepted with reservations

Then replace the source issue's factory:in-progress label with factory:awaiting-review, link the PR on the issue, and write one unique implement run record under docs/factory/runs/.

If the run stops after claiming the issue, move it to the correct live state before ending:

  • ambiguity or missing human decision -> factory:needs-info
  • load-bearing or scope decision -> factory:ready-to-spec
  • transient infrastructure failure with no code PR -> factory:ready-to-implement

Never leave an issue factory:in-progress without a run record explaining who owns it.

What you never do

  • Merge. Ever. On any tier. The merge decision is the human's, and it is the one place accountability actually lives.
  • Modify docs/factory/CHARTER.md.
  • Modify anything under .claude/.
  • Modify .factory/gates.conf, AGENTS.md, .agents/, or .codex/.
  • Pick up a second item.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Claim and implement one ready GitHub issue, run fail-closed gates, obtain independent verification, and open a draft pull request.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

addyosmani/factory2632026년 8월 22일 업데이트

Scheduled health sweep that closes the factory loop - reads CI failures, recent commits, dependency and security advisories, and live queue labels, then files issues and writes an immutable run record. Use for the nightly or weekly monitor routine.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

addyosmani/factory2632026년 8월 22일 업데이트

Inspect factory health, stale work, CI, security advisories, and recent run evidence without implementing fixes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

addyosmani/factory2632026년 8월 22일 업데이트

Turn an ambiguous factory issue into human-approved product, behavior, design, and implementation slices. Use interactively before implementation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

addyosmani/factory2632026년 8월 22일 업데이트

Turn a ready-to-spec queue item into an approved plan through explicit human gates. Use when an item needs scope decided before code exists, when planning a feature, or before starting a migration. Runs interactively - not for unattended routines.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

addyosmani/factory2632026년 8월 22일 업데이트

Show the factory control room from live GitHub labels, open PRs, recent run records, gate health, and charter limits.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

addyosmani/factory2632026년 8월 22일 업데이트

addyosmani의 스킬 모두 보기

이 스킬의 문제 신고