@harness-engineering/cli 1.25.7 → 1.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/dist/agents/skills/README.md +1 -0
  2. package/dist/agents/skills/claude-code/harness-brainstorming/SKILL.md +33 -5
  3. package/dist/agents/skills/claude-code/harness-execution/SKILL.md +6 -0
  4. package/dist/agents/skills/claude-code/harness-knowledge-pipeline/SKILL.md +277 -0
  5. package/dist/agents/skills/claude-code/harness-knowledge-pipeline/skill.yaml +60 -0
  6. package/dist/agents/skills/claude-code/harness-planning/SKILL.md +25 -1
  7. package/dist/agents/skills/claude-code/initialize-harness-project/SKILL.md +22 -6
  8. package/dist/agents/skills/claude-code/initialize-harness-project/skill.yaml +2 -1
  9. package/dist/agents/skills/claude-code/initialize-test-suite-project/SKILL.md +415 -0
  10. package/dist/agents/skills/claude-code/initialize-test-suite-project/skill.yaml +35 -0
  11. package/dist/agents/skills/codex/harness-brainstorming/SKILL.md +33 -5
  12. package/dist/agents/skills/codex/harness-execution/SKILL.md +6 -0
  13. package/dist/agents/skills/codex/harness-knowledge-pipeline/SKILL.md +277 -0
  14. package/dist/agents/skills/codex/harness-knowledge-pipeline/skill.yaml +60 -0
  15. package/dist/agents/skills/codex/harness-planning/SKILL.md +25 -1
  16. package/dist/agents/skills/codex/initialize-harness-project/SKILL.md +22 -6
  17. package/dist/agents/skills/codex/initialize-harness-project/skill.yaml +2 -1
  18. package/dist/agents/skills/codex/initialize-test-suite-project/SKILL.md +415 -0
  19. package/dist/agents/skills/codex/initialize-test-suite-project/skill.yaml +35 -0
  20. package/dist/agents/skills/cursor/harness-brainstorming/SKILL.md +33 -5
  21. package/dist/agents/skills/cursor/harness-execution/SKILL.md +6 -0
  22. package/dist/agents/skills/cursor/harness-knowledge-pipeline/SKILL.md +277 -0
  23. package/dist/agents/skills/cursor/harness-knowledge-pipeline/skill.yaml +60 -0
  24. package/dist/agents/skills/cursor/harness-planning/SKILL.md +25 -1
  25. package/dist/agents/skills/cursor/initialize-harness-project/SKILL.md +22 -6
  26. package/dist/agents/skills/cursor/initialize-harness-project/skill.yaml +2 -1
  27. package/dist/agents/skills/cursor/initialize-test-suite-project/SKILL.md +415 -0
  28. package/dist/agents/skills/cursor/initialize-test-suite-project/skill.yaml +35 -0
  29. package/dist/agents/skills/gemini-cli/harness-brainstorming/SKILL.md +33 -5
  30. package/dist/agents/skills/gemini-cli/harness-execution/SKILL.md +6 -0
  31. package/dist/agents/skills/gemini-cli/harness-knowledge-pipeline/SKILL.md +277 -0
  32. package/dist/agents/skills/gemini-cli/harness-knowledge-pipeline/skill.yaml +60 -0
  33. package/dist/agents/skills/gemini-cli/harness-planning/SKILL.md +25 -1
  34. package/dist/agents/skills/gemini-cli/initialize-harness-project/SKILL.md +22 -6
  35. package/dist/agents/skills/gemini-cli/initialize-harness-project/skill.yaml +2 -1
  36. package/dist/agents/skills/gemini-cli/initialize-test-suite-project/SKILL.md +415 -0
  37. package/dist/agents/skills/gemini-cli/initialize-test-suite-project/skill.yaml +35 -0
  38. package/dist/agents/skills/package.json +2 -2
  39. package/dist/agents/skills/tests/initialize-test-suite-project.test.ts +152 -0
  40. package/dist/{agents-md-QPO3H5HX.js → agents-md-VI3HLR7E.js} +3 -3
  41. package/dist/{architecture-IJLXRHZA.js → architecture-ZDDKEVID.js} +4 -4
  42. package/dist/{assess-project-QU6XIVJK.js → assess-project-Y6W7YDUA.js} +1 -1
  43. package/dist/bin/harness-mcp.js +16 -15
  44. package/dist/bin/harness.js +27 -27
  45. package/dist/{check-phase-gate-TNY64AOS.js → check-phase-gate-CXR3VM22.js} +4 -4
  46. package/dist/{chunk-JJQ3TW2E.js → chunk-2BPPS6YQ.js} +804 -93
  47. package/dist/{chunk-NKQEMWGT.js → chunk-2FPUPRCY.js} +3419 -126
  48. package/dist/{chunk-MLOGYWLY.js → chunk-3AMQYWGT.js} +2 -2
  49. package/dist/{chunk-AS5DQT4S.js → chunk-56A6OXVA.js} +9 -9
  50. package/dist/{chunk-G5SNXUIK.js → chunk-7GY6WNEI.js} +1 -1
  51. package/dist/{chunk-SZ3Q4XEO.js → chunk-AMRC4FU2.js} +441 -288
  52. package/dist/{chunk-K533WNZG.js → chunk-B66LRB5M.js} +1 -1
  53. package/dist/{chunk-YRBNAHH4.js → chunk-BK4DJIIY.js} +4 -4
  54. package/dist/{chunk-2DF6OZLG.js → chunk-DBIX3X4H.js} +2 -2
  55. package/dist/{chunk-LXPRO2FH.js → chunk-FUND5WJR.js} +2 -2
  56. package/dist/{chunk-FRDS4XGD.js → chunk-JV4Y2U5F.js} +1 -1
  57. package/dist/{chunk-XVJRFP7W.js → chunk-K56DTX7G.js} +6 -6
  58. package/dist/{chunk-K35D7HF3.js → chunk-N6B6RKQQ.js} +1 -1
  59. package/dist/{chunk-LTCEV7VF.js → chunk-NY7DTZ6K.js} +3 -3
  60. package/dist/{chunk-JPZY7ZQX.js → chunk-OLW7BJ5N.js} +1 -1
  61. package/dist/{chunk-KVJZQ2MV.js → chunk-ORNEK65Y.js} +1 -1
  62. package/dist/{chunk-D3XL2FLX.js → chunk-PNNFCVW4.js} +5 -5
  63. package/dist/{chunk-E5Z6NTTQ.js → chunk-Q3ZLVMQM.js} +1 -1
  64. package/dist/{chunk-PCOU2UXU.js → chunk-RAVD7QLY.js} +8 -8
  65. package/dist/{chunk-IQO7IINR.js → chunk-TSVYBDDE.js} +1 -1
  66. package/dist/{chunk-MCDCZMKN.js → chunk-TY2ESLVL.js} +1 -1
  67. package/dist/{chunk-TQRCODRJ.js → chunk-VKS3F46M.js} +1 -1
  68. package/dist/{chunk-GVNT2YC7.js → chunk-WZ7UHPT3.js} +9 -9
  69. package/dist/{chunk-ZIYLIYN4.js → chunk-YC4EYIER.js} +8 -2
  70. package/dist/{chunk-IT2KORSK.js → chunk-ZN6ROTYP.js} +1 -1
  71. package/dist/{ci-workflow-FJYRFZYQ.js → ci-workflow-EW37KVPS.js} +3 -3
  72. package/dist/{create-skill-6QWJHQYS.js → create-skill-4T5CBSJ2.js} +2 -2
  73. package/dist/{dist-ZV6GO6FA.js → dist-CJDGASPP.js} +2 -2
  74. package/dist/{dist-HPWNWCT6.js → dist-NCNAXUFD.js} +41 -1
  75. package/dist/{docs-7DW3DI4Z.js → docs-4XI2FQW2.js} +4 -4
  76. package/dist/{engine-P7EE2IWO.js → engine-4L4CDTHU.js} +3 -3
  77. package/dist/{entropy-HCXRTDFU.js → entropy-PBYSIQYS.js} +3 -3
  78. package/dist/{feedback-Y4FYN3NR.js → feedback-OTIFW5MK.js} +1 -1
  79. package/dist/{generate-agent-definitions-3EHPIWBO.js → generate-agent-definitions-CZGUXIIN.js} +4 -4
  80. package/dist/{graph-loader-KXVS3YK3.js → graph-loader-RDXSEBD7.js} +1 -1
  81. package/dist/index.d.ts +8 -8
  82. package/dist/index.js +27 -27
  83. package/dist/{loader-SKHF3JVV.js → loader-UZOXCWFC.js} +3 -3
  84. package/dist/{mcp-MWYIPDQU.js → mcp-GWVVV6LH.js} +16 -15
  85. package/dist/{performance-ADWH5NJY.js → performance-5UQPP3XX.js} +4 -4
  86. package/dist/{review-pipeline-TLKE5OQD.js → review-pipeline-65V4EO6O.js} +3 -3
  87. package/dist/{runtime-7LYAW7GU.js → runtime-PXX7HNB3.js} +3 -3
  88. package/dist/{scan-BGJ7TLLV.js → scan-WM7XDUF7.js} +1 -1
  89. package/dist/{security-5XWINYVB.js → security-CAYDRZIZ.js} +1 -1
  90. package/dist/{validate-BFFHYHY7.js → validate-CWGXR7QM.js} +4 -4
  91. package/dist/{validate-cross-check-GQX7OVCR.js → validate-cross-check-BKCNLZYG.js} +3 -3
  92. package/package.json +10 -10
  93. package/dist/agents/commands/claude-code/harness/harness.md +0 -36
  94. package/dist/agents/commands/codex/AGENTS.md +0 -39
  95. package/dist/agents/commands/codex/harness/add-harness-component/SKILL.md +0 -204
  96. package/dist/agents/commands/codex/harness/add-harness-component/agents/openai.yaml +0 -3
  97. package/dist/agents/commands/codex/harness/cleanup-dead-code/SKILL.md +0 -257
  98. package/dist/agents/commands/codex/harness/cleanup-dead-code/agents/openai.yaml +0 -3
  99. package/dist/agents/commands/codex/harness/detect-doc-drift/SKILL.md +0 -191
  100. package/dist/agents/commands/codex/harness/detect-doc-drift/agents/openai.yaml +0 -3
  101. package/dist/agents/commands/codex/harness/enforce-architecture/SKILL.md +0 -289
  102. package/dist/agents/commands/codex/harness/enforce-architecture/agents/openai.yaml +0 -3
  103. package/dist/agents/commands/codex/harness/harness-architecture-advisor/SKILL.md +0 -442
  104. package/dist/agents/commands/codex/harness/harness-architecture-advisor/agents/openai.yaml +0 -3
  105. package/dist/agents/commands/codex/harness/harness-autopilot/SKILL.md +0 -929
  106. package/dist/agents/commands/codex/harness/harness-autopilot/agents/openai.yaml +0 -3
  107. package/dist/agents/commands/codex/harness/harness-brainstorming/SKILL.md +0 -418
  108. package/dist/agents/commands/codex/harness/harness-brainstorming/agents/openai.yaml +0 -3
  109. package/dist/agents/commands/codex/harness/harness-code-review/SKILL.md +0 -850
  110. package/dist/agents/commands/codex/harness/harness-code-review/agents/openai.yaml +0 -3
  111. package/dist/agents/commands/codex/harness/harness-codebase-cleanup/SKILL.md +0 -236
  112. package/dist/agents/commands/codex/harness/harness-codebase-cleanup/agents/openai.yaml +0 -3
  113. package/dist/agents/commands/codex/harness/harness-debugging/SKILL.md +0 -378
  114. package/dist/agents/commands/codex/harness/harness-debugging/agents/openai.yaml +0 -3
  115. package/dist/agents/commands/codex/harness/harness-dependency-health/SKILL.md +0 -190
  116. package/dist/agents/commands/codex/harness/harness-dependency-health/agents/openai.yaml +0 -3
  117. package/dist/agents/commands/codex/harness/harness-docs-pipeline/SKILL.md +0 -472
  118. package/dist/agents/commands/codex/harness/harness-docs-pipeline/agents/openai.yaml +0 -3
  119. package/dist/agents/commands/codex/harness/harness-execution/SKILL.md +0 -522
  120. package/dist/agents/commands/codex/harness/harness-execution/agents/openai.yaml +0 -3
  121. package/dist/agents/commands/codex/harness/harness-hotspot-detector/SKILL.md +0 -172
  122. package/dist/agents/commands/codex/harness/harness-hotspot-detector/agents/openai.yaml +0 -3
  123. package/dist/agents/commands/codex/harness/harness-impact-analysis/SKILL.md +0 -195
  124. package/dist/agents/commands/codex/harness/harness-impact-analysis/agents/openai.yaml +0 -3
  125. package/dist/agents/commands/codex/harness/harness-integrity/SKILL.md +0 -178
  126. package/dist/agents/commands/codex/harness/harness-integrity/agents/openai.yaml +0 -3
  127. package/dist/agents/commands/codex/harness/harness-onboarding/SKILL.md +0 -299
  128. package/dist/agents/commands/codex/harness/harness-onboarding/agents/openai.yaml +0 -3
  129. package/dist/agents/commands/codex/harness/harness-perf/SKILL.md +0 -272
  130. package/dist/agents/commands/codex/harness/harness-perf/agents/openai.yaml +0 -3
  131. package/dist/agents/commands/codex/harness/harness-planning/SKILL.md +0 -592
  132. package/dist/agents/commands/codex/harness/harness-planning/agents/openai.yaml +0 -3
  133. package/dist/agents/commands/codex/harness/harness-refactoring/SKILL.md +0 -181
  134. package/dist/agents/commands/codex/harness/harness-refactoring/agents/openai.yaml +0 -3
  135. package/dist/agents/commands/codex/harness/harness-release-readiness/SKILL.md +0 -701
  136. package/dist/agents/commands/codex/harness/harness-release-readiness/agents/openai.yaml +0 -3
  137. package/dist/agents/commands/codex/harness/harness-roadmap/SKILL.md +0 -607
  138. package/dist/agents/commands/codex/harness/harness-roadmap/agents/openai.yaml +0 -3
  139. package/dist/agents/commands/codex/harness/harness-security-scan/SKILL.md +0 -147
  140. package/dist/agents/commands/codex/harness/harness-security-scan/agents/openai.yaml +0 -3
  141. package/dist/agents/commands/codex/harness/harness-skill-authoring/SKILL.md +0 -314
  142. package/dist/agents/commands/codex/harness/harness-skill-authoring/agents/openai.yaml +0 -3
  143. package/dist/agents/commands/codex/harness/harness-soundness-review/SKILL.md +0 -1280
  144. package/dist/agents/commands/codex/harness/harness-soundness-review/agents/openai.yaml +0 -3
  145. package/dist/agents/commands/codex/harness/harness-supply-chain-audit/SKILL.md +0 -255
  146. package/dist/agents/commands/codex/harness/harness-supply-chain-audit/agents/openai.yaml +0 -3
  147. package/dist/agents/commands/codex/harness/harness-tdd/SKILL.md +0 -189
  148. package/dist/agents/commands/codex/harness/harness-tdd/agents/openai.yaml +0 -3
  149. package/dist/agents/commands/codex/harness/harness-test-advisor/SKILL.md +0 -171
  150. package/dist/agents/commands/codex/harness/harness-test-advisor/agents/openai.yaml +0 -3
  151. package/dist/agents/commands/codex/harness/harness-verification/SKILL.md +0 -433
  152. package/dist/agents/commands/codex/harness/harness-verification/agents/openai.yaml +0 -3
  153. package/dist/agents/commands/codex/harness/harness-verify/SKILL.md +0 -170
  154. package/dist/agents/commands/codex/harness/harness-verify/agents/openai.yaml +0 -3
  155. package/dist/agents/commands/codex/harness/initialize-harness-project/SKILL.md +0 -244
  156. package/dist/agents/commands/codex/harness/initialize-harness-project/agents/openai.yaml +0 -3
  157. package/dist/agents/commands/cursor/harness/add-harness-component.mdc +0 -200
  158. package/dist/agents/commands/cursor/harness/cleanup-dead-code.mdc +0 -253
  159. package/dist/agents/commands/cursor/harness/detect-doc-drift.mdc +0 -187
  160. package/dist/agents/commands/cursor/harness/enforce-architecture.mdc +0 -304
  161. package/dist/agents/commands/cursor/harness/harness-architecture-advisor.mdc +0 -457
  162. package/dist/agents/commands/cursor/harness/harness-autopilot.mdc +0 -924
  163. package/dist/agents/commands/cursor/harness/harness-brainstorming.mdc +0 -414
  164. package/dist/agents/commands/cursor/harness/harness-code-review.mdc +0 -865
  165. package/dist/agents/commands/cursor/harness/harness-codebase-cleanup.mdc +0 -232
  166. package/dist/agents/commands/cursor/harness/harness-debugging.mdc +0 -374
  167. package/dist/agents/commands/cursor/harness/harness-dependency-health.mdc +0 -187
  168. package/dist/agents/commands/cursor/harness/harness-docs-pipeline.mdc +0 -468
  169. package/dist/agents/commands/cursor/harness/harness-execution.mdc +0 -518
  170. package/dist/agents/commands/cursor/harness/harness-hotspot-detector.mdc +0 -169
  171. package/dist/agents/commands/cursor/harness/harness-impact-analysis.mdc +0 -192
  172. package/dist/agents/commands/cursor/harness/harness-integrity.mdc +0 -175
  173. package/dist/agents/commands/cursor/harness/harness-onboarding.mdc +0 -296
  174. package/dist/agents/commands/cursor/harness/harness-perf.mdc +0 -268
  175. package/dist/agents/commands/cursor/harness/harness-planning.mdc +0 -587
  176. package/dist/agents/commands/cursor/harness/harness-refactoring.mdc +0 -177
  177. package/dist/agents/commands/cursor/harness/harness-release-readiness.mdc +0 -697
  178. package/dist/agents/commands/cursor/harness/harness-roadmap.mdc +0 -603
  179. package/dist/agents/commands/cursor/harness/harness-security-scan.mdc +0 -162
  180. package/dist/agents/commands/cursor/harness/harness-skill-authoring.mdc +0 -300
  181. package/dist/agents/commands/cursor/harness/harness-soundness-review.mdc +0 -1275
  182. package/dist/agents/commands/cursor/harness/harness-supply-chain-audit.mdc +0 -252
  183. package/dist/agents/commands/cursor/harness/harness-tdd.mdc +0 -185
  184. package/dist/agents/commands/cursor/harness/harness-test-advisor.mdc +0 -168
  185. package/dist/agents/commands/cursor/harness/harness-verification.mdc +0 -429
  186. package/dist/agents/commands/cursor/harness/harness-verify.mdc +0 -167
  187. package/dist/agents/commands/cursor/harness/initialize-harness-project.mdc +0 -240
  188. package/dist/agents/commands/gemini-cli/harness/harness.toml +0 -277
  189. package/dist/{chunk-RRHUCDRD.js → chunk-ZP5E7YET.js} +3 -3
