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.
- package/LICENSE +21 -0
- package/README.md +299 -0
- package/adapters/amazon-q/README.md +23 -0
- package/adapters/antigravity/README.md +22 -0
- package/adapters/claude-code/README.md +30 -0
- package/adapters/cline/README.md +23 -0
- package/adapters/codex/README.md +31 -0
- package/adapters/copilot/README.md +23 -0
- package/adapters/cursor/README.md +29 -0
- package/adapters/gemini/README.md +23 -0
- package/adapters/generic/README.md +40 -0
- package/adapters/hermes/README.md +31 -0
- package/adapters/hermes/SKILL.md +89 -0
- package/adapters/hermes/scripts/init.mjs +27 -0
- package/adapters/hermes/scripts/phase.mjs +27 -0
- package/adapters/hermes/scripts/validate.mjs +27 -0
- package/adapters/kilo-code/README.md +23 -0
- package/adapters/openclaw/README.md +22 -0
- package/adapters/pi/README.md +22 -0
- package/adapters/roo/README.md +23 -0
- package/adapters/windsurf/README.md +23 -0
- package/cli/commands/checkpoint.mjs +94 -0
- package/cli/commands/config.mjs +268 -0
- package/cli/commands/contract.mjs +155 -0
- package/cli/commands/detect-tool.mjs +112 -0
- package/cli/commands/init.mjs +351 -0
- package/cli/commands/learn.mjs +47 -0
- package/cli/commands/pause.mjs +34 -0
- package/cli/commands/phase.mjs +182 -0
- package/cli/commands/resume.mjs +33 -0
- package/cli/commands/rollback.mjs +261 -0
- package/cli/commands/set-mode.mjs +75 -0
- package/cli/commands/status.mjs +168 -0
- package/cli/commands/validate.mjs +118 -0
- package/cli/commands/worktree.mjs +298 -0
- package/cli/harness-dev.mjs +88 -0
- package/cli/lib/args.mjs +111 -0
- package/cli/lib/command-helpers.mjs +50 -0
- package/cli/lib/config-registry.mjs +329 -0
- package/cli/lib/constants.mjs +30 -0
- package/cli/lib/contract.mjs +306 -0
- package/cli/lib/detect-stack.mjs +235 -0
- package/cli/lib/errors.mjs +71 -0
- package/cli/lib/file-io.mjs +90 -0
- package/cli/lib/gates.mjs +492 -0
- package/cli/lib/git.mjs +144 -0
- package/cli/lib/help.mjs +246 -0
- package/cli/lib/modes.mjs +92 -0
- package/cli/lib/output.mjs +49 -0
- package/cli/lib/paths.mjs +75 -0
- package/cli/lib/phases.mjs +58 -0
- package/cli/lib/platform.mjs +78 -0
- package/cli/lib/progress.mjs +357 -0
- package/cli/lib/ralph-inner.mjs +314 -0
- package/cli/lib/ralph-outer.mjs +249 -0
- package/cli/lib/ralph-output.mjs +178 -0
- package/cli/lib/scaffold.mjs +431 -0
- package/cli/lib/schemas/stacks.json +477 -0
- package/cli/lib/state.mjs +333 -0
- package/cli/lib/templates.mjs +264 -0
- package/cli/lib/tool-registry.mjs +218 -0
- package/cli/lib/validate-schema.mjs +131 -0
- package/cli/lib/vars.mjs +114 -0
- package/package.json +50 -0
- package/schema/harness-config.schema.json +127 -0
- package/templates/AGENTS.md +63 -0
- package/templates/ci/github-actions.yml +78 -0
- package/templates/ci/gitlab-ci.yml +59 -0
- package/templates/docs/agents/evaluator.md +14 -0
- package/templates/docs/agents/generator.md +13 -0
- package/templates/docs/agents/planner.md +13 -0
- package/templates/docs/agents/simplifier.md +13 -0
- package/templates/docs/phases/build.md +41 -0
- package/templates/docs/phases/define.md +51 -0
- package/templates/docs/phases/plan.md +36 -0
- package/templates/docs/phases/review.md +42 -0
- package/templates/docs/phases/ship.md +43 -0
- package/templates/docs/phases/simplify.md +40 -0
- package/templates/docs/phases/verify.md +38 -0
- package/templates/evaluator-rubric.md +28 -0
- package/templates/init.ps1 +97 -0
- package/templates/init.sh +102 -0
- 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
|