dev-harness-cli 1.0.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.
Files changed (83) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +299 -0
  3. package/adapters/amazon-q/README.md +23 -0
  4. package/adapters/antigravity/README.md +22 -0
  5. package/adapters/claude-code/README.md +30 -0
  6. package/adapters/cline/README.md +23 -0
  7. package/adapters/codex/README.md +31 -0
  8. package/adapters/copilot/README.md +23 -0
  9. package/adapters/cursor/README.md +29 -0
  10. package/adapters/gemini/README.md +23 -0
  11. package/adapters/generic/README.md +40 -0
  12. package/adapters/hermes/README.md +31 -0
  13. package/adapters/hermes/SKILL.md +89 -0
  14. package/adapters/hermes/scripts/init.mjs +27 -0
  15. package/adapters/hermes/scripts/phase.mjs +27 -0
  16. package/adapters/hermes/scripts/validate.mjs +27 -0
  17. package/adapters/kilo-code/README.md +23 -0
  18. package/adapters/openclaw/README.md +22 -0
  19. package/adapters/pi/README.md +22 -0
  20. package/adapters/roo/README.md +23 -0
  21. package/adapters/windsurf/README.md +23 -0
  22. package/cli/commands/checkpoint.mjs +94 -0
  23. package/cli/commands/config.mjs +268 -0
  24. package/cli/commands/contract.mjs +155 -0
  25. package/cli/commands/detect-tool.mjs +112 -0
  26. package/cli/commands/init.mjs +351 -0
  27. package/cli/commands/learn.mjs +47 -0
  28. package/cli/commands/pause.mjs +34 -0
  29. package/cli/commands/phase.mjs +182 -0
  30. package/cli/commands/resume.mjs +33 -0
  31. package/cli/commands/rollback.mjs +261 -0
  32. package/cli/commands/set-mode.mjs +75 -0
  33. package/cli/commands/status.mjs +168 -0
  34. package/cli/commands/validate.mjs +118 -0
  35. package/cli/commands/worktree.mjs +298 -0
  36. package/cli/harness-dev.mjs +88 -0
  37. package/cli/lib/args.mjs +111 -0
  38. package/cli/lib/command-helpers.mjs +50 -0
  39. package/cli/lib/config-registry.mjs +329 -0
  40. package/cli/lib/constants.mjs +30 -0
  41. package/cli/lib/contract.mjs +306 -0
  42. package/cli/lib/detect-stack.mjs +235 -0
  43. package/cli/lib/errors.mjs +71 -0
  44. package/cli/lib/file-io.mjs +90 -0
  45. package/cli/lib/gates.mjs +492 -0
  46. package/cli/lib/git.mjs +144 -0
  47. package/cli/lib/help.mjs +246 -0
  48. package/cli/lib/modes.mjs +92 -0
  49. package/cli/lib/output.mjs +49 -0
  50. package/cli/lib/paths.mjs +75 -0
  51. package/cli/lib/phases.mjs +58 -0
  52. package/cli/lib/platform.mjs +78 -0
  53. package/cli/lib/progress.mjs +357 -0
  54. package/cli/lib/ralph-inner.mjs +314 -0
  55. package/cli/lib/ralph-outer.mjs +249 -0
  56. package/cli/lib/ralph-output.mjs +178 -0
  57. package/cli/lib/scaffold.mjs +431 -0
  58. package/cli/lib/schemas/stacks.json +477 -0
  59. package/cli/lib/state.mjs +333 -0
  60. package/cli/lib/templates.mjs +264 -0
  61. package/cli/lib/tool-registry.mjs +218 -0
  62. package/cli/lib/validate-schema.mjs +131 -0
  63. package/cli/lib/vars.mjs +114 -0
  64. package/package.json +50 -0
  65. package/schema/harness-config.schema.json +127 -0
  66. package/templates/AGENTS.md +63 -0
  67. package/templates/ci/github-actions.yml +78 -0
  68. package/templates/ci/gitlab-ci.yml +59 -0
  69. package/templates/docs/agents/evaluator.md +14 -0
  70. package/templates/docs/agents/generator.md +13 -0
  71. package/templates/docs/agents/planner.md +13 -0
  72. package/templates/docs/agents/simplifier.md +13 -0
  73. package/templates/docs/phases/build.md +41 -0
  74. package/templates/docs/phases/define.md +51 -0
  75. package/templates/docs/phases/plan.md +36 -0
  76. package/templates/docs/phases/review.md +42 -0
  77. package/templates/docs/phases/ship.md +43 -0
  78. package/templates/docs/phases/simplify.md +40 -0
  79. package/templates/docs/phases/verify.md +38 -0
  80. package/templates/evaluator-rubric.md +28 -0
  81. package/templates/init.ps1 +97 -0
  82. package/templates/init.sh +102 -0
  83. package/templates/sprint-contract.md +31 -0
