bmad-module-skill-forge 0.9.0 → 0.10.1-alpha.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/.claude-plugin/marketplace.json +39 -0
- package/.gitattributes +16 -0
- package/README.md +105 -38
- package/docs/404.md +13 -10
- package/docs/RELEASING.md +185 -0
- package/docs/STABILITY.md +123 -0
- package/docs/_data/pinned.yaml +98 -0
- package/docs/agents.md +16 -11
- package/docs/architecture.md +221 -0
- package/docs/bmad-synergy.md +11 -13
- package/docs/concepts.md +18 -108
- package/docs/examples.md +121 -80
- package/docs/getting-started.md +85 -147
- package/docs/how-it-works.md +25 -536
- package/docs/index.md +44 -27
- package/docs/skill-model.md +328 -0
- package/docs/troubleshooting.md +39 -0
- package/docs/verifying-a-skill.md +232 -0
- package/docs/why-skf.md +93 -0
- package/docs/workflows.md +119 -13
- package/package.json +25 -4
- package/src/README.md +23 -25
- package/src/forger/forge-tier.yaml +4 -2
- package/src/forger/preferences.yaml +7 -1
- package/src/knowledge/agentskills-spec.md +1 -1
- package/src/knowledge/architecture-verification.md +1 -1
- package/src/knowledge/ccc-bridge.md +16 -15
- package/src/knowledge/overview.md +11 -11
- package/src/knowledge/progressive-capability.md +3 -3
- package/src/knowledge/provenance-tracking.md +9 -3
- package/src/knowledge/qmd-registry.md +8 -8
- package/src/knowledge/skf-knowledge-index.csv +2 -2
- package/src/knowledge/skill-lifecycle.md +16 -1
- package/src/knowledge/split-body-strategy.md +1 -1
- package/src/knowledge/version-paths.md +17 -12
- package/src/module-help.csv +18 -17
- package/src/module.yaml +4 -0
- package/src/shared/health-check.md +372 -0
- package/src/shared/references/feasibility-report-schema.md +86 -0
- package/src/shared/references/headless-gate-convention.md +62 -0
- package/src/shared/references/output-contract-schema.md +35 -0
- package/src/shared/references/pipeline-contracts.md +102 -0
- package/src/shared/scripts/skf-atomic-write.py +370 -0
- package/src/shared/scripts/skf-manifest-ops.py +236 -0
- package/src/shared/scripts/skf-preflight.py +164 -0
- package/src/shared/scripts/skf-rebuild-managed-sections.py +201 -0
- package/src/shared/scripts/skf-severity-classify.py +163 -0
- package/src/shared/scripts/skf-skill-inventory.py +210 -0
- package/src/shared/scripts/skf-structural-diff.py +257 -0
- package/src/shared/scripts/skf-validate-frontmatter.py +318 -0
- package/src/shared/scripts/skf-validate-output.py +247 -0
- package/src/skf-analyze-source/SKILL.md +57 -0
- package/src/skf-analyze-source/assets/skill-brief-schema.md +125 -0
- package/src/skf-analyze-source/references/unit-detection-heuristics.md +124 -0
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-01-init.md +6 -66
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-01b-continue.md +4 -59
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-02-scan-project.md +7 -68
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-03-identify-units.md +6 -66
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-04-map-and-detect.md +7 -68
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-05-recommend.md +6 -66
- package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-06-generate-briefs.md +14 -66
- package/src/skf-analyze-source/steps-c/step-07-health-check.md +22 -0
- package/src/skf-audit-skill/SKILL.md +59 -0
- package/src/{workflows/audit-skill/data → skf-audit-skill/assets}/drift-report-template.md +7 -7
- package/src/{workflows/audit-skill/data → skf-audit-skill/references}/severity-rules.md +11 -11
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-01-init.md +24 -68
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-02-re-index.md +36 -71
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-03-structural-diff.md +21 -63
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-04-semantic-diff.md +6 -65
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-05-severity-classify.md +5 -63
- package/src/{workflows/audit-skill → skf-audit-skill}/steps-c/step-06-report.md +10 -59
- package/src/skf-audit-skill/steps-c/step-07-health-check.md +22 -0
- package/src/skf-brief-skill/SKILL.md +53 -0
- package/src/{workflows/brief-skill/data → skf-brief-skill/assets}/scope-templates.md +23 -0
- package/src/skf-brief-skill/assets/skill-brief-schema.md +206 -0
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-01-gather-intent.md +6 -67
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-02-analyze-target.md +6 -66
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-03-scope-definition.md +12 -68
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-04-confirm-brief.md +5 -63
- package/src/{workflows/brief-skill → skf-brief-skill}/steps-c/step-05-write-brief.md +10 -69
- package/src/skf-brief-skill/steps-c/step-06-health-check.md +22 -0
- package/src/skf-create-skill/SKILL.md +63 -0
- package/src/{workflows/create-skill/data → skf-create-skill/assets}/compile-assembly-rules.md +60 -0
- package/src/{workflows/create-skill/data → skf-create-skill/assets}/skill-sections.md +92 -23
- package/src/skf-create-skill/assets/tessl-dismissal-rules.md +102 -0
- package/src/{workflows/create-skill/data → skf-create-skill/references}/extraction-patterns-tracing.md +13 -13
- package/src/{workflows/create-skill/data → skf-create-skill/references}/extraction-patterns.md +8 -3
- package/src/skf-create-skill/references/source-resolution-protocols.md +239 -0
- package/src/{workflows/create-skill/data → skf-create-skill/references}/tier-degradation-rules.md +8 -7
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-01-load-brief.md +25 -63
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-02-ecosystem-check.md +8 -64
- package/src/skf-create-skill/steps-c/step-03-extract.md +379 -0
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-03d-component-extraction.md +18 -35
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-04-enrich.md +12 -69
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-05-compile.md +71 -75
- package/src/skf-create-skill/steps-c/step-06-validate.md +267 -0
- package/src/{workflows/create-skill → skf-create-skill}/steps-c/step-07-generate-artifacts.md +30 -74
- package/src/skf-create-skill/steps-c/step-08-report.md +145 -0
- package/src/skf-create-skill/steps-c/step-09-health-check.md +23 -0
- package/src/{workflows/create-skill/steps-c → skf-create-skill/steps-c/sub}/step-02b-ccc-discover.md +8 -66
- package/src/skf-create-skill/steps-c/sub/step-03b-fetch-temporal.md +229 -0
- package/src/{workflows/create-skill/steps-c → skf-create-skill/steps-c/sub}/step-03c-fetch-docs.md +18 -42
- package/src/skf-create-stack-skill/SKILL.md +64 -0
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/assets}/stack-skill-template.md +2 -1
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/compose-mode-rules.md +19 -5
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/integration-patterns.md +1 -1
- package/src/{workflows/create-stack-skill/data → skf-create-stack-skill/references}/manifest-patterns.md +10 -10
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-01-init.md +14 -55
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-02-detect-manifests.md +29 -63
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-03-rank-and-confirm.md +9 -59
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-04-parallel-extract.md +29 -64
- package/src/skf-create-stack-skill/steps-c/step-05-detect-integrations.md +164 -0
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-06-compile-stack.md +7 -60
- package/src/skf-create-stack-skill/steps-c/step-07-generate-output.md +328 -0
- package/src/{workflows/create-stack-skill → skf-create-stack-skill}/steps-c/step-08-validate.md +17 -63
- package/src/skf-create-stack-skill/steps-c/step-09-report.md +128 -0
- package/src/skf-create-stack-skill/steps-c/step-10-health-check.md +22 -0
- package/src/skf-drop-skill/SKILL.md +57 -0
- package/src/{workflows/drop-skill → skf-drop-skill}/steps-c/step-01-select.md +9 -69
- package/src/{workflows/drop-skill → skf-drop-skill}/steps-c/step-02-execute.md +30 -106
- package/src/skf-drop-skill/steps-c/step-03-report.md +83 -0
- package/src/skf-drop-skill/steps-c/step-04-health-check.md +22 -0
- package/src/skf-export-skill/SKILL.md +57 -0
- package/src/skf-export-skill/assets/managed-section-format.md +138 -0
- package/src/{workflows/export-skill/data → skf-export-skill/assets}/snippet-format.md +8 -12
- package/src/skf-export-skill/steps-c/step-01-load-skill.md +247 -0
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-02-package.md +5 -58
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-03-generate-snippet.md +15 -77
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-04-update-context.md +59 -133
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-05-token-report.md +4 -58
- package/src/{workflows/export-skill → skf-export-skill}/steps-c/step-06-summary.md +20 -64
- package/src/skf-export-skill/steps-c/step-07-health-check.md +22 -0
- package/src/skf-forger/SKILL.md +110 -0
- package/src/skf-forger/bmad-skill-manifest.yaml +11 -0
- package/src/skf-quick-skill/SKILL.md +56 -0
- package/src/{workflows/quick-skill/data → skf-quick-skill/references}/registry-resolution.md +6 -6
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-01-resolve-target.md +9 -62
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-02-ecosystem-check.md +5 -59
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-03-quick-extract.md +18 -61
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-04-compile.md +6 -60
- package/src/{workflows/quick-skill → skf-quick-skill}/steps-c/step-05-validate.md +58 -78
- package/src/skf-quick-skill/steps-c/step-06-write.md +73 -0
- package/src/skf-quick-skill/steps-c/step-07-health-check.md +22 -0
- package/src/skf-refine-architecture/SKILL.md +57 -0
- package/src/{workflows/refine-architecture/data → skf-refine-architecture/references}/refinement-rules.md +16 -16
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-01-init.md +6 -63
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-02-gap-analysis.md +29 -71
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-03-issue-detection.md +5 -65
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-04-improvements.md +5 -64
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-05-compile.md +5 -56
- package/src/{workflows/refine-architecture → skf-refine-architecture}/steps-c/step-06-report.md +14 -64
- package/src/skf-refine-architecture/steps-c/step-07-health-check.md +22 -0
- package/src/skf-rename-skill/SKILL.md +58 -0
- package/src/{workflows/rename-skill → skf-rename-skill}/steps-c/step-01-select.md +12 -73
- package/src/{workflows/rename-skill → skf-rename-skill}/steps-c/step-02-execute.md +32 -113
- package/src/skf-rename-skill/steps-c/step-03-report.md +83 -0
- package/src/skf-rename-skill/steps-c/step-04-health-check.md +22 -0
- package/src/skf-setup/SKILL.md +55 -0
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-01-detect-and-tier.md +6 -62
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-01b-ccc-index.md +9 -65
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-02-write-config.md +15 -60
- package/src/{workflows/setup-forge → skf-setup}/steps-c/step-03-auto-index.md +7 -66
- package/src/skf-setup/steps-c/step-04-report.md +92 -0
- package/src/skf-setup/steps-c/step-05-health-check.md +22 -0
- package/src/skf-test-skill/SKILL.md +59 -0
- package/src/skf-test-skill/references/migration-section-rules.md +114 -0
- package/src/skf-test-skill/references/scoring-rules.md +207 -0
- package/src/skf-test-skill/references/source-access-protocol.md +109 -0
- package/src/skf-test-skill/scripts/compute-score.py +310 -0
- package/src/skf-test-skill/steps-c/step-01-init.md +238 -0
- package/src/{workflows/test-skill → skf-test-skill}/steps-c/step-02-detect-mode.md +4 -62
- package/src/skf-test-skill/steps-c/step-03-coverage-check.md +347 -0
- package/src/skf-test-skill/steps-c/step-04-coherence-check.md +239 -0
- package/src/{workflows/test-skill → skf-test-skill}/steps-c/step-04b-external-validators.md +42 -77
- package/src/skf-test-skill/steps-c/step-05-score.md +266 -0
- package/src/skf-test-skill/steps-c/step-06-report.md +290 -0
- package/src/skf-test-skill/steps-c/step-07-health-check.md +25 -0
- package/src/skf-test-skill/templates/test-report-template.md +58 -0
- package/src/skf-update-skill/SKILL.md +58 -0
- package/src/{workflows/update-skill/data → skf-update-skill/references}/manual-section-rules.md +6 -6
- package/src/{workflows/update-skill/data → skf-update-skill/references}/merge-conflict-rules.md +5 -5
- package/src/skf-update-skill/references/remote-source-resolution.md +94 -0
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-01-init.md +22 -69
- package/src/skf-update-skill/steps-c/step-02-detect-changes.md +255 -0
- package/src/skf-update-skill/steps-c/step-03-re-extract.md +336 -0
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-04-merge.md +60 -72
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-05-validate.md +5 -62
- package/src/skf-update-skill/steps-c/step-06-write.md +278 -0
- package/src/{workflows/update-skill → skf-update-skill}/steps-c/step-07-report.md +11 -66
- package/src/skf-update-skill/steps-c/step-08-health-check.md +22 -0
- package/src/skf-verify-stack/SKILL.md +60 -0
- package/src/skf-verify-stack/assets/feasibility-report-template.md +76 -0
- package/src/{workflows/verify-stack/data → skf-verify-stack/references}/coverage-patterns.md +12 -4
- package/src/skf-verify-stack/references/integration-verification-rules.md +78 -0
- package/src/skf-verify-stack/steps-c/step-01-init.md +178 -0
- package/src/{workflows/verify-stack → skf-verify-stack}/steps-c/step-02-coverage.md +27 -72
- package/src/skf-verify-stack/steps-c/step-03-integrations.md +179 -0
- package/src/{workflows/verify-stack → skf-verify-stack}/steps-c/step-04-requirements.md +14 -67
- package/src/skf-verify-stack/steps-c/step-05-synthesize.md +147 -0
- package/src/skf-verify-stack/steps-c/step-06-report.md +156 -0
- package/src/skf-verify-stack/steps-c/step-07-health-check.md +25 -0
- package/tools/cli/commands/install.js +1 -1
- package/tools/cli/commands/status.js +21 -23
- package/tools/cli/commands/uninstall.js +11 -19
- package/tools/cli/commands/update.js +2 -2
- package/tools/cli/lib/ide-skills.js +216 -0
- package/tools/cli/lib/installer.js +29 -52
- package/tools/cli/lib/manifest.js +11 -5
- package/tools/cli/lib/platform-codes.yaml +223 -0
- package/tools/cli/lib/ui.js +76 -47
- package/tools/validate-docs-drift.js +193 -0
- package/src/agents/forger.agent.yaml +0 -114
- package/src/workflows/README.md +0 -174
- package/src/workflows/analyze-source/data/skill-brief-schema.md +0 -125
- package/src/workflows/analyze-source/data/unit-detection-heuristics.md +0 -124
- package/src/workflows/analyze-source/workflow.md +0 -61
- package/src/workflows/audit-skill/workflow.md +0 -64
- package/src/workflows/brief-skill/data/skill-brief-schema.md +0 -159
- package/src/workflows/brief-skill/workflow.md +0 -58
- package/src/workflows/create-skill/data/source-resolution-protocols.md +0 -200
- package/src/workflows/create-skill/steps-c/step-03-extract.md +0 -301
- package/src/workflows/create-skill/steps-c/step-03b-fetch-temporal.md +0 -253
- package/src/workflows/create-skill/steps-c/step-06-validate.md +0 -254
- package/src/workflows/create-skill/steps-c/step-08-report.md +0 -176
- package/src/workflows/create-skill/workflow.md +0 -53
- package/src/workflows/create-stack-skill/steps-c/step-05-detect-integrations.md +0 -196
- package/src/workflows/create-stack-skill/steps-c/step-07-generate-output.md +0 -270
- package/src/workflows/create-stack-skill/steps-c/step-09-report.md +0 -145
- package/src/workflows/create-stack-skill/workflow.md +0 -59
- package/src/workflows/drop-skill/steps-c/step-03-report.md +0 -135
- package/src/workflows/drop-skill/workflow.md +0 -63
- package/src/workflows/export-skill/data/managed-section-format.md +0 -103
- package/src/workflows/export-skill/steps-c/step-01-load-skill.md +0 -237
- package/src/workflows/export-skill/workflow.md +0 -58
- package/src/workflows/quick-skill/steps-c/step-06-write.md +0 -179
- package/src/workflows/quick-skill/workflow.md +0 -58
- package/src/workflows/refine-architecture/workflow.md +0 -61
- package/src/workflows/rename-skill/steps-c/step-03-report.md +0 -132
- package/src/workflows/rename-skill/workflow.md +0 -64
- package/src/workflows/setup-forge/steps-c/step-04-report.md +0 -156
- package/src/workflows/setup-forge/workflow.md +0 -51
- package/src/workflows/test-skill/data/scoring-rules.md +0 -123
- package/src/workflows/test-skill/data/source-access-protocol.md +0 -51
- package/src/workflows/test-skill/steps-c/step-01-init.md +0 -217
- package/src/workflows/test-skill/steps-c/step-03-coverage-check.md +0 -280
- package/src/workflows/test-skill/steps-c/step-04-coherence-check.md +0 -271
- package/src/workflows/test-skill/steps-c/step-05-score.md +0 -222
- package/src/workflows/test-skill/steps-c/step-06-report.md +0 -207
- package/src/workflows/test-skill/templates/test-report-template.md +0 -28
- package/src/workflows/test-skill/workflow.md +0 -57
- package/src/workflows/update-skill/data/remote-source-resolution.md +0 -57
- package/src/workflows/update-skill/steps-c/step-02-detect-changes.md +0 -221
- package/src/workflows/update-skill/steps-c/step-03-re-extract.md +0 -256
- package/src/workflows/update-skill/steps-c/step-06-write.md +0 -265
- package/src/workflows/update-skill/workflow.md +0 -56
- package/src/workflows/verify-stack/data/feasibility-report-template.md +0 -63
- package/src/workflows/verify-stack/data/integration-verification-rules.md +0 -73
- package/src/workflows/verify-stack/steps-c/step-01-init.md +0 -179
- package/src/workflows/verify-stack/steps-c/step-03-integrations.md +0 -195
- package/src/workflows/verify-stack/steps-c/step-05-synthesize.md +0 -191
- package/src/workflows/verify-stack/steps-c/step-06-report.md +0 -197
- package/src/workflows/verify-stack/workflow.md +0 -61
- package/tools/cli/lib/compiler.js +0 -306
- package/tools/cli/lib/ide-commands.js +0 -244
- /package/src/{workflows/analyze-source → skf-analyze-source}/templates/analysis-report-template.md +0 -0
- /package/src/{workflows/quick-skill/data → skf-quick-skill/assets}/skill-template.md +0 -0
- /package/src/{workflows/setup-forge/data → skf-setup/references}/tier-rules.md +0 -0
- /package/src/{workflows/test-skill/data → skf-test-skill/assets}/output-section-formats.md +0 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Skill Brief Schema
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Defines the output contract for skill-brief.yaml files generated by analyze-source. Each generated brief must conform to this schema to be consumable by brief-skill and create-skill downstream workflows.
|
|
6
|
+
|
|
7
|
+
## Required Fields
|
|
8
|
+
|
|
9
|
+
| Field | Type | Constraint | Description |
|
|
10
|
+
|-------------|--------|--------------------------------------------------|-----------------------------------------------------------------------------|
|
|
11
|
+
| name | string | kebab-case `[a-z0-9-]+` | Unique skill identifier |
|
|
12
|
+
| version | string | Semantic version (`X.Y.Z` or `X.Y.Z-prerelease`) | Auto-detect from source (see Version Detection below), fall back to `1.0.0`. **Side effect on remote sources:** `skf-create-skill` treats `version` as an **implicit** `target_version` hint when `target_version` itself is absent — it will try to resolve `{version}` or `v{version}` to a git tag before cloning and fall back to HEAD with a warning if no tag matches. See `skf-create-skill/references/source-resolution-protocols.md` → "Implicit Tag Resolution". |
|
|
13
|
+
| source_repo | string | GitHub URL or local path | Repository or project root (optional when `source_type: "docs-only"`) |
|
|
14
|
+
| language | string | Recognized language | Primary programming language |
|
|
15
|
+
| scope | object | See Scope Object below | Boundary definition |
|
|
16
|
+
| description | string | 1-3 sentences | What the skill covers |
|
|
17
|
+
| forge_tier | string | `Quick` / `Forge` / `Forge+` / `Deep` | Inherited from forge-tier.yaml (Title Case) |
|
|
18
|
+
| created | string | ISO date `YYYY-MM-DD` | Generation date |
|
|
19
|
+
| created_by | string | user_name from config | Who generated the brief |
|
|
20
|
+
|
|
21
|
+
## Optional Fields
|
|
22
|
+
|
|
23
|
+
| Field | Type | Constraint | Description |
|
|
24
|
+
|--------------------|--------|--------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
25
|
+
| source_type | string | `source` or `docs-only` | Default `source`. When `docs-only`: `source_repo` optional, `doc_urls` required |
|
|
26
|
+
| doc_urls | array | `{url, label}` objects | Documentation URLs for T3 content. Required when `source_type: "docs-only"` |
|
|
27
|
+
| `scripts_intent` | string | `detect` / `none` / free-text | Describes whether scripts should be extracted. Values: `detect` (auto-detect from source — default when absent), `none` (skip scripts), or a free-text description of expected scripts (e.g., "CLI validation tools in bin/"). |
|
|
28
|
+
| `assets_intent` | string | `detect` / `none` / free-text | Describes whether assets should be extracted. Values: `detect` (auto-detect from source — default when absent), `none` (skip assets), or a free-text description of expected assets (e.g., "JSON schemas in schemas/"). |
|
|
29
|
+
| `target_version` | string | Semantic version (`X.Y.Z` or `X.Y.Z-prerelease`) | User-specified target version. When present, overrides auto-detection and becomes the skill's version. Recommended for docs-only skills where auto-detection is unavailable. |
|
|
30
|
+
| `source_authority` | string | `official` / `community` / `internal` | Default `community`. Set to `official` only when the skill creator is the library maintainer. Forced to `community` when `source_type: "docs-only"`. |
|
|
31
|
+
| `source_ref` | string | Git ref (tag/branch/HEAD) | Resolved git ref used for source access. Set automatically during tag resolution — do not set manually. |
|
|
32
|
+
|
|
33
|
+
When `source_type: "docs-only"`:
|
|
34
|
+
- `source_repo` becomes optional (set to doc site URL for reference)
|
|
35
|
+
- `doc_urls` must have at least one entry
|
|
36
|
+
- `source_authority` is forced to `community` (T3 external documentation cannot be `official`)
|
|
37
|
+
- All extracted content gets `[EXT:{url}]` citations
|
|
38
|
+
|
|
39
|
+
## Version Detection
|
|
40
|
+
|
|
41
|
+
During brief generation, attempt to auto-detect the source version before defaulting to `"1.0.0"`. Check the first matching file in the source:
|
|
42
|
+
|
|
43
|
+
- **Python:** `pyproject.toml` `[project] version` (static) → if `dynamic = ["version"]`, check `__init__.py` for `__version__` → `_version.py` if exists → `setup.py` `version=` → `git describe --tags --abbrev=0`
|
|
44
|
+
- **JavaScript/TypeScript:** root `package.json` (`"version"`) → if root has `"private": true` with a `"workspaces"` array or lacks a `"version"` field, fall back to a primary workspace package's `package.json` (e.g., `code/core/package.json`, or the first matching `packages/*/package.json`). For GitHub sources, prefer `gh api repos/{owner}/{repo}/releases/latest` → `tag_name` when a non-pre-release tag exists, over a default-branch pre-release. Treat a version containing `-alpha`, `-beta`, `-rc`, `-next`, or `-canary` as a pre-release.
|
|
45
|
+
- **Rust:** `Cargo.toml` `[package] version` (static) → if `version = { workspace = true }`, resolve from workspace root `Cargo.toml` → `git describe --tags --abbrev=0`
|
|
46
|
+
- **Go:** version tag from `go.mod` or `git describe --tags --abbrev=0`
|
|
47
|
+
|
|
48
|
+
If the source is a remote GitHub repo, use `gh api repos/{owner}/{repo}/contents/{file}` to read the version file. If the source is local, read the file directly.
|
|
49
|
+
|
|
50
|
+
If detection succeeds, use the detected version. If it fails or returns a non-semver value, fall back to `"1.0.0"`.
|
|
51
|
+
|
|
52
|
+
The create-skill workflow (step-03-extract) also performs version reconciliation at extraction time — if the source version has changed since the brief was created, the extraction step warns and uses the source version.
|
|
53
|
+
|
|
54
|
+
**Target version override:** When `target_version` is present in the brief, it takes precedence over auto-detection. Auto-detection still runs for informational purposes (displayed as "Detected version" alongside the user-specified "Target version"), but the `target_version` value is used as the brief's `version` field. This is particularly useful for docs-only skills (where no package manifest exists) and when the user wants to compile a skill for a specific older version.
|
|
55
|
+
|
|
56
|
+
**Pre-release handling:** If the detected version contains a pre-release tag (e.g., `1.0.0-beta.0`, `2.0.0-rc.1`), preserve it as-is. Pre-release tags are valid semver and must not be stripped. When comparing versions during reconciliation, use semver-aware comparison that respects pre-release ordering.
|
|
57
|
+
|
|
58
|
+
## Scope Object
|
|
59
|
+
|
|
60
|
+
```yaml
|
|
61
|
+
scope:
|
|
62
|
+
type: full-library | specific-modules | public-api | component-library | docs-only
|
|
63
|
+
include:
|
|
64
|
+
- 'src/**/*.ts' # At least one required
|
|
65
|
+
exclude:
|
|
66
|
+
- 'src/**/*.test.ts' # Optional
|
|
67
|
+
notes: 'Optional rationale for scope decision'
|
|
68
|
+
# Additional fields when scope.type is "component-library":
|
|
69
|
+
# registry_path: "path/to/registry.ts" # Optional — auto-detected if omitted
|
|
70
|
+
# ui_variants: # Optional — design system variants
|
|
71
|
+
# - name: "shadcnui"
|
|
72
|
+
# package: "packages/components/react-shadcn"
|
|
73
|
+
# demo_patterns: # Optional — auto-detected if omitted
|
|
74
|
+
# - "**/demo/**"
|
|
75
|
+
# - "**/*.stories.*"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Scope Types
|
|
79
|
+
|
|
80
|
+
| Type | Use When |
|
|
81
|
+
|-------------------|--------------------------------------------------------------------------------------|
|
|
82
|
+
| full-library | Entire codebase of a unit |
|
|
83
|
+
| specific-modules | Selected components or packages |
|
|
84
|
+
| public-api | Only exported interfaces |
|
|
85
|
+
| component-library | UI component libraries with registries, props-based APIs, and design system variants |
|
|
86
|
+
| docs-only | When source_type is docs-only — no source code available, all content from doc_urls |
|
|
87
|
+
|
|
88
|
+
## YAML Template
|
|
89
|
+
|
|
90
|
+
```yaml
|
|
91
|
+
name: '{unit-name}'
|
|
92
|
+
version: '{detected-version or 1.0.0}'
|
|
93
|
+
source_type: 'source'
|
|
94
|
+
source_repo: '{project_path}'
|
|
95
|
+
language: '{detected_language}'
|
|
96
|
+
scope:
|
|
97
|
+
type: '{detected_scope_type}'
|
|
98
|
+
include:
|
|
99
|
+
- '{include_pattern}'
|
|
100
|
+
exclude:
|
|
101
|
+
- '{exclude_pattern}'
|
|
102
|
+
notes: '{scope_rationale}'
|
|
103
|
+
description: '{1-3 sentence description}'
|
|
104
|
+
forge_tier: '{Quick|Forge|Forge+|Deep}'
|
|
105
|
+
created: '{current_date}'
|
|
106
|
+
created_by: '{user_name}'
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Validation Rules
|
|
110
|
+
|
|
111
|
+
1. **Name uniqueness**: No duplicate names within forge_data_folder
|
|
112
|
+
2. **Source accessibility**: source_repo path must exist or be reachable
|
|
113
|
+
3. **Language recognized**: Must be a known programming language
|
|
114
|
+
4. **Scope type valid**: Must match one of the five defined types (full-library, specific-modules, public-api, component-library, docs-only)
|
|
115
|
+
5. **Include patterns**: At least one include glob pattern required (exception: `docs-only` scope, where include patterns are optional since no source code is available)
|
|
116
|
+
6. **Forge tier match**: Must match value in forge-tier.yaml
|
|
117
|
+
7. **Docs-only mode**: When `source_type: "docs-only"`, `doc_urls` required (>= 1), `source_repo` optional
|
|
118
|
+
8. Each `doc_urls` entry must have a valid `url` field
|
|
119
|
+
|
|
120
|
+
## Output Location
|
|
121
|
+
|
|
122
|
+
Each skill-brief.yaml is written to:
|
|
123
|
+
```
|
|
124
|
+
{forge_data_folder}/{unit-name}/skill-brief.yaml
|
|
125
|
+
```
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Unit Detection Heuristics
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Rules for identifying discrete skillable units within a project. A "skillable unit" is a self-contained component with clear boundaries that can be documented as an independent skill.
|
|
6
|
+
|
|
7
|
+
## Detection Signals
|
|
8
|
+
|
|
9
|
+
### Strong Signals (High Confidence)
|
|
10
|
+
|
|
11
|
+
| Signal | Description | Example |
|
|
12
|
+
|------------------------------------------------|----------------------------------------------|------------------------------------|
|
|
13
|
+
| Independent package.json / Cargo.toml / go.mod | Unit has its own dependency manifest | `packages/auth/package.json` |
|
|
14
|
+
| Separate entry point | Unit has a main/index file | `services/api/src/index.ts` |
|
|
15
|
+
| Docker/service definition | Unit runs as an independent service | `docker-compose.yml` service entry |
|
|
16
|
+
| Distinct export surface | Unit exports a public API consumed by others | `src/lib/index.ts` with re-exports |
|
|
17
|
+
| Workspace member | Listed in root workspace configuration | `pnpm-workspace.yaml` packages |
|
|
18
|
+
|
|
19
|
+
### Moderate Signals (Medium Confidence)
|
|
20
|
+
|
|
21
|
+
| Signal | Description | Example |
|
|
22
|
+
|--------------------------|---------------------------------------------------|-------------------------------------|
|
|
23
|
+
| Directory depth boundary | Top-level directory with self-contained structure | `src/modules/payments/` |
|
|
24
|
+
| Naming convention | Follows organizational naming pattern | `@org/package-name` |
|
|
25
|
+
| Separate test suite | Has its own test directory or config | `packages/auth/__tests__/` |
|
|
26
|
+
| README.md presence | Has documentation at directory level | `libs/utils/README.md` |
|
|
27
|
+
| CI/CD pipeline reference | Referenced in build/deploy configuration | `.github/workflows/deploy-auth.yml` |
|
|
28
|
+
|
|
29
|
+
### Weak Signals (Low Confidence — Require Corroboration)
|
|
30
|
+
|
|
31
|
+
| Signal | Description | Example |
|
|
32
|
+
|--------------------|---------------------------------------------|-------------------------------|
|
|
33
|
+
| Large directory | Many files in a subtree | 50+ files under one directory |
|
|
34
|
+
| Comment boundaries | Code comments marking sections | `// --- Auth Module ---` |
|
|
35
|
+
| Import clustering | Files that import primarily from each other | Tight import graph cluster |
|
|
36
|
+
|
|
37
|
+
## Boundary Classification
|
|
38
|
+
|
|
39
|
+
### Service Boundary
|
|
40
|
+
- Independent deployable unit
|
|
41
|
+
- Own process, port, or container
|
|
42
|
+
- Clear network interface (REST, gRPC, message queue)
|
|
43
|
+
- Scope type: `full-library`
|
|
44
|
+
|
|
45
|
+
### Package Boundary
|
|
46
|
+
- Workspace member or independently versioned package
|
|
47
|
+
- Own dependency manifest
|
|
48
|
+
- Exports consumed by other packages
|
|
49
|
+
- Scope type: `full-library` or `specific-modules`
|
|
50
|
+
|
|
51
|
+
### Module Boundary
|
|
52
|
+
- Logical grouping within a single package
|
|
53
|
+
- Shared namespace or directory structure
|
|
54
|
+
- Internal cohesion, external coupling through defined interface
|
|
55
|
+
- Scope type: `specific-modules` or `public-api`
|
|
56
|
+
|
|
57
|
+
### Library Boundary
|
|
58
|
+
- Third-party dependency with significant project-specific usage patterns
|
|
59
|
+
- Custom wrappers, configurations, or integration code
|
|
60
|
+
- Scope type: `public-api`
|
|
61
|
+
|
|
62
|
+
### Component Library Boundary
|
|
63
|
+
- Contains a component registry or catalog file (array of component definitions with IDs, names, categories)
|
|
64
|
+
- Has `components/`, `packages/components/`, or similar multi-component directory structure
|
|
65
|
+
- Multiple design system variant directories (e.g., `react-shadcn/`, `react-baseui/`, `react-carbon/`)
|
|
66
|
+
- Significant demo/story/example file ratio (>30% of total files)
|
|
67
|
+
- CLI-based installation pattern (e.g., `npx <tool> add <component-id>`)
|
|
68
|
+
- Props interfaces outnumber function signatures as primary API surface
|
|
69
|
+
- Scope type: `component-library`
|
|
70
|
+
|
|
71
|
+
## Disqualification Rules
|
|
72
|
+
|
|
73
|
+
Do NOT recommend as a skillable unit if:
|
|
74
|
+
|
|
75
|
+
1. **Too small**: Fewer than 3 source files or 100 lines of code
|
|
76
|
+
2. **Generated code**: Auto-generated files (protobuf, GraphQL codegen, etc.)
|
|
77
|
+
3. **Pure configuration**: Only config files with no logic
|
|
78
|
+
4. **Test-only**: Test utilities with no production code
|
|
79
|
+
5. **Vendor/dependency**: Third-party code copied into project
|
|
80
|
+
6. **Already skilled**: Existing skill found in forge_data_folder (recommend update-skill instead)
|
|
81
|
+
|
|
82
|
+
## Script/Asset Detection Signals
|
|
83
|
+
|
|
84
|
+
During per-unit analysis, check for scripts and assets alongside code exports.
|
|
85
|
+
|
|
86
|
+
**Script signals:**
|
|
87
|
+
|
|
88
|
+
| Strength | Signal | Example |
|
|
89
|
+
|----------|-----------------------------------------------------------------------------------------------|-----------------------------------------------------|
|
|
90
|
+
| Strong | Entry point in `package.json` `bin`, Cargo.toml `[[bin]]`, pyproject.toml `[project.scripts]` | `"bin": { "migrate": "scripts/migrate.js" }` |
|
|
91
|
+
| Strong | Shebang + executable file | `#!/usr/bin/env python` in `scripts/setup.py` |
|
|
92
|
+
| Moderate | File in `scripts/`, `bin/`, `tools/`, `cli/` directory | `scripts/validate.sh` |
|
|
93
|
+
| Moderate | CI/CD reference to script | `.github/workflows/test.yml` runs `scripts/test.sh` |
|
|
94
|
+
|
|
95
|
+
**Asset signals:**
|
|
96
|
+
|
|
97
|
+
| Strength | Signal | Example |
|
|
98
|
+
|----------|--------------------------------------------------------------------------------|----------------------------------|
|
|
99
|
+
| Strong | JSON Schema file with `$schema` key | `schemas/config.schema.json` |
|
|
100
|
+
| Strong | Config template with `.example` or `.template` extension | `config.yaml.example` |
|
|
101
|
+
| Moderate | File in `assets/`, `templates/`, `schemas/`, `configs/`, `examples/` directory | `templates/report.hbs` |
|
|
102
|
+
| Moderate | OpenAPI/GraphQL definition | `openapi.json`, `schema.graphql` |
|
|
103
|
+
|
|
104
|
+
**Per-unit output:** Record `has_scripts: boolean`, `has_assets: boolean`, `script_files: string[]`, `asset_files: string[]`.
|
|
105
|
+
|
|
106
|
+
**Disqualify:** Generated files (dist/, build/), vendored dependencies, IDE configs (.vscode/, .idea/), binary files (.so, .dll, .jar).
|
|
107
|
+
|
|
108
|
+
## Stack Skill Candidate Detection
|
|
109
|
+
|
|
110
|
+
Flag units as stack skill candidates when:
|
|
111
|
+
|
|
112
|
+
1. **Co-import frequency**: Two or more units are imported together in 3+ files
|
|
113
|
+
2. **Integration adapter**: A unit exists primarily to bridge two other units
|
|
114
|
+
3. **Shared state**: Multiple units read/write to the same data store
|
|
115
|
+
4. **Orchestration layer**: A unit coordinates calls across multiple other units
|
|
116
|
+
|
|
117
|
+
## Tier-Aware Scanning Depth
|
|
118
|
+
|
|
119
|
+
| Forge Tier | Scanning Approach |
|
|
120
|
+
|------------|----------------------------------------------------------------------------------------------------|
|
|
121
|
+
| Quick | File structure analysis: directory trees, manifest files, entry points, naming conventions |
|
|
122
|
+
| Forge | AST analysis: export surfaces, import graphs, dependency trees, type hierarchies |
|
|
123
|
+
| Forge+ | AST + CCC: semantic file pre-ranking before structural analysis, CCC signals for relevance scoring |
|
|
124
|
+
| Deep | AST + QMD: temporal evolution, refactoring patterns, semantic relationships, architectural drift |
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: 'step-01-init'
|
|
3
|
-
description: 'Initialize analysis workflow — load config, detect continuation, accept project path, check existing skills, create report'
|
|
4
|
-
|
|
5
2
|
nextStepFile: './step-02-scan-project.md'
|
|
6
3
|
continueFile: './step-01b-continue.md'
|
|
7
4
|
outputFile: '{forge_data_folder}/analyze-source-report-{project_name}.md'
|
|
8
|
-
templateFile: '
|
|
5
|
+
templateFile: 'templates/analysis-report-template.md'
|
|
9
6
|
---
|
|
10
7
|
|
|
11
8
|
# Step 1: Initialize Analysis
|
|
@@ -14,44 +11,11 @@ templateFile: '../templates/analysis-report-template.md'
|
|
|
14
11
|
|
|
15
12
|
To initialize the analyze-source workflow by loading configuration, detecting continuation state, accepting the target project path, checking for existing skills, and creating the analysis report document.
|
|
16
13
|
|
|
17
|
-
##
|
|
18
|
-
|
|
19
|
-
### Universal Rules:
|
|
20
|
-
|
|
21
|
-
- 🛑 NEVER generate content without user input
|
|
22
|
-
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
23
|
-
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
|
24
|
-
- 📋 YOU ARE A FACILITATOR, not a content generator
|
|
25
|
-
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
|
26
|
-
- ⚙️ 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
|
|
27
|
-
|
|
28
|
-
### Role Reinforcement:
|
|
29
|
-
|
|
30
|
-
- ✅ You are a source code analyst and decomposition architect (Ferris Architect mode)
|
|
31
|
-
- ✅ If you already have been given a name, communication_style and identity, continue to use those while playing this new role
|
|
32
|
-
- ✅ Prescriptive precision — zero-hallucination, only report what is found
|
|
33
|
-
- ✅ File:line citation tracing for all claims
|
|
34
|
-
|
|
35
|
-
### Step-Specific Rules:
|
|
36
|
-
|
|
37
|
-
- 🎯 Focus only on initialization — do NOT begin scanning or analysis
|
|
38
|
-
- 🚫 FORBIDDEN to analyze source code in this step
|
|
39
|
-
- 💬 Collect project path and scope hints from user
|
|
40
|
-
- 📋 Verify prerequisites before proceeding
|
|
41
|
-
|
|
42
|
-
## EXECUTION PROTOCOLS:
|
|
43
|
-
|
|
44
|
-
- 🎯 Follow the MANDATORY SEQUENCE exactly
|
|
45
|
-
- 💾 Create output document from template when initialization complete
|
|
46
|
-
- 📖 Update output frontmatter with initialization data
|
|
47
|
-
- 🚫 FORBIDDEN to proceed without valid project path and forge-tier.yaml
|
|
14
|
+
## Rules
|
|
48
15
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
- Focus: Setup and validation only — no analysis
|
|
53
|
-
- Limits: Do not read source files beyond checking prerequisites
|
|
54
|
-
- Dependencies: setup-forge must have been run (forge-tier.yaml must exist)
|
|
16
|
+
- Focus only on initialization — do not begin scanning or analysis
|
|
17
|
+
- Collect project path and scope hints from user
|
|
18
|
+
- Verify prerequisites before proceeding
|
|
55
19
|
|
|
56
20
|
## MANDATORY SEQUENCE
|
|
57
21
|
|
|
@@ -73,7 +37,7 @@ Look for {outputFile}.
|
|
|
73
37
|
|
|
74
38
|
**Check forge-tier.yaml:**
|
|
75
39
|
- Look for `{sidecar_path}/forge-tier.yaml`
|
|
76
|
-
- **IF missing:** HARD HALT — "**Cannot proceed.** forge-tier.yaml not found at `{sidecar_path}/forge-tier.yaml`. Please run the setup
|
|
40
|
+
- **IF missing:** HARD HALT — "**Cannot proceed.** forge-tier.yaml not found at `{sidecar_path}/forge-tier.yaml`. Please run the setup workflow first to configure your forge tier (Quick/Forge/Forge+/Deep)."
|
|
77
41
|
- **IF found:** Read and note the forge tier value
|
|
78
42
|
|
|
79
43
|
**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.
|
|
@@ -175,27 +139,3 @@ Display: "**Proceeding to project scan...**"
|
|
|
175
139
|
|
|
176
140
|
ONLY WHEN the output report has been created with populated frontmatter (project_paths, forge_tier, existing_skills) will you load and read fully {nextStepFile} to execute and begin the project scan.
|
|
177
141
|
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
181
|
-
|
|
182
|
-
### ✅ SUCCESS:
|
|
183
|
-
|
|
184
|
-
- Continuation detection performed correctly
|
|
185
|
-
- forge-tier.yaml verified present and tier noted
|
|
186
|
-
- Valid project path collected from user
|
|
187
|
-
- Optional scope hints collected
|
|
188
|
-
- Existing skills scanned and documented
|
|
189
|
-
- Analysis report created from template with populated frontmatter
|
|
190
|
-
- Auto-proceeded to step 02
|
|
191
|
-
|
|
192
|
-
### ❌ SYSTEM FAILURE:
|
|
193
|
-
|
|
194
|
-
- Skipping forge-tier.yaml check
|
|
195
|
-
- Accepting an invalid project path
|
|
196
|
-
- Not checking for existing skills
|
|
197
|
-
- Not creating the output report before proceeding
|
|
198
|
-
- Beginning source analysis in this step
|
|
199
|
-
- Hardcoded paths instead of using frontmatter variables
|
|
200
|
-
|
|
201
|
-
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: 'step-01b-continue'
|
|
3
|
-
description: 'Handle workflow continuation from previous session'
|
|
4
|
-
|
|
5
2
|
outputFile: '{forge_data_folder}/analyze-source-report-{project_name}.md'
|
|
6
3
|
nextStepOptions:
|
|
7
4
|
step-02: './step-02-scan-project.md'
|
|
@@ -17,42 +14,11 @@ nextStepOptions:
|
|
|
17
14
|
|
|
18
15
|
To resume the analyze-source workflow from where it was left off in a previous session by reading the analysis report's progress state and routing to the correct next step.
|
|
19
16
|
|
|
20
|
-
##
|
|
21
|
-
|
|
22
|
-
### Universal Rules:
|
|
23
|
-
|
|
24
|
-
- 🛑 NEVER generate content without user input
|
|
25
|
-
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
26
|
-
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
|
27
|
-
- 📋 YOU ARE A FACILITATOR, not a content generator
|
|
28
|
-
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
|
29
|
-
- ⚙️ 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
|
|
30
|
-
|
|
31
|
-
### Role Reinforcement:
|
|
32
|
-
|
|
33
|
-
- ✅ You are a source code analyst and decomposition architect (Ferris Architect mode)
|
|
34
|
-
- ✅ If you already have been given a name, communication_style and identity, continue to use those while playing this new role
|
|
35
|
-
- ✅ Prescriptive precision — resume exactly where we left off
|
|
36
|
-
|
|
37
|
-
### Step-Specific Rules:
|
|
38
|
-
|
|
39
|
-
- 🎯 Focus only on reading state and routing — do NOT perform any analysis
|
|
40
|
-
- 🚫 FORBIDDEN to re-run completed steps
|
|
41
|
-
- 💬 Present progress summary to user before resuming
|
|
42
|
-
|
|
43
|
-
## EXECUTION PROTOCOLS:
|
|
44
|
-
|
|
45
|
-
- 🎯 Follow the MANDATORY SEQUENCE exactly
|
|
46
|
-
- 💾 Update lastContinued in output frontmatter
|
|
47
|
-
- 📖 Route to the correct next step based on stepsCompleted
|
|
48
|
-
- 🚫 FORBIDDEN to skip the progress summary
|
|
17
|
+
## Rules
|
|
49
18
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
-
|
|
53
|
-
- Focus: State detection and routing only
|
|
54
|
-
- Limits: Do not modify any existing report content
|
|
55
|
-
- Dependencies: Output file must exist with valid stepsCompleted
|
|
19
|
+
- Focus only on reading state and routing — do not perform any analysis
|
|
20
|
+
- Do not re-run completed steps
|
|
21
|
+
- Present progress summary to user before resuming
|
|
56
22
|
|
|
57
23
|
## MANDATORY SEQUENCE
|
|
58
24
|
|
|
@@ -121,24 +87,3 @@ lastContinued: '{current_date}'
|
|
|
121
87
|
|
|
122
88
|
ONLY WHEN the progress state has been read, summarized to the user, and lastContinued updated will you load the appropriate next step file to resume the workflow.
|
|
123
89
|
|
|
124
|
-
---
|
|
125
|
-
|
|
126
|
-
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
127
|
-
|
|
128
|
-
### ✅ SUCCESS:
|
|
129
|
-
|
|
130
|
-
- Analysis report loaded and progress state read
|
|
131
|
-
- Progress summary presented to user
|
|
132
|
-
- Correct next step identified from stepsCompleted
|
|
133
|
-
- lastContinued updated in frontmatter
|
|
134
|
-
- Routed to correct step file
|
|
135
|
-
|
|
136
|
-
### ❌ SYSTEM FAILURE:
|
|
137
|
-
|
|
138
|
-
- Not reading stepsCompleted from report
|
|
139
|
-
- Skipping progress summary
|
|
140
|
-
- Routing to wrong step
|
|
141
|
-
- Re-running already completed steps
|
|
142
|
-
- Not updating lastContinued
|
|
143
|
-
|
|
144
|
-
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: 'step-02-scan-project'
|
|
3
|
-
description: 'Map project structure, detect service boundaries, and identify package manifests'
|
|
4
|
-
|
|
5
2
|
nextStepFile: './step-03-identify-units.md'
|
|
6
3
|
outputFile: '{forge_data_folder}/analyze-source-report-{project_name}.md'
|
|
7
|
-
heuristicsFile: '
|
|
4
|
+
heuristicsFile: 'references/unit-detection-heuristics.md'
|
|
8
5
|
---
|
|
9
6
|
|
|
10
7
|
# Step 2: Scan Project
|
|
@@ -13,46 +10,12 @@ heuristicsFile: '../data/unit-detection-heuristics.md'
|
|
|
13
10
|
|
|
14
11
|
To map the complete project structure by scanning directory trees, detecting service boundaries, identifying package manifests, and cataloging entry points — building the foundation that subsequent steps use for unit identification.
|
|
15
12
|
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
### Universal Rules:
|
|
19
|
-
|
|
20
|
-
- 🛑 NEVER generate content without user input
|
|
21
|
-
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
22
|
-
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
|
23
|
-
- 📋 YOU ARE A FACILITATOR, not a content generator
|
|
24
|
-
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
|
25
|
-
- ⚙️ 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
|
|
26
|
-
|
|
27
|
-
### Role Reinforcement:
|
|
28
|
-
|
|
29
|
-
- ✅ You are a source code analyst and decomposition architect (Ferris Architect mode)
|
|
30
|
-
- ✅ If you already have been given a name, communication_style and identity, continue to use those while playing this new role
|
|
31
|
-
- ✅ Prescriptive precision — zero-hallucination, only report what is found
|
|
32
|
-
- ✅ File:line citation tracing for all claims
|
|
33
|
-
|
|
34
|
-
### Step-Specific Rules:
|
|
35
|
-
|
|
36
|
-
- 🎯 Focus only on structural scanning — do NOT classify units or map exports yet
|
|
37
|
-
- 🚫 FORBIDDEN to read source file contents beyond manifest files and entry points
|
|
38
|
-
- 💬 Use subprocess optimization (Pattern 1) for scanning across many files
|
|
39
|
-
- 📋 Tier-aware scanning depth: Quick (file structure only), Forge (+ manifest parsing), Deep (+ config analysis)
|
|
40
|
-
|
|
41
|
-
**AST Degradation Fallback:** If the AST tool (ast-grep) is unavailable at Forge or Deep tier, degrade to Quick-tier behavior for this step and emit a warning: "AST tool unavailable — falling back to file-structure scanning for this step."
|
|
42
|
-
|
|
43
|
-
## EXECUTION PROTOCOLS:
|
|
13
|
+
## Rules
|
|
44
14
|
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
## CONTEXT BOUNDARIES:
|
|
51
|
-
|
|
52
|
-
- Available: project_path, forge_tier, scope_hints, existing_skills from report frontmatter
|
|
53
|
-
- Focus: Project structure mapping only — directory tree, manifests, entry points, service configs
|
|
54
|
-
- Limits: Do not analyze exports, imports, or integration points (that's steps 03-04)
|
|
55
|
-
- Dependencies: step-01-init must have created the report with valid project_path
|
|
15
|
+
- Focus only on structural scanning — do not classify units or map exports yet
|
|
16
|
+
- Do not read source file contents beyond manifest files and entry points
|
|
17
|
+
- Use subprocess Pattern 1 for scanning across many files
|
|
18
|
+
- Tier-aware scanning depth: Quick (file structure), Forge (+ manifest parsing), Deep (+ config analysis)
|
|
56
19
|
|
|
57
20
|
## MANDATORY SEQUENCE
|
|
58
21
|
|
|
@@ -183,34 +146,10 @@ Display: "**Select:** [C] Continue to Unit Identification"
|
|
|
183
146
|
#### EXECUTION RULES:
|
|
184
147
|
|
|
185
148
|
- ALWAYS halt and wait for user input after presenting menu
|
|
149
|
+
- **GATE [default: C]** — If `{headless_mode}`: auto-proceed with [C] Continue, log: "headless: auto-continue past scan results"
|
|
186
150
|
- ONLY proceed to next step when user selects 'C'
|
|
187
151
|
|
|
188
152
|
## CRITICAL STEP COMPLETION NOTE
|
|
189
153
|
|
|
190
154
|
ONLY WHEN the Project Scan section has been appended to {outputFile} with complete boundary, manifest, and entry point catalogs, and frontmatter stepsCompleted has been updated, will you load and read fully {nextStepFile} to begin unit identification.
|
|
191
155
|
|
|
192
|
-
---
|
|
193
|
-
|
|
194
|
-
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
195
|
-
|
|
196
|
-
### ✅ SUCCESS:
|
|
197
|
-
|
|
198
|
-
- Complete directory structure mapped
|
|
199
|
-
- All package manifests found and cataloged
|
|
200
|
-
- Entry points identified
|
|
201
|
-
- Service boundaries detected with confidence levels
|
|
202
|
-
- Scope hints applied correctly
|
|
203
|
-
- Results presented to user for confirmation
|
|
204
|
-
- Report updated with Project Scan section
|
|
205
|
-
- stepsCompleted updated in frontmatter
|
|
206
|
-
|
|
207
|
-
### ❌ SYSTEM FAILURE:
|
|
208
|
-
|
|
209
|
-
- Incomplete directory scan (missing subdirectories)
|
|
210
|
-
- Not detecting workspace configuration files
|
|
211
|
-
- Reading source file contents (only manifests/configs allowed)
|
|
212
|
-
- Not presenting results for user confirmation
|
|
213
|
-
- Classifying units in this step (that's step 03)
|
|
214
|
-
- Hardcoded paths instead of using frontmatter variables
|
|
215
|
-
|
|
216
|
-
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|
package/src/{workflows/analyze-source → skf-analyze-source}/steps-c/step-03-identify-units.md
RENAMED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: 'step-03-identify-units'
|
|
3
|
-
description: 'Classify discrete skillable units from scan results using detection heuristics and assign scope types'
|
|
4
|
-
|
|
5
2
|
nextStepFile: './step-04-map-and-detect.md'
|
|
6
3
|
outputFile: '{forge_data_folder}/analyze-source-report-{project_name}.md'
|
|
7
|
-
heuristicsFile: '
|
|
4
|
+
heuristicsFile: 'references/unit-detection-heuristics.md'
|
|
8
5
|
---
|
|
9
6
|
|
|
10
7
|
# Step 3: Identify Units
|
|
@@ -13,44 +10,11 @@ heuristicsFile: '../data/unit-detection-heuristics.md'
|
|
|
13
10
|
|
|
14
11
|
To classify each detected boundary from the project scan into discrete skillable units by applying detection heuristics, assigning boundary types and scope types, and filtering out disqualified candidates.
|
|
15
12
|
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
### Universal Rules:
|
|
19
|
-
|
|
20
|
-
- 🛑 NEVER generate content without user input
|
|
21
|
-
- 📖 CRITICAL: Read the complete step file before taking any action
|
|
22
|
-
- 🔄 CRITICAL: When loading next step with 'C', ensure entire file is read
|
|
23
|
-
- 📋 YOU ARE A FACILITATOR, not a content generator
|
|
24
|
-
- ✅ YOU MUST ALWAYS SPEAK OUTPUT In your Agent communication style with the config `{communication_language}`
|
|
25
|
-
- ⚙️ 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
|
|
26
|
-
|
|
27
|
-
### Role Reinforcement:
|
|
28
|
-
|
|
29
|
-
- ✅ You are a source code analyst and decomposition architect (Ferris Architect mode)
|
|
30
|
-
- ✅ If you already have been given a name, communication_style and identity, continue to use those while playing this new role
|
|
31
|
-
- ✅ Prescriptive precision — zero-hallucination, only report what is found
|
|
32
|
-
- ✅ File:line citation tracing — cite detection signals with specific file paths
|
|
33
|
-
|
|
34
|
-
### Step-Specific Rules:
|
|
35
|
-
|
|
36
|
-
- 🎯 Focus only on unit classification — do NOT map exports or integration points yet
|
|
37
|
-
- 🚫 FORBIDDEN to generate skill-brief.yaml in this step
|
|
38
|
-
- 💬 Apply heuristics systematically to each detected boundary
|
|
39
|
-
- 📋 Every classification must cite the detection signals that justify it
|
|
40
|
-
|
|
41
|
-
## EXECUTION PROTOCOLS:
|
|
42
|
-
|
|
43
|
-
- 🎯 Follow the MANDATORY SEQUENCE exactly
|
|
44
|
-
- 💾 Append "## Identified Units" section to {outputFile}
|
|
45
|
-
- 📖 Update stepsCompleted in {outputFile} frontmatter
|
|
46
|
-
- 🚫 FORBIDDEN to proceed without presenting classifications to user
|
|
13
|
+
## Rules
|
|
47
14
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
- Focus: Classification of boundaries into skillable units with scope types
|
|
52
|
-
- Limits: Do not analyze file contents beyond what's needed for classification
|
|
53
|
-
- Dependencies: step-02-scan-project must have populated the Project Scan section
|
|
15
|
+
- Focus only on unit classification — do not map exports or integration points yet
|
|
16
|
+
- Do not generate skill-brief.yaml in this step
|
|
17
|
+
- Every classification must cite the detection signals that justify it
|
|
54
18
|
|
|
55
19
|
## MANDATORY SEQUENCE
|
|
56
20
|
|
|
@@ -166,34 +130,10 @@ Display: "**Select:** [C] Continue to Export Mapping and Integration Detection"
|
|
|
166
130
|
#### EXECUTION RULES:
|
|
167
131
|
|
|
168
132
|
- ALWAYS halt and wait for user input after presenting menu
|
|
133
|
+
- **GATE [default: C]** — If `{headless_mode}`: accept all classifications and auto-proceed, log: "headless: auto-accept unit classifications"
|
|
169
134
|
- ONLY proceed to next step when user selects 'C'
|
|
170
135
|
|
|
171
136
|
## CRITICAL STEP COMPLETION NOTE
|
|
172
137
|
|
|
173
138
|
ONLY WHEN the Identified Units section has been appended to {outputFile} with complete classification tables, disqualification records, and language detection results, and frontmatter stepsCompleted has been updated, will you load and read fully {nextStepFile} to begin export mapping and integration detection.
|
|
174
139
|
|
|
175
|
-
---
|
|
176
|
-
|
|
177
|
-
## 🚨 SYSTEM SUCCESS/FAILURE METRICS
|
|
178
|
-
|
|
179
|
-
### ✅ SUCCESS:
|
|
180
|
-
|
|
181
|
-
- Every detected boundary evaluated against heuristics
|
|
182
|
-
- Detection signals cited with specific file paths
|
|
183
|
-
- Scope types assigned to each qualifying unit
|
|
184
|
-
- Disqualification rules applied and documented
|
|
185
|
-
- Existing skills cross-referenced
|
|
186
|
-
- Primary language detected per unit
|
|
187
|
-
- Classifications presented to user for confirmation
|
|
188
|
-
- Report updated with Identified Units section
|
|
189
|
-
|
|
190
|
-
### ❌ SYSTEM FAILURE:
|
|
191
|
-
|
|
192
|
-
- Classifying without citing detection signals
|
|
193
|
-
- Missing disqualification checks
|
|
194
|
-
- Not cross-referencing existing_skills
|
|
195
|
-
- Mapping exports or integrations in this step (that's step 04)
|
|
196
|
-
- Generating skill-brief.yaml in this step (that's step 06)
|
|
197
|
-
- Not presenting classifications for user confirmation
|
|
198
|
-
|
|
199
|
-
**Master Rule:** Skipping steps, optimizing sequences, or not following exact instructions is FORBIDDEN and constitutes SYSTEM FAILURE.
|