agentleFS
5hseok5hseok/hanipman-gate/skills/design-workflow/SKILL.md

design-workflow

Skill0 starsChanged 2 months agoMITView on GitHub

설계를 결정 원장(ledger decide)에 확정하고 리뷰 크기 슬라이스로 구현하는 절차. 체크포인트 커밋 트리거, 리스크 티어, 리뷰 산출물 규칙 포함. 설계→구현 작업을 시작하거나 커밋 분할 기준이 필요할 때 참조.

  • Commits and pushes

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Never read the design document in full: Use ledger current --file <task> [--topic <slug>].

    line 44
  2. Distinctive:

    Every slice carries target file globs, acceptance criteria, and — in a batch run — the

    line 79
  3. Distinctive:

    Slices are implemented sequentially, one at a time: Never two at once: they share a working tree, and a conflict costs more than the …

    line 83
  4. Distinctive:

    Stop and tell the user — do not keep implementing through the trigger.

    line 118
  5. Distinctive:

    Ask for approval. Never git add / git commit before the user answers.

    line 122
  6. Very specific:

    Only the slice's own changed files are staged (/commit-msg --checkpoint), never git add -A, never .claude/review/.

    line 135
  7. Distinctive:

    Commit message and phase split follow the project's own git rules, not this file's.

    line 149
  8. Very specific:

    No AI attribution trailers in commit messages (Co-Authored-By, Claude-Session) — user policy.

    line 150
  9. Distinctive:

    Simple work bypasses the pipeline: If a change touches ≤2 files, or maps to a single decision with no cross-layer impact, implement it in …

    line 156
  10. Distinctive:

    The raw diff is the truth; artifacts are an aid: If an artifact fails to generate, review proceeds on the raw diff — report the failure, …

    line 175
  11. Distinctive:

    Do not put change rationale or design justification in code comments.

    line 183

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Design Workflow

Applies in every project, whenever a task is design-then-implement above the complexity gate below. How a design becomes reviewed code: decisions live in a CLI-enforced ledger, implementation ships in review-sized slices, and each slice passes a machine gate before a human reads the diff.

The human reviews after the fact, not in the loop. A confirmed design is implemented end to end without stopping for the user (/impl-pipeline, batch mode); the user approves the plan once, and then reviews the finished slices one at a time (/review-desk). Slice boundaries survive the wait because each slice lands as its own checkpoint commit. Stopping between slices (--stepwise) is the exception, for designs that are not actually settled.

The workflow supplies the procedure. The project supplies the facts — its layers, conventions, base branch, and risk areas are read from the project at runtime, never assumed from another repo.


Decision Ledger

Design decisions live in the ledger task document, in four sections: ## 현재 설계 (confirmed decisions only) · ## 작업 큐 (implementation slices) · ## 결정 로그 (append-only) · ## 진행 로그.

RuleDetail
No direct body appendNever append a decision by editing the document body. Confirming or changing a decision goes through ledger decide.
Decision log is append-onlyNever edit an existing decision's body in ## 결정 로그. Only the status may flip (ACTIVE → SUPERSEDED by D-n).
Supersede, don't overwriteA changed decision is recorded with decide --supersedes D-n, which atomically replaces the topic block.
Current section = confirmed onlyNo TBD, no "고민 중", no unchosen options. Unconfirmed discussion belongs in ## 진행 로그 or stays in the session. Promote to the current section only at the moment it is decided.

Leftover superseded prose in the current section means someone bypassed the CLI. Run /design-reconcile, which moves — never deletes — such content back to the log.


Reading Protocol

  • Never read the design document in full. Use ledger current --file <task> [--topic <slug>].
  • When delegating, inject the current output into the prompt — never hand a subagent a document path.

This is what keeps token cost independent of document length. A subagent that reads the whole document re-reads every superseded decision.

/design-reconcile is the one exception: inconsistency detection requires comparing the current section against the decision log, so it reads the raw document for analysis only.


Project Facts Are Resolved, Never Assumed

These four are project-specific. Read them from the project at the start of a run; never carry them over from another repo:

FactWhere it comes from
Layer model (the chain a change travels)CLAUDE.md, .claude/rules/, .claude/conventions/ — else inferred from the codebase and confirmed with the user
New-feature checklistsame — else derived from an existing comparable feature
Base branchthe project's git rules — else the branch the current one is nearest to. Never default to main silently
Risk areas (tier A).claude/review-policy.md if present — else the principles below

A project with no convention docs is not an error. Infer, confirm, and mark the convention check SKIPPED rather than failing the gate on it.


Slices

  • A slice is a review boundary, and therefore a commit candidate. When a slice lands, propose a checkpoint commit (see below). Outside an authorized batch run, the agent never commits on its own — it proposes; the user decides.
  • Decompose by decision (D-n) first; split a large decision along the project's own layer boundary (resolved above), in dependency order. Order independent slices first.
  • Every slice carries target file globs, acceptance criteria, and — in a batch run — the slices it depends on. The gate uses the globs to detect out-of-design changes; the dependency edges are what let a failed slice be parked without poisoning the ones after it.
  • Decomposition is confirmed with the user before implementation starts.
  • Slices are implemented sequentially, one at a time. Never two at once: they share a working tree, and a conflict costs more than the wall-clock it saves. Removing the user's wait is what shortens a run — not overlapping the work.

Who reviews a slice, and when

