bmad-module-skill-forge 0.6.0 β 0.7.1
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/README.md +2 -2
- package/docs/agents.md +9 -5
- package/docs/concepts.md +17 -13
- package/docs/examples.md +19 -4
- package/docs/getting-started.md +34 -19
- package/docs/how-it-works.md +87 -84
- package/docs/index.md +1 -1
- package/docs/workflows.md +88 -40
- package/package.json +1 -1
- package/src/agents/forger.agent.yaml +17 -5
- package/src/forger/README.md +1 -1
- package/src/forger/forge-tier.yaml +2 -1
- package/src/forger/preferences.yaml +5 -7
- package/src/knowledge/agentskills-spec.md +1 -1
- package/src/knowledge/architecture-verification.md +102 -0
- package/src/knowledge/ccc-bridge.md +3 -2
- package/src/knowledge/confidence-tiers.md +12 -1
- package/src/knowledge/doc-fetcher.md +1 -1
- package/src/knowledge/manual-section-integrity.md +2 -2
- package/src/knowledge/overview.md +11 -7
- package/src/knowledge/progressive-capability.md +5 -2
- package/src/knowledge/qmd-registry.md +5 -2
- package/src/knowledge/skf-knowledge-index.csv +2 -0
- package/src/knowledge/skill-lifecycle.md +26 -2
- package/src/knowledge/split-body-strategy.md +16 -2
- package/src/knowledge/tool-resolution.md +55 -0
- package/src/knowledge/zero-hallucination.md +11 -8
- package/src/module-help.csv +9 -6
- package/src/module.yaml +3 -0
- package/src/workflows/README.md +35 -17
- package/src/workflows/analyze-source/data/skill-brief-schema.md +18 -5
- package/src/workflows/analyze-source/steps-c/step-01-init.md +2 -2
- package/src/workflows/analyze-source/steps-c/step-01b-continue.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-02-scan-project.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-03-identify-units.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-04-map-and-detect.md +3 -3
- package/src/workflows/analyze-source/steps-c/step-05-recommend.md +1 -1
- package/src/workflows/analyze-source/steps-c/step-06-generate-briefs.md +2 -2
- package/src/workflows/analyze-source/workflow.md +2 -2
- package/src/workflows/audit-skill/data/severity-rules.md +1 -1
- package/src/workflows/audit-skill/steps-c/step-01-init.md +2 -1
- package/src/workflows/audit-skill/steps-c/step-02-re-index.md +8 -1
- package/src/workflows/audit-skill/steps-c/step-03-structural-diff.md +2 -2
- package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +2 -2
- package/src/workflows/audit-skill/steps-c/step-05-severity-classify.md +1 -1
- package/src/workflows/audit-skill/workflow.md +2 -1
- package/src/workflows/brief-skill/data/scope-templates.md +10 -0
- package/src/workflows/brief-skill/data/skill-brief-schema.md +25 -23
- package/src/workflows/brief-skill/steps-c/step-01-gather-intent.md +1 -1
- package/src/workflows/brief-skill/steps-c/step-02-analyze-target.md +1 -1
- package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +3 -0
- package/src/workflows/create-skill/data/extraction-patterns.md +7 -1
- package/src/workflows/create-skill/data/skill-sections.md +12 -11
- package/src/workflows/create-skill/data/source-resolution-protocols.md +2 -2
- package/src/workflows/create-skill/data/tier-degradation-rules.md +1 -1
- package/src/workflows/create-skill/steps-c/step-01-load-brief.md +14 -10
- package/src/workflows/create-skill/steps-c/step-02b-ccc-discover.md +4 -0
- package/src/workflows/create-skill/steps-c/step-03-extract.md +19 -19
- package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +3 -3
- package/src/workflows/create-skill/steps-c/step-03c-fetch-docs.md +3 -1
- package/src/workflows/create-skill/steps-c/step-04-enrich.md +3 -1
- package/src/workflows/create-skill/steps-c/step-05-compile.md +4 -3
- package/src/workflows/create-skill/steps-c/step-06-validate.md +2 -2
- package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +33 -44
- package/src/workflows/create-skill/steps-c/step-08-report.md +25 -11
- package/src/workflows/create-skill/workflow.md +2 -2
- package/src/workflows/create-stack-skill/data/compose-mode-rules.md +65 -0
- package/src/workflows/create-stack-skill/data/manifest-patterns.md +23 -1
- package/src/workflows/create-stack-skill/data/stack-skill-template.md +28 -6
- package/src/workflows/create-stack-skill/steps-c/step-01-init.md +25 -7
- package/src/workflows/create-stack-skill/steps-c/step-02-detect-manifests.md +37 -3
- package/src/workflows/create-stack-skill/steps-c/step-03-rank-and-confirm.md +29 -3
- package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +50 -7
- package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +35 -3
- package/src/workflows/create-stack-skill/steps-c/step-06-compile-stack.md +5 -1
- package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +53 -5
- package/src/workflows/create-stack-skill/steps-c/step-08-validate.md +3 -3
- package/src/workflows/create-stack-skill/steps-c/step-09-report.md +8 -2
- package/src/workflows/create-stack-skill/workflow.md +2 -2
- package/src/workflows/export-skill/data/managed-section-format.md +8 -1
- package/src/workflows/export-skill/data/snippet-format.md +1 -1
- package/src/workflows/export-skill/steps-c/step-04-update-context.md +7 -2
- package/src/workflows/export-skill/steps-c/step-05-token-report.md +1 -1
- package/src/workflows/export-skill/workflow.md +3 -1
- package/src/workflows/quick-skill/data/skill-template.md +18 -6
- package/src/workflows/quick-skill/steps-c/step-04-compile.md +26 -6
- package/src/workflows/quick-skill/steps-c/step-05-validate.md +1 -1
- package/src/workflows/quick-skill/steps-c/step-06-write.md +3 -0
- package/src/workflows/quick-skill/workflow.md +1 -1
- package/src/workflows/refine-architecture/data/refinement-rules.md +102 -0
- package/src/workflows/refine-architecture/steps-c/step-01-init.md +188 -0
- package/src/workflows/refine-architecture/steps-c/step-02-gap-analysis.md +179 -0
- package/src/workflows/refine-architecture/steps-c/step-03-issue-detection.md +182 -0
- package/src/workflows/refine-architecture/steps-c/step-04-improvements.md +169 -0
- package/src/workflows/refine-architecture/steps-c/step-05-compile.md +200 -0
- package/src/workflows/refine-architecture/steps-c/step-06-report.md +147 -0
- package/src/workflows/refine-architecture/workflow.md +61 -0
- package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +2 -1
- package/src/workflows/setup-forge/steps-c/step-01b-ccc-index.md +5 -3
- package/src/workflows/setup-forge/steps-c/step-02-write-config.md +15 -16
- package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +1 -1
- package/src/workflows/setup-forge/steps-c/step-04-report.md +2 -2
- package/src/workflows/setup-forge/workflow.md +3 -2
- package/src/workflows/test-skill/data/scoring-rules.md +3 -0
- package/src/workflows/test-skill/data/source-access-protocol.md +1 -1
- package/src/workflows/test-skill/steps-c/step-01-init.md +1 -0
- package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +2 -0
- package/src/workflows/test-skill/workflow.md +2 -2
- package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +3 -3
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +8 -3
- package/src/workflows/update-skill/steps-c/step-05-validate.md +8 -12
- package/src/workflows/update-skill/steps-c/step-06-write.md +5 -2
- package/src/workflows/update-skill/workflow.md +1 -1
- package/src/workflows/verify-stack/data/coverage-patterns.md +45 -0
- package/src/workflows/verify-stack/data/feasibility-report-template.md +63 -0
- package/src/workflows/verify-stack/data/integration-verification-rules.md +73 -0
- package/src/workflows/verify-stack/steps-c/step-01-init.md +174 -0
- package/src/workflows/verify-stack/steps-c/step-02-coverage.md +181 -0
- package/src/workflows/verify-stack/steps-c/step-03-integrations.md +195 -0
- package/src/workflows/verify-stack/steps-c/step-04-requirements.md +168 -0
- package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +191 -0
- package/src/workflows/verify-stack/steps-c/step-06-report.md +197 -0
- package/src/workflows/verify-stack/workflow.md +61 -0
- package/src/workflows/analyze-source/validation-report.md +0 -657
- package/src/workflows/analyze-source/workflow-plan-analyze-source.md +0 -385
- package/src/workflows/audit-skill/validation-report.md +0 -545
- package/src/workflows/audit-skill/workflow-plan-audit-skill.md +0 -318
- package/src/workflows/brief-skill/validation-report.md +0 -630
- package/src/workflows/brief-skill/workflow-plan-brief-skill.md +0 -360
- package/src/workflows/create-skill/validation-report.md +0 -189
- package/src/workflows/create-skill/workflow-plan-create-skill.md +0 -525
- package/src/workflows/create-stack-skill/validation-report.md +0 -401
- package/src/workflows/create-stack-skill/workflow-plan-create-stack-skill.md +0 -481
- package/src/workflows/export-skill/validation-report.md +0 -263
- package/src/workflows/export-skill/workflow-plan-export-skill.md +0 -369
- package/src/workflows/quick-skill/validation-report.md +0 -543
- package/src/workflows/quick-skill/workflow-plan-quick-skill.md +0 -405
- package/src/workflows/setup-forge/validation-report.md +0 -504
- package/src/workflows/setup-forge/workflow-plan-setup-forge.md +0 -430
- package/src/workflows/test-skill/validation-report.md +0 -390
- package/src/workflows/test-skill/workflow-plan-test-skill.md +0 -292
- package/src/workflows/update-skill/data/tier-degradation-rules.md +0 -46
- package/src/workflows/update-skill/validation-report.md +0 -559
- package/src/workflows/update-skill/workflow-plan-update-skill.md +0 -441
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'step-04-improvements'
|
|
3
|
+
description: 'Suggest capability expansions from skill data not leveraged in the architecture'
|
|
4
|
+
|
|
5
|
+
nextStepFile: './step-05-compile.md'
|
|
6
|
+
refinementRulesData: '../data/refinement-rules.md'
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Step 4: Improvement Detection
|
|
10
|
+
|
|
11
|
+
## STEP GOAL:
|
|
12
|
+
|
|
13
|
+
Identify capability expansions β library features documented in the generated skills that the architecture does not leverage. Detect unused capabilities, cross-library synergies visible from skill API surfaces, and alternative patterns that could strengthen the architecture. For each improvement, document the capability and suggest how to incorporate it.
|
|
14
|
+
|
|
15
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
16
|
+
|
|
17
|
+
### Universal Rules:
|
|
18
|
+
|
|
19
|
+
- π CRITICAL: Read the complete step file before taking any action
|
|
20
|
+
- π CRITICAL: When loading next step with 'C', ensure entire file is read
|
|
21
|
+
- βοΈ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
|
|
22
|
+
- β
YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
23
|
+
|
|
24
|
+
### Role Reinforcement:
|
|
25
|
+
|
|
26
|
+
- β
You are an architecture refinement analyst identifying untapped capabilities
|
|
27
|
+
- β
Every improvement must cite specific APIs from the generated skills β no speculation
|
|
28
|
+
- β
Improvements are suggestions, not mandates β present them as optional enhancements
|
|
29
|
+
|
|
30
|
+
### Step-Specific Rules:
|
|
31
|
+
|
|
32
|
+
- π― Focus ONLY on capability expansions not leveraged in the architecture
|
|
33
|
+
- π« FORBIDDEN to detect gaps (Step 02) or issues (Step 03) β those are already captured
|
|
34
|
+
- π― Improvements are ADDITIVE suggestions β they enhance, not contradict, the architecture
|
|
35
|
+
- π¬ Every improvement MUST include evidence citations from actual skill content
|
|
36
|
+
|
|
37
|
+
## EXECUTION PROTOCOLS:
|
|
38
|
+
|
|
39
|
+
- Load refinement rules for improvement detection criteria
|
|
40
|
+
- Compare full skill API surfaces against architecture usage
|
|
41
|
+
- Detect unused capabilities, cross-library synergies, and alternative patterns
|
|
42
|
+
- Append improvement findings as workflow state for Step 05
|
|
43
|
+
- Only improvement detection β no gap or issue analysis
|
|
44
|
+
|
|
45
|
+
## CONTEXT BOUNDARIES:
|
|
46
|
+
|
|
47
|
+
- Available: Architecture document content, skill inventory and SKILL.md files, refinement rules
|
|
48
|
+
- Focus: Finding capabilities in skills that the architecture does not use
|
|
49
|
+
- Limits: Only detect improvements β do not re-detect gaps or issues from earlier steps
|
|
50
|
+
- Dependencies: Step 01 (skill inventory), Steps 02-03 (complete β do not duplicate findings)
|
|
51
|
+
|
|
52
|
+
## MANDATORY SEQUENCE
|
|
53
|
+
|
|
54
|
+
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
55
|
+
|
|
56
|
+
### 1. Reference Refinement Rules
|
|
57
|
+
|
|
58
|
+
Use the refinement rules loaded in Step 01 from `{refinementRulesData}`. If not available in context, reload from `{refinementRulesData}`.
|
|
59
|
+
|
|
60
|
+
Extract: improvement classification (Unused Capability, Cross-Library Synergy, Alternative Pattern), detection method, and citation format.
|
|
61
|
+
|
|
62
|
+
### 2. Build Architecture Usage Map
|
|
63
|
+
|
|
64
|
+
For each library referenced in the architecture document, extract how it is used:
|
|
65
|
+
|
|
66
|
+
- What capabilities are described (e.g., "Loro for real-time data sync")
|
|
67
|
+
- What APIs or features are referenced
|
|
68
|
+
- What role it plays in the architecture
|
|
69
|
+
|
|
70
|
+
This creates a map of `{library} -> {described_usage[]}` for comparison against full skill API surfaces.
|
|
71
|
+
|
|
72
|
+
### 3. Compare Skill API Surfaces Against Architecture Usage
|
|
73
|
+
|
|
74
|
+
For each skill in the inventory:
|
|
75
|
+
|
|
76
|
+
**Load the full API surface from SKILL.md:**
|
|
77
|
+
- All exported functions with signatures
|
|
78
|
+
- All exported types and interfaces
|
|
79
|
+
- All documented capabilities and features
|
|
80
|
+
- All protocol support indicators
|
|
81
|
+
|
|
82
|
+
**Compare against the architecture usage map:**
|
|
83
|
+
- Which exports does the architecture reference or imply usage of?
|
|
84
|
+
- Which exports are NOT referenced in the architecture at all?
|
|
85
|
+
|
|
86
|
+
**For each unreferenced capability:**
|
|
87
|
+
- Evaluate relevance: would this capability strengthen the architecture?
|
|
88
|
+
- Skip trivial or internal-only exports (utilities, helpers, debug functions)
|
|
89
|
+
- Flag capabilities that could address architectural concerns or expand functionality
|
|
90
|
+
|
|
91
|
+
### 4. Detect Cross-Library Synergies
|
|
92
|
+
|
|
93
|
+
Examine pairs of skills for complementary capabilities not exploited in the architecture:
|
|
94
|
+
|
|
95
|
+
- Does Library A export an event system that Library B could consume?
|
|
96
|
+
- Does Library A produce a data format that Library B has an optimized processor for?
|
|
97
|
+
- Do two libraries offer overlapping capabilities that could be unified?
|
|
98
|
+
|
|
99
|
+
**Only flag synergies where both sides have documented APIs** β do not speculate about undocumented features.
|
|
100
|
+
|
|
101
|
+
### 5. Document Each Improvement
|
|
102
|
+
|
|
103
|
+
For each detected improvement, apply the citation format from {refinementRulesData}:
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
**[IMPROVEMENT]**: {description}
|
|
107
|
+
|
|
108
|
+
Evidence:
|
|
109
|
+
- {skill_name} exports: `{function}({params}) -> {return_type}`
|
|
110
|
+
- Architecture uses: {what the architecture currently describes}
|
|
111
|
+
- Untapped: {what the skill offers that the architecture does not mention}
|
|
112
|
+
|
|
113
|
+
Suggestion: {how to incorporate this capability into the architecture}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Categorize improvements:**
|
|
117
|
+
- **High:** Capabilities that address known architectural concerns or significantly expand functionality
|
|
118
|
+
- **Medium:** Capabilities that add convenience or efficiency improvements
|
|
119
|
+
- **Low:** Capabilities that are nice-to-have but not impactful
|
|
120
|
+
|
|
121
|
+
### 6. Display Improvement Suggestions
|
|
122
|
+
|
|
123
|
+
"**Pass 3: Improvement Detection β Untapped Capabilities**
|
|
124
|
+
|
|
125
|
+
**Improvements Found:** {count} ({high_count} high value, {medium_count} medium, {low_count} low)
|
|
126
|
+
|
|
127
|
+
{IF improvements found:}
|
|
128
|
+
| # | Library | Improvement Type | Value | Summary |
|
|
129
|
+
|---|---------|-----------------|-------|---------|
|
|
130
|
+
| {n} | {lib} | {type} | {value} | {brief description} |
|
|
131
|
+
|
|
132
|
+
{For each improvement, display the full citation with evidence and suggestion}
|
|
133
|
+
|
|
134
|
+
{IF no improvements found:}
|
|
135
|
+
**No untapped capabilities detected.** The architecture fully leverages the skill API surfaces.
|
|
136
|
+
|
|
137
|
+
**Proceeding to compile refined architecture...**"
|
|
138
|
+
|
|
139
|
+
Store all improvement findings as workflow state for Step 05. To ensure durability across long runs, also append a `<!-- [RA-IMPROVEMENTS] ... -->` comment block to `{forge_data_folder}/ra-state-{project_name}.md` containing the **complete formatted improvement findings** (full citation blocks with evidence, value ratings, and suggestions β not just counts) β Step 05 can read this back if context degrades. **Do NOT write to `{output_folder}/refined-architecture-{project_name}.md` β that file is created only in step-05.**
|
|
140
|
+
|
|
141
|
+
### 7. Auto-Proceed to Next Step
|
|
142
|
+
|
|
143
|
+
Load, read the full file and then execute `{nextStepFile}`.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## π¨ SYSTEM SUCCESS/FAILURE METRICS
|
|
148
|
+
|
|
149
|
+
### β
SUCCESS:
|
|
150
|
+
|
|
151
|
+
- Refinement rules loaded from {refinementRulesData}
|
|
152
|
+
- Architecture usage map built for each referenced library
|
|
153
|
+
- Full skill API surfaces compared against architecture usage
|
|
154
|
+
- Cross-library synergies checked for complementary capabilities
|
|
155
|
+
- Every improvement includes evidence citations from actual skill content
|
|
156
|
+
- Improvements categorized by value (High, Medium, Low)
|
|
157
|
+
- Improvement results displayed with count and details
|
|
158
|
+
- Improvement findings stored as workflow state for Step 05
|
|
159
|
+
- Auto-proceeded to step 05
|
|
160
|
+
|
|
161
|
+
### β SYSTEM FAILURE:
|
|
162
|
+
|
|
163
|
+
- Improvements without evidence from actual skills (speculation)
|
|
164
|
+
- Re-detecting gaps (Step 02) or issues (Step 03)
|
|
165
|
+
- Presenting trivial internal-only exports as improvements
|
|
166
|
+
- Not categorizing improvements by value
|
|
167
|
+
- Hardcoded paths instead of frontmatter variables
|
|
168
|
+
|
|
169
|
+
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'step-05-compile'
|
|
3
|
+
description: 'Produce the refined architecture document by annotating the original with gaps, issues, and improvements'
|
|
4
|
+
|
|
5
|
+
nextStepFile: './step-06-report.md'
|
|
6
|
+
outputFile: '{output_folder}/refined-architecture-{project_name}.md'
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Step 5: Compile Refined Architecture
|
|
10
|
+
|
|
11
|
+
## STEP GOAL:
|
|
12
|
+
|
|
13
|
+
Produce the refined architecture document by starting with the original as a base, adding gap-fill subsections, issue callout blocks, and improvement suggestions. Append a Refinement Summary. Present for user review before finalizing.
|
|
14
|
+
|
|
15
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
16
|
+
|
|
17
|
+
### Universal Rules:
|
|
18
|
+
|
|
19
|
+
- π CRITICAL: Read the complete step file before taking any action
|
|
20
|
+
- βοΈ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
|
|
21
|
+
- β
YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
22
|
+
|
|
23
|
+
### Role Reinforcement:
|
|
24
|
+
|
|
25
|
+
- β
You are an architecture refinement analyst compiling the final refined document
|
|
26
|
+
- β
Additive, not destructive β preserve every word of the original, only add refinements
|
|
27
|
+
- β
The document must be in `{document_output_language}`
|
|
28
|
+
|
|
29
|
+
### Step-Specific Rules:
|
|
30
|
+
|
|
31
|
+
- π« FORBIDDEN to discover new gaps, issues, or improvements β use only what Steps 02-04 produced
|
|
32
|
+
- π« FORBIDDEN to delete, reword, or rearrange original architecture content
|
|
33
|
+
- π¬ Present compiled document for user review (Gate checkpoint)
|
|
34
|
+
|
|
35
|
+
## EXECUTION PROTOCOLS:
|
|
36
|
+
|
|
37
|
+
- Compile refined architecture from original + findings from Steps 02-04
|
|
38
|
+
- Write output to {outputFile}, wait for user approval before proceeding
|
|
39
|
+
|
|
40
|
+
## CONTEXT BOUNDARIES:
|
|
41
|
+
|
|
42
|
+
- From Steps 01-04: Architecture document, skill inventory, gap/issue/improvement findings
|
|
43
|
+
- This step produces: The refined architecture document at {outputFile}
|
|
44
|
+
|
|
45
|
+
## MANDATORY SEQUENCE
|
|
46
|
+
|
|
47
|
+
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
48
|
+
|
|
49
|
+
### 1. Prepare the Original as Base
|
|
50
|
+
|
|
51
|
+
Load the complete original architecture document.
|
|
52
|
+
|
|
53
|
+
This is the base. Every line of the original MUST appear in the refined document, unmodified.
|
|
54
|
+
|
|
55
|
+
**Context recovery check:** If gap, issue, or improvement findings from Steps 02-04 are not available in context (e.g., due to context degradation in long runs), attempt to read the durability state from `{forge_data_folder}/ra-state-{project_name}.md`. Parse the `<!-- [RA-GAPS] -->`, `<!-- [RA-ISSUES] -->`, and `<!-- [RA-IMPROVEMENTS] -->` comment blocks to recover the complete formatted findings (each block contains full citation text with evidence, not just counts). If a section is still missing or contains only summary counts after recovery, HALT: "β οΈ Context for the [Gaps|Issues|Improvements] analysis was lost and the durability state is insufficient to reconstruct findings. Re-run [RA] from the beginning β step 01 will reset the state file, then steps 02-04 will rebuild all findings."
|
|
56
|
+
|
|
57
|
+
### 2. Insert Gap-Fill Subsections
|
|
58
|
+
|
|
59
|
+
For each gap finding from Step 02:
|
|
60
|
+
|
|
61
|
+
**Locate the most relevant section** in the original architecture where this integration would logically belong.
|
|
62
|
+
|
|
63
|
+
**Insert a gap-fill subsection** one heading level deeper than the parent section:
|
|
64
|
+
|
|
65
|
+
```markdown
|
|
66
|
+
#### RA: {Library A} <-> {Library B} Integration Path
|
|
67
|
+
|
|
68
|
+
> [!NOTE] **Gap Identified by Refine Architecture**
|
|
69
|
+
> This integration path was not documented in the original architecture but is supported by skill API evidence.
|
|
70
|
+
|
|
71
|
+
{Gap description with full evidence citation from Step 02}
|
|
72
|
+
|
|
73
|
+
**Proposed Integration:**
|
|
74
|
+
{Suggested architecture content describing how the libraries connect}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
If no clear parent section exists, collect orphan gaps into a new section: "## RA: Additional Integration Paths"
|
|
78
|
+
|
|
79
|
+
### 3. Insert Issue Annotations
|
|
80
|
+
|
|
81
|
+
For each issue finding from Step 03:
|
|
82
|
+
|
|
83
|
+
**Locate the section** containing the contradicted claim.
|
|
84
|
+
|
|
85
|
+
**Insert an issue callout block** immediately after the contradicted text:
|
|
86
|
+
|
|
87
|
+
```markdown
|
|
88
|
+
> [!WARNING] **Issue Detected by Refine Architecture** ({severity})
|
|
89
|
+
> Architecture states: "{quoted claim}"
|
|
90
|
+
> Skill reality: {contradicting evidence from skill}
|
|
91
|
+
> {IF VS report}: VS verdict: {verdict} for {pair}
|
|
92
|
+
>
|
|
93
|
+
> **Suggested Correction:** {specific correction with API evidence}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Placement priority:** Place each issue callout immediately after the contradicted text in its original location. If the contradicted claim is inside a Markdown list item, code block, or table row where inserting a callout block would break syntax, place the callout immediately after the enclosing block instead. If the contradicted claim cannot be precisely located, collect into "## RA: Additional Issues Detected" at the end of the document, ordered by severity (Critical first, then Major, then Minor).
|
|
97
|
+
|
|
98
|
+
### 4. Insert Improvement Suggestions
|
|
99
|
+
|
|
100
|
+
For each improvement finding from Step 04:
|
|
101
|
+
|
|
102
|
+
**Locate the section** where the library is discussed.
|
|
103
|
+
|
|
104
|
+
**Insert an improvement subsection** one heading level deeper:
|
|
105
|
+
|
|
106
|
+
```markdown
|
|
107
|
+
#### RA: Enhancement β {Improvement Title}
|
|
108
|
+
|
|
109
|
+
> [!TIP] **Improvement Suggested by Refine Architecture** ({value} value)
|
|
110
|
+
> {skill_name} provides `{api}` which is not currently leveraged.
|
|
111
|
+
|
|
112
|
+
{Full improvement description with evidence citation from Step 04}
|
|
113
|
+
|
|
114
|
+
**How to Incorporate:**
|
|
115
|
+
{Specific suggestion for updating the architecture}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Order by value:** High value improvements first, then Medium, then Low.
|
|
119
|
+
|
|
120
|
+
**Placement fallback:** If the library's only architecture mention is inside a table, code block, or Mermaid diagram where inserting a subsection would break syntax, collect into `## RA: Additional Improvements Suggested` at the end of the document.
|
|
121
|
+
|
|
122
|
+
### 5. Add Refinement Summary Section
|
|
123
|
+
|
|
124
|
+
Append a `## Refinement Summary` section containing:
|
|
125
|
+
|
|
126
|
+
- **Header:** "Produced by: Refine Architecture workflow using {skill_count} skills" and date
|
|
127
|
+
- **Changes Made table** with the following rows:
|
|
128
|
+
|
|
129
|
+
| Category | Count | Breakdown |
|
|
130
|
+
|----------|-------|-----------|
|
|
131
|
+
| Gaps Filled | {gap_count} | β |
|
|
132
|
+
| Issues Flagged | {issue_count} | Critical: {critical_count}, Major: {major_count}, Minor: {minor_count} |
|
|
133
|
+
| Improvements Suggested | {improvement_count} | High: {high_count}, Medium: {medium_count}, Low: {low_count} |
|
|
134
|
+
| Skills Used as Evidence | {skill_count} | β |
|
|
135
|
+
- **Evidence Sources table:** Each skill name and how many refinements cite it
|
|
136
|
+
- **Next Steps:** Review `[!WARNING]` issues, `[!NOTE]` gaps, `[!TIP]` improvements; then run **[SS] Stack Skill** to compose your individual skills into a unified stack skill, providing this refined architecture doc when prompted
|
|
137
|
+
|
|
138
|
+
### 6. Write the Refined Document
|
|
139
|
+
|
|
140
|
+
Write the complete refined architecture to `{outputFile}`.
|
|
141
|
+
|
|
142
|
+
### 7. Present Compiled Document for Review
|
|
143
|
+
|
|
144
|
+
"**Refined architecture compiled. Please review:**
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
{Display the Refinement Summary section only β not the full document}
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
**The full refined document has been written to:** `{outputFile}`
|
|
153
|
+
|
|
154
|
+
Please review the refinements:
|
|
155
|
+
- {gap_count} gap-fill subsections added
|
|
156
|
+
- {issue_count} issue annotations inserted
|
|
157
|
+
- {improvement_count} improvement suggestions included
|
|
158
|
+
- Original architecture content preserved in full
|
|
159
|
+
|
|
160
|
+
**Does the refinement look correct?**"
|
|
161
|
+
|
|
162
|
+
### 8. Present MENU OPTIONS
|
|
163
|
+
|
|
164
|
+
Display: **Select:** [C] Continue to Final Report
|
|
165
|
+
|
|
166
|
+
#### EXECUTION RULES:
|
|
167
|
+
|
|
168
|
+
- ALWAYS halt and wait for user input after presenting compilation
|
|
169
|
+
- ONLY proceed to next step when user approves and selects 'C'
|
|
170
|
+
|
|
171
|
+
#### Menu Handling Logic:
|
|
172
|
+
|
|
173
|
+
- IF C: Load, read entire file, then execute {nextStepFile}
|
|
174
|
+
- IF Any other: Process as feedback, adjust specific refinements in the document, rewrite {outputFile}, redisplay preview, then [Redisplay Menu Options](#8-present-menu-options)
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## π¨ SYSTEM SUCCESS/FAILURE METRICS
|
|
179
|
+
|
|
180
|
+
### β
SUCCESS:
|
|
181
|
+
|
|
182
|
+
- Original architecture document preserved in full without modifications
|
|
183
|
+
- Gap-fill subsections inserted at logical locations with evidence citations
|
|
184
|
+
- Issue callout blocks inserted adjacent to contradicted claims with severity
|
|
185
|
+
- Improvement suggestions inserted with value ratings and evidence
|
|
186
|
+
- Refinement Summary section appended with accurate counts
|
|
187
|
+
- Refined document written to {outputFile}
|
|
188
|
+
- User reviewed and approved compilation
|
|
189
|
+
- Proceeded to step 06 only after user selected C
|
|
190
|
+
|
|
191
|
+
### β SYSTEM FAILURE:
|
|
192
|
+
|
|
193
|
+
- Deleting, rewording, or rearranging original architecture content
|
|
194
|
+
- Discovering new findings not from Steps 02-04
|
|
195
|
+
- Inserting refinements without evidence citations
|
|
196
|
+
- Proceeding without user review (Gate checkpoint)
|
|
197
|
+
- Not writing the document to {outputFile} before presenting for review
|
|
198
|
+
- Hardcoded paths instead of frontmatter variables
|
|
199
|
+
|
|
200
|
+
**Master Rule:** Additive only. Preserve the original. Get user approval before proceeding.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 'step-06-report'
|
|
3
|
+
description: 'Present refinement summary to user with counts, next steps, and review options'
|
|
4
|
+
|
|
5
|
+
outputFile: '{output_folder}/refined-architecture-{project_name}.md'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Step 6: Present Report
|
|
9
|
+
|
|
10
|
+
## STEP GOAL:
|
|
11
|
+
|
|
12
|
+
Present the complete refinement summary to the user. Display counts of gaps filled, issues flagged, and improvements suggested. Provide the output file path and recommend next steps. Offer the user options to review changes in detail or exit. This is the FINAL step β no nextStepFile.
|
|
13
|
+
|
|
14
|
+
## MANDATORY EXECUTION RULES (READ FIRST):
|
|
15
|
+
|
|
16
|
+
### Universal Rules:
|
|
17
|
+
|
|
18
|
+
- π CRITICAL: Read the complete step file before taking any action
|
|
19
|
+
- βοΈ TOOL/SUBPROCESS FALLBACK: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
|
|
20
|
+
- β
YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
21
|
+
|
|
22
|
+
### Role Reinforcement:
|
|
23
|
+
|
|
24
|
+
- β
You are an architecture refinement analyst delivering the final summary
|
|
25
|
+
- β
Present findings clearly and concisely β the user needs to decide which refinements to keep
|
|
26
|
+
- β
Next step recommendations must be specific and actionable
|
|
27
|
+
|
|
28
|
+
### Step-Specific Rules:
|
|
29
|
+
|
|
30
|
+
- π― Focus ONLY on presenting the completed refinement β no new analysis
|
|
31
|
+
- π« FORBIDDEN to discover new gaps, issues, or improvements
|
|
32
|
+
- π« FORBIDDEN to modify the refined document β only read and present
|
|
33
|
+
- π This is the FINAL step β no nextStepFile
|
|
34
|
+
|
|
35
|
+
## EXECUTION PROTOCOLS:
|
|
36
|
+
|
|
37
|
+
- Load and present the refinement summary from the compiled document
|
|
38
|
+
- No new content written β document was finalized in Step 05
|
|
39
|
+
- Present summary, next steps, and review options clearly
|
|
40
|
+
- Read-only presentation β do not alter document data
|
|
41
|
+
|
|
42
|
+
## CONTEXT BOUNDARIES:
|
|
43
|
+
|
|
44
|
+
- Available: Complete {outputFile} with all refinements from Steps 02-05
|
|
45
|
+
- Focus: Clear, actionable presentation of refinement results
|
|
46
|
+
- Limits: Do not add new analysis or change any refinements
|
|
47
|
+
- Dependencies: All previous steps must be complete (Steps 01-05)
|
|
48
|
+
|
|
49
|
+
## MANDATORY SEQUENCE
|
|
50
|
+
|
|
51
|
+
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
52
|
+
|
|
53
|
+
### 1. Load Refined Document
|
|
54
|
+
|
|
55
|
+
Read the `{outputFile}` to have all data available for presentation.
|
|
56
|
+
|
|
57
|
+
Verify the `## Refinement Summary` section is present. If it is absent, HALT: "β οΈ Refinement Summary not found in `{outputFile}`. Step 05 may not have completed successfully. Re-run [RA] from the beginning."
|
|
58
|
+
|
|
59
|
+
**Extract metrics from the Refinement Summary section:** Parse `gap_count`, `issue_count`, `improvement_count`, `critical_count`, `major_count`, `minor_count`, `high_count`, `medium_count`, `low_count`, and `skill_count` from the Changes Made table and Evidence Sources table. Use these extracted values in the summary table and next-steps sections below.
|
|
60
|
+
|
|
61
|
+
### 2. Display Summary
|
|
62
|
+
|
|
63
|
+
"**Refine Architecture β Refinement Complete**
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
| Metric | Count |
|
|
68
|
+
|--------|-------|
|
|
69
|
+
| **Gaps Filled** | {gap_count} |
|
|
70
|
+
| **Issues Flagged** | {issue_count} (Critical: {critical_count}, Major: {major_count}, Minor: {minor_count}) |
|
|
71
|
+
| **Improvements Suggested** | {improvement_count} (High: {high_count}, Medium: {medium_count}, Low: {low_count}) |
|
|
72
|
+
| **Skills Used as Evidence** | {skill_count} |
|
|
73
|
+
|
|
74
|
+
**Evidence Sources:** (which skills contributed evidence)
|
|
75
|
+
|
|
76
|
+
{Display the Evidence Sources table from the Refinement Summary section of the document}
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
**Your refined architecture is at:** `{outputFile}`
|
|
81
|
+
|
|
82
|
+
The original architecture content is fully preserved. All refinements are clearly marked with `[!NOTE]`, `[!WARNING]`, and `[!TIP]` callout blocks that you can accept, modify, or remove."
|
|
83
|
+
|
|
84
|
+
### 3. Present Next Steps
|
|
85
|
+
|
|
86
|
+
"**Recommended next steps:**
|
|
87
|
+
|
|
88
|
+
1. **Review the refined document** β accept, modify, or remove individual refinements
|
|
89
|
+
2. **[SS] Stack Skill** β compose-mode activates automatically when SS detects existing individual skills without a codebase; provide this refined architecture doc as the architecture document when prompted
|
|
90
|
+
3. **Re-run [VS] Verify Stack** if you made changes based on issue corrections β to confirm resolution
|
|
91
|
+
|
|
92
|
+
{IF issues with Critical severity were found:}
|
|
93
|
+
**β οΈ Attention:** {critical_count} critical issue(s) were flagged. These indicate fundamental contradictions between your architecture and the verified API surfaces. Address these before proceeding to stack skill composition."
|
|
94
|
+
|
|
95
|
+
### 4. Present Menu
|
|
96
|
+
|
|
97
|
+
Display: "**[R] Review changes in detail** | **[X] Exit refinement**"
|
|
98
|
+
|
|
99
|
+
#### Menu Handling Logic:
|
|
100
|
+
|
|
101
|
+
- **IF R:** Walk through each refinement with its full evidence citation:
|
|
102
|
+
1. First, all gaps with their evidence and proposed integration paths
|
|
103
|
+
2. Then, all issues ordered by severity with architecture claim vs. skill reality
|
|
104
|
+
3. Finally, all improvements ordered by value with untapped capability details
|
|
105
|
+
After completing the walkthrough, redisplay the menu.
|
|
106
|
+
|
|
107
|
+
- **IF X:** "**Refined architecture saved to:** `{outputFile}`
|
|
108
|
+
|
|
109
|
+
Re-run **[RA] Refine Architecture** anytime after updating your skills or architecture document.
|
|
110
|
+
|
|
111
|
+
**Architecture refinement complete.**"
|
|
112
|
+
|
|
113
|
+
#### EXECUTION RULES:
|
|
114
|
+
|
|
115
|
+
- ALWAYS halt and wait for user input after presenting the menu
|
|
116
|
+
- R may be selected multiple times β always walk through all refinements
|
|
117
|
+
- X ends the workflow
|
|
118
|
+
|
|
119
|
+
## CRITICAL STEP COMPLETION NOTE
|
|
120
|
+
|
|
121
|
+
This is the final step of the refine-architecture workflow. When the user selects X, the workflow is complete. The refined architecture at `{outputFile}` contains the full original content plus all gap-fills, issue annotations, and improvement suggestions backed by skill API evidence.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## π¨ SYSTEM SUCCESS/FAILURE METRICS
|
|
126
|
+
|
|
127
|
+
### β
SUCCESS:
|
|
128
|
+
|
|
129
|
+
- Refined document loaded and verified for Refinement Summary section
|
|
130
|
+
- Summary displayed with accurate counts for gaps, issues, and improvements
|
|
131
|
+
- Output file path displayed prominently
|
|
132
|
+
- Next steps presented with specific workflow recommendations
|
|
133
|
+
- Critical issues highlighted if present
|
|
134
|
+
- Menu presented with R and X options
|
|
135
|
+
- Detailed review walkthrough available on R selection with full evidence citations
|
|
136
|
+
- Workflow exits cleanly on X with saved file path
|
|
137
|
+
|
|
138
|
+
### β SYSTEM FAILURE:
|
|
139
|
+
|
|
140
|
+
- Discovering new findings or changing refinements in this step
|
|
141
|
+
- Modifying the refined document content
|
|
142
|
+
- Not presenting the menu
|
|
143
|
+
- Not displaying the document save path on exit
|
|
144
|
+
- Inaccurate counts in the summary
|
|
145
|
+
- Hardcoded paths instead of frontmatter variables
|
|
146
|
+
|
|
147
|
+
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: refine-architecture
|
|
3
|
+
description: Improve architecture doc using verified skill data and VS feasibility findings
|
|
4
|
+
web_bundle: true
|
|
5
|
+
installed_path: '{project-root}/_bmad/skf/workflows/skillforge/refine-architecture'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Refine Architecture
|
|
9
|
+
|
|
10
|
+
**Goal:** Take an original architecture document + generated skills + optional VS feasibility report, and produce a refined architecture with gaps filled, issues flagged, and improvements suggested β all backed by specific API evidence from the generated skills.
|
|
11
|
+
|
|
12
|
+
**Your Role:** In addition to your name, communication_style, and persona, you are also an architecture refinement analyst operating in Ferris Architect mode. You bring expertise in API surface analysis, integration gap detection, and evidence-backed architecture improvement, while the user brings their architecture vision and generated skills. Execute with analytical precision β every suggestion must cite specific APIs from the generated skills. Evidence-backed suggestions, not speculation.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## WORKFLOW ARCHITECTURE
|
|
17
|
+
|
|
18
|
+
This uses **step-file architecture** for disciplined execution:
|
|
19
|
+
|
|
20
|
+
### Core Principles
|
|
21
|
+
|
|
22
|
+
- **Micro-file Design**: Each step is a self-contained instruction file that must be followed exactly
|
|
23
|
+
- **Just-In-Time Loading**: Only the current step file is in memory β never load future step files until told to do so
|
|
24
|
+
- **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed
|
|
25
|
+
- **Additive, Not Destructive**: This workflow enhances the original architecture β it never deletes original content, only adds annotations, subsections, and suggestions
|
|
26
|
+
- **Evidence-Backed Refinement**: Every gap, issue, or improvement must cite specific APIs, types, or function signatures from the generated skills
|
|
27
|
+
|
|
28
|
+
### Step Processing Rules
|
|
29
|
+
|
|
30
|
+
1. **READ COMPLETELY**: Always read the entire step file before taking any action
|
|
31
|
+
2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate
|
|
32
|
+
3. **WAIT FOR INPUT**: If a menu is presented, halt and wait for user selection
|
|
33
|
+
4. **CHECK CONTINUATION**: If the step has a menu with Continue as an option, only proceed to next step when user selects 'C' (Continue)
|
|
34
|
+
5. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file
|
|
35
|
+
|
|
36
|
+
### Critical Rules (NO EXCEPTIONS)
|
|
37
|
+
|
|
38
|
+
- π **NEVER** load multiple step files simultaneously
|
|
39
|
+
- π **ALWAYS** read entire step file before execution
|
|
40
|
+
- π« **NEVER** skip steps or optimize the sequence
|
|
41
|
+
- π― **ALWAYS** follow the exact instructions in the step file
|
|
42
|
+
- βΈοΈ **ALWAYS** halt at menus and wait for user input
|
|
43
|
+
- π **NEVER** create mental todo lists from future steps
|
|
44
|
+
- βοΈ **TOOL/SUBPROCESS FALLBACK**: If any instruction references a subprocess, subagent, or tool you do not have access to, you MUST still achieve the outcome in your main context thread
|
|
45
|
+
- β
YOU MUST ALWAYS SPEAK OUTPUT in your Agent communication style with the config `{communication_language}`
|
|
46
|
+
- π **DOCUMENT-PRODUCING**: This workflow outputs a refined architecture markdown file
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## INITIALIZATION SEQUENCE
|
|
51
|
+
|
|
52
|
+
### 1. Module Configuration Loading
|
|
53
|
+
|
|
54
|
+
Load and read full config from {project-root}/_bmad/skf/config.yaml and resolve:
|
|
55
|
+
|
|
56
|
+
- `project_name`, `user_name`, `communication_language`, `document_output_language`
|
|
57
|
+
- `skills_output_folder`, `forge_data_folder`, `output_folder`
|
|
58
|
+
|
|
59
|
+
### 2. First Step Execution
|
|
60
|
+
|
|
61
|
+
Load, read the full file and then execute `./steps-c/step-01-init.md` to begin the workflow.
|
|
@@ -45,6 +45,7 @@ Verify availability of the four forge tools (ast-grep, gh, qmd, ccc), read any e
|
|
|
45
45
|
- This is the first step β no prior context exists
|
|
46
46
|
- Available: forge-tier.yaml and preferences.yaml may exist from prior runs
|
|
47
47
|
- Focus: tool verification and tier calculation only
|
|
48
|
+
- Produces: `{detected_tools}`, `{calculated_tier}`, `{previous_tier}`, `{tier_override}` for downstream steps
|
|
48
49
|
- Dependencies: none β this step bootstraps everything
|
|
49
50
|
|
|
50
51
|
## MANDATORY SEQUENCE
|
|
@@ -104,7 +105,7 @@ This is informational only β security scan availability does NOT affect the ti
|
|
|
104
105
|
|
|
105
106
|
**Step B β Daemon health:** Run `ccc doctor`
|
|
106
107
|
|
|
107
|
-
- If daemon is running and model check OK: record `{ccc: true}` and store version string from output
|
|
108
|
+
- If daemon is running and model check OK: record `{ccc: true, ccc_daemon: "healthy"}` and store version string from output
|
|
108
109
|
- If daemon is not running: record `{ccc: true, ccc_daemon: "stopped"}` β binary available, daemon needs starting. Step-01b will handle this.
|
|
109
110
|
- If error or timeout: record `{ccc: true, ccc_daemon: "error"}` β binary works but daemon has issues.
|
|
110
111
|
|
|
@@ -71,7 +71,7 @@ Check the `ccc_index` section:
|
|
|
71
71
|
- Proceed to section 4
|
|
72
72
|
|
|
73
73
|
- If `ccc_index.indexed_path` matches `{project-root}` but timestamp is older than threshold:
|
|
74
|
-
-
|
|
74
|
+
- Note index is stale β proceed to section 3 for re-index (section 3 will overwrite `ccc_index_result` to `"created"` or `"failed"`)
|
|
75
75
|
|
|
76
76
|
- If `ccc_index` is missing, has null values, or path doesn't match:
|
|
77
77
|
- Proceed to section 3 for initial index
|
|
@@ -86,9 +86,9 @@ The `ccc index` command auto-starts the daemon when needed. Proceed with indexin
|
|
|
86
86
|
|
|
87
87
|
Attempt indexing anyway β errors will be caught below.
|
|
88
88
|
|
|
89
|
-
Run:
|
|
89
|
+
Run (CWD must be `{project-root}`):
|
|
90
90
|
```bash
|
|
91
|
-
ccc init
|
|
91
|
+
ccc init
|
|
92
92
|
```
|
|
93
93
|
|
|
94
94
|
**If init fails** (project may already be initialized): continue β this is not an error.
|
|
@@ -98,6 +98,8 @@ Then run:
|
|
|
98
98
|
ccc index
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
+
**Note:** `ccc index` can take several minutes on large codebases (1000+ files). Run with an extended timeout or in background mode. Use `ccc status` to verify completion β check that `Chunks` and `Files` counts are non-zero.
|
|
102
|
+
|
|
101
103
|
**If succeeds:**
|
|
102
104
|
- Run `ccc status` to get file count
|
|
103
105
|
- Store `{ccc_index_result: "created", ccc_indexed_path: {project-root}, ccc_last_indexed: {current ISO timestamp}, ccc_file_count: {count from status}}`
|