@@ -1,240 +0,0 @@
1
- ---
2
- description: Scaffold a new harness-compliant project
3
- alwaysApply: false
4
- ---
5
-
6
- <!-- Generated by harness generate-slash-commands. Do not edit. -->
7
-
8
- # Initialize Harness Project
9
-
10
- > Scaffold a new harness-compliant project or migrate an existing project to the next adoption level. Assess current state, configure personas, generate AGENTS.md, and validate the result.
11
-
12
- ## When to Use
13
-
14
- - Starting a brand new project that should be harness-managed from day one
15
- - Migrating an existing project to harness for the first time
16
- - Upgrading an existing harness project from one adoption level to the next (basic to intermediate, intermediate to advanced)
17
- - When `on_project_init` triggers fire
18
- - NOT when the project is already at the desired adoption level (use harness-onboarding to orient instead)
19
- - NOT when adding a single component to an existing harness project (use add-harness-component)
20
- - NOT when the project has no clear owner or maintainer — harness setup requires someone to own the constraints
21
-
22
- ## Process
23
-
24
- ### Phase 1: ASSESS — Determine Current State
25
-
26
- 1. **Check for existing harness configuration.** Look for `.harness/` directory, `AGENTS.md`, `harness.config.json`, and any skill definitions. Their presence determines whether this is a new project or a migration.
27
-
28
- 2. **For new projects:** Gather project context — language, framework, test runner, build tool. Ask the human if any of these are undecided. Do not assume defaults.
29
-
30
- 2b. **For existing projects with detectable frameworks:** Run `harness init` without flags first. The command auto-detects frameworks (FastAPI, Django, Gin, Axum, Spring Boot, Next.js, React+Vite, Vue, Express, NestJS) by scanning project files. Present the detection result to the human and ask for confirmation before proceeding. If detection fails, ask the human to specify `--framework` manually.
31
-
32
- 3. **For existing projects:** Run `harness validate` to see what is already configured and what is missing. Read `AGENTS.md` if it exists. Identify the current adoption level:
33
- - **Basic:** Has `AGENTS.md` and `harness.config.json` with project metadata. No layers, no skills, no dependency constraints.
34
- - **Intermediate:** Has layers defined, dependency constraints between layers, at least one custom skill. `harness check-deps` runs and passes.
35
- - **Advanced:** Has full persona configuration, custom skills for the team's workflows, state management, learnings capture, and CI integration for `harness validate`.
36
-
37
- 4. **Recommend the target adoption level.** For new projects, start with basic unless the team has harness experience. For existing projects, recommend one level up from current. Present the recommendation and wait for confirmation.
38
-
39
- ### Phase 2: SCAFFOLD — Generate Project Structure
40
-
41
- 1. **Run `harness init` with the appropriate flags:**
42
- - New basic JS/TS project: `harness init --level basic`
43
- - With framework: `harness init --level basic --framework <framework>`
44
- - Non-JS language: `harness init --language <python|go|rust|java>`
45
- - Non-JS with framework: `harness init --framework <fastapi|django|gin|axum|spring-boot>`
46
- - Existing project (auto-detect): `harness init` (no flags -- auto-detection runs)
47
- - Migration to intermediate: `harness init --level intermediate --migrate`
48
- - Migration to advanced: `harness init --level advanced --migrate`
49
-
50
- **Supported frameworks:** nextjs, react-vite, vue, express, nestjs, fastapi, django, gin, axum, spring-boot
51
- **Supported languages:** typescript, python, go, rust, java
52
-
53
- 2. **Review generated files.** `harness init` creates:
54
- - `harness.config.json` — Project configuration (name, stack, adoption level)
55
- - `.harness/` directory — State and learnings storage
56
- - `AGENTS.md` — Agent instructions (template, needs customization)
57
- - Layer definitions (intermediate and above)
58
- - Dependency constraints (intermediate and above)
59
-
60
- 3. **Do not blindly accept generated content.** Read the generated `AGENTS.md` and `harness.config.json`. Flag anything that looks wrong or incomplete. The scaffolded output is a starting point, not a finished product.
61
-
62
- ### Phase 3: CONFIGURE — Customize for the Project
63
-
64
- 1. **Configure personas.** Run `harness persona generate` to create persona definitions based on the project's stack and team structure. Personas define how agents should behave in this project — coding style, communication preferences, constraint strictness.
65
-
66
- 2. **Customize AGENTS.md.** The generated template needs project-specific content:
67
- - Project description and purpose
68
- - Architecture overview (components, layers, data flow)
69
- - Key conventions the team follows
70
- - Known constraints and forbidden patterns
71
- - Links to relevant documentation
72
-
73
- 3. **For intermediate and above:** Define layer boundaries. Which modules belong to which layers? What are the allowed import directions? Document these in `harness.config.json` and ensure they match the actual codebase structure.
74
-
75
- 4. **For advanced:** Configure state management (`.harness/state.json` schema), learnings capture (`.harness/learnings.md` conventions), and CI integration hooks.
76
-
77
- 5. **Configure i18n (all levels).** Ask: "Will this project support multiple languages?" Based on the answer:
78
- - **Yes:** Invoke `harness-i18n-workflow` configure phase to set up i18n config in `harness.config.json` (source locale, target locales, framework, strictness). Then invoke `harness-i18n-workflow` scaffold phase to create translation file structure and extraction config. Set `i18n.enabled: true`.
79
- - **No:** Set `i18n.enabled: false` in `harness.config.json`. The `harness-i18n-process` skill will still fire gentle prompts for unconfigured projects when features touch user-facing strings.
80
- - **Not sure yet:** Skip i18n configuration entirely. Do not set `i18n.enabled`. The project can enable i18n later by running `harness-i18n-workflow` directly.
81
-
82
- ### Phase 4: VALIDATE — Confirm Everything Works
83
-
84
- 1. **Run `harness validate`** to verify the full configuration. This checks:
85
- - `harness.config.json` schema validity
86
- - `AGENTS.md` presence and required sections
87
- - Layer definitions (if intermediate+)
88
- - Dependency constraints (if intermediate+)
89
- - Persona configuration (if configured)
90
-
91
- 2. **Fix any validation errors before finishing.** Do not leave the project in a half-configured state.
92
-
93
- 3. **Run `harness check-deps`** (intermediate and above) to verify dependency constraints match the actual codebase. If there are violations, decide with the human: update the constraints or fix the code.
94
-
95
- ### Build the Initial Knowledge Graph
96
-
97
- If the project will use graph-based queries, build the initial knowledge graph now:
98
-
99
- ```
100
- harness scan [path]
101
- ```
102
-
103
- This creates the `.harness/graph/` directory and populates it with the project's dependency and relationship data. Subsequent graph queries (impact analysis, dependency health, test advisor) depend on this initial scan.
104
-
105
- 4. **Mention roadmap.** After validation passes, inform the user: "When you are ready to set up a project roadmap, run `/harness:roadmap --create`. This creates a unified `docs/roadmap.md` that tracks features, milestones, and status across your specs and plans." This is informational only — do not create the roadmap automatically.
106
-
107
- 5. **Commit the initialization.** All generated and configured files in a single commit.
108
-
109
- ## Harness Integration
110
-
111
- - **`harness init --level <level> [--framework <framework>] [--language <language>]`** — Scaffold a new project. `--framework` infers language automatically. `--language` without `--framework` gives a bare language scaffold. Running without flags on an existing project directory triggers auto-detection.
112
- - **`harness init --level <level> --migrate`** — Migrate an existing project to the next adoption level, preserving existing configuration.
113
- - **`harness persona generate`** — Generate persona definitions based on project stack and team structure.
114
- - **`harness validate`** — Verify the full project configuration is valid and complete.
115
- - **`harness check-deps`** — Verify dependency constraints match the actual codebase (intermediate and above).
116
- - **`harness-i18n-workflow configure` + `harness-i18n-workflow scaffold`** — Invoked during Phase 3 if the project will support multiple languages. Sets up i18n configuration and translation file structure.
117
- - **Roadmap nudge** — After successful initialization, inform the user about `/harness:roadmap --create` for setting up project-level feature tracking. Informational only; does not create the roadmap.
118
-
119
- ## Success Criteria
120
-
121
- - `harness.config.json` exists and passes schema validation
122
- - `AGENTS.md` exists with project-specific content (not just the template)
123
- - `.harness/` directory exists with appropriate state files
124
- - `harness validate` passes with zero errors
125
- - `harness check-deps` passes (intermediate and above)
126
- - Personas are configured if the project uses them
127
- - The adoption level matches what was agreed upon with the human
128
- - All generated files are committed in a single atomic commit
129
- - i18n configuration is set if the human chose to enable it during init
130
-
131
- ## Examples
132
-
133
- ### Example: New TypeScript Project (Basic Level)
134
-
135
- **ASSESS:**
136
-
137
- ```
138
- Human: "I'm starting a new TypeScript API project using Express and Vitest."
139
- Check for .harness/ — not found. This is a new project.
140
- Recommend: basic level (new project, start simple).
141
- Human confirms: "Basic is fine for now."
142
- ```
143
-
144
- **SCAFFOLD:**
145
-
146
- ```bash
147
- harness init --level basic --framework express
148
- # Creates: harness.config.json, .harness/, AGENTS.md (template)
149
- ```
150
-
151
- **CONFIGURE:**
152
-
153
- ```
154
- Edit AGENTS.md:
155
- - Add project description: "REST API for widget management"
156
- - Add stack: TypeScript, Express, Vitest, PostgreSQL
157
- - Add conventions: "Use zod for validation, repository pattern for data access"
158
- - Add constraints: "No direct SQL queries outside repository layer"
159
- - Ask: "Will this project support multiple languages?"
160
- - Human: "Yes, Spanish and French."
161
- - Run harness-i18n-workflow configure (source: en, targets: es, fr)
162
- - Run harness-i18n-workflow scaffold (creates locales/ directory structure)
163
- ```
164
-
165
- **VALIDATE:**
166
-
167
- ```bash
168
- harness validate # Pass — basic level checks satisfied
169
- git add harness.config.json .harness/ AGENTS.md
170
- git commit -m "feat: initialize harness project at basic level"
171
- ```
172
-
173
- ### Example: Migrating Existing Project from Basic to Intermediate
174
-
175
- **ASSESS:**
176
-
177
- ```
178
- Read harness.config.json — level: basic
179
- Read AGENTS.md — exists, has project-specific content
180
- Run: harness validate — passes at basic level
181
- Recommend: intermediate (add layers and dependency constraints)
182
- Human confirms: "Yes, we're ready for layers."
183
- ```
184
-
185
- **SCAFFOLD:**
186
-
187
- ```bash
188
- harness init --level intermediate --migrate
189
- # Preserves existing harness.config.json and AGENTS.md
190
- # Adds: layer definitions template, dependency constraints template
191
- ```
192
-
193
- **CONFIGURE:**
194
-
195
- ```
196
- Define layers in harness.config.json:
197
- - presentation: src/routes/, src/middleware/
198
- - business: src/services/, src/models/
199
- - data: src/repositories/, src/db/
200
-
201
- Define constraints:
202
- - presentation → business (allowed)
203
- - business → data (allowed)
204
- - data → presentation (forbidden)
205
- - presentation → data (forbidden — must go through business)
206
-
207
- Update AGENTS.md with layer documentation.
208
- ```
209
-
210
- **VALIDATE:**
211
-
212
- ```bash
213
- harness validate # Pass — intermediate level checks satisfied
214
- harness check-deps # Pass — no constraint violations in existing code
215
- git add -A
216
- git commit -m "feat: migrate harness project to intermediate level with layers"
217
- ```
218
-
219
- ### Example: Adoption Level Progression
220
-
221
- **Basic (start here):**
222
-
223
- - `AGENTS.md` with project context
224
- - `harness.config.json` with metadata
225
- - `harness validate` runs in development
226
-
227
- **Intermediate (add structure):**
228
-
229
- - Layer definitions and boundaries
230
- - Dependency constraints enforced by `harness check-deps`
231
- - At least one custom skill for team workflows
232
-
233
- **Advanced (full integration):**
234
-
235
- - Persona configuration for consistent agent behavior
236
- - State management across sessions
237
- - `.harness/learnings.md` capturing institutional knowledge
238
- - `harness validate` runs in CI pipeline
239
- - Custom skills for all common team workflows
240
-
@@ -1,277 +0,0 @@
1
- # Generated by harness generate-slash-commands. Do not edit.
2
- description = "Natural language router to harness skills — classifies intent, confirms, dispatches"
3
- prompt = '''
4
- <context>
5
- Cognitive mode: analytical-classifier
6
- Type: rigid
7
- </context>
8
-
9
- <objective>
10
- Natural language router to harness skills — classifies intent, confirms, dispatches
11
-
12
- Phases:
13
- - classify: Parse intent and search skills index for matches
14
- - confirm: Present routing decision with scope and reasoning
15
- - dispatch: Invoke selected skill via run_skill with original intent
16
- </objective>
17
-
18
- <execution_context>
19
- --- SKILL.md (agents/skills/claude-code/harness-router/SKILL.md) ---
20
- # Harness Router
21
-
22
- > Natural language entry point to all harness skills. Classifies user intent by scope and domain, confirms the routing decision with explicit reasoning, and dispatches to the appropriate skill.
23
-
24
- ## When to Use
25
-
26
- - When the user invokes `/harness` with a natural language description of what they want
27
- - When the user is unsure which harness skill to use
28
- - When the user wants to describe their intent rather than remember a command name
29
- - NOT when the user already knows the specific skill (e.g., `/harness:tdd`, `/harness:planning`)
30
- - NOT for non-harness tasks (general coding, file operations, etc.)
31
-
32
- ## Process
33
-
34
- ### Iron Law
35
-
36
- **The router confirms before dispatching.** Never silently route to a skill. Always present the chosen skill, scope classification, and reasoning — then wait for the user to confirm.
37
-
38
- ---
39
-
40
- ### Phase 1: CLASSIFY — Parse Intent and Search
41
-
42
- 1. **Check for empty input.** If no intent is provided, show usage help:
43
-
44
- ```
45
- Usage: /harness <describe what you want to do>
46
-
47
- Examples:
48
- /harness fix the button spacing on the settings page
49
- /harness we need a notification system
50
- /harness this page is slow
51
- /harness redesign how the sidebar filters work
52
- /harness clean up my code
53
-
54
- I'll figure out the right skill and process level for you.
55
- ```
56
-
57
- Stop here — do not proceed to classification.
58
-
59
- 2. **Search the skill catalog.** Call `search_skills` with the user's natural language intent as the query:
60
-
61
- ```
62
- search_skills({ query: "<user's intent>" })
63
- ```
64
-
65
- This returns ranked skill matches from the skills index.
66
-
67
- 3. **Classify scope.** Based on the intent language and search results, classify into one of four tiers:
68
-
69
- | Scope | Signal Words | Description |
70
- |-------|-------------|-------------|
71
- | **quick-fix** | "fix", "tweak", "adjust", "change X to Y", "update", "correct" | Small, targeted change with no design decisions |
72
- | **guided-change** | "redesign", "refactor", "improve how X works", "rework" | Moderate scope, some decisions but architecture is clear |
73
- | **full-exploration** | "build", "create", "add a new system for", "we need", "design" | Ambiguous scope, multiple approaches, design decisions needed |
74
- | **diagnostic** | "broken", "slow", "failing", "debug", "review", "check", "analyze" | Something is broken or needs analysis |
75
-
76
- Additional scope signals:
77
- - Single file or component mentioned → lower ceremony (quick-fix or guided-change)
78
- - Multiple systems or no clear target → higher ceremony (full-exploration)
79
- - Error messages or symptoms → diagnostic
80
-
81
- 4. **Map scope to entry skill.** Use the classification and search results to select the entry skill:
82
-
83
- | Scope | Primary Skill | Alternates (when search results indicate better match) |
84
- |-------|--------------|-------------------------------------------------------|
85
- | quick-fix | `harness-tdd` | `harness-refactoring` if the intent is structural |
86
- | guided-change | `harness-planning` | `harness-architecture-advisor` if tradeoffs are involved |
87
- | full-exploration | `harness-brainstorming` | — |
88
- | diagnostic | `harness-debugging` | `harness-code-review` for review requests, `harness-perf` for performance |
89
-
90
- If the `search_skills` results strongly favor a specific skill that differs from the scope-based default, prefer the search result. The scope classification provides the fallback when search results are ambiguous.
91
-
92
- 5. **Assess confidence.** Determine whether the match is confident or ambiguous:
93
- - **High confidence:** Top search result clearly dominates, scope classification aligns with it
94
- - **Low confidence:** Top 2-3 results are close in score, or scope classification points to a different skill than search results
95
-
96
- ---
97
-
98
- ### Phase 2: CONFIRM — Present Decision with Reasoning
99
-
100
- **High confidence (single clear match):**
101
-
102
- Present the routing decision with scope classification and reasoning:
103
-
104
- ```
105
- This looks like a [scope-level] — [one-line reasoning about why this scope].
106
-
107
- I'll route to `harness:[skill]` because [why this skill fits the intent].
108
-
109
- Proceed? (y / n / suggest another)
110
- ```
111
-
112
- Wait for the user to confirm before proceeding.
113
-
114
- **Low confidence (ambiguous, multiple candidates):**
115
-
116
- Present the top 2-3 candidates with descriptions:
117
-
118
- ```
119
- This could be a few things:
120
-
121
- 1. `harness:[skill-1]` — [one-line description of what this skill does]
122
- 2. `harness:[skill-2]` — [one-line description of what this skill does]
123
- 3. `harness:[skill-3]` — [one-line description of what this skill does]
124
-
125
- Which fits best? (1 / 2 / 3)
126
- ```
127
-
128
- Wait for the user to choose.
129
-
130
- **User rejects the suggestion:**
131
-
132
- If the user says no or suggests a different skill:
133
- - If they name a specific skill, confirm and dispatch to that skill
134
- - If they re-phrase their intent, re-run CLASSIFY with the new phrasing
135
- - Do not loop more than twice — if the second attempt also misses, list all available harness skills and let the user pick
136
-
137
- ---
138
-
139
- ### Phase 3: DISPATCH — Invoke Selected Skill
140
-
141
- 1. **Pass the original intent as context.** When invoking the selected skill, include the user's original natural language intent so they do not need to repeat themselves.
142
-
143
- 2. **Invoke via `run_skill`.** Call `run_skill` with the selected skill name and the user's intent as the argument:
144
-
145
- ```
146
- run_skill({ skill: "<selected-skill>", path: "<project-root>" })
147
- ```
148
-
149
- Pass the original intent through as the skill's argument context.
150
-
151
- 3. **Hand off cleanly.** Once the skill is invoked, the router's job is done. The dispatched skill owns all subsequent interaction, including any downstream chaining to other skills.
152
-
153
- ---
154
-
155
- ## Scope Examples
156
-
157
- ### Quick Fix
158
- **Intent:** "fix the button spacing on the settings page"
159
- **Classification:** quick-fix — single component, clear target, no design decisions
160
- **Route:** `harness-tdd`
161
-
162
- ### Guided Change
163
- **Intent:** "redesign how the sidebar filters work"
164
- **Classification:** guided-change — moderate scope, clear architecture, some decisions
165
- **Route:** `harness-planning` or `harness-architecture-advisor`
166
-
167
- ### Full Exploration
168
- **Intent:** "we need a notification system"
169
- **Classification:** full-exploration — ambiguous scope, multiple approaches, design decisions needed
170
- **Route:** `harness-brainstorming`
171
-
172
- ### Diagnostic
173
- **Intent:** "this page is slow"
174
- **Classification:** diagnostic — performance symptom, needs investigation
175
- **Route:** `harness-perf`
176
-
177
- ### Ambiguous
178
- **Intent:** "clean up my code"
179
- **Classification:** ambiguous — could be refactoring, dead code removal, or architecture cleanup
180
- **Route:** Present candidates: `harness-refactoring`, `harness-codebase-cleanup`, `harness-cleanup-dead-code`
181
-
182
- ## Harness Integration
183
-
184
- - **`search_skills`** — Used in Phase 1 to match the user's natural language intent against the skill catalog. Returns ranked results based on keyword, description, and stack-signal matching.
185
- - **`run_skill`** — Used in Phase 3 to dispatch to the selected skill. Passes the project path and original intent as context.
186
- - **`harness validate`** — Not directly used by the router. Validation is the responsibility of the dispatched skill.
187
-
188
- ## Success Criteria
189
-
190
- - `/harness fix the button spacing on the settings page` routes to `harness-tdd` with scope "quick-fix" and confirms before dispatching
191
- - `/harness we need a notification system` routes to `harness-brainstorming` with scope "full-exploration" and confirms before dispatching
192
- - `/harness clean up my code` (ambiguous) presents top 2-3 candidates and lets user choose
193
- - `/harness this page is slow` routes to a diagnostic skill with reasoning
194
- - `/harness redesign how the sidebar filters work` routes to `harness-planning` or `harness-architecture-advisor` with scope "guided-change"
195
- - Confirmation always includes: scope classification, chosen skill, and one-line reasoning
196
- - User can reject the suggestion and re-phrase or pick a different skill
197
- - Dispatched skill receives the original natural language intent as context
198
- - `search_skills` MCP tool is used for matching — no custom scoring code
199
- - `/harness` with no arguments shows usage help with examples
200
-
201
- ## Rationalizations to Reject
202
-
203
- | Rationalization | Reality |
204
- |----------------|---------|
205
- | "The intent is obvious, I can skip the confirmation step" | The Iron Law requires confirmation before every dispatch. Even obvious intents benefit from the user seeing the scope classification — it catches misunderstandings early. |
206
- | "I should also suggest downstream skills the dispatched skill will chain into" | Each skill owns its own transitions. Surfacing the full chain adds noise and duplicates logic that already exists in the dispatched skill. |
207
- | "The search results don't match well, so I'll just guess based on keywords" | If `search_skills` returns poor results, present the top candidates and let the user choose. Guessing silently is worse than admitting ambiguity. |
208
- | "The user rejected my suggestion twice, I should keep trying" | After two misses, list available skills and let the user pick directly. Do not loop indefinitely. |
209
-
210
- ## Gates
211
-
212
- - **No silent dispatch.** Every routing decision must be confirmed by the user before the skill is invoked. No exceptions.
213
- - **No bypassing search_skills.** The skill catalog search must be used for matching. Do not hardcode intent-to-skill mappings or rely solely on keyword heuristics.
214
- - **No downstream chaining.** The router dispatches to exactly one skill. It does not pre-load or suggest the skills that will follow.
215
- - **No more than two re-classification attempts.** If the user rejects twice, show the full list and let them pick.
216
-
217
- ## Escalation
218
-
219
- - **When `search_skills` returns no results:** The skills index may be stale or missing. Suggest the user run `harness update-skills-index` to regenerate it, then retry.
220
- - **When the user's intent spans multiple skills:** Ask: "This sounds like it involves both [skill A] and [skill B]. Which should we start with?" Do not attempt to dispatch to multiple skills simultaneously.
221
- - **When the user asks for something outside the harness skill catalog:** Say so plainly: "This doesn't match any harness skill. You may want to handle this directly, or describe the task differently if you think a harness skill should apply."
222
-
223
-
224
- --- skill.yaml (agents/skills/claude-code/harness-router/skill.yaml) ---
225
- name: harness-router
226
- version: "1.0.0"
227
- description: Natural language router to harness skills — classifies intent, confirms, dispatches
228
- cognitive_mode: analytical-classifier
229
- command_name: harness
230
- triggers:
231
- - manual
232
- platforms:
233
- - claude-code
234
- - gemini-cli
235
- tools:
236
- - Read
237
- - Glob
238
- - Grep
239
- cli:
240
- command: harness skill run harness-router
241
- args:
242
- - name: intent
243
- description: Natural language description of what the user wants
244
- required: true
245
- mcp:
246
- tool: run_skill
247
- input:
248
- skill: harness-router
249
- path: string
250
- type: rigid
251
- tier: 1
252
- phases:
253
- - name: classify
254
- description: Parse intent and search skills index for matches
255
- required: true
256
- - name: confirm
257
- description: Present routing decision with scope and reasoning
258
- required: true
259
- - name: dispatch
260
- description: Invoke selected skill via run_skill with original intent
261
- required: true
262
- state:
263
- persistent: false
264
- files: []
265
- depends_on: []
266
- addresses:
267
- - signal: high-complexity
268
- weight: 0.3
269
-
270
- </execution_context>
271
-
272
- <process>
273
- 1. Try: invoke mcp__harness__run_skill with skill: "harness-router"
274
- 2. If MCP unavailable: follow the SKILL.md workflow provided above directly
275
- 3. Pass through any arguments provided by the user
276
- </process>
277
- '''
@@ -1,9 +1,9 @@
1
- import {
2
- logger
3
- } from "./chunk-EBJQ6N4M.js";
4
1
  import {
5
2
  ALLOWED_COGNITIVE_MODES
6
3
  } from "./chunk-HIK6OEUF.js";
4
+ import {
5
+ logger
6
+ } from "./chunk-EBJQ6N4M.js";
7
7
  import {
8
8
  CLIError,
9
9
  ExitCode