From 036f1180000661143b289206e70e8835094593b6 Mon Sep 17 00:00:00 2001 From: Martin Gratzer Date: Mon, 27 Jul 2026 11:02:44 +0200 Subject: [PATCH 01/10] refactor(skills): move cross-skill references into _shared MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit phase-execution.md, pattern-audit.md, and forge-scout.md were consumed by forge-ship (and forge-scout by forge-implement) while living in forge-implement's private directories — violating the self-containment rule. Also drops the Refs # trailer convention stated nowhere else and removes stale step/dimension references from pattern-audit. Claude-Session: https://claude.ai/code/session_0187yZ3Nnp45s9BVYxnpJ7Ca --- CONTEXT.md | 2 +- .../references => _shared}/pattern-audit.md | 4 ++-- .../references => _shared}/phase-execution.md | 4 ++-- skills/{forge-implement => _shared}/roles/forge-scout.md | 4 ++-- skills/forge-implement/SKILL.md | 4 ++-- skills/forge-ship/SKILL.md | 9 ++++++--- 6 files changed, 15 insertions(+), 12 deletions(-) rename skills/{forge-implement/references => _shared}/pattern-audit.md (89%) rename skills/{forge-implement/references => _shared}/phase-execution.md (94%) rename skills/{forge-implement => _shared}/roles/forge-scout.md (87%) diff --git a/CONTEXT.md b/CONTEXT.md index bf0d595..f1989c6 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -28,7 +28,7 @@ Shared vocabulary used across multiple skills. Terms used in only one skill stay **Smart zone / Dumb zone** — workable region (~first 100k tokens) vs degraded region of LLM context. See [architecture — Operating Constraints](docs/architecture.md#operating-constraints). -**Pattern audit** — when a pattern changes, grep ALL files using the old pattern and update. See [pattern-audit](skills/forge-implement/references/pattern-audit.md). +**Pattern audit** — when a pattern changes, grep ALL files using the old pattern and update. See [pattern-audit](skills/_shared/pattern-audit.md). **Quality gates** — lint, format, type check, tests. Run before commit, PR push, and reflection. diff --git a/skills/forge-implement/references/pattern-audit.md b/skills/_shared/pattern-audit.md similarity index 89% rename from skills/forge-implement/references/pattern-audit.md rename to skills/_shared/pattern-audit.md index 5f15464..51b526f 100644 --- a/skills/forge-implement/references/pattern-audit.md +++ b/skills/_shared/pattern-audit.md @@ -13,8 +13,8 @@ When a pattern changes in a diff, find every other place using the old pattern a ## When to audit -1. **During implementation** (Step 5) — the moment you change a pattern -2. **During reflection** (Correctness & Patterns dimension) — catch what the implementer missed +1. **During implementation** — the moment you change a pattern +2. **During reflection** — the review pass checks pattern consistency to catch what the implementer missed ## Common failure modes diff --git a/skills/forge-implement/references/phase-execution.md b/skills/_shared/phase-execution.md similarity index 94% rename from skills/forge-implement/references/phase-execution.md rename to skills/_shared/phase-execution.md index c16a878..a3d3dc5 100644 --- a/skills/forge-implement/references/phase-execution.md +++ b/skills/_shared/phase-execution.md @@ -30,7 +30,7 @@ Code and tests together, end to end across all affected layers. **Verify unfamiliar APIs before using them** — grep the codebase, check type definitions or docs, confirm the API exists at the project's pinned version. Skip for: stdlib, APIs already used in this codebase, type-checked interfaces. -**Follow existing patterns and import style.** No barrel files unless the project uses them (see [barrel-imports](../../_shared/barrel-imports.md)). +**Follow existing patterns and import style.** No barrel files unless the project uses them (see [barrel-imports](barrel-imports.md)). ### 2. Test @@ -49,6 +49,6 @@ Verify before proceeding to the next phase: - [ ] Tests exist for new behavior in this phase - [ ] All tests pass (not just new ones) - [ ] No lint/type errors introduced -- [ ] Commit the phase — one logical change per commit, conventional format, `Refs #` when applicable +- [ ] Commit the phase — one logical change per commit, conventional format Use TodoWrite to track progress through phases. diff --git a/skills/forge-implement/roles/forge-scout.md b/skills/_shared/roles/forge-scout.md similarity index 87% rename from skills/forge-implement/roles/forge-scout.md rename to skills/_shared/roles/forge-scout.md index d224aa4..140b104 100644 --- a/skills/forge-implement/roles/forge-scout.md +++ b/skills/_shared/roles/forge-scout.md @@ -5,14 +5,14 @@ description: Researches a codebase to answer targeted questions without knowledg # Scout -You are researching a codebase to answer specific questions. **You have no knowledge of what is being built or why.** You receive only questions — never the ticket, issue, or feature description. +You are researching a codebase to answer specific questions. **You have no knowledge of what is being built or why.** You receive only questions — never the Issue, plan, or feature description. ## Behavior For each question: 1. Search the codebase thoroughly — grep, glob, read files 2. Trace relevant code paths end to end -3. Report findings with file paths and function names +3. Report answers with file paths and function names ## Rules diff --git a/skills/forge-implement/SKILL.md b/skills/forge-implement/SKILL.md index 50682a7..fe5a5c4 100644 --- a/skills/forge-implement/SKILL.md +++ b/skills/forge-implement/SKILL.md @@ -32,9 +32,9 @@ Identify **durable architectural decisions** — data model, API contracts, and #### Research (delegate) -Write 3–7 factual questions about existing systems, patterns, and integration points. Delegate to a [forge-scout](roles/forge-scout.md) sub-agent that receives only the questions — not the issue. If no sub-agent support, read the role file and answer each question following its rules. +Write 3–7 factual questions about existing systems, patterns, and integration points. Delegate to a [forge-scout](../_shared/roles/forge-scout.md) sub-agent that receives only the questions — not the Issue. If no sub-agent support, read the role file and answer each question following its rules. -**Inputs:** Role: [forge-scout](roles/forge-scout.md), the research questions, codebase access. +**Inputs provided to sub-agent:** Role: [forge-scout](../_shared/roles/forge-scout.md), the research questions, codebase access. **Expected output:** One factual answer per question, with file paths and code references. If the runtime supports per-task model choice, prefer a **cheap fast model** for scout work — scouting is factual reconnaissance, not deep synthesis. Otherwise inherit the parent session model and keep the scout task narrow. diff --git a/skills/forge-ship/SKILL.md b/skills/forge-ship/SKILL.md index 01b3d47..1a3271b 100644 --- a/skills/forge-ship/SKILL.md +++ b/skills/forge-ship/SKILL.md @@ -24,7 +24,10 @@ Determine input type (Issue number/URL, plan file, or free-text). For Issues, fe #### 1b. Plan -For complex work, write 3–7 research questions and delegate to a sub-agent with the [forge-scout](../forge-implement/roles/forge-scout.md) role for unbiased codebase research. Prefer a cheap fast model for scout work. +For complex work, write 3–7 research questions and delegate to a sub-agent with the [forge-scout](../_shared/roles/forge-scout.md) role for unbiased codebase research. Prefer a cheap fast model for scout work. If the runtime does not support sub-agents, read the role file and answer the questions inline following its rules. + +**Inputs provided to sub-agent:** Role: [forge-scout](../_shared/roles/forge-scout.md), the research questions, codebase access. +**Expected output:** One factual answer per question, with file paths and code references. From the research, create a plan: durable decisions, vertical phases (see [vertical-slicing](../_shared/vertical-slicing.md)), files to change, scope boundaries. @@ -43,9 +46,9 @@ When working from a plan file or free-text (no issue number), use `/ Date: Mon, 27 Jul 2026 11:03:16 +0200 Subject: [PATCH 02/10] docs(context): align vocabulary with current skill behavior MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reflection described the removed four-reviewer design; Composite skill claimed pure orchestration; Issue claimed an unpersisted AFK/HITL field and a priority no skill uses; quality gates omitted coverage. Adds Vertical phase and Tiny diff (both cross-skill and load-bearing), removes Smart/Dumb zone and Three-tier context per the file's own single-consumer rule — they live in architecture.md and setup-project. Claude-Session: https://claude.ai/code/session_0187yZ3Nnp45s9BVYxnpJ7Ca --- CONTEXT.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/CONTEXT.md b/CONTEXT.md index f1989c6..f1616bd 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -6,47 +6,47 @@ Shared vocabulary used across multiple skills. Terms used in only one skill stay **Issue tracker** — system tracking Issues. Providers: GitHub (default, via `gh`), markdown `plan/` folder ([spec](skills/_shared/plan-folder-spec.md)), or user-configured (declared in AGENTS.md). Detection: AGENTS.md declaration → `plan/` directory → GitHub fallback. -**Issue** — one tracked unit of work. Carries title, body, labels, and AFK/HITL mode. +**Issue** — one tracked unit of work. Carries title, body, and labels; the AFK/HITL mode is recorded in the body at creation. **Plan** — structured proposal for implementing an Issue: durable decisions, vertical phases, verification steps. **Vertical slice** — end-to-end implementation crossing all layers for one narrow scenario, testable in isolation. See [vertical-slicing](skills/_shared/vertical-slicing.md). +**Vertical phase** — one ordered step of a Plan: spans all affected layers, ends with tests passing and a commit. Phases sequence work within a Vertical slice. + **AFK / HITL** — Issue execution mode. AFK: fully specified for autonomous execution. HITL: requires human judgment during implementation. Set at creation time. See [afk-vs-hitl](skills/forge-create-issue/references/afk-vs-hitl.md). -**Reflection** — self-review across four parallel dimensions before peer review. Produces Findings. +**Reflection** — self-review of current changes before peer review: tiny diffs review inline, otherwise one fresh-context review pass by default, deepened only when risk justifies it. Produces Findings. + +**Tiny diff** — roughly ≤2 files and ≤100 changed lines with low risk; reviewed inline without delegation. See [review-delegation](skills/_shared/review-delegation.md). **Finding** — one issue surfaced by reflection, severity-tagged P0–P3. P3 not flagged. **Deferred item** — a Finding not addressed in the current PR; becomes a new Issue. -**Composite skill** — orchestrates other skills (currently only `forge-ship`). +**Composite skill** — combines other skills' processes into a single invocation (currently only `forge-ship`, composing implement and reflect). **Inline fallback** — `(delegate)` step provides both sub-agent and in-context paths for runtime portability. -**Self-containment** — single-use references stay with the skill; cross-skill references live in `skills/_shared/`. Within the shared layer, files have explicit consumers; outside it, skills are self-contained. - -**Smart zone / Dumb zone** — workable region (~first 100k tokens) vs degraded region of LLM context. See [architecture — Operating Constraints](docs/architecture.md#operating-constraints). +**Self-containment** — single-use references stay with the skill; cross-skill references live in `skills/_shared/`. Within the shared layer, files have explicit consumers (skills or other shared files); outside it, skills are self-contained. **Pattern audit** — when a pattern changes, grep ALL files using the old pattern and update. See [pattern-audit](skills/_shared/pattern-audit.md). -**Quality gates** — lint, format, type check, tests. Run before commit, PR push, and reflection. +**Quality gates** — lint, format, type check, tests, and coverage (≥90% on new/modified code where tooling exists). Run at phase gates, before commit, PR push, and reflection. **Attended / unattended** — default pauses for confirmation; `--unattended` uses severity-gated heuristics. **Trailing context** — `-- ` appended to provide extra execution guidance. -**Three-tier context** — Hot (`AGENTS.md`) / Warm (`docs/`) / Cold (specs). Each tier earns its token cost. - ## Relationships -- An **Issue** has one **AFK/HITL mode**, a priority, and labels. -- A **Plan** implements one **Issue** through ordered **Vertical slices**. +- An **Issue** has one **AFK/HITL mode** and labels. +- A **Plan** implements one **Issue** through ordered **Vertical phases**. - A **Reflection** produces zero or more **Findings**; each is fixed or becomes a **Deferred item**. -- A **Composite skill** invokes other skills; `--unattended` propagates through composition. +- A **Composite skill** runs its component skills' processes; `--unattended` applies across all of them. ## Flagged Ambiguities - **Issue** (capitalized) is the abstract concept; provider determined per-project. - **Plan** is the proposal; "plan file" is a markdown artifact containing a Plan. -- **Reflection** is self-review by sub-agents; **peer review** is external. +- **Reflection** is self-review (inline for tiny diffs, otherwise delegated to fresh context); **peer review** is external. From 5676d848aad0b56407ace4c2dd9ae997e57123f5 Mon Sep 17 00:00:00 2001 From: Martin Gratzer Date: Mon, 27 Jul 2026 11:05:57 +0200 Subject: [PATCH 03/10] fix(skills): repair vocabulary, frontmatter, and structural drift MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - reflect: drop context: fork (forking the whole skill strands the interactive triage step; fresh context already comes from the (delegate) review step), rename Triage Deferred Items to Triage Findings — items only become deferred as the outcome of triage - implement: document --unattended, fold Sub-Issue Handling into Step 1, action-verb step titles, placeholder casing, disambiguate from ship in the description - ship: bash example for push/PR, coverage fallback, Format and Coverage rows in the output gates, scout delegation fallback - create-issue/shape: complete allowed-tools their own steps require; create-issue gains trailing-context support and records the AFK/HITL mode in the Issue body - address-pr-feedback: Follow-up renamed to Deferred item (canonical) - issue-operations: new label discovery/update and epic sub-issue sections absorb the provider conditionals skills had inlined; sub-issue linking uses task lists with --parent as opt-in (the flag is not available on all gh versions) Claude-Session: https://claude.ai/code/session_0187yZ3Nnp45s9BVYxnpJ7Ca --- skills/_shared/issue-operations.md | 29 ++++++++++++++ skills/_shared/plan-folder-spec.md | 2 +- skills/forge-address-pr-feedback/SKILL.md | 16 ++++---- skills/forge-create-issue/SKILL.md | 27 +++++++------ skills/forge-implement/SKILL.md | 38 +++++++++---------- skills/forge-reflect/SKILL.md | 21 +++++----- skills/forge-setup-project/SKILL.md | 11 +++--- .../references/output-format.md | 6 +-- skills/forge-shape/SKILL.md | 14 ++++--- skills/forge-ship/SKILL.md | 22 +++++++---- 10 files changed, 115 insertions(+), 71 deletions(-) diff --git a/skills/_shared/issue-operations.md b/skills/_shared/issue-operations.md index 0bf13a4..f82ccef 100644 --- a/skills/_shared/issue-operations.md +++ b/skills/_shared/issue-operations.md @@ -29,6 +29,35 @@ ISSUE_EOF **Other provider:** use the tool or CLI declared in AGENTS.md with the same title, body, and labels. +## Discover and Update Labels + +**GitHub:** discover available labels before applying any, and add missing ones to an existing Issue: + +```bash +gh label list +gh issue edit --add-label "