uni-harness 0.1.1 → 0.1.2
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: harness-init
|
|
3
|
-
description: Scan the repository
|
|
3
|
+
description: Scan the repository to fill in the PROJECT section of CLAUDE.md and .harness/commands.env, and propose initial RULES/ANTI-PATTERNS. Run once right after installing the harness, or whenever CLAUDE.md is still in placeholder state. Verifies detected commands by actually running them before applying. If the repo has no project code yet (greenfield), offers to scaffold a minimal project so the sensors start active from the first line of code.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Harness Init — Initialize the Harness by Scanning the Repo
|
|
@@ -16,9 +16,11 @@ running them.
|
|
|
16
16
|
the project. Never let it drive language detection, and never propose the
|
|
17
17
|
kit's self-test (`harness/tests/test_hooks.sh`) as the project's TEST_CMD:
|
|
18
18
|
it verifies the harness, not the user's code, and pointing the stop gate
|
|
19
|
-
at it would "pass" every turn regardless of what broke.
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
at it would "pass" every turn regardless of what broke.
|
|
20
|
+
- The scan decides which mode you are in: project code exists → continue
|
|
21
|
+
with Step 2 (and the brownfield section if the project predates the
|
|
22
|
+
harness). Nothing but harness files → switch to the **New Projects
|
|
23
|
+
(greenfield)** section below. Do not stop at "nothing to configure".
|
|
22
24
|
- Language/version: from manifests (package.json, pyproject.toml, go.mod,
|
|
23
25
|
Cargo.toml, *.csproj, ...). Prefer versions pinned in lockfiles/config.
|
|
24
26
|
- BUILD / TEST / LINT candidates: collect from manifest scripts, Makefile,
|
|
@@ -46,6 +48,32 @@ running them.
|
|
|
46
48
|
truisms ("write good code") are forbidden — only things observable in
|
|
47
49
|
this repository.
|
|
48
50
|
|
|
51
|
+
## New Projects (greenfield — the harness was installed before any code)
|
|
52
|
+
|
|
53
|
+
If the scan finds no project code at all (no manifest, no sources, no CI),
|
|
54
|
+
the user is starting a project *with* the harness — the whole point is
|
|
55
|
+
that sensors guard the very first code written. Ending with "come back
|
|
56
|
+
later" leaves them off during the riskiest phase. Instead, offer to
|
|
57
|
+
bootstrap:
|
|
58
|
+
|
|
59
|
+
1. **Ask, don't guess:** what is being built, which language/runtime,
|
|
60
|
+
which framework and test runner (offer the ecosystem defaults, e.g.
|
|
61
|
+
pytest / vitest / go test).
|
|
62
|
+
2. **Propose a minimal scaffold** and apply it only after approval: the
|
|
63
|
+
manifest (package.json / pyproject.toml / go.mod ...), a source entry
|
|
64
|
+
point, a test setup with **one real passing test**, and a
|
|
65
|
+
linter/formatter config if the ecosystem has a standard one. Announce
|
|
66
|
+
any dependency installs with the reason before running them.
|
|
67
|
+
3. If it is not a git repository, offer `git init` (the guard hooks and
|
|
68
|
+
future ANTI-PATTERNS mining assume git history).
|
|
69
|
+
4. Then continue with Step 2 exactly as usual: run the scaffold's
|
|
70
|
+
BUILD/TEST/LINT commands, confirm they pass, and fill CLAUDE.md and
|
|
71
|
+
commands.env with the **verified** commands.
|
|
72
|
+
|
|
73
|
+
The exit criterion for greenfield: sensors ACTIVE against a real (if tiny)
|
|
74
|
+
test suite. If the user declines the scaffold, leave everything blank as
|
|
75
|
+
before and tell them to re-run /harness-init once code exists.
|
|
76
|
+
|
|
49
77
|
## Existing Projects (brownfield)
|
|
50
78
|
|
|
51
79
|
- If CLAUDE.md existed before the harness was installed, never replace it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uni-harness",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Agent harness kit for Claude Code — installs verification sensors, destructive-command guards, checkpoint recovery, observability logs, and ratchet skills into your project",
|
|
5
5
|
"bin": {
|
|
6
6
|
"uni-harness": "bin/cli.js"
|