agentleFS
park-jongbeompark-jongbeom/patrick-work-harness/skills/gate-a/SKILL.md

gate-a

Skill1 starsChanged 2 months agoMITView on GitHub

Establishes the Gate A implementation plan. Use when starting a new session or on '작업 계획 작성', 'Gate A 시작', '계획해라', etc.

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 9 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before session start (before any code change):

    line 11
  2. Very specific:

    Check §2 priority · §3 active tracks · §4 next action (or the equivalent priority/active-track/next-action sections under plan_tier: "1")

    line 14
  3. Distinctive:

    Check §5 handoff notes: if 「즉시 처리 대상」·「의존 대기」·「조건부」 has items, review whether they can be reflected when forming this Gate A plan

    line 15
  4. Distinctive:

    If such an item is incorporated into this session's scope, delete it from §5 at Gate E

    line 16
  5. Distinctive:

    Cross-verification scope: only the session/track this Gate A directly touches — no exhaustive lookup (avoid overhead)

    line 22
  6. Very specific:

    If needed, gh search code or external-library documentation check

    line 125
  7. Distinctive:

    After reading all related files, self-check the 3 axes below in 1 line each and record the result in the required output item "시스템 적합성 점검":

    line 146
  8. Distinctive:

    Prohibited patterns: no violation of per-repo core prohibitions (during MVP)·common prohibitions (smallest diff·YAGNI·key hardcoding)

    line 150
  9. Very specific:

    After reading all related files, check the trigger table below.

    line 158
  10. Distinctive:

    Only then → the minimum that works

    line 182
  11. Very specific:

    If a planned new-code item can stop at rung 1~5, remove it from the plan (or replace it with reuse/stdlib/native/dependency).

    line 184
  12. Very specific:

    When proceeding, record 1 line at the end of the Gate A response: > ⚠️ R-12 가드 우회: 사용자 명시 승인 (변경 파일 N개 / Step M개)

    line 280
  13. Very specific:

    Update the plan document(s) (status: A (승인 대기), write the Gate A block) — run the file-editing tool

    line 285
  14. Distinctive:

    STOP — await user document review·approval

    line 314
  15. Very specific:

    If FEATURE_SPEC.md exists at the target repo root and this session adds or changes a feature:

    line 318
  16. Very specific:

    Update DOC_INDEX.md: FEATURE_SPEC.md row Status → Partial

    line 321
  17. Distinctive:

    After completing the entire Gate A procedure (plan output + plan document(s) update), output the block below at the very end of the …

    line 353

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Gate A Procedure (follow order strictly)

Session Initialization Checklist (mandatory before starting Gate A)

Before session start (before any code change):

0-A. Load the plan document (tier-aware — see SKILL_DETAIL.md §Plan-Doc Update Pattern) — plan_tier: "2" (or field absent) → <master_plan_file>; plan_tier: "1" → <single_plan_file>

  • Check §2 priority · §3 active tracks · §4 next action (or the equivalent priority/active-track/next-action sections under plan_tier: "1")
  • Check §5 handoff notes: if 「즉시 처리 대상」·「의존 대기」·「조건부」 has items, review whether they can be reflected when forming this Gate A plan
  • If such an item is incorporated into this session's scope, delete it from §5 at Gate E