ReviewerWhenBlocks the run?
Machine gate (/review-gate)every slice, before anything elseyes — RED is fixed, twice, then the slice is parked
Independent reviewer agentevery slice in batch mode; never the agent that wrote itonly for BLOCKING findings (wrong behavior, diverges from the decision, breaks a layer contract)
The user (/review-desk)after the whole runno — the run is already done; their requests become a fix queue

Taste, naming debates, and "is this the best shape" are carried, not fixed, during a run. An unattended agent rewriting code on taste is how a batch run turns into an unreviewable diff.


Checkpoint Commits

Applies to all work, not just the pipeline. An uncommitted diff that grows past review size is the single biggest cause of unreviewable change. Do not let it accumulate silently and dump it on the user at the end. Surface it while it is still small, so that later the user can review one purpose at a time and skip what they already accepted.

Propose a checkpoint when ANY of these fires

TriggerWhy
A slice passes the gate GREENIt is a complete, self-contained, verified unit. The natural boundary.
Uncommitted diff reaches ~10 files or ~400 changed linesPast this, a human stops reading line by line and starts skimming.
Purpose is about to shift — the next change has a different intent than what is already uncommitted (refactor → feature, fix → chore, a new D-n)Mixing purposes in one diff is what makes review hard. Size is secondary; a 3-file diff carrying two unrelated intents is already worse than a 20-file diff carrying one.
A migration, a lock/transaction change, or anything else tier A is about to be touchedThe user should review the pre-state before it becomes archaeology.

How to propose

Stop and tell the user — do not keep implementing through the trigger.

  1. State why it fired (which trigger, with the actual numbers).
  2. Show the purpose-based phase split you would stage, not just a file count.
  3. Ask for approval. Never git add / git commit before the user answers.

The proposal is a suggestion, not a gate. If the user says keep going, keep going — but do not re-ask on every subsequent file. Re-ask at the next distinct trigger.

The one exception — an authorized batch run

/impl-pipeline batch mode commits a checkpoint per slice, without asking each time. That is legal only under all of these:

  • The user approved it explicitly, in that run's Run Contract, before any code was written.
  • run.json.commit_authorized: true records the approval, and the run is scoped to one branch.
  • The branch is not the base branch, and the working tree was clean when the run started.
  • Only the slice's own changed files are staged (/commit-msg --checkpoint), never git add -A, never .claude/review/**. Never git push.

The approval expires with the run. /review-desk — which happens afterwards — has no such authority: every commit there is approved individually, as always.

The reason for the exception is mechanical, not convenience: without a commit per slice, an unattended run collapses into one working-tree blob and the user's later slice-by-slice review becomes impossible. The commit is the review boundary.

Still true

  • Outside that authorization, the agent never commits or stages autonomously. Approval is required every time, in every project.
  • Commit message and phase split follow the project's own git rules, not this file's.
  • No AI attribution trailers in commit messages (Co-Authored-By, Claude-Session) — user policy.

Complexity Gate

Simple work bypasses the pipeline. If a change touches ≤2 files, or maps to a single decision with no cross-layer impact, implement it in one pass and let the user review the diff normally.

Pipeline overhead must not exceed its benefit.


Risk Tiers (when the project has no review-policy.md)

Tier A (정독 필수) = ① money / permissions / personal data · ② schema migration · ③ transaction, lock, or concurrency boundary changed · ④ high fan-in symbol (many callers, most untouched). Everything else is tier B; machine-certified boilerplate is tier C and gets folded away.


Review Artifacts

  • Gate results and walkthroughs go to .claude/review/{branch-slug}/. If that path is not gitignored in this repo, warn the user — never edit their .gitignore.
  • The raw diff is the truth; artifacts are an aid. If an artifact fails to generate, review proceeds on the raw diff — report the failure, don't block. Degraded ≠ failed.
  • Artifacts carry a SHA stamp. If the stamp differs from HEAD, the artifact is stale — regenerate it.

No Explanatory Comments

Do not put change rationale or design justification in code comments. The review guide carries the "why".

Implementation agents report issues, design gaps, and unstated assumptions in their report text, never as a code comment.

(Inline comments explaining non-obvious business logic remain required where the project's own convention says so. The ban is on comments that exist to explain a change to a reviewer.)


Skills

SkillRole
/impl-pipelineOrchestrates the run: project context → design → slices → Run Contract (the one user stop) → per slice: implement → gate → agent review → fix → walkthrough → checkpoint commit. --stepwise restores the stop-after-every-slice behavior.
/review-gateMachine gate per slice. GREEN/RED plus a non-blocking human-judgment list.
/change-walkthroughPer-slice review guide, ordered by request flow, with real call chains.
/explain-diff-htmlInteractive per-slice explainer. In a batch run, generated during the run for tier A slices — the user reads them cold, later.
/review-deskThe user's post-run review: slice by slice, requests collected into a fix queue, applied in one pass, re-gated.
/commit-msgCommit message from the actual diff. --checkpoint S-n performs the slice commit inside an authorized batch run.
/design-reconcileLedger hygiene. Moves stale content out of the current section — never deletes.

The flow, end to end

설계 확정 (decide)
  → /impl-pipeline        ← 사용자 승인 1회 (Run Contract)
      S-1 … S-n 무중단: 구현 → 게이트 → 에이전트 리뷰 → 수정 → 워크스루 → 체크포인트 커밋
  → 러닝 리포트 + 알림      ← 사용자는 이 시점에 자유롭게 복귀
  → /review-desk          ← 슬라이스별 사후 검수, 수정 요청은 큐에 축적
  → 큐 일괄 반영 + 재게이트 → 커밋 정리 (매번 승인) → 구현완료

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.