@jamie-tam/forge 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +389 -0
- package/agents/architect.md +92 -0
- package/agents/builder.md +122 -0
- package/agents/code-reviewer.md +107 -0
- package/agents/concept-designer.md +207 -0
- package/agents/craft-reviewer.md +132 -0
- package/agents/critic.md +130 -0
- package/agents/doc-writer.md +85 -0
- package/agents/dreamer.md +129 -0
- package/agents/e2e-runner.md +89 -0
- package/agents/gotcha-hunter.md +127 -0
- package/agents/prototype-builder.md +193 -0
- package/agents/prototype-codifier.md +204 -0
- package/agents/prototype-reviewer.md +163 -0
- package/agents/security-reviewer.md +108 -0
- package/agents/spec-reviewer.md +94 -0
- package/agents/tracer.md +98 -0
- package/agents/wireframer.md +109 -0
- package/commands/abort.md +25 -0
- package/commands/bugfix.md +151 -0
- package/commands/evolve.md +118 -0
- package/commands/feature.md +236 -0
- package/commands/forge.md +100 -0
- package/commands/greenfield.md +185 -0
- package/commands/hotfix.md +98 -0
- package/commands/refactor.md +147 -0
- package/commands/resume.md +25 -0
- package/commands/setup.md +201 -0
- package/commands/status.md +27 -0
- package/commands/task-force.md +110 -0
- package/commands/validate.md +12 -0
- package/dist/__tests__/active-manifest.test.js +272 -0
- package/dist/__tests__/copy.test.js +96 -0
- package/dist/__tests__/gate-check.test.js +384 -0
- package/dist/__tests__/wiki.test.js +472 -0
- package/dist/__tests__/work-manifest.test.js +304 -0
- package/dist/active-manifest.js +229 -0
- package/dist/cli.js +158 -0
- package/dist/copy.js +124 -0
- package/dist/gate-check.js +326 -0
- package/dist/hooks.js +60 -0
- package/dist/init.js +140 -0
- package/dist/manifest.js +90 -0
- package/dist/merge.js +77 -0
- package/dist/paths.js +36 -0
- package/dist/uninstall.js +216 -0
- package/dist/update.js +158 -0
- package/dist/verify-manifest.js +65 -0
- package/dist/verify.js +98 -0
- package/dist/wiki-ui.js +310 -0
- package/dist/wiki.js +364 -0
- package/dist/work-manifest.js +798 -0
- package/hooks/config/gate-requirements.json +79 -0
- package/hooks/hooks.json +143 -0
- package/hooks/scripts/analyze-telemetry.sh +114 -0
- package/hooks/scripts/gate-enforcer.sh +164 -0
- package/hooks/scripts/pre-compact.sh +90 -0
- package/hooks/scripts/session-start.sh +81 -0
- package/hooks/scripts/telemetry.sh +41 -0
- package/hooks/scripts/wiki-lint.sh +87 -0
- package/hooks/templates/AGENTS.md.template +48 -0
- package/hooks/templates/CLAUDE.md.template +45 -0
- package/package.json +55 -0
- package/protocols/README.md +40 -0
- package/protocols/codex.md +151 -0
- package/protocols/graphify.md +156 -0
- package/references/common/agent-coordination.md +65 -0
- package/references/common/coding-standards.md +54 -0
- package/references/common/feature-tracking.md +21 -0
- package/references/common/io-protocol.md +36 -0
- package/references/common/phases.md +57 -0
- package/references/common/quality-gates.md +130 -0
- package/references/common/skill-authoring.md +154 -0
- package/references/common/skill-compliance.md +30 -0
- package/references/python/standards.md +44 -0
- package/references/react/standards.md +61 -0
- package/references/typescript/standards.md +42 -0
- package/rules/common/forge-system.md +59 -0
- package/rules/common/git-workflow.md +40 -0
- package/rules/common/guardrails.md +37 -0
- package/rules/common/quality-gates.md +18 -0
- package/rules/common/security.md +50 -0
- package/rules/common/skill-selection.md +78 -0
- package/rules/common/testing.md +58 -0
- package/rules/common/verification.md +39 -0
- package/skills/build-pr-workflow/SKILL.md +301 -0
- package/skills/build-pr-workflow/references/pr-template.md +62 -0
- package/skills/build-pr-workflow/references/subagent-merge.md +47 -0
- package/skills/build-pr-workflow/references/worktree-setup.md +125 -0
- package/skills/build-prototype/SKILL.md +264 -0
- package/skills/build-scaffold/SKILL.md +340 -0
- package/skills/build-tdd/SKILL.md +89 -0
- package/skills/build-wireframe/SKILL.md +110 -0
- package/skills/build-wireframe/assets/baseline-template.html +486 -0
- package/skills/build-wireframe/references/demo-walkthroughs.md +170 -0
- package/skills/build-wireframe/references/gotchas.md +188 -0
- package/skills/build-wireframe/references/legend-lines.md +141 -0
- package/skills/concept-slides/SKILL.md +192 -0
- package/skills/deliver-db-migration/SKILL.md +466 -0
- package/skills/deliver-deploy/SKILL.md +407 -0
- package/skills/deliver-onboarding/SKILL.md +198 -0
- package/skills/deliver-onboarding/references/document-templates.md +393 -0
- package/skills/deliver-onboarding/templates/getting-started.md +122 -0
- package/skills/discover-codebase-analysis/SKILL.md +448 -0
- package/skills/discover-requirements/SKILL.md +418 -0
- package/skills/discover-requirements/templates/prd.md +99 -0
- package/skills/discover-requirements/templates/technical-spec.md +123 -0
- package/skills/discover-requirements/templates/user-stories.md +76 -0
- package/skills/harden/SKILL.md +214 -0
- package/skills/iterate-prototype/SKILL.md +241 -0
- package/skills/plan-architecture/SKILL.md +457 -0
- package/skills/plan-architecture/templates/adr-template.md +52 -0
- package/skills/plan-architecture/templates/api-contract.md +99 -0
- package/skills/plan-architecture/templates/db-schema.md +81 -0
- package/skills/plan-architecture/templates/system-design.md +111 -0
- package/skills/plan-brainstorm/SKILL.md +433 -0
- package/skills/plan-design-system/SKILL.md +279 -0
- package/skills/plan-task-decompose/SKILL.md +454 -0
- package/skills/quality-code-review/SKILL.md +286 -0
- package/skills/quality-security-audit/SKILL.md +292 -0
- package/skills/quality-security-audit/references/audit-report-template.md +89 -0
- package/skills/quality-security-audit/references/owasp-checks.md +178 -0
- package/skills/quality-test-execution/SKILL.md +435 -0
- package/skills/quality-test-plan/SKILL.md +297 -0
- package/skills/quality-test-plan/references/test-type-guide.md +263 -0
- package/skills/quality-test-plan/templates/e2e-test-plan.md +72 -0
- package/skills/quality-test-plan/templates/integration-test-plan.md +74 -0
- package/skills/quality-test-plan/templates/load-test-plan.md +111 -0
- package/skills/quality-test-plan/templates/smoke-test-plan.md +68 -0
- package/skills/quality-test-plan/templates/unit-test-plan.md +56 -0
- package/skills/quality-uiux/SKILL.md +481 -0
- package/skills/support-debug/SKILL.md +464 -0
- package/skills/support-dream/SKILL.md +213 -0
- package/skills/support-gotcha/SKILL.md +249 -0
- package/skills/support-runtime-reachability/SKILL.md +190 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-01-passes-app-use/src/app.ts +7 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-01-passes-app-use/src/handlers/cases.ts +7 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-02-orphan-no-app-use/src/app.ts +8 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-02-orphan-no-app-use/src/handlers/cases.ts +7 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-03-orphan-import-only/src/App.tsx +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-03-orphan-import-only/src/components/RingingBanner.tsx +7 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-03-orphan-import-only/src/hooks/useTwilio.ts +6 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-04-jsx-component-rendered/src/App.tsx +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-04-jsx-component-rendered/src/components/MyComp.tsx +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-05-jsx-component-not-rendered/src/App.tsx +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-05-jsx-component-not-rendered/src/components/Orphan.tsx +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-06-class-instantiated/src/lib/Service.ts +6 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-06-class-instantiated/src/main.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-07-class-not-instantiated/src/lib/Lonely.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-07-class-not-instantiated/src/main.ts +2 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-08-default-export-imported-and-called/src/handler.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-08-default-export-imported-and-called/src/main.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-09-default-export-orphan/src/handler.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-09-default-export-orphan/src/main.ts +2 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-10-aliased-named-export/src/lib.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-10-aliased-named-export/src/main.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-11-re-export-chain/src/lib/index.ts +1 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-11-re-export-chain/src/lib/internal.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-11-re-export-chain/src/main.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-12-test-only-caller/src/util.test.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-12-test-only-caller/src/util.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-13-gated-pending-annotation/src/future.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-14-untraceable-annotation/src/decorated.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-15-untraceable-empty/src/lazy.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-16-python-module/src/lib.py +15 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-16-python-module/src/main.py +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-17-router-use/src/parent.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-17-router-use/src/routes/cases.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-18-shadowed-name-fp/src/lib/foo.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-18-shadowed-name-fp/src/other.ts +8 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-19-same-name-different-module/src/handlers/cases.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-19-same-name-different-module/src/handlers/users.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-19-same-name-different-module/src/main.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-20-aliased-import-usage/src/handlers/cases.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-20-aliased-import-usage/src/main.ts +4 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-21-mixed-default-and-named/src/lib.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-21-mixed-default-and-named/src/main.ts +5 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-22-dynamic-import-then-caller/src/lib.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-22-dynamic-import-then-caller/src/main.ts +8 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-23-dynamic-import-with-space/src/lib.ts +3 -0
- package/skills/support-runtime-reachability/scripts/__fixtures__/case-23-dynamic-import-with-space/src/main.ts +7 -0
- package/skills/support-runtime-reachability/scripts/check.mjs +638 -0
- package/skills/support-runtime-reachability/scripts/check.test.mjs +244 -0
- package/skills/support-skill-validator/SKILL.md +194 -0
- package/skills/support-skill-validator/references/false-positives.md +59 -0
- package/skills/support-skill-validator/references/validation-checks.md +280 -0
- package/skills/support-system-guide/SKILL.md +311 -0
- package/skills/support-task-force/SKILL.md +265 -0
- package/skills/support-task-force/references/dispatch-pattern.md +178 -0
- package/skills/support-task-force/references/synthesis-template.md +126 -0
- package/skills/support-wiki-bootstrap/SKILL.md +37 -0
- package/skills/support-wiki-lint/SKILL.md +196 -0
- package/skills/support-wiki-lint/scripts/lint.mjs +488 -0
- package/skills/support-wiki-lint/scripts/lint.test.mjs +196 -0
- package/templates/README.md +23 -0
- package/templates/aiwiki/CLAUDE.md.template +78 -0
- package/templates/aiwiki/schemas/architecture.md +118 -0
- package/templates/aiwiki/schemas/convention.md +112 -0
- package/templates/aiwiki/schemas/decision.md +144 -0
- package/templates/aiwiki/schemas/gotcha.md +118 -0
- package/templates/aiwiki/schemas/oracle.md +105 -0
- package/templates/aiwiki/schemas/session.md +125 -0
- package/templates/manifests/bugfix.yaml +41 -0
- package/templates/manifests/feature.yaml +69 -0
- package/templates/manifests/greenfield.yaml +61 -0
- package/templates/manifests/hotfix.yaml +45 -0
- package/templates/manifests/refactor.yaml +44 -0
- package/templates/manifests/v5/SCHEMA.md +327 -0
- package/templates/manifests/v5/feature.yaml +77 -0
- package/templates/manifests/v6/SCHEMA.md +199 -0
- package/templates/wiki-html/dream-detail.html +378 -0
- package/templates/wiki-html/dreams-list.html +155 -0
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
# The five validation checks
|
|
2
|
+
|
|
3
|
+
Full detail for each of the five validation checks the validator runs. Load this when actually executing a scan — the SKILL.md keeps the entry points and the severity ladder; this file keeps the procedures.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Check 1: Directive Conflicts
|
|
8
|
+
|
|
9
|
+
**Purpose:** Find contradictions between imperative statements across skills and rules.
|
|
10
|
+
|
|
11
|
+
**Process:**
|
|
12
|
+
|
|
13
|
+
1. **Extract Directives**
|
|
14
|
+
- Scan all SKILL.md, rules, and commands for imperative statements
|
|
15
|
+
- Target keywords: `MUST`, `NEVER`, `ALWAYS`, `NO`, `REQUIRED`, `MANDATORY`, `FORBIDDEN`, `DO NOT`
|
|
16
|
+
- Extract the full sentence containing each directive
|
|
17
|
+
- Record: file path, line context, directive text
|
|
18
|
+
|
|
19
|
+
2. **Categorize Directives by Topic**
|
|
20
|
+
- Group directives by what they govern:
|
|
21
|
+
- Testing (when to test, what to test, how to test)
|
|
22
|
+
- Code generation (when to write code, what patterns)
|
|
23
|
+
- Deployment (when to deploy, prerequisites)
|
|
24
|
+
- Review (what to review, how to review)
|
|
25
|
+
- Documentation (what to document, when)
|
|
26
|
+
- Git (branching, committing, PRs)
|
|
27
|
+
- Security (secrets, auth, validation)
|
|
28
|
+
- Process (ordering, gates, approvals)
|
|
29
|
+
|
|
30
|
+
3. **Cross-Check for Contradictions**
|
|
31
|
+
- Within each topic, compare directives pairwise
|
|
32
|
+
- Flag when:
|
|
33
|
+
- One says MUST and another says NEVER for the same action
|
|
34
|
+
- One says ALWAYS and another says exception/skip for the same context
|
|
35
|
+
- Scope overlap creates ambiguity (general rule vs specific skill)
|
|
36
|
+
|
|
37
|
+
4. **Output Format**
|
|
38
|
+
```
|
|
39
|
+
CONFLICTS:
|
|
40
|
+
|
|
41
|
+
[ERROR] C-001: Testing Contradiction
|
|
42
|
+
build-tdd: "NO production code without a failing test FIRST"
|
|
43
|
+
build-scaffold: "Generate project boilerplate with initial test infrastructure"
|
|
44
|
+
Analysis: Scaffold generates code before tests exist. Is scaffold exempt from TDD?
|
|
45
|
+
Suggested Resolution: Document scaffold as a TDD-exempt bootstrap phase, or
|
|
46
|
+
require scaffold to generate failing tests first.
|
|
47
|
+
|
|
48
|
+
[WARNING] C-002: Fact-Checking Overlap
|
|
49
|
+
support-debug: "FACT-CHECK FIRST: verify the reported behavior"
|
|
50
|
+
rules/common/verification.md: "verify via context7 or websearch BEFORE proceeding"
|
|
51
|
+
Analysis: Not a contradiction, but unclear which takes precedence when both apply.
|
|
52
|
+
Suggested Resolution: Clarify that verification rule is the authority,
|
|
53
|
+
support-debug applies it specifically to bug reports.
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
5. **Known Acceptable Conflicts**
|
|
57
|
+
- Some conflicts are intentional (e.g., `/hotfix` explicitly skips certain gates)
|
|
58
|
+
- These must be documented as intentional exceptions
|
|
59
|
+
- If documented, report as INFO not ERROR
|
|
60
|
+
- If undocumented, report as WARNING
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Check 2: I/O Graph Integrity
|
|
65
|
+
|
|
66
|
+
**Purpose:** Verify that the I/O protocol forms a valid directed acyclic graph (DAG).
|
|
67
|
+
|
|
68
|
+
**Severity Baseline (READ FIRST — prevents false ERRORs):**
|
|
69
|
+
|
|
70
|
+
I/O Contract is **OPTIONAL** per `references/common/skill-authoring.md`. Per that rule, fields are "Usually" required, not "Always". Apply this severity ladder when classifying any I/O finding:
|
|
71
|
+
|
|
72
|
+
| Situation | Default severity |
|
|
73
|
+
|---|---|
|
|
74
|
+
| Skill has NO `## I/O Contract` section at all (pure methodology skill) | **INFO** — by design, do not escalate without evidence the omission breaks a workflow |
|
|
75
|
+
| Skill has I/O Contract but omits one field (e.g., no `Feeds into`) | **INFO** — `Feeds into` is "Usually", not mandatory |
|
|
76
|
+
| `Produces X` is declared but no skill lists `Requires X` (orphaned output) | **INFO** — asymmetric mirroring is allowed; only escalate if a real consumer is observed to fail |
|
|
77
|
+
| `Requires X` is declared but NO skill produces X anywhere (broken pipeline) | **ERROR** — this genuinely breaks the workflow |
|
|
78
|
+
| Cycle detected in the produces→requires graph (true deadlock) | **ERROR** |
|
|
79
|
+
|
|
80
|
+
Only escalate to WARNING/ERROR when you can name the downstream skill that fails and how. "X is missing a row" is INFO; "skill Y will fail to find artifact X" is WARNING/ERROR.
|
|
81
|
+
|
|
82
|
+
**Process:**
|
|
83
|
+
|
|
84
|
+
1. **Build the I/O Graph**
|
|
85
|
+
- For each skill that declares I/O metadata, extract:
|
|
86
|
+
- `Requires`: what artifacts it needs as input
|
|
87
|
+
- `Produces`: what artifacts it creates as output
|
|
88
|
+
- `Feeds into`: which skills consume its output
|
|
89
|
+
- Skills WITHOUT an `## I/O Contract` section are treated as methodology-only nodes. Record their existence but do not flag the omission above INFO.
|
|
90
|
+
- Build a directed graph: skill -> produces -> consumed by -> skill
|
|
91
|
+
|
|
92
|
+
2. **Check for Missing Producers**
|
|
93
|
+
- For every `Requires` entry, verify at least one skill `Produces` it
|
|
94
|
+
- Missing producer = gap in the pipeline (something needs input that nothing creates)
|
|
95
|
+
```
|
|
96
|
+
[ERROR] IO-001: Missing Producer
|
|
97
|
+
quality-test-execution requires "test-plan.md"
|
|
98
|
+
No skill produces "test-plan.md"
|
|
99
|
+
Wait -- quality-test-plan produces this. Check naming match.
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
3. **Check for Orphaned Outputs**
|
|
103
|
+
- For every `Produces` entry, verify at least one skill or command references it (in `Requires`, in command flow, or in protocol body)
|
|
104
|
+
- Orphaned output = artifact created but never referenced anywhere
|
|
105
|
+
- **Default severity: INFO** (per Severity Baseline above). The artifact may be consumed by a command directly without the consumer-skill mirroring the row.
|
|
106
|
+
- Escalate to WARNING only if the artifact is named in another skill's body as required and that skill would fail without it.
|
|
107
|
+
```
|
|
108
|
+
[INFO] IO-002: Orphaned Output (asymmetric mirroring)
|
|
109
|
+
quality-security-audit produces "security audit report"
|
|
110
|
+
deliver-deploy doesn't mirror it in `Requires`.
|
|
111
|
+
`Feeds into` is "Usually", not mandatory. No workflow break observed.
|
|
112
|
+
Action: Optional — add to deliver-deploy `Requires` if consumer-side
|
|
113
|
+
visibility matters. No fix required.
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
4. **Check for Skills Without I/O Contract (NOT a defect)**
|
|
117
|
+
- Some skills are pure methodology and intentionally omit `## I/O Contract` (e.g., `build-tdd` — the agent owns its TDD methodology handoff, the calling command owns the orchestration).
|
|
118
|
+
- **Default severity: INFO**. Note the omission for awareness; do not block.
|
|
119
|
+
```
|
|
120
|
+
[INFO] IO-005: Skill Omits I/O Contract by Design
|
|
121
|
+
build-tdd has no `## I/O Contract` section.
|
|
122
|
+
Per `references/common/skill-authoring.md`, I/O Contract is OPTIONAL for
|
|
123
|
+
methodology-only skills. build-tdd's task scope and artifact paths are
|
|
124
|
+
supplied by the calling command (/feature, /bugfix, /hotfix) and by the
|
|
125
|
+
dispatched builder agent.
|
|
126
|
+
Action: None. This is intentional design.
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
5. **Check for Circular Dependencies**
|
|
130
|
+
- Verify the graph is acyclic
|
|
131
|
+
- Circular dependency = deadlock (A requires B's output, B requires A's output)
|
|
132
|
+
```
|
|
133
|
+
[ERROR] IO-003: Circular Dependency
|
|
134
|
+
build-tdd requires architecture artifacts
|
|
135
|
+
plan-architecture requires codebase analysis
|
|
136
|
+
discover-codebase-analysis requires existing code
|
|
137
|
+
build-tdd produces existing code
|
|
138
|
+
Cycle: build-tdd -> plan-architecture -> discover-codebase-analysis -> build-tdd
|
|
139
|
+
Note: This is a false positive -- discover-codebase-analysis is for EXISTING
|
|
140
|
+
code, not code being built. Mark as checked.
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
6. **Verify Artifact Path Consistency**
|
|
144
|
+
- Check that artifact paths are consistent across skills
|
|
145
|
+
- If one skill produces `.forge/work/{type}/{name}/test-plan.md` and another requires `test-plan.md`, flag the ambiguity
|
|
146
|
+
```
|
|
147
|
+
[WARNING] IO-004: Path Ambiguity
|
|
148
|
+
quality-test-plan produces: ".forge/work/{type}/{name}/test-plan.md"
|
|
149
|
+
quality-test-execution requires: "test plan"
|
|
150
|
+
Recommend: Use consistent path references across skills.
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Check 3: Responsibility Overlaps
|
|
156
|
+
|
|
157
|
+
**Purpose:** Flag when multiple skills claim the same responsibility.
|
|
158
|
+
|
|
159
|
+
**Process:**
|
|
160
|
+
|
|
161
|
+
1. **Extract Responsibility Claims**
|
|
162
|
+
- From each skill's "Process" section, extract what it does
|
|
163
|
+
- From each skill's "Covers" section, extract what it reviews
|
|
164
|
+
- From rules, extract what they enforce
|
|
165
|
+
|
|
166
|
+
2. **Identify Overlaps**
|
|
167
|
+
- Multiple skills claiming to do the same thing
|
|
168
|
+
- Multiple rules enforcing the same constraint differently
|
|
169
|
+
- A skill doing something that a rule also enforces
|
|
170
|
+
|
|
171
|
+
3. **Classify Overlaps**
|
|
172
|
+
|
|
173
|
+
| Type | Severity | Example |
|
|
174
|
+
|---|---|---|
|
|
175
|
+
| **Redundant enforcement** | WARNING | Both code-review and security-audit check for secrets |
|
|
176
|
+
| **Conflicting ownership** | ERROR | Both test-plan and tdd claim to write unit tests |
|
|
177
|
+
| **Layered enforcement** | INFO | Rule sets standard, skill enforces it (this is correct design) |
|
|
178
|
+
|
|
179
|
+
4. **Output Format**
|
|
180
|
+
```
|
|
181
|
+
OVERLAPS:
|
|
182
|
+
|
|
183
|
+
[WARNING] O-001: Fact-Checking Responsibility
|
|
184
|
+
Claimed by: support-debug (Phase 0), rules/common/verification.md, quality-code-review
|
|
185
|
+
Analysis: Three components all perform fact-checking.
|
|
186
|
+
Suggested Resolution: verification.md is the authority on WHEN to fact-check.
|
|
187
|
+
support-debug applies it to bug reports. quality-code-review applies it to reviews.
|
|
188
|
+
Document this hierarchy explicitly.
|
|
189
|
+
|
|
190
|
+
[INFO] O-002: Layered Security Enforcement
|
|
191
|
+
rules/common/security.md: Sets security standards
|
|
192
|
+
quality-security-audit: Enforces security standards in code review
|
|
193
|
+
quality-code-review: Checks for secret exposure in critical pass
|
|
194
|
+
Analysis: This is correct layered enforcement. No action needed.
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Check 4: Gate Completeness
|
|
200
|
+
|
|
201
|
+
**Purpose:** Verify every command transition has a defined quality gate.
|
|
202
|
+
|
|
203
|
+
**Process:**
|
|
204
|
+
|
|
205
|
+
1. **Extract Command Flows**
|
|
206
|
+
- Parse each command file for its skill sequence
|
|
207
|
+
- Identify every transition between skills (skill A -> skill B)
|
|
208
|
+
|
|
209
|
+
2. **Check Gate Definitions**
|
|
210
|
+
- For each transition, verify a gate is defined in `references/common/quality-gates.md`
|
|
211
|
+
- Gate must specify: what is checked, pass criteria, fail action
|
|
212
|
+
|
|
213
|
+
3. **Flag Missing Gates**
|
|
214
|
+
```
|
|
215
|
+
[ERROR] G-001: Missing Gate
|
|
216
|
+
/feature command: build-tdd -> quality-code-review
|
|
217
|
+
No gate defined for this transition.
|
|
218
|
+
Recommended: Define gate criteria (e.g., "all tests pass, no lint errors").
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
4. **Flag Undocumented Exemptions**
|
|
222
|
+
- Some commands intentionally skip gates (e.g., `/hotfix` may skip brainstorming)
|
|
223
|
+
- These MUST be documented as intentional
|
|
224
|
+
- If a gate is skipped but not documented as intentional, flag it
|
|
225
|
+
```
|
|
226
|
+
[WARNING] G-002: Undocumented Gate Exemption
|
|
227
|
+
/hotfix command skips gate between discover -> plan
|
|
228
|
+
This may be intentional for emergency fixes, but it is not documented.
|
|
229
|
+
Recommended: Add explicit exemption documentation: "Hotfix skips brainstorming
|
|
230
|
+
gate because emergency fixes prioritize speed over design exploration."
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
5. **Verify Gate Criteria Are Testable**
|
|
234
|
+
- "Code must be good" is not a testable gate
|
|
235
|
+
- "All tests pass, coverage > 80%, no critical lint errors" is testable
|
|
236
|
+
- Flag vague gate criteria
|
|
237
|
+
```
|
|
238
|
+
[WARNING] G-003: Vague Gate Criteria
|
|
239
|
+
Gate: architecture -> implementation
|
|
240
|
+
Criteria: "Architecture artifacts reviewed"
|
|
241
|
+
Issue: "Reviewed" is subjective. Recommended: "Architecture artifacts exist,
|
|
242
|
+
contain API contracts, DB schema (if applicable), and system diagram.
|
|
243
|
+
User has approved the approach."
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Check 5: Post-Evolve Drift
|
|
249
|
+
|
|
250
|
+
**Purpose:** After modifications, verify changed skills/rules are still consistent with the rest of the system.
|
|
251
|
+
|
|
252
|
+
**Process:**
|
|
253
|
+
|
|
254
|
+
1. **Identify Modified Files**
|
|
255
|
+
- Compare against last known validated state
|
|
256
|
+
- Use git diff if available, or timestamp comparison
|
|
257
|
+
- Focus validation on changed files and their connections
|
|
258
|
+
|
|
259
|
+
2. **Run Targeted Checks**
|
|
260
|
+
- For each modified file:
|
|
261
|
+
- Re-run Check 1 (directives) against all other files
|
|
262
|
+
- Re-run Check 2 (I/O) for connected skills only
|
|
263
|
+
- Re-run Check 3 (overlaps) for same-domain skills
|
|
264
|
+
- Re-run Check 4 (gates) for commands that reference modified skill
|
|
265
|
+
|
|
266
|
+
3. **Output Format**
|
|
267
|
+
```
|
|
268
|
+
DRIFT:
|
|
269
|
+
|
|
270
|
+
[ERROR] D-001: New Contradiction After /evolve
|
|
271
|
+
Modified: support-debug (added "ALWAYS verify with context7 before debugging")
|
|
272
|
+
Conflicts with: rules/common/verification.md ("verify when UNCERTAIN, not always")
|
|
273
|
+
Analysis: New directive is stricter than existing rule.
|
|
274
|
+
Suggested Resolution: Align language -- either debug skill says "when uncertain"
|
|
275
|
+
or verification rule says "always."
|
|
276
|
+
|
|
277
|
+
[INFO] D-002: No Drift Detected
|
|
278
|
+
Modified: deliver-deploy (updated smoke test section)
|
|
279
|
+
All checks pass against connected skills and rules.
|
|
280
|
+
```
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: support-system-guide
|
|
3
|
+
description: "Use when the user opens a fresh session, asks 'what should I run', 'where do I start', 'which command for X', 'is this a /feature or /greenfield', or describes intent without naming a command. Routes them to the right command (/feature, /greenfield, /task-force, /harden, etc.) and explains the phase model. Skip if the user has already invoked a specific command."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<EXTREMELY-IMPORTANT>
|
|
7
|
+
If you think there is even a 1% chance a skill might apply to what you are doing, you ABSOLUTELY MUST invoke the skill.
|
|
8
|
+
|
|
9
|
+
IF A SKILL APPLIES TO YOUR TASK, YOU DO NOT HAVE A CHOICE. YOU MUST USE IT.
|
|
10
|
+
|
|
11
|
+
This is not negotiable. This is not optional. You cannot rationalize your way out of this.
|
|
12
|
+
</EXTREMELY-IMPORTANT>
|
|
13
|
+
|
|
14
|
+
# Support: System Guide
|
|
15
|
+
|
|
16
|
+
## Overview
|
|
17
|
+
|
|
18
|
+
This skill governs how the forge system itself is used. It is the meta-skill that ensures all other skills are invoked correctly, commands are chosen appropriately, and the `.forge/` working directory is managed properly.
|
|
19
|
+
|
|
20
|
+
**Core Principle:** Skills are mandatory when they apply, not optional suggestions. The system works only when every applicable skill is invoked every time.
|
|
21
|
+
|
|
22
|
+
## Instruction Priority
|
|
23
|
+
|
|
24
|
+
forge skills override default system prompt behavior, but **user instructions always take precedence**:
|
|
25
|
+
|
|
26
|
+
1. **User's explicit instructions** (CLAUDE.md, direct requests) -- highest priority
|
|
27
|
+
2. **forge skills** -- override default system behavior where they conflict
|
|
28
|
+
3. **Default system prompt** -- lowest priority
|
|
29
|
+
|
|
30
|
+
If CLAUDE.md says "don't use TDD" and a skill says "always use TDD," follow the user's instructions. The user is in control.
|
|
31
|
+
|
|
32
|
+
## How to Access Skills and Agents
|
|
33
|
+
|
|
34
|
+
**In Claude Code:** Use the `Skill` tool. When you invoke a skill, its content is loaded and presented to you -- follow it directly. Never use the Read tool on skill files.
|
|
35
|
+
|
|
36
|
+
### Dispatch Reference
|
|
37
|
+
|
|
38
|
+
When command or skill files use these directives, here is what they mean:
|
|
39
|
+
|
|
40
|
+
| Directive | Action |
|
|
41
|
+
|---|---|
|
|
42
|
+
| **REQUIRED SUB-SKILL: Use X** | You MUST call the `Skill` tool with `skill: "X"`. Do NOT act on the task without loading the skill first. |
|
|
43
|
+
| **Dispatch the X subagent** | You MUST call the `Agent` tool with `subagent_type: "forge:X"`. Do NOT perform the review yourself. |
|
|
44
|
+
|
|
45
|
+
**Why this matters:** Skills contain detailed process constraints (e.g., build-tdd has 500 lines of TDD discipline). The one-line summary in the command file is NOT a substitute. If you skip loading the skill, you will miss critical constraints and produce lower-quality output.
|
|
46
|
+
|
|
47
|
+
**Agent dispatch ownership:** Skills own their agents. Each skill that needs an agent dispatches it as part of its process. Commands chain skills — they do not manage agent dispatch directly. When a skill says "Dispatch the **X** subagent", that is a mandatory dispatch, not a suggestion.
|
|
48
|
+
|
|
49
|
+
**When dispatching agents:** Provide the task objective, scope, and success criteria in the prompt. Agents have file access and will explore the codebase for details — see `references/common/agent-coordination.md` for role-based handling (producers need review, reviewers don't).
|
|
50
|
+
|
|
51
|
+
## The Rule
|
|
52
|
+
|
|
53
|
+
**Invoke relevant skills BEFORE any response or action.** Even a 1% chance a skill might apply means you should invoke the skill to check. If an invoked skill turns out to be wrong for the situation, you do not need to follow it.
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
User message received
|
|
57
|
+
|
|
|
58
|
+
+-- Does message match a COMMAND? --Yes--> Route to command (see Command Routing below)
|
|
59
|
+
| Command invokes skills in sequence.
|
|
60
|
+
|
|
|
61
|
+
+-- No command match
|
|
62
|
+
|
|
|
63
|
+
+-- Might any SKILL apply? --Yes (even 1%)--> Invoke skill BEFORE responding
|
|
64
|
+
|
|
|
65
|
+
+-- Definitely no skill applies --> Respond normally
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Command Routing
|
|
69
|
+
|
|
70
|
+
When the user describes what they want to do, route them to the correct command. Commands orchestrate skills into end-to-end workflows.
|
|
71
|
+
|
|
72
|
+
| User Intent | Command | What It Does |
|
|
73
|
+
|---|---|---|
|
|
74
|
+
| "What does this project have?" / "Show me forge" / "What can I run?" | `/forge` | One-screen discovery — installed capabilities, active work, suggested next |
|
|
75
|
+
| "Add a feature" / "Implement X" / "Build Y" | `/feature` | Full lifecycle: discover -> plan -> build -> quality -> deliver |
|
|
76
|
+
| "New project" / "Start from scratch" / "Greenfield" | `/greenfield` | Scaffold + full lifecycle for a new project |
|
|
77
|
+
| "Fix this bug" / "Something is broken" / "Error when..." | `/bugfix` | Debug -> fix -> test -> PR |
|
|
78
|
+
| "Clean up" / "Refactor" / "Improve code quality" | `/refactor` | Analyze -> refactor -> review -> PR |
|
|
79
|
+
| "Production is down" / "Emergency fix" / "Critical bug" | `/hotfix` | Emergency: debug -> fix -> test -> deploy (expedited gates) |
|
|
80
|
+
| "Improve the skills" / "Update a skill" / "System enhancement" | `/evolve` | Self-improvement: review skills, propose changes, validate |
|
|
81
|
+
| "Check consistency" / "Validate skills" / "Run validator" | `/validate` | Validate all skills/rules for contradictions and gaps |
|
|
82
|
+
|
|
83
|
+
### Command vs. Direct Skill Use
|
|
84
|
+
|
|
85
|
+
- **Commands** are for workflows (multi-skill, gated sequences)
|
|
86
|
+
- **Direct skill invocation** is for single capabilities ("just review this code", "just generate a test plan")
|
|
87
|
+
- When in doubt, suggest the command -- it provides the full quality pipeline
|
|
88
|
+
|
|
89
|
+
## Skill Groups
|
|
90
|
+
|
|
91
|
+
Skills are organized by function using prefix groups. Understanding the groups helps identify which skills to invoke.
|
|
92
|
+
|
|
93
|
+
### Prototype-driven phases (v6)
|
|
94
|
+
The default v6 SDLC runs concept → wireframe → prototype → iterate → codify. These skills are the canonical path; the `discover-` and `plan-` groups below are non-prototype fallback.
|
|
95
|
+
|
|
96
|
+
| Skill | When to Use |
|
|
97
|
+
|---|---|
|
|
98
|
+
| `concept-slides` | Phase 1 — produce low-fidelity marp concept deck (hook + sub-concepts + journey) |
|
|
99
|
+
| `build-wireframe` | Phase 2 — single-HTML annotated wireframe with click-through demos |
|
|
100
|
+
| `build-prototype` | Phase 3 — scaffold the prototype (Vite/React/TS/Tailwind/Zustand etc.) |
|
|
101
|
+
| `iterate-prototype` | Phase 4 — polish loop on the prototype; small tweaks driven by `pocs/.../.forge/feedback.md` |
|
|
102
|
+
| `harden` | Phase 5 — codify the locked prototype into `aiwiki/architecture/`, ADRs, slice graph |
|
|
103
|
+
|
|
104
|
+
### discover- (Understand) — non-prototype fallback
|
|
105
|
+
Skills that gather and structure information about what needs to be built when the prototype-driven flow does not apply.
|
|
106
|
+
|
|
107
|
+
| Skill | When to Use |
|
|
108
|
+
|---|---|
|
|
109
|
+
| `discover-requirements` | User has raw input (notes, emails, screenshots) that needs structuring |
|
|
110
|
+
| `discover-codebase-analysis` | Working on existing code, need to understand what exists |
|
|
111
|
+
|
|
112
|
+
### plan- (Decide) — non-prototype fallback
|
|
113
|
+
Skills that determine how to approach the work when the prototype-driven flow does not apply.
|
|
114
|
+
|
|
115
|
+
| Skill | When to Use |
|
|
116
|
+
|---|---|
|
|
117
|
+
| `plan-brainstorm` | Need to decide HOW to approach a feature (design discussion) |
|
|
118
|
+
| `plan-architecture` | Need technical artifacts: API contracts, DB schema, diagrams |
|
|
119
|
+
| `plan-design-system` | Frontend feature needs visual direction (theme, colors, spacing, typography) |
|
|
120
|
+
| `plan-task-decompose` | Need to break work into implementable units |
|
|
121
|
+
|
|
122
|
+
### build- (Implement)
|
|
123
|
+
Skills that produce code and artifacts.
|
|
124
|
+
|
|
125
|
+
| Skill | When to Use |
|
|
126
|
+
|---|---|
|
|
127
|
+
| `build-scaffold` | New project needs directory structure, tooling, Docker setup |
|
|
128
|
+
| `build-tdd` | Writing code (strict RED-GREEN-REFACTOR) |
|
|
129
|
+
| `build-pr-workflow` | Need branches, worktrees, or pull requests |
|
|
130
|
+
|
|
131
|
+
### quality- (Verify)
|
|
132
|
+
Skills that verify work meets standards.
|
|
133
|
+
|
|
134
|
+
| Skill | When to Use |
|
|
135
|
+
|---|---|
|
|
136
|
+
| `quality-code-review` | Code needs review — orchestrates the safety → craft → reachability → gotcha-hunter chain |
|
|
137
|
+
| `quality-test-plan` | Need comprehensive test strategy (all test types) |
|
|
138
|
+
| `quality-test-execution` | Need to execute tests from the test plan |
|
|
139
|
+
| `quality-security-audit` | Need security review (OWASP, secrets, dependencies) |
|
|
140
|
+
| `quality-uiux` | Frontend work needs UX review |
|
|
141
|
+
|
|
142
|
+
### deliver- (Ship)
|
|
143
|
+
Skills that deliver work to users.
|
|
144
|
+
|
|
145
|
+
| Skill | When to Use |
|
|
146
|
+
|---|---|
|
|
147
|
+
| `deliver-deploy` | All tests pass, review done, ready to ship |
|
|
148
|
+
| `deliver-db-migration` | Feature needs database schema changes |
|
|
149
|
+
| `deliver-onboarding` | Need to create or update newcomer documentation |
|
|
150
|
+
|
|
151
|
+
### support- (Maintain)
|
|
152
|
+
Skills that maintain the system and handle problems.
|
|
153
|
+
|
|
154
|
+
| Skill | When to Use |
|
|
155
|
+
|---|---|
|
|
156
|
+
| `support-system-guide` | (This skill) How to use the system |
|
|
157
|
+
| `support-debug` | Something is broken, need systematic debugging |
|
|
158
|
+
| `support-gotcha` | Lesson learned that should be recorded for prevention |
|
|
159
|
+
| `support-skill-validator` | Validate skills/rules for consistency |
|
|
160
|
+
|
|
161
|
+
## Skill Priority
|
|
162
|
+
|
|
163
|
+
When multiple skills could apply, use this order:
|
|
164
|
+
|
|
165
|
+
1. **Process skills first** (support-debug, plan-brainstorm) -- these determine HOW to approach the task
|
|
166
|
+
2. **Implementation skills second** (build-tdd, quality-code-review) -- these guide execution
|
|
167
|
+
|
|
168
|
+
**Route by mode.** Detect repo state per `rules/common/skill-selection.md`:
|
|
169
|
+
- Prototype mode (path under `pocs/`, no codified architecture in `aiwiki/architecture/`): use `iterate-prototype` for tweaks; do NOT load `plan-brainstorm` or `build-tdd`.
|
|
170
|
+
- Production mode (codified architecture exists, manifest's `phase_plan.codify: active` or later): use `build-tdd` for code changes; `plan-*` skills are non-prototype fallback only.
|
|
171
|
+
|
|
172
|
+
Examples:
|
|
173
|
+
- "Fix this bug" -> `support-debug` first, then domain-specific skills
|
|
174
|
+
- "Deploy this" -> `deliver-deploy` (which checks gates from earlier skills)
|
|
175
|
+
|
|
176
|
+
## Skill Types
|
|
177
|
+
|
|
178
|
+
**Rigid skills** (build-tdd, support-debug): Follow exactly. Do not adapt away the discipline. These skills exist because shortcuts cause failures.
|
|
179
|
+
|
|
180
|
+
**Flexible skills** (deliver-onboarding, quality-uiux): Adapt principles to context. The output format and depth should match the project.
|
|
181
|
+
|
|
182
|
+
The skill itself indicates which type it is by its language. "MUST" and "NEVER" indicate rigid. "Consider" and "adapt" indicate flexible.
|
|
183
|
+
|
|
184
|
+
## .forge/ Directory Management
|
|
185
|
+
|
|
186
|
+
### Auto-Creation
|
|
187
|
+
|
|
188
|
+
When starting any work item (via `/feature`, `/bugfix`, etc.), auto-create the directory structure:
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
.forge/
|
|
192
|
+
work/
|
|
193
|
+
{type}/ # feature | bugfix | refactor | hotfix | greenfield
|
|
194
|
+
{name}/
|
|
195
|
+
manifest.yaml -> Initialize from .claude/templates/manifests/{type}.yaml
|
|
196
|
+
requirements.md -> Populated by discover-requirements (where applicable)
|
|
197
|
+
architecture/ -> Populated by plan-architecture (where applicable)
|
|
198
|
+
tasks.md -> Populated by plan-task-decompose (where applicable)
|
|
199
|
+
test-plan.md -> Populated by quality-test-plan (where applicable)
|
|
200
|
+
test-results.md -> Populated by quality-test-execution (where applicable)
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
**Note on architecture/ and decisions/ placement (v6):** The `architecture/` directory under `.forge/work/{type}/{name}/` is a working draft used by the non-prototype fallback flow. In the prototype-driven flow, final architecture pages land in `aiwiki/architecture/` (written by `harden`). Decisions (ADRs) ALWAYS land in `aiwiki/decisions/`; the `.forge/work/.../decisions/` directory was retired in v6.
|
|
204
|
+
|
|
205
|
+
### Manifest Initialization
|
|
206
|
+
|
|
207
|
+
```yaml
|
|
208
|
+
schema_version: "6"
|
|
209
|
+
name: "{name}"
|
|
210
|
+
type: "{type}" # feature | bugfix | refactor | hotfix | greenfield
|
|
211
|
+
description: "{what this work is for}"
|
|
212
|
+
status: in-progress # in-progress | paused | completed | escalated
|
|
213
|
+
created: "{YYYY-MM-DD}"
|
|
214
|
+
command: "{command}" # the slash command that created this manifest, e.g. "feature"
|
|
215
|
+
phase_plan: # Plan-status per workflow milestone; set at preflight.
|
|
216
|
+
concept: active # active | active-light | active-commit-only | skipped | as-discovered | complete-inline
|
|
217
|
+
wireframe: active
|
|
218
|
+
prototype: active
|
|
219
|
+
iterate: active
|
|
220
|
+
codify: active
|
|
221
|
+
production-build: active
|
|
222
|
+
deliver: active
|
|
223
|
+
phases: # Gate state per phase; mutated by skills during execution.
|
|
224
|
+
# Shape per work type — see templates/manifests/{type}.yaml.
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Phase names in `phase_plan` are canonical per `.claude/references/common/phases.md`; full schema in `.claude/templates/manifests/v6/SCHEMA.md`. Phases are defaults, not requirements — set `phase_plan.{phase}: skipped` (or any other plan-status) at preflight to capture deviations.
|
|
228
|
+
|
|
229
|
+
### Document Versioning
|
|
230
|
+
|
|
231
|
+
When a skill updates an artifact in `.forge/`:
|
|
232
|
+
|
|
233
|
+
1. If the artifact has been approved by the user, do NOT overwrite it silently
|
|
234
|
+
2. If rework is needed, create a new version: `architecture-v2/` or note the revision in the file
|
|
235
|
+
3. The manifest tracks which version is current
|
|
236
|
+
4. Never delete previous versions -- they provide audit trail
|
|
237
|
+
|
|
238
|
+
### Directory Hygiene
|
|
239
|
+
|
|
240
|
+
- `.forge/` should be in `.gitignore` (working files, not source)
|
|
241
|
+
- Exception: `manifest.yaml` may be committed for team visibility (project preference)
|
|
242
|
+
- Gotchas live in `aiwiki/gotchas/` per the aiwiki typed-page model, see `aiwiki/CLAUDE.md`
|
|
243
|
+
- Clean up completed feature directories only when user explicitly requests it
|
|
244
|
+
|
|
245
|
+
## Red Flags -- STOP and Invoke the Skill
|
|
246
|
+
|
|
247
|
+
These thoughts mean you are rationalizing skipping a skill:
|
|
248
|
+
|
|
249
|
+
| Thought | Reality |
|
|
250
|
+
|---|---|
|
|
251
|
+
| "This is just a simple question" | Questions often lead to tasks. Check for applicable skills. |
|
|
252
|
+
| "I need more context first" | Skill check comes BEFORE clarifying questions. |
|
|
253
|
+
| "Let me explore the codebase first" | Skills tell you HOW to explore. Check first. |
|
|
254
|
+
| "I can check git/files quickly" | Files lack conversation context. Skills provide process. |
|
|
255
|
+
| "Let me gather information first" | Skills tell you HOW to gather information. |
|
|
256
|
+
| "This doesn't need a formal skill" | If a skill exists for it, use it. |
|
|
257
|
+
| "I remember this skill" | Skills evolve. Read the current version via Skill tool. |
|
|
258
|
+
| "This doesn't count as a task" | Any action is a task. Check for skills. |
|
|
259
|
+
| "The skill is overkill" | Simple things become complex. Use it. |
|
|
260
|
+
| "I'll just do this one thing first" | Check BEFORE doing anything. |
|
|
261
|
+
| "This feels productive" | Undisciplined action wastes time. Skills prevent this. |
|
|
262
|
+
| "I know what that means" | Knowing the concept is not the same as using the skill. Invoke it. |
|
|
263
|
+
|
|
264
|
+
## User Instructions
|
|
265
|
+
|
|
266
|
+
User instructions say WHAT to do, not HOW to do it. "Add X" or "Fix Y" does not mean skip the skill workflow.
|
|
267
|
+
|
|
268
|
+
- "Add a payment feature" -> still use `/feature` (discover -> plan -> build -> quality -> deliver)
|
|
269
|
+
- "Fix the login bug" -> still use `support-debug` (four-phase process)
|
|
270
|
+
- "Deploy to production" -> still use `deliver-deploy` (full pipeline)
|
|
271
|
+
|
|
272
|
+
The only exception is when the user **explicitly** says to skip a skill or step: "Skip brainstorming, just implement it." Even then, note what was skipped in the manifest.
|
|
273
|
+
|
|
274
|
+
## Session Start Behavior
|
|
275
|
+
|
|
276
|
+
When a new session begins:
|
|
277
|
+
|
|
278
|
+
1. **Check for in-progress work**
|
|
279
|
+
- Walk `.forge/work/*/` for any manifests with `status: in-progress` or `status: paused`
|
|
280
|
+
- Skip `status: completed` and `status: escalated` items — they are terminal states
|
|
281
|
+
- If found, summarize: "You have in-progress work: {type}/{name}, currently in {phase}. Want to continue?"
|
|
282
|
+
- When multiple in-progress items exist, use `{type}/{name}` as the canonical identifier (names can collide across types)
|
|
283
|
+
|
|
284
|
+
2. **Lightweight validation**
|
|
285
|
+
- Run `support-skill-validator` quick check (I/O graph only)
|
|
286
|
+
- Report any issues found
|
|
287
|
+
|
|
288
|
+
3. **Check for recent gotchas**
|
|
289
|
+
- Read `aiwiki/gotchas/` for entries relevant to current work (and `~/.claude/gotchas/` for global entries)
|
|
290
|
+
- If a gotcha's frontmatter has a `proposed_rule:` block, surface it as a hard-interrupt per `support-gotcha` Step 6
|
|
291
|
+
|
|
292
|
+
## I/O Contract
|
|
293
|
+
|
|
294
|
+
| Field | Value |
|
|
295
|
+
|---|---|
|
|
296
|
+
| **Requires** | -- (meta-skill, always available) |
|
|
297
|
+
| **Produces** | Guidance, `.forge/` directory structure, command routing |
|
|
298
|
+
| **Feeds into** | All other skills (by ensuring they are invoked correctly) |
|
|
299
|
+
|
|
300
|
+
## Quick Reference
|
|
301
|
+
|
|
302
|
+
| Situation | Action |
|
|
303
|
+
|---|---|
|
|
304
|
+
| User wants to build something | Route to `/feature` or `/greenfield` |
|
|
305
|
+
| Something is broken | Route to `/bugfix` or invoke `support-debug` |
|
|
306
|
+
| Code needs review | Invoke `quality-code-review` |
|
|
307
|
+
| Ready to deploy | Invoke `deliver-deploy` |
|
|
308
|
+
| New session, existing feature | Resume from last phase in manifest |
|
|
309
|
+
| Not sure which skill | Check this guide's Skill Groups table |
|
|
310
|
+
| User says "skip X" | Note in manifest, proceed without that step |
|
|
311
|
+
| Thought: "skill is overkill" | STOP. Invoke the skill. |
|