bmad-module-skill-forge 0.5.0 → 0.7.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/README.md +4 -3
- package/docs/agents.md +12 -5
- package/docs/concepts.md +37 -15
- package/docs/examples.md +49 -5
- package/docs/getting-started.md +43 -17
- package/docs/how-it-works.md +115 -90
- package/docs/index.md +2 -2
- package/docs/workflows.md +89 -41
- package/package.json +2 -2
- package/src/agents/forger.agent.yaml +18 -6
- package/src/forger/README.md +1 -1
- package/src/forger/forge-tier.yaml +18 -1
- package/src/forger/preferences.yaml +6 -8
- package/src/knowledge/agentskills-spec.md +1 -1
- package/src/knowledge/architecture-verification.md +102 -0
- package/src/knowledge/ccc-bridge.md +110 -0
- package/src/knowledge/confidence-tiers.md +14 -3
- package/src/knowledge/doc-fetcher.md +1 -1
- package/src/knowledge/manual-section-integrity.md +2 -2
- package/src/knowledge/overview.md +10 -6
- package/src/knowledge/progressive-capability.md +15 -6
- package/src/knowledge/qmd-registry.md +18 -1
- package/src/knowledge/skf-knowledge-index.csv +3 -1
- package/src/knowledge/skill-lifecycle.md +26 -2
- package/src/knowledge/split-body-strategy.md +16 -2
- package/src/knowledge/zero-hallucination.md +11 -8
- package/src/module-help.csv +9 -6
- package/src/module.yaml +4 -1
- package/src/workflows/README.md +36 -18
- package/src/workflows/analyze-source/data/skill-brief-schema.md +18 -5
- package/src/workflows/analyze-source/data/unit-detection-heuristics.md +1 -0
- package/src/workflows/analyze-source/steps-c/step-01-init.md +4 -4
- 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 +8 -4
- 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/drift-report-template.md +6 -6
- package/src/workflows/audit-skill/data/severity-rules.md +1 -1
- package/src/workflows/audit-skill/steps-c/step-01-init.md +3 -2
- package/src/workflows/audit-skill/steps-c/step-02-re-index.md +23 -1
- package/src/workflows/audit-skill/steps-c/step-04-semantic-diff.md +6 -6
- package/src/workflows/audit-skill/workflow.md +3 -2
- 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 +4 -4
- package/src/workflows/brief-skill/steps-c/step-02-analyze-target.md +15 -0
- package/src/workflows/brief-skill/steps-c/step-05-write-brief.md +3 -0
- package/src/workflows/create-skill/data/extraction-patterns.md +37 -1
- package/src/workflows/create-skill/data/skill-sections.md +14 -13
- package/src/workflows/create-skill/data/source-resolution-protocols.md +1 -1
- package/src/workflows/create-skill/steps-c/step-01-load-brief.md +18 -12
- package/src/workflows/create-skill/steps-c/step-02-ecosystem-check.md +2 -2
- package/src/workflows/create-skill/steps-c/step-02b-ccc-discover.md +157 -0
- package/src/workflows/create-skill/steps-c/step-03-extract.md +25 -20
- package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +8 -8
- 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 +9 -9
- package/src/workflows/create-skill/steps-c/step-05-compile.md +4 -3
- package/src/workflows/create-skill/steps-c/step-06-validate.md +3 -3
- package/src/workflows/create-skill/steps-c/step-07-generate-artifacts.md +60 -39
- package/src/workflows/create-skill/steps-c/step-08-report.md +26 -11
- package/src/workflows/create-skill/workflow.md +3 -3
- package/src/workflows/create-stack-skill/data/compose-mode-rules.md +65 -0
- package/src/workflows/create-stack-skill/data/stack-skill-template.md +29 -7
- package/src/workflows/create-stack-skill/steps-c/step-01-init.md +25 -8
- package/src/workflows/create-stack-skill/steps-c/step-02-detect-manifests.md +35 -2
- package/src/workflows/create-stack-skill/steps-c/step-03-rank-and-confirm.md +26 -2
- package/src/workflows/create-stack-skill/steps-c/step-04-parallel-extract.md +24 -0
- package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +40 -2
- 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 +4 -4
- package/src/workflows/create-stack-skill/steps-c/step-09-report.md +8 -2
- package/src/workflows/create-stack-skill/workflow.md +3 -3
- 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-01-load-skill.md +1 -1
- package/src/workflows/export-skill/steps-c/step-02-package.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 +24 -4
- package/src/workflows/quick-skill/steps-c/step-02-ecosystem-check.md +1 -3
- 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/data/tier-rules.md +16 -6
- package/src/workflows/setup-forge/steps-c/step-01-detect-and-tier.md +33 -15
- package/src/workflows/setup-forge/steps-c/step-01b-ccc-index.md +148 -0
- package/src/workflows/setup-forge/steps-c/step-02-write-config.md +29 -12
- package/src/workflows/setup-forge/steps-c/step-03-auto-index.md +29 -6
- package/src/workflows/setup-forge/steps-c/step-04-report.md +16 -4
- package/src/workflows/setup-forge/workflow.md +4 -3
- package/src/workflows/test-skill/data/scoring-rules.md +8 -0
- package/src/workflows/test-skill/data/source-access-protocol.md +1 -1
- package/src/workflows/test-skill/steps-c/step-01-init.md +3 -2
- package/src/workflows/test-skill/steps-c/step-02-detect-mode.md +2 -0
- package/src/workflows/test-skill/templates/test-report-template.md +3 -0
- package/src/workflows/test-skill/workflow.md +2 -2
- package/src/workflows/update-skill/steps-c/step-01-init.md +3 -2
- package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +2 -2
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +24 -4
- package/src/workflows/update-skill/steps-c/step-05-validate.md +7 -11
- package/src/workflows/update-skill/steps-c/step-06-write.md +7 -4
- 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/tools/cli/commands/status.js +2 -1
- 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 -523
- 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 -428
- 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,65 @@
|
|
|
1
|
+
# Compose Mode Rules
|
|
2
|
+
|
|
3
|
+
Rules for synthesizing a stack skill from pre-generated individual skills and an architecture document, without requiring a codebase.
|
|
4
|
+
|
|
5
|
+
## Skill Loading
|
|
6
|
+
|
|
7
|
+
1. Scan `{skills_output_folder}` for subdirectories containing both `SKILL.md` and `metadata.json`
|
|
8
|
+
2. **Filter:** Skip any subdirectory named `{project_name}-stack` or any skill where `metadata.json` has `"skill_type": "stack"` — stack skills must not be loaded as source dependencies to avoid self-referencing loops
|
|
9
|
+
3. Skip any subdirectory missing either `SKILL.md` or `metadata.json` — log a warning and skip
|
|
10
|
+
4. Load each `metadata.json` and extract: `name`, `language`, `confidence_tier`, `source_repo`, `exports` (count), `version`
|
|
11
|
+
5. Store the subdirectory name as `skill_dir` (distinct from `name` — the directory may differ from the metadata name)
|
|
12
|
+
6. Store loaded skills as `raw_dependencies` with `source: "existing_skill"`
|
|
13
|
+
|
|
14
|
+
## Architecture Integration Mapping
|
|
15
|
+
|
|
16
|
+
**If `{architecture_doc_path}` is null or the file does not exist:** Skip this section and proceed to [Inferred Integrations (No Architecture Document)](#inferred-integrations-no-architecture-document) below.
|
|
17
|
+
|
|
18
|
+
1. Load the architecture document from `{architecture_doc_path}`
|
|
19
|
+
2. Parse section headers and prose paragraphs for references to loaded skill names
|
|
20
|
+
3. A **co-mention** is detected when a paragraph or section references 2+ loaded skill names
|
|
21
|
+
4. For each co-mention pair, load both skills' export lists and API signatures from their `SKILL.md`
|
|
22
|
+
5. Compose an integration section describing how the two libraries connect based on:
|
|
23
|
+
- Shared types or interfaces between the two skills' API surfaces
|
|
24
|
+
- Architecture document prose describing their interaction
|
|
25
|
+
- Complementary domain roles (e.g., one produces data the other consumes)
|
|
26
|
+
|
|
27
|
+
## Confidence Tier Inheritance
|
|
28
|
+
|
|
29
|
+
- All compose-mode evidence inherits confidence tiers from the source individual skills
|
|
30
|
+
- If both skills in a pair are T1, the integration is T1
|
|
31
|
+
- If either skill is T1-low, the integration is T1-low
|
|
32
|
+
- If either skill is T2, the structural confidence still inherits the lower of T1/T1-low from the pair — the T2 temporal annotations from that skill are carried as an additive enrichment marker, not a tier upgrade
|
|
33
|
+
- T1 + T2 pair: inherits `T1 [composed, +T2 annotations]` — the T1 skill provides full structural confidence
|
|
34
|
+
- T1-low + T2 pair: inherits `T1-low [composed, +T2 annotations]` — T1-low structural confidence with T2 temporal annotations noted
|
|
35
|
+
- If both skills are T2 (no T1/T1-low base available): the integration confidence is `T1-low [composed, +T2 annotations from both]` — T2 temporal enrichment depends on structural extraction, so the most conservative structural tier is assumed
|
|
36
|
+
- Compose-mode integrations add suffix: `[composed]` — e.g., `T1 [composed]`, `T1-low [composed, +T2 annotations]`
|
|
37
|
+
|
|
38
|
+
## Integration Evidence Format
|
|
39
|
+
|
|
40
|
+
Each integration entry must cite both source skills by name with function signatures:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
{Skill A name} + {Skill B name}
|
|
44
|
+
Type: [pattern type from integration-patterns.md]
|
|
45
|
+
Evidence:
|
|
46
|
+
[from skill: {Skill A name}] {exported_function_signature}
|
|
47
|
+
[from skill: {Skill B name}] {exported_function_signature}
|
|
48
|
+
Architecture reference: "{quoted prose from architecture doc}"
|
|
49
|
+
Confidence: {inherited_tier} [composed]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Feasibility Report Integration
|
|
53
|
+
|
|
54
|
+
If a feasibility report (`feasibility-report-{project_name}.md`) exists in `{forge_data_folder}/`:
|
|
55
|
+
- Load the VS overall verdict from the report's YAML frontmatter `overall_verdict` field (`FEASIBLE`, `CONDITIONALLY FEASIBLE`, or `NOT FEASIBLE`) and parse per-pair verdicts from the `## Integration Verdicts` markdown table (`Verified`, `Plausible`, `Risky`, or `Blocked`)
|
|
56
|
+
- Include the verdict in the integration evidence: `VS overall: {FEASIBLE|CONDITIONALLY FEASIBLE|NOT FEASIBLE}`, `VS pair: {Verified|Plausible|Risky|Blocked}`
|
|
57
|
+
- Flag any pairs where VS reported `Risky` or `Blocked` verdicts
|
|
58
|
+
|
|
59
|
+
## Inferred Integrations (No Architecture Document)
|
|
60
|
+
|
|
61
|
+
When no architecture document is available:
|
|
62
|
+
- Infer potential integrations from skills sharing the same `language` field
|
|
63
|
+
- Infer from skills sharing domain keywords in their `SKILL.md` descriptions
|
|
64
|
+
- Mark all inferred integrations: `[inferred from shared domain]`
|
|
65
|
+
- Inferred integrations default to lowest confidence of the pair with `[inferred from shared domain]` suffix (use this instead of `[composed]` for inferred integrations)
|
|
@@ -69,18 +69,40 @@ Indexed format targeting ~80-120 tokens per stack:
|
|
|
69
69
|
"name": "{project}-stack",
|
|
70
70
|
"version": "1.0.0",
|
|
71
71
|
"generation_date": "{ISO-8601}",
|
|
72
|
-
"confidence_tier": "{Quick|Forge|Deep}",
|
|
72
|
+
"confidence_tier": "{Quick|Forge|Forge+|Deep}",
|
|
73
|
+
"spec_version": "1.3",
|
|
73
74
|
"source_authority": "{official|community|internal}",
|
|
75
|
+
"generated_by": "create-stack-skill",
|
|
74
76
|
"exports": [],
|
|
75
77
|
"library_count": 0,
|
|
76
78
|
"integration_count": 0,
|
|
77
79
|
"libraries": ["lib1", "lib2"],
|
|
78
80
|
"integration_pairs": [["lib1", "lib2"]],
|
|
81
|
+
"language": "{primary language or list of languages from constituent skills}",
|
|
82
|
+
"ast_node_count": "{number-or-omitted-if-no-ast}",
|
|
79
83
|
"confidence_distribution": {
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
+
"t1": 0,
|
|
85
|
+
"t1_low": 0,
|
|
86
|
+
"t2": 0,
|
|
87
|
+
"t3": 0
|
|
88
|
+
},
|
|
89
|
+
"tool_versions": {
|
|
90
|
+
"ast_grep": "{version-or-null}",
|
|
91
|
+
"qmd": "{version-or-null}",
|
|
92
|
+
"skf": "{skf_version}"
|
|
93
|
+
},
|
|
94
|
+
"stats": {
|
|
95
|
+
"exports_documented": 0,
|
|
96
|
+
"exports_public_api": 0,
|
|
97
|
+
"exports_internal": 0,
|
|
98
|
+
"exports_total": 0,
|
|
99
|
+
"public_api_coverage": 0.0,
|
|
100
|
+
"total_coverage": 0.0,
|
|
101
|
+
"scripts_count": 0,
|
|
102
|
+
"assets_count": 0
|
|
103
|
+
},
|
|
104
|
+
"dependencies": [],
|
|
105
|
+
"compatibility": "{semver-range}"
|
|
84
106
|
}
|
|
85
107
|
```
|
|
86
108
|
|
|
@@ -90,7 +112,7 @@ Indexed format targeting ~80-120 tokens per stack:
|
|
|
90
112
|
# {library_name} Reference
|
|
91
113
|
|
|
92
114
|
**Version:** {version_from_manifest}
|
|
93
|
-
**Import count:** {count} files
|
|
115
|
+
**Import count:** {count} files *(compose-mode: replace with **Export count:** {count} exports)*
|
|
94
116
|
**Confidence:** {T1/T1-low/T2}
|
|
95
117
|
|
|
96
118
|
## Key Exports
|
|
@@ -110,7 +132,7 @@ Indexed format targeting ~80-120 tokens per stack:
|
|
|
110
132
|
|
|
111
133
|
**Type:** {pattern_type}
|
|
112
134
|
**Co-import files:** {count}
|
|
113
|
-
**Confidence:** {T1/T1-low}
|
|
135
|
+
**Confidence:** {T1/T1-low/T2 [composed]}
|
|
114
136
|
|
|
115
137
|
## Integration Pattern
|
|
116
138
|
[Detailed description of how these libraries connect]
|
|
@@ -67,11 +67,11 @@ STOP — do not proceed.
|
|
|
67
67
|
**If forge-tier.yaml exists:**
|
|
68
68
|
|
|
69
69
|
Extract:
|
|
70
|
-
- `forge_tier` — Quick, Forge, or Deep
|
|
70
|
+
- `forge_tier` — Quick, Forge, Forge+, or Deep
|
|
71
71
|
- `available_tools` — list of detected tools (gh_bridge, ast_bridge, qmd_bridge, skill-check)
|
|
72
72
|
- `project_root` — project root path
|
|
73
73
|
|
|
74
|
-
**Apply tier override:** Read `{sidecar_path}/preferences.yaml`. If `tier_override` is set and is a valid tier value (Quick, Forge, or Deep), use it instead of the detected tier.
|
|
74
|
+
**Apply tier override:** Read `{sidecar_path}/preferences.yaml`. If `tier_override` is set and is a valid tier value (Quick, Forge, Forge+, or Deep), use it instead of the detected tier.
|
|
75
75
|
|
|
76
76
|
### 2. Validate Available Tools
|
|
77
77
|
|
|
@@ -81,6 +81,7 @@ Extract:
|
|
|
81
81
|
**Tier-dependent tools:**
|
|
82
82
|
- **Quick:** gh_bridge (source reading) — graceful degradation to local file reading if unavailable
|
|
83
83
|
- **Forge:** ast_bridge (ast-grep structural analysis) — required for Forge tier
|
|
84
|
+
- **Forge+:** ast_bridge + ccc_bridge (ccc semantic co-import augmentation) — ccc available for step-05
|
|
84
85
|
- **Deep:** qmd_bridge (QMD temporal enrichment) — required for Deep tier
|
|
85
86
|
|
|
86
87
|
Report tool availability. If a tier-required tool is missing, downgrade tier and note:
|
|
@@ -99,6 +100,18 @@ Check if the user provided:
|
|
|
99
100
|
- If provided, store as `scope_overrides` for use in step 03
|
|
100
101
|
- Format: `library_name: include|exclude`
|
|
101
102
|
|
|
103
|
+
**Compose mode detection:**
|
|
104
|
+
|
|
105
|
+
Set `compose_mode: false` as the default.
|
|
106
|
+
|
|
107
|
+
- If user provides an architecture document path for composition or explicitly requests compose mode → set `compose_mode: true` and store `architecture_doc_path`
|
|
108
|
+
- If no manifest files exist in project root AND at least one subdirectory in `{skills_output_folder}` contains both `SKILL.md` and `metadata.json` → suggest compose mode to the user and ask for optional architecture document path
|
|
109
|
+
- If user accepts → set `compose_mode: true` and store `architecture_doc_path` (may be `null` if user chose not to provide one)
|
|
110
|
+
- If user declines → `compose_mode` remains `false`, continue with code-mode
|
|
111
|
+
|
|
112
|
+
If compose_mode:
|
|
113
|
+
- Display: "**Compose mode detected.** Synthesizing stack skill from existing skills + architecture document."
|
|
114
|
+
|
|
102
115
|
If no optional inputs provided, auto-detection will be used.
|
|
103
116
|
|
|
104
117
|
### 4. Display Initialization Summary
|
|
@@ -106,15 +119,19 @@ If no optional inputs provided, auto-detection will be used.
|
|
|
106
119
|
"**Stack Skill Forge initialized.**
|
|
107
120
|
|
|
108
121
|
**Project:** {project_name}
|
|
109
|
-
**Forge Tier:** {tier_description}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
-
|
|
122
|
+
**Forge Tier:** {forge_tier} — {tier_description}
|
|
123
|
+
|
|
124
|
+
Where tier_description follows positive capability framing:
|
|
125
|
+
- Quick: "Source reading and import counting"
|
|
126
|
+
- Forge: "AST-backed structural analysis"
|
|
127
|
+
- Forge+: "AST structural + CCC semantic co-import augmentation"
|
|
128
|
+
- Deep: "Full intelligence — structural + contextual + temporal"
|
|
113
129
|
|
|
114
130
|
**Available Tools:** {tool_list}
|
|
115
|
-
**Input Mode:** {auto-detect | explicit dependency list}
|
|
131
|
+
**Input Mode:** {auto-detect | explicit dependency list | compose mode}
|
|
116
132
|
|
|
117
|
-
**Proceeding to
|
|
133
|
+
**If compose mode:** Proceeding to skill loading...
|
|
134
|
+
**If code mode:** Proceeding to manifest detection..."
|
|
118
135
|
|
|
119
136
|
### 5. Auto-Proceed to Next Step
|
|
120
137
|
|
|
@@ -38,7 +38,7 @@ Scan the project root for dependency manifest files, parse each to extract depen
|
|
|
38
38
|
- 🎯 Load manifest-patterns.md for detection rules
|
|
39
39
|
- 💾 Store manifests found and raw dependency list as workflow state
|
|
40
40
|
- 📖 Auto-proceed to step 03 after successful detection
|
|
41
|
-
- 🚫 HALT if no manifests found and no explicit list provided
|
|
41
|
+
- 🚫 HALT if no manifests found and no explicit list provided — **unless `compose_mode` is true** (compose mode skips manifest detection)
|
|
42
42
|
|
|
43
43
|
## CONTEXT BOUNDARIES:
|
|
44
44
|
|
|
@@ -50,6 +50,39 @@ Scan the project root for dependency manifest files, parse each to extract depen
|
|
|
50
50
|
|
|
51
51
|
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
52
52
|
|
|
53
|
+
### 0. Check Compose Mode
|
|
54
|
+
|
|
55
|
+
**If `compose_mode` is true AND `explicit_deps` was provided in step 01:**
|
|
56
|
+
|
|
57
|
+
Use the explicit dependency list directly. Store the explicit list as `raw_dependencies` with `source: "explicit"` and skip to [Auto-Proceed to Next Step](#5-auto-proceed-to-next-step).
|
|
58
|
+
|
|
59
|
+
**If `compose_mode` is true AND `explicit_deps` was NOT provided:**
|
|
60
|
+
|
|
61
|
+
Scan `{skills_output_folder}` for subdirectories containing SKILL.md and metadata.json.
|
|
62
|
+
|
|
63
|
+
**Filter:** Skip any subdirectory named `{project_name}-stack` or any skill where `metadata.json` has `"skill_type": "stack"` — stack skills must not be loaded as source dependencies to avoid self-referencing loops.
|
|
64
|
+
|
|
65
|
+
**If zero skills remain after filtering:** HALT with: "**Cannot proceed in compose-mode.** No individual skills found in `{skills_output_folder}` (after filtering stack skills). Run [CS] Create Skill or [QS] Quick Skill to generate individual skills first, then re-run [SS]."
|
|
66
|
+
|
|
67
|
+
For each skill found:
|
|
68
|
+
1. Read metadata.json
|
|
69
|
+
2. Extract: name, language, confidence_tier, source_repo, exports count, version
|
|
70
|
+
3. Store the subdirectory name as `skill_dir` (distinct from `name` — the directory may differ from the metadata name)
|
|
71
|
+
4. Store as `raw_dependencies` with source: "existing_skill"
|
|
72
|
+
|
|
73
|
+
Display:
|
|
74
|
+
"**Loaded {N} existing skills as dependencies.**
|
|
75
|
+
|
|
76
|
+
| Skill | Language | Tier | Exports | Source |
|
|
77
|
+
|-------|----------|------|---------|--------|
|
|
78
|
+
| {name} | {lang} | {tier} | {count} | {repo} |
|
|
79
|
+
|
|
80
|
+
**Proceeding to scope confirmation...**"
|
|
81
|
+
|
|
82
|
+
Skip to [Auto-Proceed to Next Step](#5-auto-proceed-to-next-step) — the skills table above serves as the detection summary.
|
|
83
|
+
|
|
84
|
+
**If not compose_mode:** Continue with section 1 (existing flow).
|
|
85
|
+
|
|
53
86
|
### 1. Check for Explicit Dependency List
|
|
54
87
|
|
|
55
88
|
**If `explicit_deps` was provided in step 01:**
|
|
@@ -58,7 +91,7 @@ Scan the project root for dependency manifest files, parse each to extract depen
|
|
|
58
91
|
|
|
59
92
|
**Dependencies:** {explicit_deps_count} libraries provided"
|
|
60
93
|
|
|
61
|
-
Store the explicit list as `raw_dependencies` and skip to
|
|
94
|
+
Store the explicit list as `raw_dependencies` and skip to [Display Detection Summary](#4-display-detection-summary).
|
|
62
95
|
|
|
63
96
|
**If no explicit list:** Continue to section 2.
|
|
64
97
|
|
|
@@ -52,6 +52,30 @@ Count import frequency for each dependency across the codebase, rank by usage, a
|
|
|
52
52
|
|
|
53
53
|
### 1. Count Import Frequency
|
|
54
54
|
|
|
55
|
+
**If `compose_mode` is true:**
|
|
56
|
+
|
|
57
|
+
Skip import counting entirely. All skills are included by default.
|
|
58
|
+
|
|
59
|
+
Set `confirmed_dependencies` = all `raw_dependencies` (the list already stored as workflow state from Step 02).
|
|
60
|
+
|
|
61
|
+
**Apply scope_overrides:** If `scope_overrides` were provided in step 01, apply them now — force-include or force-exclude skills as specified. Log any overrides applied.
|
|
62
|
+
|
|
63
|
+
Present skills sorted by architectural layer (from architecture doc if available):
|
|
64
|
+
- If `architecture_doc_path` is not null: parse architecture doc for section headers to determine layer grouping
|
|
65
|
+
- If `architecture_doc_path` is null or layers not detectable: present alphabetically
|
|
66
|
+
|
|
67
|
+
Display skills as a table:
|
|
68
|
+
|
|
69
|
+
| # | Skill | Language | Tier | Architecture Layer |
|
|
70
|
+
|---|-------|----------|------|--------------------|
|
|
71
|
+
| 1 | {name} | {language} | {confidence_tier} | {layer or 'Unclassified'} |
|
|
72
|
+
|
|
73
|
+
User confirms inclusion/exclusion at the gate (same [C] menu as code-mode).
|
|
74
|
+
|
|
75
|
+
Skip to [Present MENU OPTIONS](#5-present-menu-options).
|
|
76
|
+
|
|
77
|
+
**If not compose_mode:**
|
|
78
|
+
|
|
55
79
|
For each dependency in `raw_dependencies`:
|
|
56
80
|
|
|
57
81
|
**Launch a subprocess** that runs grep across all source files in the project to count import statements for each library. Return only the counts, not file contents.
|
|
@@ -136,8 +160,8 @@ Display: **Select:** [C] Continue to Extraction
|
|
|
136
160
|
|
|
137
161
|
#### Menu Handling Logic:
|
|
138
162
|
|
|
139
|
-
- IF C: Store confirmed_dependencies, then load, read entire file, then execute {nextStepFile}
|
|
140
|
-
- IF Any other: Process as scope modification, redisplay updated
|
|
163
|
+
- IF C: Store current `confirmed_dependencies` (including any modifications made since initial presentation), then load, read entire file, then execute {nextStepFile}
|
|
164
|
+
- IF Any other: Process as scope modification (add/remove skills from `confirmed_dependencies`), update the in-memory `confirmed_dependencies` list accordingly, redisplay the updated skills table, then [Redisplay Menu Options](#5-present-menu-options)
|
|
141
165
|
|
|
142
166
|
---
|
|
143
167
|
|
|
@@ -50,6 +50,30 @@ For each confirmed dependency, extract key exports, usage patterns, and API surf
|
|
|
50
50
|
|
|
51
51
|
**CRITICAL:** Follow this sequence exactly. Do not skip, reorder, or improvise.
|
|
52
52
|
|
|
53
|
+
### 0. Check Compose Mode
|
|
54
|
+
|
|
55
|
+
**If `compose_mode` is true:**
|
|
56
|
+
|
|
57
|
+
"**Extraction data already available from individual skills. Skipping extraction phase.**"
|
|
58
|
+
|
|
59
|
+
For each confirmed skill, load `{skills_output_folder}/{skill_dir}/SKILL.md` (where `skill_dir` is the subdirectory name stored in step-02, which may differ from the `name` field in metadata.json) into context. Build a `per_library_extractions[]` entry for each skill with the following fields:
|
|
60
|
+
- `library`: skill name from metadata.json
|
|
61
|
+
- `exports`: exports list extracted from the SKILL.md exports section
|
|
62
|
+
- `usage_patterns`: usage patterns from the SKILL.md usage section
|
|
63
|
+
- `confidence`: the skill's existing confidence tier (T1, T1-low, T2) — inherited directly
|
|
64
|
+
|
|
65
|
+
Display an extraction summary:
|
|
66
|
+
|
|
67
|
+
"**Loaded {N} skill extractions from existing skills.**
|
|
68
|
+
|
|
69
|
+
| Skill | Exports | Confidence | Status |
|
|
70
|
+
|-------|---------|------------|--------|
|
|
71
|
+
| {name} | {count} | {tier} | Loaded |"
|
|
72
|
+
|
|
73
|
+
Auto-proceed to next step.
|
|
74
|
+
|
|
75
|
+
**If not compose_mode:** Continue with section 1 (existing flow).
|
|
76
|
+
|
|
53
77
|
### 1. Prepare Extraction Plan
|
|
54
78
|
|
|
55
79
|
**AST Tool Availability Check (Forge/Deep only):**
|
|
@@ -4,6 +4,7 @@ description: 'Detect co-import patterns and integration points between confirmed
|
|
|
4
4
|
|
|
5
5
|
nextStepFile: './step-06-compile-stack.md'
|
|
6
6
|
integrationPatterns: '../data/integration-patterns.md'
|
|
7
|
+
composeModeRules: '../data/compose-mode-rules.md'
|
|
7
8
|
---
|
|
8
9
|
|
|
9
10
|
# Step 5: Detect Integrations
|
|
@@ -42,7 +43,7 @@ Analyze co-import patterns between confirmed libraries to identify integration p
|
|
|
42
43
|
|
|
43
44
|
## CONTEXT BOUNDARIES:
|
|
44
45
|
|
|
45
|
-
- From step 03: confirmed_dependencies[]
|
|
46
|
+
- From step 03: confirmed_dependencies[] — in code-mode, includes file lists per library; in compose-mode, file lists are not present (use per_library_extractions[] from step 04 for skill content)
|
|
46
47
|
- From step 04: per_library_extractions[] with exports and patterns
|
|
47
48
|
- This step produces: integration_graph {pairs[], types[], files[]}
|
|
48
49
|
- This is the VALUE-ADD step — what makes stack skills different from individual skills
|
|
@@ -61,6 +62,33 @@ Report: "**Analyzing {pair_count} library pairs for integration patterns...**"
|
|
|
61
62
|
|
|
62
63
|
### 2. Detect Co-Import Files
|
|
63
64
|
|
|
65
|
+
**If `compose_mode` is true:**
|
|
66
|
+
|
|
67
|
+
Instead of co-import grep, detect integrations from architecture document:
|
|
68
|
+
|
|
69
|
+
1. Load `{composeModeRules}` for integration evidence format rules
|
|
70
|
+
2. **If `{architecture_doc_path}` is null or not available:** Skip directly to the "If no architecture document available" fallback below
|
|
71
|
+
3. Load the architecture document from `{architecture_doc_path}`
|
|
72
|
+
4. Use prose-based co-mention analysis: find paragraphs mentioning 2+ confirmed skill names
|
|
73
|
+
5. For each detected integration pair:
|
|
74
|
+
- Load both skills' export lists and API signatures
|
|
75
|
+
- Compose an integration section following the format from `{composeModeRules}`
|
|
76
|
+
- Include VS feasibility verdict if a feasibility report (`feasibility-report-{project_name}.md`) exists in `{forge_data_folder}/`
|
|
77
|
+
- Cite evidence from both skills: `[from skill: {skill_name}]`
|
|
78
|
+
|
|
79
|
+
All integration evidence inherits confidence tiers from the source skills. Load and apply the full **Confidence Tier Inheritance** matrix from `{composeModeRules}` to compute the correct tier for each pair (covers T1+T1, T1+T1-low, T1-low+T1-low, T1+T2, T1-low+T2, T2+T2 cases). Apply the `[composed]` suffix to all confidence labels — e.g., `T1 [composed]`, `T1-low [composed, +T2 annotations]`.
|
|
80
|
+
|
|
81
|
+
**VS verdict parsing (if feasibility report exists):** Read the `overall_verdict` from the report's YAML frontmatter. Parse the `## Integration Verdicts` markdown table for per-pair verdicts. For each architecture-detected pair, include `VS overall: {verdict}` and `VS pair: {verdict}` in the integration evidence per the format in `{composeModeRules}`. VS verdicts do not apply to inferred integrations since the VS report operates on architecture-described interactions only. Additionally, flag any pairs where VS reported `Risky` or `Blocked` by appending a `[VS: Risky]` or `[VS: Blocked]` warning annotation to the integration entry.
|
|
82
|
+
|
|
83
|
+
If no architecture document available:
|
|
84
|
+
- Infer potential integrations from skills sharing the same `language` field or sharing domain keywords in their SKILL.md descriptions (use the `usage_patterns` and `exports` fields from `per_library_extractions[]` built in step-04, or reload `{skills_output_folder}/{skill_dir}/SKILL.md` if full prose text is needed for keyword extraction)
|
|
85
|
+
- Mark inferred integrations: `[inferred from shared domain]` — use this suffix instead of `[composed]` for inferred integrations
|
|
86
|
+
- Inferred integrations qualify automatically — no file-count threshold applies
|
|
87
|
+
|
|
88
|
+
Skip to section 3 (Classify Integration Types) with the compose-mode pairs.
|
|
89
|
+
|
|
90
|
+
**If not compose_mode:**
|
|
91
|
+
|
|
64
92
|
For each library pair (A, B):
|
|
65
93
|
|
|
66
94
|
**Launch a subprocess** that greps across all source files to find files importing BOTH library A and library B. Return only file paths and import line numbers.
|
|
@@ -71,11 +99,21 @@ For each library pair (A, B):
|
|
|
71
99
|
|
|
72
100
|
**Threshold:** A pair must have 2+ co-import files to qualify as an integration pattern (single file co-imports may be incidental).
|
|
73
101
|
|
|
102
|
+
**CCC Semantic Augmentation (Forge+ and Deep with ccc):**
|
|
103
|
+
|
|
104
|
+
If `tools.ccc` is true AND `ccc_index.status` is `"fresh"` or `"stale"` in forge-tier.yaml, augment co-import detection with semantic search (max 1 query per library pair):
|
|
105
|
+
|
|
106
|
+
For each library pair that has exactly 1 co-import file (below the 2-file threshold), run `ccc_bridge.search("{libA} {libB}", source_root, top_k=10)` to find files where the two libraries interact semantically — even without explicit import co-location. If CCC returns additional files where both libraries appear, add them to the pair's co-import candidate list and re-evaluate against the 2-file threshold.
|
|
107
|
+
|
|
108
|
+
For pairs that already qualify (2+ files), CCC is not needed for detection — but the CCC results may surface additional integration files for richer classification in section 3.
|
|
109
|
+
|
|
110
|
+
CCC failures: skip augmentation silently, proceed with grep-only results.
|
|
111
|
+
|
|
74
112
|
### 3. Classify Integration Types
|
|
75
113
|
|
|
76
114
|
Load `{integrationPatterns}` for classification rules.
|
|
77
115
|
|
|
78
|
-
For each qualifying pair (2+ co-import
|
|
116
|
+
For each qualifying pair, analyze to classify the integration type (**in compose-mode**: all architecture-document-detected pairs qualify automatically — the 2+ co-import file threshold applies only in code-mode; **in code-mode**: pair must have 2+ co-import files):
|
|
79
117
|
|
|
80
118
|
- **Type 1: Middleware Chain** — Sequential function calls piping output between libraries
|
|
81
119
|
- **Type 2: Shared Types** — Type definitions exchanged between libraries
|
|
@@ -80,6 +80,8 @@ description: >
|
|
|
80
80
|
|
|
81
81
|
**This is the core value of the stack skill.** Compile in order:
|
|
82
82
|
|
|
83
|
+
**Zero-integration guard:** If the integration graph from step 05 has zero edges (no detected integration pairs), skip the integration layer compilation and note: "No integration patterns detected — stack skill will contain library summaries without an integration layer." Proceed directly to section 4 (Per-Library Sections).
|
|
84
|
+
|
|
83
85
|
**Cross-cutting patterns** (if any):
|
|
84
86
|
- Patterns spanning 3+ libraries
|
|
85
87
|
- Middleware chains, shared configuration, common architectural patterns
|
|
@@ -98,7 +100,7 @@ description: >
|
|
|
98
100
|
|
|
99
101
|
### 4. Compile Per-Library Sections
|
|
100
102
|
|
|
101
|
-
For each confirmed library (ordered by integration connectivity, then import count):
|
|
103
|
+
For each confirmed library (ordered by integration connectivity, then import count — **in compose-mode**, order by integration connectivity, then skill confidence tier since import counts are not available):
|
|
102
104
|
|
|
103
105
|
- Role in stack (one-line description)
|
|
104
106
|
- Key exports used in this project
|
|
@@ -122,6 +124,8 @@ Create the reference index table:
|
|
|
122
124
|
|---------|---------|-------------|------------|-----------|
|
|
123
125
|
| ... | ... | ... | ... | ... |
|
|
124
126
|
|
|
127
|
+
(**in compose-mode**: replace the Imports column with Export Count from source skill metadata, since import counts are not available)
|
|
128
|
+
|
|
125
129
|
### 7. Present Compiled SKILL.md Preview
|
|
126
130
|
|
|
127
131
|
"**Stack skill compilation complete. Please review:**
|
|
@@ -77,10 +77,10 @@ Write `{skills_output_folder}/{project_name}-stack/SKILL.md` with the approved s
|
|
|
77
77
|
For each confirmed library, write `{skills_output_folder}/{project_name}-stack/references/{library_name}.md`:
|
|
78
78
|
|
|
79
79
|
Load structure from `{stackSkillTemplate}` references section:
|
|
80
|
-
- Library name, version from manifest
|
|
81
|
-
- Import count and file count
|
|
80
|
+
- Library name, version from manifest (**in compose-mode**: version from source skill `metadata.json`)
|
|
81
|
+
- Import count and file count (**in compose-mode**: export count from source skill metadata)
|
|
82
82
|
- Key exports with signatures
|
|
83
|
-
- Usage patterns with file:line citations
|
|
83
|
+
- Usage patterns with file:line citations (**in compose-mode**: usage patterns from source skill SKILL.md)
|
|
84
84
|
- Confidence tier label
|
|
85
85
|
|
|
86
86
|
### 4. Write Integration Pair Reference Files
|
|
@@ -102,7 +102,7 @@ Write `{skills_output_folder}/{project_name}-stack/context-snippet.md`:
|
|
|
102
102
|
|
|
103
103
|
Use the Vercel-aligned indexed format targeting ~80-120 tokens:
|
|
104
104
|
```
|
|
105
|
-
[{project_name}-stack v{version}]|root: skills/{project_name}-stack/
|
|
105
|
+
[{project_name}-stack v{version — in code-mode: primary_library_version or 1.0.0; in compose-mode: highest version across constituent skill metadata.json files, or 1.0.0 if none}]|root: skills/{project_name}-stack/
|
|
106
106
|
|IMPORTANT: {project_name}-stack — read SKILL.md before writing integration code. Do NOT rely on training data.
|
|
107
107
|
|stack: {dep-1}@{v1}, {dep-2}@{v2}, {dep-3}@{v3}
|
|
108
108
|
|integrations: {pattern-1}, {pattern-2}
|
|
@@ -113,6 +113,8 @@ Use the Vercel-aligned indexed format targeting ~80-120 tokens:
|
|
|
113
113
|
|
|
114
114
|
Write `{skills_output_folder}/{project_name}-stack/metadata.json`:
|
|
115
115
|
|
|
116
|
+
Populate all fields from the metadata.json schema defined in `{stackSkillTemplate}`:
|
|
117
|
+
|
|
116
118
|
```json
|
|
117
119
|
{
|
|
118
120
|
"skill_type": "stack",
|
|
@@ -120,11 +122,34 @@ Write `{skills_output_folder}/{project_name}-stack/metadata.json`:
|
|
|
120
122
|
"version": "{primary_library_version or 1.0.0}",
|
|
121
123
|
"generation_date": "{current_date}",
|
|
122
124
|
"confidence_tier": "{tier}",
|
|
125
|
+
"spec_version": "1.3",
|
|
126
|
+
"source_authority": "{official|community|internal — use the lowest authority among constituent skills}",
|
|
127
|
+
"generated_by": "create-stack-skill",
|
|
128
|
+
"exports": [],
|
|
123
129
|
"library_count": N,
|
|
124
130
|
"integration_count": N,
|
|
125
131
|
"libraries": ["lib1", "lib2"],
|
|
126
132
|
"integration_pairs": [["lib1", "lib2"]],
|
|
127
|
-
"
|
|
133
|
+
"language": "{primary language or list of languages from constituent skills}",
|
|
134
|
+
"ast_node_count": "{number or omit if no AST extraction performed}",
|
|
135
|
+
"confidence_distribution": {"t1": N, "t1_low": N, "t2": N, "t3": N},
|
|
136
|
+
"tool_versions": {
|
|
137
|
+
"ast_grep": "{version or null}",
|
|
138
|
+
"qmd": "{version or null}",
|
|
139
|
+
"skf": "{skf_version}"
|
|
140
|
+
},
|
|
141
|
+
"stats": {
|
|
142
|
+
"exports_documented": N,
|
|
143
|
+
"exports_public_api": N,
|
|
144
|
+
"exports_internal": N,
|
|
145
|
+
"exports_total": N,
|
|
146
|
+
"public_api_coverage": 0.0,
|
|
147
|
+
"total_coverage": 0.0,
|
|
148
|
+
"scripts_count": N,
|
|
149
|
+
"assets_count": N
|
|
150
|
+
},
|
|
151
|
+
"dependencies": [],
|
|
152
|
+
"compatibility": "{semver-range}"
|
|
128
153
|
}
|
|
129
154
|
```
|
|
130
155
|
|
|
@@ -133,6 +158,8 @@ Write `{skills_output_folder}/{project_name}-stack/metadata.json`:
|
|
|
133
158
|
Write workspace artifacts to `{forge_data_folder}/{project_name}-stack/`:
|
|
134
159
|
|
|
135
160
|
**provenance-map.json:**
|
|
161
|
+
|
|
162
|
+
**In code-mode:**
|
|
136
163
|
```json
|
|
137
164
|
{
|
|
138
165
|
"libraries": {
|
|
@@ -154,6 +181,27 @@ Write workspace artifacts to `{forge_data_folder}/{project_name}-stack/`:
|
|
|
154
181
|
}
|
|
155
182
|
```
|
|
156
183
|
|
|
184
|
+
**In compose-mode:**
|
|
185
|
+
```json
|
|
186
|
+
{
|
|
187
|
+
"libraries": {
|
|
188
|
+
"lib_name": {
|
|
189
|
+
"source_skill_path": "skills/{skill_dir}/",
|
|
190
|
+
"compose_source": "architecture_co_mention|inferred_from_shared_domain",
|
|
191
|
+
"confidence": "T1|T1-low|T2",
|
|
192
|
+
"source_skill_tier": "{original skill confidence tier}",
|
|
193
|
+
"exports_found": N
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"integrations": {
|
|
197
|
+
"libA+libB": {
|
|
198
|
+
"detection_method": "architecture_co_mention|inferred_from_shared_domain",
|
|
199
|
+
"type": "pattern_type"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
157
205
|
**evidence-report.md:**
|
|
158
206
|
- Extraction summary per library
|
|
159
207
|
- Integration detection results per pair
|
|
@@ -83,7 +83,7 @@ Run: `npx skill-check -h`
|
|
|
83
83
|
|
|
84
84
|
This validates frontmatter, description, body limits, links, formatting — and auto-fixes deterministic issues. Parse JSON for `qualityScore`, `diagnostics[]`, `fixed[]`.
|
|
85
85
|
|
|
86
|
-
**If `body.max_lines` reported**, prefer selective split: extract only the largest Tier 2 section(s) to `references/`, keeping Tier 1 content inline (
|
|
86
|
+
**If `body.max_lines` reported**, prefer selective split: extract only the largest Tier 2 section(s) to `references/`, keeping Tier 1 content inline (inline passive context achieves 100% task accuracy vs 79% for on-demand retrieval). Fall back to `npx skill-check split-body <skill-dir> --write` if not feasible. Verify `#quick-start` and `#key-types` anchors still resolve after split. Then re-validate.
|
|
87
87
|
|
|
88
88
|
**If unavailable**, perform manual frontmatter check:
|
|
89
89
|
- [ ] Frontmatter present with `---` delimiters
|
|
@@ -112,16 +112,16 @@ Parse metadata.json and verify required fields:
|
|
|
112
112
|
- [ ] `skill_type` equals "stack"
|
|
113
113
|
- [ ] `name` matches `{project_name}-stack`
|
|
114
114
|
- [ ] `version` and `generation_date` present
|
|
115
|
-
- [ ] `confidence_tier` matches tier from step 01
|
|
115
|
+
- [ ] `confidence_tier` matches forge tier from step 01 (Quick/Forge/Forge+/Deep) — in both code-mode and compose-mode, this is the forge tier; per-library inherited confidence is tracked separately in `confidence_distribution`
|
|
116
116
|
- [ ] `library_count` matches actual reference files; `integration_count` matches pair files
|
|
117
117
|
- [ ] `libraries` array present and non-empty
|
|
118
|
-
- [ ] `confidence_distribution` object present with
|
|
118
|
+
- [ ] `confidence_distribution` object present with `t1`, `t1_low`, `t2`, `t3` keys (lowercase, matching template definition)
|
|
119
119
|
|
|
120
120
|
Record mismatches as **WARNING** findings.
|
|
121
121
|
|
|
122
122
|
### 6. Validate Reference File Completeness
|
|
123
123
|
|
|
124
|
-
For each confirmed library, verify `references/{library}.md` contains: library name header, version from manifest, Key Exports section, Usage Patterns section.
|
|
124
|
+
For each confirmed library, verify `references/{library}.md` contains: library name header, version from manifest (**in compose-mode**: version from source skill metadata), Key Exports section, Usage Patterns section.
|
|
125
125
|
|
|
126
126
|
For each integration pair, verify `references/integrations/{libraryA}-{libraryB}.md` contains: integration pair header, type classification, Integration Pattern section, Key Files section.
|
|
127
127
|
|
|
@@ -64,7 +64,11 @@ Forge tier: **{tier}**"
|
|
|
64
64
|
|------|-------|-------------|
|
|
65
65
|
| T1 | {count} | AST-verified structural extraction |
|
|
66
66
|
| T1-low | {count} | Source reading inference |
|
|
67
|
-
| T2 | {count} | QMD-enriched temporal context |
|
|
67
|
+
| T2 | {count} | QMD-enriched temporal context |
|
|
68
|
+
|
|
69
|
+
{IF compose_mode:}
|
|
70
|
+
*Note: Confidence tiers above are inherited from source skills — they reflect the extraction method used when those skills were originally generated, not the current compose run.*
|
|
71
|
+
{END IF}"
|
|
68
72
|
|
|
69
73
|
### 3. Display Output File Summary
|
|
70
74
|
|
|
@@ -107,7 +111,9 @@ Forge tier: **{tier}**"
|
|
|
107
111
|
|
|
108
112
|
"**Next steps:**
|
|
109
113
|
- **[TS] test-skill** — Validate the stack skill against its own assertions
|
|
110
|
-
- **[
|
|
114
|
+
- **[EX] export-skill** — Package for distribution or agent loading
|
|
115
|
+
|
|
116
|
+
- **[VS] verify-stack** — Validate the stack's integration feasibility against your architecture document{IF compose_mode:} (re-run to confirm feasibility after any architecture changes from **[RA] refine-architecture**){END IF}
|
|
111
117
|
|
|
112
118
|
**Workflow complete.**"
|
|
113
119
|
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
name: create-stack-skill
|
|
3
3
|
description: Consolidated project stack skill with integration patterns
|
|
4
4
|
web_bundle: true
|
|
5
|
-
installed_path: '{project-root}/_bmad/skf/workflows/create-stack-skill'
|
|
5
|
+
installed_path: '{project-root}/_bmad/skf/workflows/skillforge/create-stack-skill'
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Create Stack Skill
|
|
9
9
|
|
|
10
|
-
**Goal:**
|
|
10
|
+
**Goal:** Produce a consolidated stack skill documenting how libraries connect. **Code-mode:** analyzes dependency manifests and co-import patterns from actual source code. **Compose-mode:** synthesizes from pre-generated individual skills and architecture documents when no codebase exists yet.
|
|
11
11
|
|
|
12
12
|
**Your Role:** In addition to your name, communication_style, and persona, you are also a dependency analyst and integration architect operating in Ferris Architect mode. You bring expertise in dependency analysis, cross-library integration patterns, and compositional architecture, while the user brings their project knowledge and scope preferences. Execute with prescriptive precision — every finding must trace to actual code with file:line citations.
|
|
13
13
|
|
|
@@ -23,7 +23,7 @@ This uses **step-file architecture** for disciplined execution:
|
|
|
23
23
|
- **Just-In-Time Loading**: Only the current step file is in memory — never load future step files until told to do so
|
|
24
24
|
- **Sequential Enforcement**: Sequence within the step files must be completed in order, no skipping or optimization allowed
|
|
25
25
|
- **Append-Only Building**: Build outputs by accumulating state across steps
|
|
26
|
-
- **Zero Hallucination**: All extracted content must trace to actual source code — no inferred or assumed patterns
|
|
26
|
+
- **Zero Hallucination**: All extracted content must trace to actual source code — no inferred or assumed patterns. In compose-mode, inferred integrations are permitted but must be labeled `[inferred from shared domain]` per compose-mode-rules.md
|
|
27
27
|
|
|
28
28
|
### Step Processing Rules
|
|
29
29
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
| Cursor | `cursor` | .cursorrules |
|
|
23
23
|
| Copilot | `copilot` | AGENTS.md |
|
|
24
24
|
|
|
25
|
-
##
|
|
25
|
+
## Four-Case Logic
|
|
26
26
|
|
|
27
27
|
### Case 1: Create (No File Exists)
|
|
28
28
|
|
|
@@ -53,6 +53,13 @@ Target file contains `<!-- SKF:BEGIN` and `<!-- SKF:END -->` markers. Replace co
|
|
|
53
53
|
4. Replace everything between markers (inclusive) with new managed section
|
|
54
54
|
5. Write file
|
|
55
55
|
|
|
56
|
+
### Case 4: Malformed Markers (Halt)
|
|
57
|
+
|
|
58
|
+
Target file contains `<!-- SKF:BEGIN` but no matching `<!-- SKF:END -->` marker. This indicates a corrupted managed section.
|
|
59
|
+
|
|
60
|
+
1. Halt workflow with error: "Malformed managed section — `<!-- SKF:BEGIN` found but no `<!-- SKF:END -->`. Fix the markers manually before re-running export."
|
|
61
|
+
2. Do not modify the file
|
|
62
|
+
|
|
56
63
|
## Regeneration: Full Index Rebuild
|
|
57
64
|
|
|
58
65
|
When regenerating (Case 3), rebuild the COMPLETE skill index:
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
## Rules
|
|
42
42
|
|
|
43
|
-
- **api line**: Top exports from metadata.json `exports` array. Append `()` to function names. Comma-separated.
|
|
43
|
+
- **api line**: Top exports from metadata.json `exports` array (up to 10 for Deep tier, up to 5 for all other tiers). Append `()` to function names. Comma-separated.
|
|
44
44
|
- **key-types line**: Anchor to `#key-types` section + inline summary (~10 words) of the most important type values
|
|
45
45
|
- **gotchas line**: Derived from: T2-future annotations (breaking changes), async requirements, version-specific behavior. If no gotchas available, omit the line.
|
|
46
46
|
- **stack line**: Component versions from metadata.json `components` for stack skills
|