@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,296 +0,0 @@
1
- ---
2
- description: Onboard a new developer to a harness-managed project
3
- alwaysApply: false
4
- ---
5
-
6
- <!-- Generated by harness generate-slash-commands. Do not edit. -->
7
-
8
- # Harness Onboarding
9
-
10
- > Navigate an existing harness-managed project and generate a structured orientation for new team members. Map the codebase, understand constraints, identify the adoption level, and produce a summary that gets someone productive fast.
11
-
12
- ## When to Use
13
-
14
- - A new developer (human or agent) is joining a harness-managed project for the first time
15
- - Resuming work on a project after extended time away and needing to re-orient
16
- - When `on_project_init` triggers fire in an existing project (agent starting a new session)
17
- - When someone asks "how does this project work?" or "where do I start?"
18
- - NOT when initializing a new project (use initialize-harness-project)
19
- - NOT when the project has no harness configuration (onboard to harness first with initialize-harness-project)
20
- - NOT when deep-diving into a specific module (use standard code exploration — onboarding gives the big picture)
21
-
22
- ## Process
23
-
24
- ### Phase 1: READ — Load Project Configuration
25
-
26
- 1. **Read `AGENTS.md`.** This is the primary source of truth for agent behavior in the project. Note:
27
- - Project description and purpose
28
- - Architecture overview
29
- - Conventions and coding standards
30
- - Constraints and forbidden patterns
31
- - Any special instructions or warnings
32
-
33
- 2. **Read `harness.config.json`.** Extract:
34
- - Project name and stack
35
- - Adoption level (basic, intermediate, advanced)
36
- - Layer definitions and their directory mappings
37
- - Dependency constraints between layers
38
- - Registered skills and their triggers
39
- - Persona configuration (if present)
40
-
41
- 3. **Read `.harness/learnings.md`** if it exists. This contains hard-won insights from previous sessions — decisions made, gotchas discovered, patterns that worked or failed. Summarize the most recent and most important entries.
42
-
43
- 4. **Read `.harness/state.json`** if it exists. This reveals what was happening in the last session — current phase, active task, any blockers that were recorded.
44
-
45
- ### Phase 2: MAP — Understand the Codebase Structure
46
-
47
- 1. **Map the technology stack.** Identify from package files, configuration, and code:
48
- - Language(s) and version(s)
49
- - Framework(s) and major libraries
50
- - Test framework and test runner command
51
- - Build tool and build command
52
- - Package manager
53
- - Database or data stores (if applicable)
54
-
55
- 2. **Map the architecture.** Walk the directory structure and identify:
56
- - Top-level organization pattern (monorepo, single package, workspace)
57
- - Source code location and entry points
58
- - Layer boundaries (from `harness.config.json` and actual directory structure)
59
- - Shared utilities or common modules
60
- - Configuration files and their purposes
61
-
62
- 3. **Map the conventions.** Look for patterns in existing code:
63
- - File naming conventions (kebab-case, camelCase, PascalCase)
64
- - Test file location and naming (co-located, separate directory, `.test.ts` vs `.spec.ts`)
65
- - Import style (relative, aliases, barrel files)
66
- - Error handling patterns
67
- - Logging patterns
68
- - Code formatting (detect from config files: `.prettierrc`, `.eslintrc`, `biome.json`)
69
-
70
- 4. **Map the constraints.** Identify what is restricted:
71
- - Forbidden imports (from `harness.config.json` dependency constraints)
72
- - Layer boundary rules (which layers can import from which)
73
- - Linting rules that encode architectural decisions
74
- - Any constraints documented in `AGENTS.md` that are not yet automated
75
-
76
- 5. **Map the design system** (when present). Look for:
77
- - `design-system/tokens.json` — W3C DTCG design tokens (colors, typography, spacing)
78
- - `design-system/DESIGN.md` — Aesthetic intent, anti-patterns, platform notes
79
- - `harness.config.json` `design` block — strictness level, enabled platforms, token path
80
- - Active design skills — check if `harness-design-system`, `harness-accessibility`, `harness-design`, `harness-design-web`, `harness-design-mobile` are available
81
- - Design constraint violations — run a quick `harness-accessibility` scan to surface any existing issues
82
- - Token coverage — how many components reference tokens vs. hardcoded values
83
-
84
- If no design system exists, note this as a potential improvement area.
85
-
86
- 6. **Map the concerns.** Identify areas that need attention:
87
- - Are there TODOs or FIXMEs in the code?
88
- - Does `harness validate` pass cleanly, or are there warnings?
89
- - Are there known blockers in `.harness/state.json`?
90
- - Is documentation up to date with the code?
91
- - Are there tests? What is the approximate coverage?
92
-
93
- ### Graph-Enhanced Context (when available)
94
-
95
- When a knowledge graph exists at `.harness/graph/`, use graph queries for faster, more accurate codebase mapping:
96
-
97
- - `query_graph` — map architecture automatically from module and layer nodes, replacing manual directory walking
98
- - `search_similar` — find entry points and key files by querying for high-connectivity nodes
99
- - `get_relationships` — show layer dependencies and module structure as a traversable graph
100
-
101
- Graph queries produce a complete architecture map in seconds, including transitive relationships that directory inspection misses. Fall back to file-based commands if no graph is available.
102
-
103
- ### Phase 3: ORIENT — Identify Adoption Level and Maturity
104
-
105
- 1. **Confirm the adoption level** matches what `harness.config.json` declares:
106
- - Basic: `AGENTS.md` and `harness.config.json` exist but no layers or constraints
107
- - Intermediate: Layers defined, dependency constraints enforced, at least one custom skill
108
- - Advanced: Personas, state management, learnings, CI integration
109
-
110
- 2. **Assess harness health.** Run `harness validate` and note any issues. A project that declares intermediate but fails validation is not truly intermediate.
111
-
112
- 3. **Identify available skills.** List the skills configured for the project. Note which are custom (project-specific) vs. standard (harness-provided). Each skill represents a workflow the team has formalized.
113
-
114
- ### Phase 4: SUMMARIZE — Generate Orientation Output
115
-
116
- 1. **Produce a structured orientation summary.** This is the deliverable. Format:
117
-
118
- ```markdown
119
- # Project Orientation: <project-name>
120
-
121
- ## Overview
122
-
123
- <1-2 sentence project description from AGENTS.md>
124
-
125
- ## Stack
126
-
127
- - Language: <language> <version>
128
- - Framework: <framework>
129
- - Tests: <test framework> (`<test command>`)
130
- - Build: <build tool> (`<build command>`)
131
- - Package manager: <pm>
132
-
133
- ## Architecture
134
-
135
- <Brief description of top-level organization>
136
-
137
- ### Layers
138
-
139
- | Layer | Directories | Can Import From |
140
- | ------- | ----------- | ----------------- |
141
- | <layer> | <dirs> | <allowed imports> |
142
-
143
- ### Key Components
144
-
145
- - <component>: <purpose> (<location>)
146
-
147
- ## Constraints
148
-
149
- - <constraint 1>
150
- - <constraint 2>
151
-
152
- ## Conventions
153
-
154
- - <convention 1>
155
- - <convention 2>
156
-
157
- ## Design System
158
-
159
- - **Tokens:** [present/absent] ([token count] tokens in [group count] groups)
160
- - **Aesthetic Intent:** [present/absent] (style: [style], strictness: [level])
161
- - **Platforms:** [web, mobile, or none configured]
162
- - **Accessibility:** [baseline scan result — e.g., "3 warnings, 0 errors"]
163
- - **Design Skills:** [list of available design skills]
164
-
165
- ## Harness Status
166
-
167
- - Adoption level: <level>
168
- - Validation: <pass/fail with summary>
169
- - Available skills: <list>
170
- - State: <current phase/task if applicable>
171
-
172
- ## Recent Learnings
173
-
174
- - <most relevant learnings from .harness/learnings.md>
175
-
176
- ## Getting Started
177
-
178
- 1. <first thing to do>
179
- 2. <second thing to do>
180
- 3. <third thing to do>
181
- ```
182
-
183
- 2. **Tailor "Getting Started" to the audience.** For a new developer: how to set up the dev environment and run tests. For an agent resuming work: what the current task is and what to do next. For a reviewer: where to look and what constraints to check.
184
-
185
- 3. **Present the summary to the human.** Do not write it to a file unless asked. The orientation is a conversation artifact, not a project artifact.
186
-
187
- ## Harness Integration
188
-
189
- - **`harness validate`** — Run during onboarding to assess project health and identify any configuration issues.
190
- - **`harness skill list`** — List available skills to understand what workflows the team has formalized.
191
- - **`harness check-deps`** — Run to verify dependency constraints are passing, which confirms layer boundaries are respected.
192
- - **`harness state show`** — View current state to understand where the last session left off.
193
- - **`AGENTS.md`** — Primary source of project context and agent instructions.
194
- - **`harness.config.json`** — Source of structural configuration (layers, constraints, skills).
195
- - **`.harness/learnings.md`** — Historical context and institutional knowledge.
196
-
197
- ## Success Criteria
198
-
199
- - All four configuration sources were read (`AGENTS.md`, `harness.config.json`, `.harness/learnings.md`, `.harness/state.json`)
200
- - Technology stack is accurately identified (language, framework, test runner, build tool)
201
- - Architecture is mapped with correct layer boundaries and dependency directions
202
- - Conventions are identified from actual code patterns, not assumed
203
- - Constraints are enumerated from both `harness.config.json` and `AGENTS.md`
204
- - Adoption level is confirmed (not just declared — validated)
205
- - A structured orientation summary is produced with all sections filled
206
- - The "Getting Started" section is actionable and tailored to the audience
207
- - `harness validate` was run and results are reported
208
-
209
- ## Examples
210
-
211
- ### Example: Onboarding to an Intermediate TypeScript Project
212
-
213
- **READ:**
214
-
215
- ```
216
- Read AGENTS.md:
217
- - Project: Widget API — REST service for widget lifecycle management
218
- - Stack: TypeScript, Express, Vitest, PostgreSQL
219
- - Conventions: zod validation, repository pattern, kebab-case files
220
-
221
- Read harness.config.json:
222
- - Level: intermediate
223
- - Layers: presentation (src/routes/), business (src/services/), data (src/repositories/)
224
- - Constraints: presentation → business OK, business → data OK, data → presentation FORBIDDEN
225
-
226
- Read .harness/learnings.md:
227
- - "Date comparison needs UTC normalization — use Date.now()"
228
- - "The notifications table has a unique constraint on (userId, type) — upsert, don't insert"
229
-
230
- Read .harness/state.json:
231
- - Position: Phase execute, Task 4 of 6
232
- - Blocker: none
233
- ```
234
-
235
- **MAP:**
236
-
237
- ```
238
- Stack: TypeScript 5.3, Express 4, Vitest 1.2, pg (node-postgres)
239
- Architecture: Single package, 3 layers, entry point src/index.ts
240
- Conventions: kebab-case files, co-located tests (.test.ts), barrel exports
241
- Constraints: 3 layers with strict downward-only imports
242
- Concerns: harness validate passes, 47 tests all passing
243
- ```
244
-
245
- **ORIENT:**
246
-
247
- ```
248
- Adoption level: intermediate (confirmed — layers defined, constraints enforced)
249
- Skills: harness-tdd, harness-execution, harness-code-review
250
- State: Mid-execution on a 6-task notification feature plan
251
- ```
252
-
253
- **SUMMARIZE:**
254
-
255
- ```
256
- Produce orientation with all sections. Getting Started for this context:
257
- 1. Read the plan at docs/plans/2026-03-14-notifications-plan.md
258
- 2. Resume execution at Task 4 (state shows Tasks 1-3 complete)
259
- 3. Note the UTC normalization gotcha from learnings before working with dates
260
- ```
261
-
262
- ### Example: Onboarding to a Basic Project
263
-
264
- **READ:**
265
-
266
- ```
267
- Read AGENTS.md — exists, minimal content
268
- Read harness.config.json — level: basic, no layers defined
269
- No .harness/learnings.md
270
- No .harness/state.json
271
- ```
272
-
273
- **MAP and SUMMARIZE:**
274
-
275
- ```
276
- Adoption level: basic (confirmed — no layers or constraints)
277
- Getting Started:
278
- 1. Run npm install && npm test to verify the project builds and tests pass
279
- 2. Read AGENTS.md for project context and conventions
280
- 3. Consider migrating to intermediate level to add layer boundaries
281
- (use initialize-harness-project to upgrade)
282
- ```
283
-
284
- ## Adoption Maturity
285
-
286
- A mental model for where a team sits on the harness adoption curve. Not prescriptive — just orientation.
287
-
288
- | Level | Name | Description |
289
- | ----- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
290
- | 1 | **Manual** | Write `CLAUDE.md` by hand, run commands manually. Harness is a reference, not a tool. |
291
- | 2 | **Repeatable** | Skills installed, agent follows conventions consistently. Workflows are codified but enforcement is human-driven. |
292
- | 3 | **Automated** | Mechanical gates in CI. `harness validate` runs on PRs. Failures auto-log to `.harness/failures.md`. The system catches mistakes before humans do. |
293
- | 4 | **Self-improving** | Learnings accumulate in `.harness/learnings.md`. Agents reference past failures before planning. Institutional knowledge compounds across sessions and team members. |
294
-
295
- Most teams start at Level 1 and move up as they see the value. There is no pressure to reach Level 4 — each level delivers real benefits on its own.
296
-
@@ -1,268 +0,0 @@
1
- ---
2
- description: Performance enforcement and benchmark management
3
- alwaysApply: false
4
- ---
5
-
6
- <!-- Generated by harness generate-slash-commands. Do not edit. -->
7
-
8
- # Harness Perf
9
-
10
- > Performance enforcement and benchmark management. Tier-based gates block commits and merges based on complexity, coupling, and runtime regression severity.
11
-
12
- ## When to Use
13
-
14
- - After code changes to verify performance hasn't degraded
15
- - On PRs to enforce performance budgets
16
- - For periodic performance audits
17
- - NOT for initial development (use harness-tdd for that)
18
- - NOT for brainstorming performance improvements (use harness-brainstorming)
19
-
20
- ## Process
21
-
22
- ### Iron Law
23
-
24
- **No merge with Tier 1 performance violations. No commit with cyclomatic complexity exceeding the error threshold.**
25
-
26
- Tier 1 violations are non-negotiable blockers. If a Tier 1 violation is detected, execution halts and the violation must be resolved before any further progress. Do not attempt workarounds.
27
-
28
- ---
29
-
30
- ### Phase 1: ANALYZE — Structural and Coupling Checks
31
-
32
- 1. **Run structural checks.** Execute `harness check-perf --structural` to compute complexity metrics for all changed files:
33
- - Cyclomatic complexity per function
34
- - Nesting depth per function
35
- - File length (lines of code)
36
- - Parameter count per function
37
-
38
- 2. **Run coupling checks.** Execute `harness check-perf --coupling` to compute coupling metrics:
39
- - Fan-in and fan-out per module
40
- - Afferent and efferent coupling
41
- - Transitive dependency depth
42
- - Circular dependency detection
43
-
44
- 3. **Classify violations by tier:**
45
- - **Tier 1 (error, block commit):** Cyclomatic complexity > 15, circular dependencies, hotspot in top 5%
46
- - **Tier 2 (warning, block merge):** Complexity > 10, nesting > 4, fan-out > 10, size budget exceeded
47
- - **Tier 3 (info, no gate):** File length > 300, fan-in > 20, transitive depth > 30
48
-
49
- 4. **If Tier 1 violations found,** report them immediately and STOP. Do not proceed to benchmarks. The violations must be fixed first.
50
-
51
- 5. **If no violations found,** proceed to Phase 2.
52
-
53
- ---
54
-
55
- ### Graph Availability
56
-
57
- Hotspot scoring and coupling analysis benefit from the knowledge graph but work without it.
58
-
59
- **Staleness sensitivity:** Medium -- auto-refresh if >10 commits stale. Hotspot scoring uses churn data which does not change rapidly.
60
-
61
- | Feature | With Graph | Without Graph |
62
- | ------------------------------------ | ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
63
- | Hotspot scoring (churn x complexity) | `GraphComplexityAdapter` computes from graph nodes | `git log --format="%H" -- <file>` for per-file commit count; complexity from `check-perf --structural` output; multiply manually |
64
- | Coupling ratio | `GraphCouplingAdapter` computes from graph edges | Parse import statements, count fan-out/fan-in per file |
65
- | Critical path resolution | Graph inference (high fan-in) + `@perf-critical` annotations | `@perf-critical` annotations only; grep for decorator/comment |
66
- | Transitive dep depth | Graph BFS depth | Import chain follow, 2 levels deep |
67
-
68
- **Notice when running without graph:** "Running without graph (run `harness scan` to enable hotspot scoring and coupling analysis)"
69
-
70
- **Impact on tiers:** Without graph, Tier 1 hotspot detection is degraded. Hotspot scoring falls back to churn-only (no complexity multiplication). This limitation is documented in the performance report output.
71
-
72
- ---
73
-
74
- ### Phase 2: BENCHMARK — Runtime Performance
75
-
76
- This phase runs only when `.bench.ts` files exist in the project. If none are found, skip to Phase 3.
77
-
78
- 1. **Check baseline lock-in.** Before running benchmarks, verify baselines are kept in sync:
79
- - List all `.bench.ts` files changed in this PR: `git diff --name-only | grep '.bench.ts'`
80
- - If any `.bench.ts` files are new or modified:
81
- - Check if `.harness/perf/baselines.json` is also modified in this PR
82
- - If NOT modified: flag as Tier 2 warning: "Benchmark files changed but baselines not updated. Run `harness perf baselines update` and commit the result."
83
- - If modified: verify the updated baselines include entries for all changed benchmarks
84
- - If no `.bench.ts` files changed: skip this check
85
- - This check also runs standalone via `--check-baselines` flag
86
-
87
- 2. **Check for benchmark files.** Scan the project for `*.bench.ts` files. If none exist, skip this phase entirely.
88
-
89
- 3. **Verify clean working tree.** Run `git status --porcelain`. If there are uncommitted changes, STOP. Benchmarks on dirty trees produce unreliable results.
90
-
91
- 4. **Run benchmarks.** Execute `harness perf bench` to run all benchmark suites.
92
-
93
- 5. **Load baselines.** Read `.harness/perf/baselines.json` for previous benchmark results. If no baselines exist, treat this as a baseline-capture run.
94
-
95
- 6. **Compare results against baselines** using the `RegressionDetector`:
96
- - Calculate percentage change for each benchmark
97
- - Apply noise margin (default: 3%) before flagging regressions
98
- - Distinguish between critical-path and non-critical-path benchmarks
99
-
100
- 7. **Resolve critical paths** via `CriticalPathResolver`:
101
- - Check `@perf-critical` annotations in source files
102
- - Check graph fan-in data (functions called by many consumers)
103
- - Functions in the critical path set have stricter thresholds
104
-
105
- 8. **Flag regressions by tier:**
106
- - **Tier 1:** >5% regression on a critical path benchmark
107
- - **Tier 2:** >10% regression on a non-critical-path benchmark
108
- - **Tier 3:** >5% regression on a non-critical-path benchmark (within noise margin consideration)
109
-
110
- 9. **If this is a baseline-capture run,** report results without regression comparison. Recommend running `harness perf baselines update` to persist.
111
-
112
- ---
113
-
114
- ### Phase 3: REPORT — Generate Performance Report
115
-
116
- 1. **Format violations by tier.** Present Tier 1 violations first (most severe), then Tier 2, then Tier 3. Each violation entry includes:
117
- - File path and function name
118
- - Metric name and current value
119
- - Threshold that was exceeded
120
- - Tier classification and gate impact
121
-
122
- 2. **Show hotspot scores** for top functions if knowledge graph data is available:
123
- - Query the graph for functions with high churn + high fan-in
124
- - Rank by composite hotspot score
125
- - Flag any hotspots that also have performance violations
126
-
127
- 3. **Show benchmark regression summary** if benchmarks ran:
128
- - Table of benchmark name, baseline, current, delta percentage, tier
129
- - Highlight critical-path benchmarks with a marker
130
- - Show noise margin and whether the regression exceeds it
131
-
132
- 4. **Recommend specific actions** for each Tier 1 and Tier 2 violation:
133
- - For high complexity: suggest extract-method or strategy pattern refactoring
134
- - For high coupling: suggest interface extraction or dependency inversion
135
- - For benchmark regressions: suggest profiling the specific code path
136
- - For size budget violations: suggest module decomposition
137
-
138
- 5. **Output the report** in structured markdown format suitable for PR comments or CI output.
139
-
140
- ---
141
-
142
- ### Phase 4: ENFORCE — Apply Gate Decisions
143
-
144
- 1. **Tier 1 violations present** — FAIL. Block commit and merge. List all Tier 1 violations with their locations and values. The developer must fix these before proceeding.
145
-
146
- 2. **Tier 2 violations present, no Tier 1** — WARN. Allow commit but block merge until addressed. List all Tier 2 violations. These must be resolved before the PR can be merged.
147
-
148
- 3. **Only Tier 3 or no violations** — PASS. Proceed normally. Log Tier 3 violations as informational notes.
149
-
150
- 4. **Record gate decision** in `.harness/state.json` under a `perfGate` key:
151
-
152
- ```json
153
- {
154
- "perfGate": {
155
- "result": "pass|warn|fail",
156
- "tier1Count": 0,
157
- "tier2Count": 0,
158
- "tier3Count": 0,
159
- "timestamp": "ISO-8601"
160
- }
161
- }
162
- ```
163
-
164
- 5. **Exit with appropriate code:** 0 for pass, 1 for fail, 0 for warn (with warning output).
165
-
166
- ---
167
-
168
- ## Harness Integration
169
-
170
- - **`harness check-perf`** — Primary command for all performance checks. Runs structural and coupling analysis.
171
- - **`harness check-perf --structural`** — Run only structural complexity checks.
172
- - **`harness check-perf --coupling`** — Run only coupling analysis.
173
- - **`harness perf bench`** — Run benchmarks only. Requires clean working tree.
174
- - **`harness perf baselines show`** — View current benchmark baselines.
175
- - **`harness perf baselines update`** — Persist current benchmark results as new baselines.
176
- - **`harness perf --check-baselines`** -- Verify baseline file is updated when benchmarks change. Runs the baseline lock-in check standalone.
177
- - **`harness perf critical-paths`** — View the current critical path set and how it was determined.
178
- - **`harness validate`** — Run after enforcement to verify overall project health.
179
- - **`harness graph scan`** — Refresh knowledge graph for accurate hotspot scoring.
180
-
181
- ## Tier Classification
182
-
183
- | Tier | Severity | Gate | Examples |
184
- | ---- | -------- | ------------ | --------------------------------------------------------------------------------------------------- |
185
- | 1 | error | Block commit | Cyclomatic complexity > 15, >5% regression on critical path, hotspot in top 5%, circular dependency |
186
- | 2 | warning | Block merge | Complexity > 10, nesting > 4, >10% regression elsewhere, fan-out > 10, size budget exceeded |
187
- | 3 | info | None | File length > 300 lines, fan-in > 20, transitive depth > 30, >5% non-critical regression |
188
-
189
- ## Success Criteria
190
-
191
- - All Tier 1 violations are resolved before proceeding
192
- - Performance report follows structured format with tier classification
193
- - Benchmark regressions are compared against noise margin before flagging
194
- - Gate decision is recorded in state
195
- - `harness validate` passes after enforcement
196
-
197
- ## Examples
198
-
199
- ### Example: PR with High Complexity Function
200
-
201
- ```
202
- Phase 1: ANALYZE
203
- harness check-perf --structural
204
- Result: processOrderBatch() in src/orders/processor.ts has cyclomatic complexity 18 (Tier 1, threshold: 15)
205
-
206
- Phase 2: BENCHMARK — skipped (Tier 1 violation found)
207
-
208
- Phase 3: REPORT
209
- TIER 1 VIOLATIONS (1):
210
- - src/orders/processor.ts:processOrderBatch — complexity 18 > 15
211
- Recommendation: Extract validation and transformation into separate functions
212
-
213
- Phase 4: ENFORCE
214
- Result: FAIL — 1 Tier 1 violation. Commit blocked.
215
- ```
216
-
217
- ### Example: Benchmark Regression on Critical Path
218
-
219
- ```
220
- Phase 1: ANALYZE — no structural violations
221
-
222
- Phase 2: BENCHMARK
223
- harness perf bench
224
- Baseline: parseDocument 4.2ms, current: 4.8ms (+14.3%)
225
- parseDocument is @perf-critical — Tier 1 threshold applies (>5%)
226
-
227
- Phase 3: REPORT
228
- TIER 1 VIOLATIONS (1):
229
- - parseDocument: 14.3% regression on critical path (threshold: 5%)
230
- Recommendation: Profile parseDocument to identify the regression source
231
-
232
- Phase 4: ENFORCE
233
- Result: FAIL — 1 Tier 1 violation. Merge blocked.
234
- ```
235
-
236
- ### Example: Clean PR with Minor Warnings
237
-
238
- ```
239
- Phase 1: ANALYZE
240
- harness check-perf --structural --coupling
241
- Result: src/utils/formatter.ts has 320 lines (Tier 3, threshold: 300)
242
-
243
- Phase 2: BENCHMARK
244
- harness perf bench — all within noise margin
245
-
246
- Phase 3: REPORT
247
- TIER 3 INFO (1):
248
- - src/utils/formatter.ts: 320 lines > 300 line threshold
249
- No Tier 1 or Tier 2 violations.
250
-
251
- Phase 4: ENFORCE
252
- Result: PASS — no blocking violations.
253
- ```
254
-
255
- ## Gates
256
-
257
- - **No ignoring Tier 1 violations.** They must be fixed or the threshold must be reconfigured (with documented justification).
258
- - **No running benchmarks with dirty working tree.** Uncommitted changes invalidate benchmark results.
259
- - **No updating baselines without running benchmarks.** Baselines must come from fresh runs against committed code.
260
- - **No suppressing violations without documentation.** If a threshold is relaxed, the rationale must be documented in the project configuration.
261
-
262
- ## Escalation
263
-
264
- - **When Tier 1 violations cannot be fixed within the current task:** Propose refactoring the function into smaller units, or raising the threshold with a documented justification. Do not silently skip the violation.
265
- - **When benchmark results are noisy or inconsistent:** Increase warmup iterations, pin the runtime environment, or run benchmarks in isolation. Report the noise level so the developer can make an informed decision.
266
- - **When critical path detection seems wrong:** Check `@perf-critical` annotations in source files and verify graph fan-in thresholds. The critical path set can be overridden in `.harness/perf/critical-paths.json`.
267
- - **When a violation is a false positive:** Document it with a `// perf-ignore: <reason>` comment and add the exception to `.harness/perf/exceptions.json`.
268
-