@@ -0,0 +1,102 @@
1
+ #!/usr/bin/env bash
2
+ # init.sh — Initialize dev environment for {{stackLabel}} project
3
+ # Generated by dev-harness v{{harnessVersion}}
4
+
5
+ set -euo pipefail
6
+
7
+ echo "=== {{stackLabel}} Project Setup ==="
8
+ echo ""
9
+
10
+ # Install dependencies
11
+ echo "[1/4] Installing dependencies..."
12
+ {{installCmd}}
13
+
14
+ # Set up git hooks (if .git exists)
15
+ if [ -d ".git" ]; then
16
+ echo "[2/4] Setting up git hooks..."
17
+ mkdir -p .git/hooks
18
+
19
+ # pre-commit: run lint + type check
20
+ cat > .git/hooks/pre-commit << 'HOOK'
21
+ #!/usr/bin/env bash
22
+ set -euo pipefail
23
+ echo "Running pre-commit checks..."
24
+ {{lintCmd}} 2>/dev/null || echo "Lint: check failed (non-fatal)"
25
+ {{typeCheckCmd}} 2>/dev/null || echo "Type check: failed (non-fatal)"
26
+ HOOK
27
+ chmod +x .git/hooks/pre-commit
28
+ fi
29
+
30
+ # Start progress.md
31
+ if [ ! -f "progress.md" ]; then
32
+ echo "[3/4] Creating progress.md..."
33
+ cat > progress.md << 'MD'
34
+ # Progress: {{stackLabel}}
35
+
36
+ ## Status
37
+
38
+ | Phase | Status | Last Validated |
39
+ |-------|--------|---------------|
40
+ | DEFINE | pending | — |
41
+ | PLAN | pending | — |
42
+ | BUILD | pending | — |
43
+ | VERIFY | pending | — |
44
+ | SIMPLIFY | pending | — |
45
+ | REVIEW | pending | — |
46
+ | SHIP | pending | — |
47
+
48
+ ## Sessions
49
+
50
+ | Date | Session | Outcome |
51
+ |------|---------|---------|
52
+ MD
53
+ fi
54
+
55
+ # Create harness-config.json if not exists
56
+ if [ ! -f "harness-config.json" ]; then
57
+ echo "[4/4] Creating harness-config.json..."
58
+ cat > harness-config.json << 'CFG'
59
+ {
60
+ "version": "1.0",
61
+ "stack": "{{stack}}",
62
+ "mode": "copilot",
63
+ "currentPhase": null,
64
+ "paused": false,
65
+ "features": {
66
+ "remaining": 0,
67
+ "passing": 0,
68
+ "total": 0
69
+ },
70
+ "gates": {
71
+ "enabled": false,
72
+ "checks": ["all"]
73
+ },
74
+ "git": {
75
+ "autoCommit": false,
76
+ "autoTag": false,
77
+ "resetOnRetry": false,
78
+ "branch": null,
79
+ "clean": true,
80
+ "hasUpstream": false,
81
+ "lastCommitMessage": null
82
+ },
83
+ "phases": {
84
+ "enabled": ["define", "plan", "build", "verify", "review", "ship"]
85
+ },
86
+ "agents": {
87
+ "tone": {
88
+ "planner": "Analytical and precise. Define clear boundaries.",
89
+ "generator": "Focused and practical. Build what's specified, nothing more.",
90
+ "evaluator": "Skeptical and thorough. Accept only compelling evidence.",
91
+ "simplifier": "Relentless about clarity. Delete more than you add."
92
+ }
93
+ },
94
+ "maxRetries": 3,
95
+ "gateHistory": []
96
+ }
97
+ CFG
98
+ fi
99
+
100
+ echo ""
101
+ echo "=== Setup complete ==="
102
+ echo ""
@@ -0,0 +1,31 @@
1
+ # Sprint Contract — {{stack}}
2
+
3
+ ## Scope (Generator proposes)
4
+
5
+ **I will build:**
6
+ <!-- Clear statement of what will be built. No vague terms like "improve", "enhance", "optimize". -->
7
+
8
+ **I will NOT build:**
9
+ <!-- Explicit exclusions to prevent scope creep. -->
10
+
11
+ ## Verification Criteria (Generator proposes)
12
+
13
+ <!-- Specific commands or tests that prove the work is complete. -->
14
+
15
+ 1. ...
16
+ 2. ...
17
+ 3. ...
18
+
19
+ ## Evaluator Review (Evaluator fills in)
20
+
21
+ - [ ] Scope is clear and bounded: <!-- yes/no — if no, explain -->
22
+ - [ ] Verification criteria are sufficient: <!-- yes/no — if no, explain -->
23
+ - [ ] Exclusions are reasonable: <!-- yes/no — if no, explain -->
24
+
25
+ **Review notes:**
26
+ <!-- Evaluator's feedback to Generator if revision is needed. -->
27
+
28
+ ## Agreement Status
29
+
30
+ **Status:** <!-- Agreed / Needs Revision -->
31
+ **Negotiation rounds:** 0/5