@harness-engineering/cli 1.6.2 → 1.8.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/dist/agents/personas/documentation-maintainer.yaml +3 -1
- package/dist/agents/personas/performance-guardian.yaml +23 -0
- package/dist/agents/personas/planner.yaml +27 -0
- package/dist/agents/personas/verifier.yaml +30 -0
- package/dist/agents/skills/claude-code/align-documentation/SKILL.md +13 -0
- package/dist/agents/skills/claude-code/cleanup-dead-code/SKILL.md +25 -1
- package/dist/agents/skills/claude-code/cleanup-dead-code/skill.yaml +5 -2
- package/dist/agents/skills/claude-code/detect-doc-drift/SKILL.md +12 -0
- package/dist/agents/skills/claude-code/enforce-architecture/SKILL.md +67 -1
- package/dist/agents/skills/claude-code/enforce-architecture/skill.yaml +5 -2
- package/dist/agents/skills/claude-code/harness-accessibility/SKILL.md +281 -0
- package/dist/agents/skills/claude-code/harness-accessibility/skill.yaml +51 -0
- package/dist/agents/skills/claude-code/harness-autopilot/SKILL.md +119 -72
- package/dist/agents/skills/claude-code/harness-autopilot/skill.yaml +4 -2
- package/dist/agents/skills/claude-code/harness-brainstorming/SKILL.md +76 -4
- package/dist/agents/skills/claude-code/harness-brainstorming/skill.yaml +2 -0
- package/dist/agents/skills/claude-code/harness-code-review/SKILL.md +487 -234
- package/dist/agents/skills/claude-code/harness-code-review/skill.yaml +15 -2
- package/dist/agents/skills/claude-code/harness-codebase-cleanup/SKILL.md +226 -0
- package/dist/agents/skills/claude-code/harness-codebase-cleanup/skill.yaml +64 -0
- package/dist/agents/skills/claude-code/harness-dependency-health/SKILL.md +35 -6
- package/dist/agents/skills/claude-code/harness-dependency-health/skill.yaml +1 -1
- package/dist/agents/skills/claude-code/harness-design/SKILL.md +265 -0
- package/dist/agents/skills/claude-code/harness-design/skill.yaml +53 -0
- package/dist/agents/skills/claude-code/harness-design-mobile/SKILL.md +336 -0
- package/dist/agents/skills/claude-code/harness-design-mobile/skill.yaml +49 -0
- package/dist/agents/skills/claude-code/harness-design-system/SKILL.md +282 -0
- package/dist/agents/skills/claude-code/harness-design-system/skill.yaml +50 -0
- package/dist/agents/skills/claude-code/harness-design-web/SKILL.md +360 -0
- package/dist/agents/skills/claude-code/harness-design-web/skill.yaml +52 -0
- package/dist/agents/skills/claude-code/harness-docs-pipeline/SKILL.md +460 -0
- package/dist/agents/skills/claude-code/harness-docs-pipeline/skill.yaml +69 -0
- package/dist/agents/skills/claude-code/harness-execution/SKILL.md +73 -8
- package/dist/agents/skills/claude-code/harness-execution/skill.yaml +1 -0
- package/dist/agents/skills/claude-code/harness-hotspot-detector/SKILL.md +32 -6
- package/dist/agents/skills/claude-code/harness-hotspot-detector/skill.yaml +1 -1
- package/dist/agents/skills/claude-code/harness-i18n/SKILL.md +484 -0
- package/dist/agents/skills/claude-code/harness-i18n/skill.yaml +54 -0
- package/dist/agents/skills/claude-code/harness-i18n-process/SKILL.md +388 -0
- package/dist/agents/skills/claude-code/harness-i18n-process/skill.yaml +43 -0
- package/dist/agents/skills/claude-code/harness-i18n-workflow/SKILL.md +512 -0
- package/dist/agents/skills/claude-code/harness-i18n-workflow/skill.yaml +53 -0
- package/dist/agents/skills/claude-code/harness-impact-analysis/SKILL.md +51 -6
- package/dist/agents/skills/claude-code/harness-integrity/SKILL.md +35 -1
- package/dist/agents/skills/claude-code/harness-knowledge-mapper/SKILL.md +46 -5
- package/dist/agents/skills/claude-code/harness-knowledge-mapper/skill.yaml +1 -1
- package/dist/agents/skills/claude-code/harness-onboarding/SKILL.md +19 -1
- package/dist/agents/skills/claude-code/harness-perf/SKILL.md +37 -8
- package/dist/agents/skills/claude-code/harness-perf/skill.yaml +3 -0
- package/dist/agents/skills/claude-code/harness-perf-tdd/SKILL.md +17 -4
- package/dist/agents/skills/claude-code/harness-planning/SKILL.md +57 -3
- package/dist/agents/skills/claude-code/harness-planning/skill.yaml +2 -0
- package/dist/agents/skills/claude-code/harness-release-readiness/SKILL.md +29 -9
- package/dist/agents/skills/claude-code/harness-roadmap/SKILL.md +562 -0
- package/dist/agents/skills/claude-code/harness-roadmap/skill.yaml +43 -0
- package/dist/agents/skills/claude-code/harness-security-review/SKILL.md +36 -2
- package/dist/agents/skills/claude-code/harness-security-review/skill.yaml +8 -6
- package/dist/agents/skills/claude-code/harness-security-scan/skill.yaml +1 -1
- package/dist/agents/skills/claude-code/harness-soundness-review/SKILL.md +1267 -0
- package/dist/agents/skills/claude-code/harness-soundness-review/skill.yaml +48 -0
- package/dist/agents/skills/claude-code/harness-test-advisor/SKILL.md +35 -6
- package/dist/agents/skills/claude-code/harness-verification/SKILL.md +66 -0
- package/dist/agents/skills/claude-code/harness-verification/skill.yaml +1 -0
- package/dist/agents/skills/claude-code/harness-verify/SKILL.md +37 -0
- package/dist/agents/skills/claude-code/initialize-harness-project/SKILL.md +15 -1
- package/dist/agents/skills/claude-code/validate-context-engineering/SKILL.md +12 -0
- package/dist/agents/skills/gemini-cli/harness-accessibility/SKILL.md +281 -0
- package/dist/agents/skills/gemini-cli/harness-accessibility/skill.yaml +51 -0
- package/dist/agents/skills/gemini-cli/harness-autopilot/SKILL.md +119 -72
- package/dist/agents/skills/gemini-cli/harness-autopilot/skill.yaml +4 -2
- package/dist/agents/skills/gemini-cli/harness-codebase-cleanup/SKILL.md +226 -0
- package/dist/agents/skills/gemini-cli/harness-codebase-cleanup/skill.yaml +64 -0
- package/dist/agents/skills/gemini-cli/harness-dependency-health/SKILL.md +35 -6
- package/dist/agents/skills/gemini-cli/harness-dependency-health/skill.yaml +1 -1
- package/dist/agents/skills/gemini-cli/harness-design/SKILL.md +265 -0
- package/dist/agents/skills/gemini-cli/harness-design/skill.yaml +53 -0
- package/dist/agents/skills/gemini-cli/harness-design-mobile/SKILL.md +336 -0
- package/dist/agents/skills/gemini-cli/harness-design-mobile/skill.yaml +49 -0
- package/dist/agents/skills/gemini-cli/harness-design-system/SKILL.md +282 -0
- package/dist/agents/skills/gemini-cli/harness-design-system/skill.yaml +50 -0
- package/dist/agents/skills/gemini-cli/harness-design-web/SKILL.md +360 -0
- package/dist/agents/skills/gemini-cli/harness-design-web/skill.yaml +52 -0
- package/dist/agents/skills/gemini-cli/harness-docs-pipeline/SKILL.md +460 -0
- package/dist/agents/skills/gemini-cli/harness-docs-pipeline/skill.yaml +69 -0
- package/dist/agents/skills/gemini-cli/harness-hotspot-detector/SKILL.md +32 -6
- package/dist/agents/skills/gemini-cli/harness-hotspot-detector/skill.yaml +1 -1
- package/dist/agents/skills/gemini-cli/harness-i18n/SKILL.md +484 -0
- package/dist/agents/skills/gemini-cli/harness-i18n/skill.yaml +54 -0
- package/dist/agents/skills/gemini-cli/harness-i18n-process/SKILL.md +388 -0
- package/dist/agents/skills/gemini-cli/harness-i18n-process/skill.yaml +43 -0
- package/dist/agents/skills/gemini-cli/harness-i18n-workflow/SKILL.md +512 -0
- package/dist/agents/skills/gemini-cli/harness-i18n-workflow/skill.yaml +53 -0
- package/dist/agents/skills/gemini-cli/harness-impact-analysis/SKILL.md +51 -6
- package/dist/agents/skills/gemini-cli/harness-knowledge-mapper/SKILL.md +46 -5
- package/dist/agents/skills/gemini-cli/harness-knowledge-mapper/skill.yaml +1 -1
- package/dist/agents/skills/gemini-cli/harness-perf/SKILL.md +37 -8
- package/dist/agents/skills/gemini-cli/harness-perf/skill.yaml +3 -0
- package/dist/agents/skills/gemini-cli/harness-perf-tdd/SKILL.md +17 -4
- package/dist/agents/skills/gemini-cli/harness-release-readiness/SKILL.md +29 -9
- package/dist/agents/skills/gemini-cli/harness-roadmap/SKILL.md +562 -0
- package/dist/agents/skills/gemini-cli/harness-roadmap/skill.yaml +43 -0
- package/dist/agents/skills/gemini-cli/harness-security-review/skill.yaml +8 -6
- package/dist/agents/skills/gemini-cli/harness-security-scan/skill.yaml +1 -1
- package/dist/agents/skills/gemini-cli/harness-soundness-review/SKILL.md +1267 -0
- package/dist/agents/skills/gemini-cli/harness-soundness-review/skill.yaml +48 -0
- package/dist/agents/skills/gemini-cli/harness-test-advisor/SKILL.md +35 -6
- package/dist/agents/skills/node_modules/.bin/vitest +2 -2
- package/dist/agents/skills/shared/design-knowledge/anti-patterns/color.yaml +106 -0
- package/dist/agents/skills/shared/design-knowledge/anti-patterns/layout.yaml +109 -0
- package/dist/agents/skills/shared/design-knowledge/anti-patterns/motion.yaml +109 -0
- package/dist/agents/skills/shared/design-knowledge/anti-patterns/typography.yaml +112 -0
- package/dist/agents/skills/shared/design-knowledge/industries/creative.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/industries/ecommerce.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/industries/emerging-tech.yaml +83 -0
- package/dist/agents/skills/shared/design-knowledge/industries/fintech.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/industries/healthcare.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/industries/lifestyle.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/industries/saas.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/industries/services.yaml +80 -0
- package/dist/agents/skills/shared/design-knowledge/palettes/curated.yaml +234 -0
- package/dist/agents/skills/shared/design-knowledge/platform-rules/android.yaml +125 -0
- package/dist/agents/skills/shared/design-knowledge/platform-rules/flutter.yaml +144 -0
- package/dist/agents/skills/shared/design-knowledge/platform-rules/ios.yaml +106 -0
- package/dist/agents/skills/shared/design-knowledge/platform-rules/web.yaml +102 -0
- package/dist/agents/skills/shared/design-knowledge/typography/pairings.yaml +274 -0
- package/dist/agents/skills/shared/i18n-knowledge/accessibility/intersection.yaml +142 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/encoding.yaml +67 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/formatting.yaml +106 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/layout.yaml +80 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/pluralization.yaml +80 -0
- package/dist/agents/skills/shared/i18n-knowledge/anti-patterns/string-handling.yaml +106 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/android-resources.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/apple-strings.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/backend-patterns.yaml +50 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/flutter-intl.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/i18next.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/react-intl.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/frameworks/vue-i18n.yaml +47 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/ecommerce.yaml +66 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/fintech.yaml +66 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/gaming.yaml +69 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/healthcare.yaml +66 -0
- package/dist/agents/skills/shared/i18n-knowledge/industries/legal.yaml +66 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/ar.yaml +41 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/de.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/en.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/es.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/fi.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/fr.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/he.yaml +41 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/hi.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/it.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/ja.yaml +38 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/ko.yaml +38 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/nl.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/pl.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/pt.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/ru.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/sv.yaml +32 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/th.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/tr.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/zh-Hans.yaml +38 -0
- package/dist/agents/skills/shared/i18n-knowledge/locales/zh-Hant.yaml +35 -0
- package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/i18next-mcp.yaml +56 -0
- package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/lingo-dev.yaml +56 -0
- package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/lokalise.yaml +60 -0
- package/dist/agents/skills/shared/i18n-knowledge/mcp-interop/tolgee.yaml +60 -0
- package/dist/agents/skills/shared/i18n-knowledge/testing/locale-testing.yaml +107 -0
- package/dist/agents/skills/shared/i18n-knowledge/testing/pseudo-localization.yaml +86 -0
- package/dist/bin/harness.js +64 -4
- package/dist/{chunk-UDWGSL3T.js → chunk-3JWCBVUZ.js} +3 -3
- package/dist/{chunk-IUFFBBYV.js → chunk-LNI4T7R6.js} +179 -61
- package/dist/{chunk-USEYPS7F.js → chunk-SJECMKSS.js} +2250 -40
- package/dist/{dist-4MYPT3OE.js → dist-BDO5GFEM.js} +295 -14
- package/dist/{dist-RBZXXJHG.js → dist-NT3GXHQZ.js} +95 -1
- package/dist/index.d.ts +266 -7
- package/dist/index.js +7 -3
- package/dist/validate-cross-check-2OPGCGGU.js +7 -0
- package/package.json +7 -7
- package/dist/validate-cross-check-CPEPNLOD.js +0 -7
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
# Harness Roadmap
|
|
2
|
+
|
|
3
|
+
> Create and manage a unified project roadmap from existing specs and plans. Interactive, human-confirmed, always valid.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- When a user asks about project status and a roadmap exists (default -- no args)
|
|
8
|
+
- When a project needs a unified roadmap and none exists yet (`--create`)
|
|
9
|
+
- When adding a new feature to an existing roadmap (`--add <feature-name>`)
|
|
10
|
+
- When roadmap statuses may be stale and need updating from plan execution state (`--sync`)
|
|
11
|
+
- When features need reordering, moving between milestones, or blocker updates (`--edit`)
|
|
12
|
+
- When user asks about project status and no roadmap exists -- suggest `--create`
|
|
13
|
+
- NOT for programmatic CRUD (use `manage_roadmap` MCP tool directly)
|
|
14
|
+
|
|
15
|
+
## Process
|
|
16
|
+
|
|
17
|
+
### Iron Law
|
|
18
|
+
|
|
19
|
+
**Never write `docs/roadmap.md` without the human confirming the proposed structure first.**
|
|
20
|
+
|
|
21
|
+
If the human has not seen and approved the milestone groupings and feature list, do not write the file. Present. Wait. Confirm. Then write.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
### Command: `--create` -- Bootstrap Roadmap
|
|
26
|
+
|
|
27
|
+
#### Phase 1: SCAN -- Discover Artifacts
|
|
28
|
+
|
|
29
|
+
1. Check if `docs/roadmap.md` already exists.
|
|
30
|
+
- If it exists: warn the human. "A roadmap already exists. Overwriting will replace it. Continue? (y/n)" Wait for confirmation before proceeding. If declined, stop.
|
|
31
|
+
2. Scan for specs:
|
|
32
|
+
- `docs/specs/*.md`
|
|
33
|
+
- `docs/changes/*/proposal.md`
|
|
34
|
+
- Record each spec's title, status (if detectable from frontmatter or content), and file path.
|
|
35
|
+
3. Scan for plans:
|
|
36
|
+
- `docs/plans/*.md`
|
|
37
|
+
- Record each plan's title, estimated tasks, and file path.
|
|
38
|
+
4. Match plans to specs:
|
|
39
|
+
- Plans often reference their spec in frontmatter (`spec:`) or body text. Link them when a match is found.
|
|
40
|
+
- Unmatched plans become standalone features.
|
|
41
|
+
5. Infer feature status from artifacts:
|
|
42
|
+
- Has spec + plan + implementation evidence (committed code referenced in plan) -> `in-progress` or `complete`
|
|
43
|
+
- Has spec + plan but no implementation -> `planned`
|
|
44
|
+
- Has spec but no plan -> `backlog`
|
|
45
|
+
- Has plan but no spec -> `planned` (unusual, flag for human review)
|
|
46
|
+
6. Detect project name from `harness.yaml` `project` field, or `package.json` `name` field, or directory name as fallback.
|
|
47
|
+
|
|
48
|
+
Present scan summary:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
SCAN COMPLETE
|
|
52
|
+
|
|
53
|
+
Project: <name>
|
|
54
|
+
Found: N specs, N plans
|
|
55
|
+
Matched: N spec-plan pairs
|
|
56
|
+
Unmatched specs: N (backlog candidates)
|
|
57
|
+
Unmatched plans: N (flag for review)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
#### Phase 2: PROPOSE -- Interactive Grouping
|
|
61
|
+
|
|
62
|
+
1. Present discovered features in default milestone groupings:
|
|
63
|
+
- **Current Work** -- features with status `in-progress`
|
|
64
|
+
- **Backlog** -- everything else
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
Proposed Roadmap Structure:
|
|
68
|
+
|
|
69
|
+
## Current Work
|
|
70
|
+
- Feature A (in-progress) -- spec: docs/changes/feature-a/proposal.md
|
|
71
|
+
- Feature B (in-progress) -- spec: docs/specs/feature-b.md
|
|
72
|
+
|
|
73
|
+
## Backlog
|
|
74
|
+
- Feature C (planned) -- spec: docs/changes/feature-c/proposal.md
|
|
75
|
+
- Feature D (backlog) -- spec: docs/specs/feature-d.md
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
2. Offer choices:
|
|
79
|
+
- **(A) Accept** -- proceed with this structure
|
|
80
|
+
- **(B) Rename** -- rename milestones or features
|
|
81
|
+
- **(C) Reorganize** -- move features between milestones
|
|
82
|
+
- **(D) Add milestones** -- create additional milestones (e.g., "v2.0", "Q2 2026")
|
|
83
|
+
|
|
84
|
+
3. Ask: "Are there additional features not captured in specs that should be on the roadmap?"
|
|
85
|
+
- If yes: collect name, summary, and milestone for each.
|
|
86
|
+
|
|
87
|
+
4. Repeat until the human selects **(A) Accept**.
|
|
88
|
+
|
|
89
|
+
#### Phase 3: WRITE -- Generate Roadmap
|
|
90
|
+
|
|
91
|
+
1. Build the roadmap structure:
|
|
92
|
+
- Frontmatter: `project`, `version: 1`, `created`, `updated` timestamps
|
|
93
|
+
- One H2 section per milestone
|
|
94
|
+
- One H3 section per feature with 5 fields: `Status`, `Spec`, `Summary`, `Blockers`, `Plan`
|
|
95
|
+
|
|
96
|
+
2. Write via `manage_roadmap` MCP tool if available. If MCP is unavailable, write directly using the roadmap markdown format:
|
|
97
|
+
|
|
98
|
+
```markdown
|
|
99
|
+
---
|
|
100
|
+
project: <name>
|
|
101
|
+
version: 1
|
|
102
|
+
created: YYYY-MM-DD
|
|
103
|
+
updated: YYYY-MM-DD
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
# Roadmap
|
|
107
|
+
|
|
108
|
+
## Current Work
|
|
109
|
+
|
|
110
|
+
### Feature A
|
|
111
|
+
|
|
112
|
+
- **Status:** in-progress
|
|
113
|
+
- **Spec:** docs/changes/feature-a/proposal.md
|
|
114
|
+
- **Summary:** One-line description of the feature
|
|
115
|
+
- **Blockers:** none
|
|
116
|
+
- **Plan:** docs/plans/2026-03-20-feature-a-plan.md
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
3. Write to `docs/roadmap.md`.
|
|
120
|
+
|
|
121
|
+
#### Phase 4: VALIDATE -- Verify Output
|
|
122
|
+
|
|
123
|
+
1. Read back `docs/roadmap.md`.
|
|
124
|
+
2. Verify via `manage_roadmap show` if MCP is available -- confirms round-trip parsing.
|
|
125
|
+
3. Run `harness validate`.
|
|
126
|
+
4. Present summary to human:
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
Roadmap created: docs/roadmap.md
|
|
130
|
+
Milestones: N
|
|
131
|
+
Features: N
|
|
132
|
+
harness validate: passed
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
### Command: `--add <feature-name>` -- Add a Feature
|
|
138
|
+
|
|
139
|
+
#### Phase 1: SCAN -- Load Existing Roadmap
|
|
140
|
+
|
|
141
|
+
1. Check if `docs/roadmap.md` exists.
|
|
142
|
+
- If missing: error with clear message. "No roadmap found at docs/roadmap.md. Run `--create` first to bootstrap one."
|
|
143
|
+
2. Parse the roadmap (via `manage_roadmap show` or direct read).
|
|
144
|
+
3. Check for duplicate feature names. If `<feature-name>` already exists: error with message. "Feature '<feature-name>' already exists in milestone '<milestone>'. Use a different name or edit the existing feature."
|
|
145
|
+
|
|
146
|
+
#### Phase 2: PROPOSE -- Collect Feature Details
|
|
147
|
+
|
|
148
|
+
Ask the human for each field interactively:
|
|
149
|
+
|
|
150
|
+
1. **Milestone:** "Which milestone should this feature belong to?" List existing milestones plus a `[NEW]` option. If `[NEW]`: ask for the new milestone name.
|
|
151
|
+
2. **Status:** "What is the current status?" Offer: `backlog`, `planned`, `in-progress`, `blocked`.
|
|
152
|
+
3. **Spec:** "Is there a spec for this feature?" If yes, ask for the path. If no, leave as `none`.
|
|
153
|
+
4. **Summary:** "One-line summary of the feature."
|
|
154
|
+
5. **Blockers:** "Any blockers?" If yes, collect. If no, set to `none`.
|
|
155
|
+
6. **Plan:** "Is there a plan for this feature?" If yes, ask for the path. If no, leave as `none`.
|
|
156
|
+
|
|
157
|
+
Present the collected details for confirmation:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
New feature to add:
|
|
161
|
+
|
|
162
|
+
Milestone: Current Work
|
|
163
|
+
Name: Feature E
|
|
164
|
+
Status: planned
|
|
165
|
+
Spec: docs/changes/feature-e/proposal.md
|
|
166
|
+
Summary: Add feature E to the system
|
|
167
|
+
Blockers: none
|
|
168
|
+
Plan: none
|
|
169
|
+
|
|
170
|
+
Confirm? (y/n)
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Wait for confirmation before proceeding.
|
|
174
|
+
|
|
175
|
+
#### Phase 3: WRITE -- Add Feature to Roadmap
|
|
176
|
+
|
|
177
|
+
1. Add via `manage_roadmap add` MCP tool if available. If MCP is unavailable, parse the roadmap, add the feature to the specified milestone, and serialize back.
|
|
178
|
+
2. If the milestone is `[NEW]`: create the milestone section, then add the feature.
|
|
179
|
+
3. Write to `docs/roadmap.md`.
|
|
180
|
+
|
|
181
|
+
#### Phase 4: VALIDATE -- Verify Output
|
|
182
|
+
|
|
183
|
+
1. Read back `docs/roadmap.md`.
|
|
184
|
+
2. Verify the new feature appears in the correct milestone.
|
|
185
|
+
3. Run `harness validate`.
|
|
186
|
+
4. Confirm to human:
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
Feature added: Feature E -> Current Work
|
|
190
|
+
Total features: N
|
|
191
|
+
harness validate: passed
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
### Command: _(no args)_ -- Show Roadmap Summary
|
|
197
|
+
|
|
198
|
+
#### Phase 1: SCAN -- Load Roadmap
|
|
199
|
+
|
|
200
|
+
1. Check if `docs/roadmap.md` exists.
|
|
201
|
+
- If missing: suggest `--create`. "No roadmap found at docs/roadmap.md. Run `--create` to bootstrap one from existing specs and plans."
|
|
202
|
+
2. Parse the roadmap (via `manage_roadmap show` or direct read).
|
|
203
|
+
|
|
204
|
+
#### Phase 2: PRESENT -- Display Summary
|
|
205
|
+
|
|
206
|
+
1. Display a compact summary of the roadmap:
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
ROADMAP: <project-name>
|
|
210
|
+
Last synced: YYYY-MM-DD HH:MM
|
|
211
|
+
|
|
212
|
+
## <Milestone 1> (N features)
|
|
213
|
+
- Feature A .................. in-progress
|
|
214
|
+
- Feature B .................. planned
|
|
215
|
+
- Feature C .................. blocked (by: Feature A)
|
|
216
|
+
|
|
217
|
+
## <Milestone 2> (N features)
|
|
218
|
+
- Feature D .................. done
|
|
219
|
+
- Feature E .................. backlog
|
|
220
|
+
|
|
221
|
+
Total: N features | N done | N in-progress | N planned | N blocked | N backlog
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
2. If any features have stale sync timestamps (last_synced older than 24 hours), append a note:
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
Hint: Roadmap may be stale. Run `--sync` to update statuses from plan execution state.
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
3. No file writes. This is a read-only operation. No `harness validate` needed.
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
### Command: `--sync` -- Sync Statuses from Execution State
|
|
235
|
+
|
|
236
|
+
#### Phase 1: SCAN -- Load Roadmap and Execution State
|
|
237
|
+
|
|
238
|
+
1. Check if `docs/roadmap.md` exists.
|
|
239
|
+
- If missing: error with clear message. "No roadmap found at docs/roadmap.md. Run `--create` first to bootstrap one."
|
|
240
|
+
- Do NOT create a roadmap. Do NOT offer alternatives. Stop.
|
|
241
|
+
2. Parse the roadmap (via `manage_roadmap show` or direct read).
|
|
242
|
+
3. For each feature with linked plans, scan execution state:
|
|
243
|
+
- `.harness/state.json` (root execution state)
|
|
244
|
+
- `.harness/sessions/*/autopilot-state.json` (session-scoped execution state)
|
|
245
|
+
- Plan file completion markers
|
|
246
|
+
|
|
247
|
+
#### Phase 2: PROPOSE -- Present Status Changes
|
|
248
|
+
|
|
249
|
+
1. Infer status for each feature:
|
|
250
|
+
- All tasks complete -> suggest `done`
|
|
251
|
+
- Any task started -> suggest `in-progress`
|
|
252
|
+
- Blocker feature not done -> suggest `blocked`
|
|
253
|
+
- No execution data found -> no change
|
|
254
|
+
|
|
255
|
+
2. Check the **human-always-wins** rule: if `last_manual_edit` is more recent than `last_synced` for a feature, preserve the manually set status. Report it as "skipped (manual override)".
|
|
256
|
+
|
|
257
|
+
3. Present proposed changes:
|
|
258
|
+
|
|
259
|
+
```
|
|
260
|
+
SYNC RESULTS
|
|
261
|
+
|
|
262
|
+
Changes detected:
|
|
263
|
+
- Feature A: planned -> in-progress (3/8 tasks started)
|
|
264
|
+
- Feature B: in-progress -> done (all tasks complete)
|
|
265
|
+
- Feature C: planned -> blocked (blocked by: Feature A, not done)
|
|
266
|
+
|
|
267
|
+
Unchanged:
|
|
268
|
+
- Feature D: done (no change)
|
|
269
|
+
|
|
270
|
+
Skipped (manual override):
|
|
271
|
+
- Feature E: kept as "planned" (manually edited 2h ago)
|
|
272
|
+
|
|
273
|
+
Apply these changes? (y/n)
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
4. Wait for human confirmation before applying.
|
|
277
|
+
|
|
278
|
+
#### Phase 3: WRITE -- Apply Changes
|
|
279
|
+
|
|
280
|
+
1. Apply via `manage_roadmap sync` MCP tool if available, or via `manage_roadmap update` for each changed feature. If MCP is unavailable, parse the roadmap, update statuses, and serialize back.
|
|
281
|
+
2. Update `last_synced` timestamp in frontmatter.
|
|
282
|
+
3. Write to `docs/roadmap.md`.
|
|
283
|
+
|
|
284
|
+
#### Phase 4: VALIDATE -- Verify Output
|
|
285
|
+
|
|
286
|
+
1. Read back `docs/roadmap.md`.
|
|
287
|
+
2. Verify changes applied correctly via `manage_roadmap show` if MCP is available.
|
|
288
|
+
3. Run `harness validate`.
|
|
289
|
+
4. Present summary:
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
Sync complete: docs/roadmap.md
|
|
293
|
+
Updated: N features
|
|
294
|
+
Skipped: N (manual override)
|
|
295
|
+
Unchanged: N
|
|
296
|
+
harness validate: passed
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
### Command: `--edit` -- Interactive Edit Session
|
|
302
|
+
|
|
303
|
+
#### Phase 1: SCAN -- Load Existing Roadmap
|
|
304
|
+
|
|
305
|
+
1. Check if `docs/roadmap.md` exists.
|
|
306
|
+
- If missing: error with clear message. "No roadmap found at docs/roadmap.md. Run `--create` first to bootstrap one."
|
|
307
|
+
2. Parse the roadmap (via `manage_roadmap show` or direct read).
|
|
308
|
+
3. Present current structure:
|
|
309
|
+
|
|
310
|
+
```
|
|
311
|
+
Current roadmap: <project-name>
|
|
312
|
+
|
|
313
|
+
## <Milestone 1>
|
|
314
|
+
1. Feature A (in-progress)
|
|
315
|
+
2. Feature B (planned)
|
|
316
|
+
|
|
317
|
+
## <Milestone 2>
|
|
318
|
+
3. Feature C (done)
|
|
319
|
+
4. Feature D (backlog)
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
#### Phase 2: EDIT -- Interactive Modifications
|
|
323
|
+
|
|
324
|
+
Offer edit actions in a loop until the human is done:
|
|
325
|
+
|
|
326
|
+
1. **Reorder features within a milestone:**
|
|
327
|
+
- "Move which feature? (number)" -> "To which position?" -> reorder.
|
|
328
|
+
|
|
329
|
+
2. **Move a feature between milestones:**
|
|
330
|
+
- "Move which feature? (number)" -> "To which milestone?" (list milestones + `[NEW]`) -> move.
|
|
331
|
+
- If `[NEW]`: ask for the new milestone name, create it.
|
|
332
|
+
|
|
333
|
+
3. **Update blockers:**
|
|
334
|
+
- "Update blockers for which feature? (number)" -> "Blocked by? (feature names, comma-separated, or 'none')" -> update.
|
|
335
|
+
|
|
336
|
+
4. **Update status:**
|
|
337
|
+
- "Update status for which feature? (number)" -> offer: `backlog`, `planned`, `in-progress`, `blocked`, `done` -> update.
|
|
338
|
+
|
|
339
|
+
5. **Rename a feature:**
|
|
340
|
+
- "Rename which feature? (number)" -> "New name?" -> rename.
|
|
341
|
+
|
|
342
|
+
6. **Remove a feature:**
|
|
343
|
+
- "Remove which feature? (number)" -> "Confirm removal of '<name>'? (y/n)" -> remove on confirm.
|
|
344
|
+
|
|
345
|
+
7. **Rename a milestone:**
|
|
346
|
+
- "Rename which milestone?" -> "New name?" -> rename.
|
|
347
|
+
|
|
348
|
+
8. **Done:**
|
|
349
|
+
- Exit edit loop, proceed to WRITE phase.
|
|
350
|
+
|
|
351
|
+
Present the menu after each action:
|
|
352
|
+
|
|
353
|
+
```
|
|
354
|
+
Edit actions:
|
|
355
|
+
(1) Reorder features within a milestone
|
|
356
|
+
(2) Move feature to different milestone
|
|
357
|
+
(3) Update blockers
|
|
358
|
+
(4) Update status
|
|
359
|
+
(5) Rename feature
|
|
360
|
+
(6) Remove feature
|
|
361
|
+
(7) Rename milestone
|
|
362
|
+
(D) Done -- save and exit
|
|
363
|
+
|
|
364
|
+
Choice?
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
#### Phase 3: WRITE -- Save Changes
|
|
368
|
+
|
|
369
|
+
1. Present a diff summary of all changes made during the edit session:
|
|
370
|
+
|
|
371
|
+
```
|
|
372
|
+
Changes to apply:
|
|
373
|
+
|
|
374
|
+
- Moved "Feature B" from "Current Work" to "Q2 Release"
|
|
375
|
+
- Updated "Feature A" blockers: none -> Feature C
|
|
376
|
+
- Reordered "Q2 Release": Feature B now at position 1
|
|
377
|
+
|
|
378
|
+
Apply? (y/n)
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
2. Wait for confirmation before writing.
|
|
382
|
+
3. Apply all changes via `manage_roadmap update` / `manage_roadmap remove` MCP tool calls, or direct file manipulation if MCP is unavailable.
|
|
383
|
+
4. Update `last_manual_edit` timestamp in frontmatter (since this is a human-driven edit).
|
|
384
|
+
5. Write to `docs/roadmap.md`.
|
|
385
|
+
|
|
386
|
+
#### Phase 4: VALIDATE -- Verify Output
|
|
387
|
+
|
|
388
|
+
1. Read back `docs/roadmap.md`.
|
|
389
|
+
2. Verify changes applied correctly.
|
|
390
|
+
3. Run `harness validate`.
|
|
391
|
+
4. Present summary:
|
|
392
|
+
|
|
393
|
+
```
|
|
394
|
+
Edit complete: docs/roadmap.md
|
|
395
|
+
Changes applied: N
|
|
396
|
+
harness validate: passed
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
## Harness Integration
|
|
400
|
+
|
|
401
|
+
- **`manage_roadmap` MCP tool** -- Primary read/write interface for roadmap operations. Supports `show`, `add`, `update`, `remove`, and `query` actions. Use this when MCP is available for structured CRUD.
|
|
402
|
+
- **`harness validate`** -- Run after any roadmap modification to verify project health. Mandatory in the VALIDATE phase of both `--create` and `--add`.
|
|
403
|
+
- **Core `parseRoadmap`/`serializeRoadmap`** -- Fallback when MCP is unavailable. These functions in `packages/core/src/roadmap/` handle parsing and serializing the roadmap markdown format directly.
|
|
404
|
+
- **Roadmap file** -- Always at `docs/roadmap.md`. This is the single source of truth for the project roadmap.
|
|
405
|
+
|
|
406
|
+
## Success Criteria
|
|
407
|
+
|
|
408
|
+
1. `--create` discovers all specs (`docs/specs/*.md`, `docs/changes/*/proposal.md`) and plans (`docs/plans/*.md`)
|
|
409
|
+
2. `--create` proposes groupings and waits for human confirmation before writing
|
|
410
|
+
3. `--create` produces a valid `docs/roadmap.md` that round-trips through `parseRoadmap`/`serializeRoadmap`
|
|
411
|
+
4. `--add` collects all fields interactively (milestone, status, spec, summary, blockers, plan)
|
|
412
|
+
5. `--add` rejects duplicate feature names with a clear error message
|
|
413
|
+
6. `--add` errors gracefully when no roadmap exists, directing the user to `--create`
|
|
414
|
+
7. Default (no args) displays a compact status summary with feature counts by status
|
|
415
|
+
8. Default (no args) suggests `--create` when no roadmap exists
|
|
416
|
+
9. Default (no args) hints at `--sync` when roadmap may be stale
|
|
417
|
+
10. `--sync` scans `.harness/state.json` and `.harness/sessions/*/autopilot-state.json` for execution state
|
|
418
|
+
11. `--sync` respects the human-always-wins rule -- manually edited statuses are preserved
|
|
419
|
+
12. `--sync` presents proposed changes and waits for human confirmation before applying
|
|
420
|
+
13. `--sync` errors gracefully when no roadmap exists, directing the user to `--create`
|
|
421
|
+
14. `--edit` offers reorder, move, blocker update, status update, rename, and remove actions
|
|
422
|
+
15. `--edit` presents a diff summary and waits for confirmation before writing
|
|
423
|
+
16. `--edit` updates `last_manual_edit` timestamp (since changes are human-driven)
|
|
424
|
+
17. Output matches the roadmap markdown format exactly (frontmatter, H2 milestones, H3 features, 5 fields each)
|
|
425
|
+
18. `harness validate` passes after all operations
|
|
426
|
+
|
|
427
|
+
## Examples
|
|
428
|
+
|
|
429
|
+
### Example: `--create` -- Bootstrap a Roadmap from Existing Artifacts
|
|
430
|
+
|
|
431
|
+
**Context:** A project with 3 specs and 2 plans. Two specs have matching plans (in-progress), one spec has no plan (backlog).
|
|
432
|
+
|
|
433
|
+
**Phase 1: SCAN**
|
|
434
|
+
|
|
435
|
+
```
|
|
436
|
+
SCAN COMPLETE
|
|
437
|
+
|
|
438
|
+
Project: my-project
|
|
439
|
+
Found: 3 specs, 2 plans
|
|
440
|
+
Matched: 2 spec-plan pairs
|
|
441
|
+
Unmatched specs: 1 (backlog candidates)
|
|
442
|
+
Unmatched plans: 0
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
**Phase 2: PROPOSE**
|
|
446
|
+
|
|
447
|
+
```
|
|
448
|
+
Proposed Roadmap Structure:
|
|
449
|
+
|
|
450
|
+
## Current Work
|
|
451
|
+
- Unified Code Review (in-progress) -- spec: docs/changes/unified-code-review/proposal.md
|
|
452
|
+
- Update Checker (in-progress) -- spec: docs/changes/update-checker/proposal.md
|
|
453
|
+
|
|
454
|
+
## Backlog
|
|
455
|
+
- Design System (backlog) -- spec: docs/specs/design-system.md
|
|
456
|
+
|
|
457
|
+
Options:
|
|
458
|
+
(A) Accept this structure
|
|
459
|
+
(B) Rename milestones or features
|
|
460
|
+
(C) Reorganize -- move features between milestones
|
|
461
|
+
(D) Add milestones
|
|
462
|
+
|
|
463
|
+
Any additional features not captured in specs? (y/n)
|
|
464
|
+
```
|
|
465
|
+
|
|
466
|
+
Human selects **(A) Accept**.
|
|
467
|
+
|
|
468
|
+
**Phase 3: WRITE**
|
|
469
|
+
|
|
470
|
+
```
|
|
471
|
+
Writing docs/roadmap.md...
|
|
472
|
+
2 milestones, 3 features
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
**Phase 4: VALIDATE**
|
|
476
|
+
|
|
477
|
+
```
|
|
478
|
+
Roadmap created: docs/roadmap.md
|
|
479
|
+
Milestones: 2 (Current Work, Backlog)
|
|
480
|
+
Features: 3
|
|
481
|
+
harness validate: passed
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
### Example: `--add` -- Add a Feature to an Existing Roadmap
|
|
485
|
+
|
|
486
|
+
**Context:** A roadmap exists with 2 milestones and 3 features. Adding a new feature.
|
|
487
|
+
|
|
488
|
+
**Phase 1: SCAN**
|
|
489
|
+
|
|
490
|
+
```
|
|
491
|
+
Roadmap loaded: docs/roadmap.md
|
|
492
|
+
Milestones: 2 (Current Work, Backlog)
|
|
493
|
+
Features: 3
|
|
494
|
+
No duplicate found for "Notification System"
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
**Phase 2: PROPOSE**
|
|
498
|
+
|
|
499
|
+
```
|
|
500
|
+
Which milestone? [1] Current Work [2] Backlog [NEW] Create new
|
|
501
|
+
> 1
|
|
502
|
+
|
|
503
|
+
Status? [backlog] [planned] [in-progress] [blocked]
|
|
504
|
+
> planned
|
|
505
|
+
|
|
506
|
+
Spec? (path or "none")
|
|
507
|
+
> docs/changes/notification-system/proposal.md
|
|
508
|
+
|
|
509
|
+
One-line summary:
|
|
510
|
+
> Real-time notification delivery with WebSocket and email channels
|
|
511
|
+
|
|
512
|
+
Blockers? (or "none")
|
|
513
|
+
> none
|
|
514
|
+
|
|
515
|
+
Plan? (path or "none")
|
|
516
|
+
> none
|
|
517
|
+
|
|
518
|
+
New feature to add:
|
|
519
|
+
|
|
520
|
+
Milestone: Current Work
|
|
521
|
+
Name: Notification System
|
|
522
|
+
Status: planned
|
|
523
|
+
Spec: docs/changes/notification-system/proposal.md
|
|
524
|
+
Summary: Real-time notification delivery with WebSocket and email channels
|
|
525
|
+
Blockers: none
|
|
526
|
+
Plan: none
|
|
527
|
+
|
|
528
|
+
Confirm? (y/n)
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
Human confirms **y**.
|
|
532
|
+
|
|
533
|
+
**Phase 3: WRITE**
|
|
534
|
+
|
|
535
|
+
```
|
|
536
|
+
Adding feature to Current Work...
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
**Phase 4: VALIDATE**
|
|
540
|
+
|
|
541
|
+
```
|
|
542
|
+
Feature added: Notification System -> Current Work
|
|
543
|
+
Total features: 4
|
|
544
|
+
harness validate: passed
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
## Gates
|
|
548
|
+
|
|
549
|
+
These are hard stops. Violating any gate means the process has broken down.
|
|
550
|
+
|
|
551
|
+
- **No writing `docs/roadmap.md` without human confirmation of structure.** The PROPOSE phase must complete with an explicit accept before any file is written. Skipping confirmation produces a roadmap the human did not agree to.
|
|
552
|
+
- **No overwriting an existing roadmap without explicit user consent.** If `docs/roadmap.md` exists when `--create` runs, the human must confirm the overwrite. Silent overwrites destroy prior work.
|
|
553
|
+
- **No adding features with duplicate names.** If a feature with the same name already exists in any milestone, reject the add with a clear error. Duplicates corrupt the roadmap structure.
|
|
554
|
+
- **No proceeding when `docs/roadmap.md` is missing for `--add`.** If the roadmap does not exist, do not create one silently. Error and direct the user to `--create`.
|
|
555
|
+
- **No syncing when `docs/roadmap.md` does not exist.** `--sync` must error immediately with a message directing the user to `--create`. Do not create a roadmap as a side effect of sync.
|
|
556
|
+
- **No writing changes from `--edit` without showing a diff summary and getting confirmation.** The WRITE phase must present all pending changes and wait for explicit accept before modifying `docs/roadmap.md`.
|
|
557
|
+
|
|
558
|
+
## Escalation
|
|
559
|
+
|
|
560
|
+
- **When no specs or plans are found during `--create`:** Suggest creating a minimal roadmap with just a Backlog milestone containing features described verbally by the human. Alternatively, suggest running `harness:brainstorming` first to generate specs that can then be discovered by `--create`.
|
|
561
|
+
- **When the roadmap file is malformed and cannot be parsed:** Report the specific parse error with line numbers if available. Suggest manual inspection of `docs/roadmap.md` or recreation with `--create` (after backing up the existing file).
|
|
562
|
+
- **When MCP tool is unavailable:** Fall back to direct file manipulation via Read/Write tools using the roadmap markdown format. The core `parseRoadmap`/`serializeRoadmap` functions handle the format. Report the fallback to the human: "MCP tool unavailable, using direct file operations."
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: harness-roadmap
|
|
2
|
+
version: "1.0.0"
|
|
3
|
+
description: Create and manage a unified project roadmap from existing specs and plans
|
|
4
|
+
cognitive_mode: constructive-architect
|
|
5
|
+
triggers:
|
|
6
|
+
- manual
|
|
7
|
+
platforms:
|
|
8
|
+
- claude-code
|
|
9
|
+
- gemini-cli
|
|
10
|
+
tools:
|
|
11
|
+
- Bash
|
|
12
|
+
- Read
|
|
13
|
+
- Write
|
|
14
|
+
- Edit
|
|
15
|
+
- Glob
|
|
16
|
+
- Grep
|
|
17
|
+
cli:
|
|
18
|
+
command: harness skill run harness-roadmap
|
|
19
|
+
args:
|
|
20
|
+
- name: command
|
|
21
|
+
description: "Command: --create (bootstrap roadmap), --add <feature-name> (add feature), --sync (update statuses from execution state), --edit (interactive edit session), or no args (show summary)"
|
|
22
|
+
required: false
|
|
23
|
+
mcp:
|
|
24
|
+
tool: run_skill
|
|
25
|
+
input:
|
|
26
|
+
skill: harness-roadmap
|
|
27
|
+
type: rigid
|
|
28
|
+
phases:
|
|
29
|
+
- name: scan
|
|
30
|
+
description: Discover specs, plans, and existing roadmap state
|
|
31
|
+
required: true
|
|
32
|
+
- name: propose
|
|
33
|
+
description: Present discovered features and groupings for human approval
|
|
34
|
+
required: true
|
|
35
|
+
- name: write
|
|
36
|
+
description: Write or update docs/roadmap.md via manage_roadmap MCP tool or direct file write
|
|
37
|
+
required: true
|
|
38
|
+
- name: validate
|
|
39
|
+
description: Read back, verify round-trip, run harness validate
|
|
40
|
+
required: true
|
|
41
|
+
state:
|
|
42
|
+
persistent: false
|
|
43
|
+
depends_on: []
|
|
@@ -11,13 +11,47 @@
|
|
|
11
11
|
- NOT for quick pre-commit checks (use harness-pre-commit-review for that)
|
|
12
12
|
- NOT for general code review (use harness-code-review for that)
|
|
13
13
|
|
|
14
|
+
## Scope Adaptation
|
|
15
|
+
|
|
16
|
+
This skill adapts its behavior based on invocation context — standalone or as part of the code review pipeline.
|
|
17
|
+
|
|
18
|
+
### Detection
|
|
19
|
+
|
|
20
|
+
Check for `pipelineContext` in `.harness/handoff.json`. If present, run in **changed-files mode**. Otherwise, run in **full mode**.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Check for pipeline context
|
|
24
|
+
cat .harness/handoff.json 2>/dev/null | grep -q '"pipelineContext"'
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Changed-Files Mode (Code Review Pipeline)
|
|
28
|
+
|
|
29
|
+
When invoked from the code review pipeline (Phase 4 fan-out, security slot):
|
|
30
|
+
|
|
31
|
+
- **Phase 1 (SCAN): SKIPPED.** The mechanical security scan already ran in code review Phase 2. Read the mechanical findings from `PipelineContext.findings` where `domain === 'security'` instead of re-running `run_security_scan`.
|
|
32
|
+
- **Phase 2 (REVIEW):** Run OWASP baseline + stack-adaptive analysis on **changed files only** plus their direct imports (for data flow tracing). The changed file list is provided in the context bundle from the pipeline.
|
|
33
|
+
- **Phase 3 (THREAT-MODEL): SKIPPED** unless `--deep` flag was passed through from code review.
|
|
34
|
+
- **Phase 4 (REPORT): SKIPPED.** Return findings as `ReviewFinding[]` to the pipeline. The pipeline handles output formatting (Phase 7).
|
|
35
|
+
|
|
36
|
+
Findings returned in this mode **must** use the `ReviewFinding` schema with populated security fields (`cweId`, `owaspCategory`, `confidence`, `remediation`, `references`).
|
|
37
|
+
|
|
38
|
+
### Full Mode (Standalone)
|
|
39
|
+
|
|
40
|
+
When invoked directly (no PipelineContext):
|
|
41
|
+
|
|
42
|
+
- All phases run as documented below (Phase 1 through Phase 4).
|
|
43
|
+
- Output is the standalone security report format.
|
|
44
|
+
- This is the existing behavior — no changes.
|
|
45
|
+
|
|
14
46
|
## Principle: Layered Security
|
|
15
47
|
|
|
16
48
|
This skill follows the Deterministic-vs-LLM Responsibility Split principle. The mechanical scanner runs first and catches what patterns can catch. The AI review then looks for semantic issues that patterns miss — user input flowing through multiple functions to a dangerous sink, missing authorization checks, logic flaws in authentication flows.
|
|
17
49
|
|
|
18
50
|
## Process
|
|
19
51
|
|
|
20
|
-
### Phase 1: SCAN — Mechanical Security Scanner
|
|
52
|
+
### Phase 1: SCAN — Mechanical Security Scanner (full mode only)
|
|
53
|
+
|
|
54
|
+
> **Note:** This phase is skipped in changed-files mode. See [Scope Adaptation](#scope-adaptation) above.
|
|
21
55
|
|
|
22
56
|
Run the built-in security scanner against the project.
|
|
23
57
|
|
|
@@ -69,7 +103,7 @@ After the OWASP baseline, add stack-specific checks:
|
|
|
69
103
|
- **React:** XSS via `dangerouslySetInnerHTML`, sensitive data in client state, insecure `postMessage` listeners
|
|
70
104
|
- **Go:** Race conditions in concurrent handlers, `unsafe.Pointer` usage, format string injection
|
|
71
105
|
|
|
72
|
-
### Phase 3: THREAT-MODEL (optional, `--deep` flag)
|
|
106
|
+
### Phase 3: THREAT-MODEL (optional, `--deep` flag; full mode or explicit `--deep` in pipeline)
|
|
73
107
|
|
|
74
108
|
When invoked with `--deep`, build a lightweight threat model:
|
|
75
109
|
|
|
@@ -24,6 +24,9 @@ cli:
|
|
|
24
24
|
- name: deep
|
|
25
25
|
description: Enable threat modeling phase
|
|
26
26
|
required: false
|
|
27
|
+
- name: scope
|
|
28
|
+
description: "Scope mode: 'changed-files' or 'full'. Auto-detected from PipelineContext when omitted."
|
|
29
|
+
required: false
|
|
27
30
|
mcp:
|
|
28
31
|
tool: run_skill
|
|
29
32
|
input:
|
|
@@ -32,8 +35,8 @@ mcp:
|
|
|
32
35
|
type: rigid
|
|
33
36
|
phases:
|
|
34
37
|
- name: scan
|
|
35
|
-
description: Run mechanical security scanner
|
|
36
|
-
required:
|
|
38
|
+
description: Run mechanical security scanner (skipped in changed-files mode)
|
|
39
|
+
required: false
|
|
37
40
|
- name: review
|
|
38
41
|
description: AI-powered security review (OWASP + stack-adaptive)
|
|
39
42
|
required: true
|
|
@@ -41,10 +44,9 @@ phases:
|
|
|
41
44
|
description: Lightweight threat model from codebase graph
|
|
42
45
|
required: false
|
|
43
46
|
- name: report
|
|
44
|
-
description: Generate findings report with remediation guidance
|
|
45
|
-
required:
|
|
47
|
+
description: Generate findings report with remediation guidance (skipped in pipeline mode)
|
|
48
|
+
required: false
|
|
46
49
|
state:
|
|
47
50
|
persistent: false
|
|
48
51
|
files: []
|
|
49
|
-
depends_on:
|
|
50
|
-
- harness-code-review
|
|
52
|
+
depends_on: []
|