0-B. Index–canonical cross-verification (mandatory, stale detection)

  • Since the index is not a per-session refresh target (§6 L273), re-verify the actual Gate progress of §3/§4 ⏸/⏳/🟡 items against the canonical (${SESSION_INDEX_FILE} table + latest archive)
  • On finding final_status: ✅ E (완료) in an archive or ✅E in ${SESSION_INDEX_FILE} → index stale confirmed
  • On finding stale: include an "index correction" Step in this Gate A plan (3rd precedent "stale correction"); if out of scope, register in §5 handoff
  • Cross-verification scope: only the session/track this Gate A directly touches — no exhaustive lookup (avoid overhead)
  • Comprehension-gate ledger expiry check (COMPREHEND-GATE-1): if this Gate A's target scope has evidence in the comprehension ledger (comprehension_ledger.md — see .claude/harness-answers.yml → learning_path (SSOT); absent field means plans/learning), check whether exp has elapsed·whether the scope files materially changed — on expiry, reflect 「재검증」 in this session's trigger verdict (auto-expiry detection is implemented as the Stop hook comprehension-ledger-stale-guard.py in COMPREHEND-GATE-1-b; it only runs when wired in your Claude Code settings)
  1. Confirm ${SESSION_INDEX_FILE} (root) exists
    • YES → load (YAML header only)
    • NO → create new (refer to template)
  2. Confirm ${CURRENT_SESSION_FILE} (root) exists
    • YES → load (only the current-session section's dashboard + active Gate block)
    • NO → create new (record this session's info)
    • ※ The same-named file under plans/current_work/ is a redirect-guidance file — do not edit
  3. Confirm the plan document for new work (tier-aware — see SKILL_DETAIL.md §Plan-Doc Update Pattern)
    • plan_tier: "2" (or field absent) → new feature → can it be added to <detail_plan_file> §7? Independent work → no creating a separate new detail plan. Partial work → integrate into the relevant detail plan. The index (<master_plan_file>) is not a per-session refresh target — update only on priority change·§5 handoff incorporation/migration. Exception: the L7 status: field and the §4 「현재」 line name the active session — update both at this Gate A's start (the master-plan-stale-guard.py Stop hook blocks the response otherwise). When the session reaches ✅E, flip both back to the completed state in the same Gate E turn — the hook does not guard this reverse transition, so a session left unflipped hardens into a false "awaiting approval" state (HARNESS-AUDIT62-FIX-1).
    • plan_tier: "1" → new feature → which existing ## Phase N does it belong to (opening a new Phase requires this Gate A's user approval)? <single_plan_file> itself carries both index and session-table roles — no separate index doc to distinguish "refresh target" from.

Gate A Procedure

Step 0-A. Gate A self model verification (mandatory, audit/doc-cleanup pattern)

PROC enforcement: This Step must be performed before entering Step 0 (Pre-Plan investigation). Proceeding past Step 0 while ignoring this Step's STOP verdict is a PROC violation.

Single-canonical declaration: This Step 0-A "Gate A scoring table" (0-A-a) + "tier verdict" (0-A-b) is the Gate A-specific canonical. Gate A uses this table for two things: verifying its own progress model and producing the recommended models for follow-up Gates B/C/D/E (see Step 1's "per-Gate recommended model·effort table").

Model detection·STOP format: cite audit/SKILL.md §Step 0-c/0-d directly (single canonical). (The audit skill body is not auto-loaded — if that procedure is needed, load it directly via the Skill tool.)

Step 0-A-a. Gate A 3-axis classification (R / V / D)

Philosophy, sources, estimation guide, R-13 guard, and Effort/Thinking rule → SKILL_DETAIL.md §Model Rubric Common (not auto-loaded — load via Read when needed).

R (Reasoning Depth) — Opus promotion gate

ItemDefinitionScore
R1New architecture/domain-model decision (e.g. precise decisions like D-LSE-INTEG-1~5)+3
R2New design of concurrency·transaction-boundary·consistency model+3
R3New algorithm·scoring·matching-weight introduction+3
R4Science·math·statistics reasoning needed+3
R5New security·auth policy (CORS·token·RBAC)+3

R total ≥ 6 (= 2+ items) → Opus 5.5 candidate. 0 items = standard implementation (most sessions land here).

V (Volume) — Sonnet ↔ Haiku branch signal

ItemMeasurement basisScore
V1Changed file count 13 +1 / 47 +2+1~2
V2Implementation Step count 12 +0 / 35 +1+0~1
V3Multiple repos 1 +0 / 2 +1 / 3+ +2+0~2

Volume has no effect on Opus promotion. Used only for the Sonnet ↔ Haiku branch. For many files, Anthropic's official recommended "Sonnet orchestrator + Haiku worker parallel" pattern is more cost-efficient than a single Opus.

D (Determinism / Format Strictness) — Sonnet forcing gate

ItemDefinitionScore
D1smallest diff enforced (existing-pattern preservation stated, CLAUDE.md R-4)+1
D2Fixed format·schema output (DTO·SQL·i18n keys, etc., deterministic output)+1
D3Many regression guards (e.g. obligation to keep 285+ tests PASS)+1

D total ≥ 2 → Sonnet forced (Opus promotion blocked). Sonnet's instruction-following advantage·overengineering avoidance fits deterministic work. Opus tends to be "warmer/longer/over-elaborate" and conflicts with smallest diff. D-axis direction caution (technique-5 review result, 2026-05-25): This D-axis uses determinism as an 'Opus blocking gate' (Sonnet's instruction-following advantage fits deterministic formats). The direction differing from the industry routing convention 'determinism = easy work → weak model (Haiku downgrade)' is intentional design — D is not a Haiku-downgrade signal but an Opus-promotion-blocking signal.

Step 0-A-b. Per-Gate model decision rule

GateDecision rule (in priority order)
A (plan)(1) R ≥ 6 → Opus 5.5 (2) R = 0 + V ≤ 1 + D = 0 → Haiku 4.5 (3) otherwise → Sonnet 5 (default)
B (implement)(1) default Sonnet 5 — Anthropic official coding positioning·instruction-following advantage·overengineering avoidance fit the smallest-diff guard (2) Opus promotion = only when a Gate A unresolved R decision is delegated to B (1-line reason mandatory) (3) Haiku downgrade = R=0 + V≤1 + D≥1 (repeated-pattern application·CRUD mass production — SWE-bench Haiku 91%·RouteLLM basis)
C (verify)(1) API/DB/SEC coupling or self-debug branch → Sonnet 5 (2) Simple regression re-confirm (already PASS) → Haiku 4.5
D (verify)(1) default Sonnet 5 (overengineering-avoidance advantage) (2) R ≥ 6 (architecture-redesign class) → Opus 5.5
E (cleanup)always Haiku 4.5

Per-Gate independent application: Even if Gate A is Opus, Gate B is default Sonnet (Anthropic official pattern). Each Gate is scored independently — no inheritance. (Why the old inheritance rule was dropped → SKILL_DETAIL.md §Why the Old Model-Routing Rules Were Abolished.)

Fable 5.1 (exception escalation only): not a regular tier in the table above — Fable 5.1 is Anthropic's most capable widely-released model (Mythos-class) but is absent from the official model-selection matrix and priced at 2.5× Opus 5.5 ($10/$50 vs $4/$20, verified 2026-09-24). Consider it only for large-scale migration·multi-day full-autonomy sessions, and only with the user's explicit approval stated in a sentence (e.g. 「Fable 5.1로 진행 승인」). It does not participate in the R≥6 Opus-promotion comparison above. Basis·pricing → SKILL_DETAIL.md §Fable 5.1.

Meaning of self-verification: Gate A is "deciding the whole session's direction", so Opus promotion only when an R item (architecture decision·new algorithm, etc.) explicitly arises. Even with many changed files·repos, if R = 0, Sonnet suffices — for multi-file handling, Anthropic's official recommended "Sonnet orchestrator + Haiku worker parallel" pattern is more cost-efficient than a single Opus.

Step 0-A-b'. R-13 cost-justification guard + Step 0-A-b''. Effort·Thinking decision rule

R-13 guard (Opus output format·auto-downgrade conditions·STOP format) and Effort/Thinking rule (per-Gate table) → SKILL_DETAIL.md §3 and §4 (not auto-loaded — load via Read when needed).

Step 0-A-c. Current-model detection + Step 0-A-d. STOP verdict

Apply the same procedure as audit/SKILL.md Step 0-c / Step 0-d (single canonical). Format·bypass handling·detection-failure handling are all identical.

Summary:

  • Current tier ≥ recommended → proceed normally (to Step 0 Pre-Plan investigation). Output 1 line at the start of this response: 「✅ 모델 검증: 현재 {모델} ≥ 권장 {권장} (R/V/D 분해, {등급})」.
  • Current tier < recommended → STOP. Use the audit STOP format, stating the score breakdown.

Decomposition output obligation: Output the R/V/D 3-axis decomposition in the first line of this response (e.g. 현재 Sonnet ≥ 권장 Sonnet (R=0 / V=2: 변경파일 4 +1 + Step 3 +1 + 단일저장소 +0 / D=1: smallest diff +1 → Sonnet 디폴트)). Omitting the decomposition·showing only the total is a PROC violation. When producing Opus, the R-13 cost-justification 1 line is also mandatory (Step 0-A-b' format).

This 3-axis classification is the single canonical for producing the follow-up Gate B/C/D/E recommended models: Step 1's "per-Gate recommended model table" is produced by applying the Step 0-A-b per-Gate decision rule independently to each Gate (no natural-language prose, no Gate B auto-inheritance).


0. Pre-Plan investigation (ECC search-first)

Immediately before reading related files, perform the 1~2 items below and record the result links in the Gate A required output item "기존 구현 참조 경로". If there is no investigation result, state "없음".

  • Grep / Glob — search for similar features·same naming·already-existing helpers
  • If needed, gh search code or external-library documentation check

Purpose: avoid writing a duplicate implementation, and pass existing patterns to Gate B as reuse candidates.

💡 Multi-repo exploration subagent delegation (HARNESS-DELEGATE-1): When investigating 2+ repositories and raw output is expected to accumulate heavily in main ("intermediate output ≫ conclusion"), delegate the exploration to the Explore subagent and retrieve only the conclusion — college-crawler↔ga-api-platform schema comparison, front↔back API contract checks, etc. For single-file·small exploration, inline is better due to spawn overhead (no delegation when the verdict gate is unmet). Detail → CLAUDE_DETAIL.md §Subagent Delegation Guidelines.

What each Step-0 self-check looks at (consolidated 2026-09-24 — each check used to restate the others' scope, so the same comparison was written three times):

CheckLooks at
(before them) duplicate-avoidanceInternal reuse only
0-FitnessInternal consistency — plan vs system direction
0-OSSExternal complement — is there OSS for this
0-LadderMinimality — the least code that works
0-ClaimEpistemic status — measured (ⓐⓑ) vs inferred (ⓒ)

0-Fitness. System fitness check (HARNESS-PLAN-AUGMENT-1, 2026-06-09)

Pulls part of /audit (a post-check) forward to the Gate A point.

After reading all related files, self-check the 3 axes below in 1 line each and record the result in the required output item "시스템 적합성 점검":

  • Architecture consistency: does the change not conflict with the existing stack·layer·canonical pattern (when introducing a new pattern, cite 1 existing canonical)
  • Phase guardrail: is it not a Phase regression of CLAUDE.md §MVP 데모 로드맵 가드레일 (not bringing a lower Phase to Gate A before a higher one)
  • Prohibited patterns: no violation of per-repo core prohibitions (during MVP)·common prohibitions (smallest diff·YAGNI·key hardcoding)

Verdict: if all 3 axes are consistent, 「적합성 ✅ (아키텍처/Phase/금지 정합)」 1 line. If there is a violating·suspect axis, state that axis + response (scope adjustment or user query AskUserQuestion).

0-OSS. OSS catalog reference check (HARNESS-PLAN-AUGMENT-2, 2026-06-10)

Self-judge, then ask the user (user request 2026-06-09: "depending on task complexity, self-judge whether to complement the plan by referencing open source, then ask"). Reference-catalog canonical = (internal research note, if your project maintains one) §4 (OSS-SCAN-1 output).

After reading all related files, check the trigger table below. If any applies, propose a §4 candidate as a 1-line complement and ask whether to adopt via AskUserQuestion (not forced adoption — user decides):

Trigger (this plan's task character)OSS candidate (§4)Complement effect
External-library version change·DEP-BUMP·new-library introduction·framework migrationContext7 MCP (P0)Inject per-version latest docs → prevent stale-API inference
Front-end UI/flow change + E2E verification needed (e.g. a React repo)Playwright MCP (P1)Fill the E2E gap of unit-tests-only
Long Gate C verification·large test logs·multi-repo simultaneous verificationContext Engineering / 5 coordination patterns (P1/P2)tool-result-clearing·delegation for token saving

AskUserQuestion options: ① register as a separate OSS-ADOPT-* track / ② incorporate into this session's scope / ③ no adoption (reference only).

Verdict: if no trigger applies, 「OSS 참조 N/A (트리거 미해당)」 1 line (natural skip for simple doc·cleanup work). If applicable, record the proposed candidate + the user-decision result in the required output item "OSS 카탈로그 참조 점검".

0-Ladder. Minimalism ladder check (R-4-6, 2026-06-23 · ponytail OSS)

Source: DietrichGebert/ponytail (OSS, MIT) decision ladder — "the best code is the code you never wrote". Canonical rule = CLAUDE.md §Prohibited minimalism ladder.

For each new file·method·abstraction the plan introduces, apply the 7-rung ladder top-down and stop at the first rung that satisfies the task, then record that rung number:

  1. Does this need to exist? → skip it if not (YAGNI)
  2. Already in this codebase? → reuse (no rewrite)
  3. Stdlib does it? → use stdlib
  4. Native platform feature? → use native
  5. Installed dependency? → use existing package
  6. One line? → one line
  7. Only then → the minimum that works

If a planned new-code item can stop at rung 1~5, remove it from the plan (or replace it with reuse/stdlib/native/dependency). The ladder runs after understanding the problem (read the code the change touches·trace the real flow), not instead of it.

Safety guardrail (non-negotiable): trust-boundary validation·data-loss handling·security·accessibility are never trimmed at any rung, regardless of which rung applies.

Verdict: record the per-new-item rung number in the required output item "미니멀리즘 래더 점검". If 0 new items (reuse/edit-only), 「N/A (신규 추상화 없음)」 1 line.

0-Claim. Claim↔evidence cross-check (HARNESS-CLAIM-EVIDENCE-1, 2026-08-07)

When: immediately before Step 1 outputs the plan text (after the sentences exist). Why · where it pays off · known limit → SKILL_DETAIL.md §Claim↔Evidence Cross-Check Background (not auto-loaded — Read it only if the rationale is in question).

For each factual claim in the plan — file/line counts, existing behavior, blast radius, "N occurrences of X", "already handled by Y", cited insertion points — tag it:

TagCriterion (the decisive test)Handling
ⓐ 실측You ran a command in this session and read its output (grep count·wc·test result·file listing)Keep — cite the command or its result
ⓑ 파일 인용You can state 파일:줄 for it, and you actually read that line in this sessionKeep — cite 파일:줄 inline
ⓒ 추론Everything else — structural plausibility, memory of a prior session, "it must be like this", pattern analogyPromote to ⓐ/ⓑ before output

The decisive test is a single question: 「can you cite 파일:줄 for this?」 If you cannot, it is ⓒ — regardless of how confident it feels. This wording is deliberate: an unfalsifiable instruction ("tag inferences") lets the model label its own inference as ⓑ, which is exactly the failure mode this check exists to catch.

Promotion: for each ⓒ, run the command or open the file now, then re-tag. If the claim cannot be promoted (external condition·future event·another team's state), do not delete it — state it in the risk table with the reason it is unverifiable.

Verdict: record in the required output item "주장-근거 대조 점검". If ⓒ = 0 after promotion, 「주장-근거 대조 ✅ (ⓒ 0건)」 1 line (same natural-skip pattern as 0-OSS 「N/A」 — cost is incurred only when inference is actually present). If any claim stays unverifiable, list it as {주장} — 승격 불가: {사유} and confirm it also appears in the risk table.

  1. After reading all related files, output the Gate A content as text
    • Changed-file list (number·path·change type)
    • Per-file detailed change content: current code structure → post-change structure, key decisions
    • 기존 구현 참조 경로 (Pre-Plan investigation result; "없음" if none)
    • External-dependency mapping (design tokens·API·library versions, etc.)
    • Execution order (based on dependencies)
    • Risks and responses (concrete cause + response method)
    • 시스템 적합성 점검 (architecture·Phase·prohibited-pattern 3 axes, 1 line; the "0-Fitness" result above — HARNESS-PLAN-AUGMENT-1)
    • 이해도 게이트 발동 판정 (COMPREHEND-GATE-1) — produce 1 line by risk heuristic (AI auto + user override): 「발동(폭발반경 大→사용자 설명 / 일반 위험→AI 자기설명)」 or 「미발동(사소 CRUD·문서·정형 변경)」. On firing, the comprehension gate is performed as Gate B (/gate-b) after Gate A approval (the comprehension gate is integrated into Gate B — no separate standalone skill). Criteria → gate-b/SKILL.md §Step 0.
    • OSS 카탈로그 참조 점검 (on trigger, propose §4 candidate + user decision / if not applicable, 「N/A」 1 line — HARNESS-PLAN-AUGMENT-2)
    • 미니멀리즘 래더 점검 (R-4-6) — per new file·method·abstraction, the rung number at which it stops (e.g. MatchScoreCalculator 신규 — 래더 7칸(rung 2·3·4·5 불가 확인)); the "0-Ladder" result above. If 0 new items, 「N/A (신규 추상화 없음)」 1 line
    • 주장-근거 대조 점검 (HARNESS-CLAIM-EVIDENCE-1) — the "0-Claim" result above. If ⓒ = 0 after promotion, 「주장-근거 대조 ✅ (ⓒ 0건)」 1 line; otherwise list each unpromotable claim as {주장} — 승격 불가: {사유} (each must also appear in the risk table)
    • Gate D (verify) expectation and basis (needed/not needed + 1-line reason)
    • Per-Gate recommended model table — produced by applying the Step 0-A-b per-Gate decision rule independently to each Gate (Gate B auto-inheritance abolished):

      Mapping rule (single canonical, PROC-MODEL-RUBRIC-1 revision) — re-score the Step 0-A-a R/V/D classification per each Gate's task character:

      GateMapping procedureOutput model
      B (implement)default Sonnet 5. Opus promotion = only when a Gate A unresolved R decision is delegated to B (1-line reason mandatory). Haiku downgrade = R=0 + V≤1 + D≥1 (repeated-pattern application·CRUD mass production — SWE-bench Haiku 91%·RouteLLM basis). No auto-inheritance even if Gate A is Opusdecision-rule result
      C (verify)API/DB/SEC coupling or self-debug branch → Sonnet 5. Simple regression re-confirm (already PASS) → Haiku 4.5decision-rule result
      D (verify)produced only when "Gate D 예상 = 필요". default Sonnet 5 (overengineering-avoidance advantage). Architecture-redesign class R≥6 → Opus 5.5decision-rule result or —
      E (cleanup)always Haiku 4.5Haiku 4.5

      Fable 5.1 exception row: not part of the regular B/C/D/E mapping — add a manual row only when the user explicitly approves a large-scale migration·multi-day full-autonomy session escalation (see Step 0-A-b's Fable 5.1 note above).

      Output format:

      Gate권장 모델Effort / Thinking분해 (R / V / D)비용 정당화 (Opus 한정, R-13)
      B{Opus 5.5 / Sonnet 5 / Haiku 4.5}{high·medium·low, Haiku 는 —} / {auto·off}R={항목 1줄 또는 0} / V={점수 분해} / D={항목 1줄 또는 0}(Opus면) "R{N}건 — {항목 나열}" / (그 외) —
      C{…}{medium·low} / offR={C 한정 — API/DB/SEC 결합 여부} / V=— / D={회귀 가드 多 여부}…
      D{모델 또는 —}{medium} / offR={리팩터 깊이 — R≥6 여부} / V=— / D={overengineering 회피 명시 여부}…
      EHaiku 4.5— (effort 미지원) / off——

      모델 라인업 기준일: 2026-09-24 (출처: 공식 Models overview 조회). 당시 현행은 Fable 5.1 · Opus 5.5 · Sonnet 5 · Haiku 4.5 이고, 기본 effort 는 Fable 5.1 high · Opus 5.5 medium · Sonnet 5 high · Haiku 4.5 미지원이다. 🔴 이 표는 낡는다. 모델명을 사전지식으로 단정하지 말고, 기준일이 오래됐으면 https://platform.claude.com/docs/en/about-claude/models/overview 를 조회해서 확인한 뒤 고친다 — 이전 판은 Opus 4.8·Fable 5(둘 다 레거시)에 두 세대 머물러 있었다.

      No natural-language prose: instead of natural-language reasons like 「표준 구현 — Opus 불필요」, cite the Step 0-A-a R/V/D decomposition directly. That way, follow-up Gates can verify consistency using the same metadata during model verification. R-13 guard: an Opus-produced row must have the R items in 1 line in the cost-justification column. If unmet, auto-downgrade to Sonnet (Step 0-A-b' format).

    • Scope-check forced STOP guard (R-12, introduced 2026-05-04 HARNESS-OPTIMIZE-1-b-1):

      This guard is a pre-emptive STOP — checked right after computing the changed-file·Step count, before outputting the plan text and updating the plan document(s). On violation, refuse both the Gate A text output and the document update, and output the STOP format below.

      Guard items:

      ## Gate A 범위 점검
      - [ ] 변경 파일 ≤ 7개
      - [ ] 구현 Step ≤ 5개
      - [ ] 변경의 논리적 이유가 1가지
      - [ ] 서브세션 없이도 각 Step 후 컴파일 가능

      STOP format (when changed files > 7 or Step > 5, reusing the audit/SKILL.md Step 0-d format):

      ⛔ Gate A 범위 가드 STOP (R-12)
      - 변경 파일 N개 (가드: ≤ 7) / 구현 Step M개 (가드: ≤ 5)
      - 사유: [전체 범위가 단일 세션 한계 초과]
      - 분할 후보:
        - {-a-1}: [그룹 A 파일·Step 요약] (≤ 7 / ≤ 5)
        - {-a-2}: [그룹 B 파일·Step 요약] (≤ 7 / ≤ 5)
      - 사용자 결정 필요: ① -a-1만 본 세션 진행 / ② -a-2만 본 세션 진행 / ③ 「가드 우회 진행」 명시

      Bypass handling (restricted):

      • Proceed only when the user explicitly states in a sentence 「가드 우회 진행」 in their response
      • When proceeding, record 1 line at the end of the Gate A response: > ⚠️ R-12 가드 우회: 사용자 명시 승인 (변경 파일 N개 / Step M개)
      • Ambiguous responses like 「진행」「ok」「계속」 are not recognized as a bypass (same as the Gate A approval interpretation rule)

      Self-contradiction avoidance: This guard applies from the next Gate A call after R-12 introduction. The R-12 introduction itself (HARNESS-OPTIMIZE-1-b-1) proceeds under the pre-change SKILL, but pre-satisfies the post-change guard via the user decision to split 1-b whole (8+ files) → 1-b-1/1-b-2.

  2. Update the plan document(s) (status: A (승인 대기), write the Gate A block) — run the file-editing tool

    • Plan document(s) — tier-aware, see SKILL_DETAIL.md §Plan-Doc Update Pattern
    • ${SESSION_INDEX_FILE} YAML
    • ${CURRENT_SESSION_FILE} dashboard + the full Gate A block content (no writing a summary table only)
      • Intent-field obligation (DASHBOARD-INTENT-1): in the header, write 2 lines in plain Korean — > **세션 주제**: <평이 한 줄> (banner title)·> **작업 의도**: <무엇을 왜, 1~2문장> (banner body). No jargon·filename dumps — the banner 「🎯 지금 하는 작업」 displays these 2 lines as-is (falls back to work_topic·priority_note if absent).

    session-dashboard.html update: session-dashboard-sync.py always runs as the first entry of the Stop hook array, auto-regenerating the HTML (HARNESS-STALE-GUARD-3). No skill Bash Step needed.

    Human-review panel (DASHBOARD-PLAN-VIZ-1, 2026-09-25): the dashboard renders your ## Gate A 계획 block as a review panel — counts first (changed files · Steps · risks · unpromoted ⓒ claims), then the R-12 scope guard, files, execution order, and the risk table. The .md stays canonical; the panel is a read-only summary and carries no approval button (Anthropic telemetry: users approve ~93% of permission prompts, and "the more approvals a user sees, the less attention they pay to each" — adding buttons would buy rubber-stamping, not review). Approval is still the sentence in chat, per §Gate A Approval Interpretation.

    Write these headings so the panel can read them (the parser matches loosely, and silently omits what it cannot find — a missing risk section reads to a human as "no risks"):

    SectionWrite it asShape that parses best
    Changed files### 변경 파일 (N개)numbered list — 1. \path/to/file.py` (수정)`
    Execution order### 실행 순서 or ### 구현 Stepnumbered list, one Step per line
    Risks### 리스크 및 대응table | 리스크 | 원인 | 대응 |
    Scope guard### Gate A 범위 점검- [x] / - [ ] checkboxes (an unchecked box shows red)
    Verification### Gate D 예상1 line

    Keep the ⓐ/ⓑ/ⓒ tags from 0-Claim in the plan text — the panel counts ⓒ and flags it amber, which is the one number a reviewer should check first.

  3. STOP — await user document review·approval

Layer 2 document update (if --docs=full was used at /init)

If FEATURE_SPEC.md exists at the target repo root and this session adds or changes a feature:

  • Fill ## Overview (what the feature is, in 2–3 lines) and ## Acceptance Criteria (the observable conditions that decide "done") from the plan you just produced
  • Update DOC_INDEX.md: FEATURE_SPEC.md row Status → Partial
  • Pure refactor·infra·doc sessions → leave it untouched and say so in one line. A skeleton that stays a skeleton is the correct outcome when there is no feature; do not invent one to fill it.

Added 2026-09-24 (HARNESS-DOC-GATE-SCHEME-2). /init assigned FEATURE_SPEC.md to Gate A from the start, but no gate skill actually wrote it — the same gap API_SPEC.md had. Acceptance criteria are decided while planning, so the work belongs here.

Gate A Approval Interpretation

  • 「진행」「다음 작업」 alone are not interpreted as Gate A approval
  • Explicit phrases recognized as approval: 「Gate A 승인」「계획대로 구현」「위 Gate A대로 구현해」 etc.

Dashboard Required Fields (PROC-MODEL-RUBRIC-2 revision)

At every Gate transition, the items below must be updated:

  • Current Gate, Gate progress (✅⏸☐), next action
  • R/V/D decomposition — Step 0-A-a 3-axis scoring result (e.g. R=0 / V=2: 변경파일 4 +1 + Step 3 +1 + 단일저장소 +0 / D=1: smallest diff +1)
  • Per-Gate recommended model (B/C/D/E each, the result of applying the Step 0-A-b + 0-A-b'' decision rule — e.g. B: Sonnet 5 (medium/off) / C: Haiku 4.5 (low/off) / D: 미예상 / E: Haiku 4.5 (low/off))
    • Format: {모델} ({effort}/{thinking}) — writing the 3 items together is mandatory (model only is a PROC violation)

Revision reason (PROC-MODEL-RUBRIC-2) → SKILL_DETAIL.md §Why the Old Model-Routing Rules Were Abolished.

Model Selection Criteria (reference summary)

Model Selection Criteria (reference summary) → SKILL_DETAIL.md §5 (not auto-loaded — load via Read when needed). Exact scoring: Step 0-A-a R/V/D classification + Step 0-A-b decision rule.


This Gate response's mandatory final output

After completing the entire Gate A procedure (plan output + plan document(s) update), output the block below at the very end of the response. Omitting it or replacing it with other content is a PROC violation.

---
**다음 단계**: Gate A 검토 후 「Gate A 승인」또는 「계획대로 구현」으로 승인하면 `/gate-b` (Gate B 구현)가 시작됩니다.

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.