infinity-harness 2.0.1 → 2.0.3
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/CHANGELOG.md +48 -4
- package/README.md +2 -2
- package/harness/docs/agents/generator.md +1 -1
- package/harness/docs/agents/simplifier.md +1 -1
- package/harness/docs/phases/build.md +6 -6
- package/harness/docs/phases/define.md +4 -4
- package/harness/docs/phases/plan.md +4 -4
- package/harness/docs/phases/review.md +5 -5
- package/harness/docs/phases/ship.md +5 -5
- package/harness/docs/phases/simplify.md +6 -6
- package/harness/docs/phases/verify.md +6 -6
- package/harness/skills/capability-acquisition.md +50 -48
- package/harness/skills/cli-design.md +2 -3
- package/harness/skills/resolving-merge-conflicts.md +1 -1
- package/harness/skills/stuck-protocol.md +1 -1
- package/package.json +1 -1
- package/src/core/brief.ts +12 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,50 @@ All notable changes to this project are documented here.
|
|
|
4
4
|
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow
|
|
5
5
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [2.0.3] — 2026-08-23
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **`npm test` failed in any project that had actually been used.** The surface guard added in 2.0.2
|
|
12
|
+
walked the filesystem for documents to check, so it also read the files the harness *writes* —
|
|
13
|
+
`harness/session-handoff.md`, `harness/.run-prompt.md` — which are git-ignored scratch carrying
|
|
14
|
+
whatever commands were current when they were generated. It now asks git what the repository
|
|
15
|
+
ships. A test that fails because you ran the tool is a test people turn off.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## [2.0.2] — 2026-08-23
|
|
20
|
+
|
|
21
|
+
Everything here is one bug: the package told people to run commands it does not have. 2.0.1 fixed
|
|
22
|
+
some of them; this fixes the rest, and adds the test that makes the whole class impossible.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- **Every brief ended by telling the model to run a command that does not exist.** The last thing
|
|
27
|
+
each brief said was `2. Run: harness validate` — a CLI that stopped existing when it was ported
|
|
28
|
+
into `src/`. The brief is injected at session start and after every phase change; the model read
|
|
29
|
+
that instruction, ran it, and got "command not found" every single turn. It now names the
|
|
30
|
+
`infinity_validate` tool, and `/infinity:validate` for the human.
|
|
31
|
+
- **Three phase docs referenced `infinity_status`, which is not a tool.** It is `/infinity:status`.
|
|
32
|
+
- **36 mechanical-rename artefacts across 11 shipped documents** — "Run `the infinity_validate tool`"
|
|
33
|
+
and friends, in the phase and role docs the brief points the agent at every phase.
|
|
34
|
+
- **`capability-acquisition.md` did not actually get rewritten in 2.0.1.** A `git rm` earlier in the
|
|
35
|
+
same command failed, `&&` short-circuited, and the heredoc that was supposed to replace the file
|
|
36
|
+
never ran — so 2.0.1 shipped the old text, still pointing at `infinity-harness capability add …`
|
|
37
|
+
and at MCP servers pi cannot use. Rewritten, and verified this time.
|
|
38
|
+
- **`cli-design.md` used `infinity-harness init` as its example error message.**
|
|
39
|
+
|
|
40
|
+
### Added
|
|
41
|
+
|
|
42
|
+
- **`tests/surface.test.ts`** — the guard for all of it. It parses the tools and commands the
|
|
43
|
+
extension actually registers, then holds every rendered brief and all 48 shipped documents to that
|
|
44
|
+
list: no `infinity_*` tool or `/infinity:*` command may be named unless it exists, nothing may
|
|
45
|
+
point at a command line this package does not have, and the rename artefact cannot come back. The
|
|
46
|
+
changelog is exempt — its job is to name what a release removed. It found four defects the moment
|
|
47
|
+
it was written.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
7
51
|
## [2.0.1] — 2026-08-23
|
|
8
52
|
|
|
9
53
|
### Fixed
|
|
@@ -72,10 +116,10 @@ changed, and the extension no longer depends on an external repository.
|
|
|
72
116
|
### Breaking
|
|
73
117
|
|
|
74
118
|
- **Package renamed** `pi-harness` → `infinity-harness`.
|
|
75
|
-
- **Tools renamed.** `harness_task_list` → `infinity_plan`, `
|
|
76
|
-
`
|
|
77
|
-
|
|
78
|
-
`
|
|
119
|
+
- **Tools renamed.** `harness_task_list` → `infinity_plan`, `pi_harness_remote`/`harness_remote` →
|
|
120
|
+
`infinity_dashboard`. New: `infinity_brief`, `infinity_validate`, `infinity_advance`. The goal-loop
|
|
121
|
+
and worker-spawn tools were not carried over — their modules ship but nothing registers them (see
|
|
122
|
+
the reachability guard in the `package` E2E scenario).
|
|
79
123
|
- **Commands renamed** to the `/infinity:*` namespace, and `/infinity:run` / `/infinity:halt` added.
|
|
80
124
|
- **The `cli`, `prompts` and `skills` symlinks are gone.** They pointed at absolute paths inside a
|
|
81
125
|
sibling `dev-harness` checkout, which made the package impossible to install anywhere else. The
|
package/README.md
CHANGED
|
@@ -270,7 +270,7 @@ infinity-harness/
|
|
|
270
270
|
│ ├── model-router.json optional routing
|
|
271
271
|
│ ├── docs/ architecture · decisions · phase and role docs
|
|
272
272
|
│ └── skills/ 28 craft skills the brief points at
|
|
273
|
-
├── tests/
|
|
273
|
+
├── tests/ 23 files, plain node:assert
|
|
274
274
|
└── scripts/run-tests.mjs
|
|
275
275
|
```
|
|
276
276
|
|
|
@@ -282,7 +282,7 @@ there is one implementation, and the adapter calls it.
|
|
|
282
282
|
```bash
|
|
283
283
|
npm install
|
|
284
284
|
npm run check # tsc --noEmit
|
|
285
|
-
npm test #
|
|
285
|
+
npm test # 23 test files
|
|
286
286
|
npm run e2e # end-to-end against a live model
|
|
287
287
|
```
|
|
288
288
|
|
|
@@ -10,4 +10,4 @@ You implement. You produce artifacts. You self-check.
|
|
|
10
10
|
- In BUILD: implement ONE task at a time, then validate
|
|
11
11
|
- In VERIFY: run the full test suite
|
|
12
12
|
- In SIMPLIFY: adopt the Simplifier persona (see simplifier.md)
|
|
13
|
-
- When done: call `
|
|
13
|
+
- When done: call `infinity_validate`
|
|
@@ -10,4 +10,4 @@ You refactor. You clean. You never change behavior.
|
|
|
10
10
|
- Break long functions (~40 line threshold)
|
|
11
11
|
- Rename unclear variables
|
|
12
12
|
- ⚠ All tests must still pass after your changes
|
|
13
|
-
- Run `
|
|
13
|
+
- Run `infinity_validate` after each feature to confirm gate
|
|
@@ -15,16 +15,16 @@ producing instructions for each. Validate after each task before advancing.
|
|
|
15
15
|
|
|
16
16
|
## Process
|
|
17
17
|
1. Read `harness/progress.md`, `AGENTS.md`, and `harness/features/feature-list.json`
|
|
18
|
-
2. Run `
|
|
18
|
+
2. Run `infinity_brief` to get the current task brief (feature, task, criteria)
|
|
19
19
|
3. For each incomplete feature → for each pending task:
|
|
20
20
|
a. Implement the task **test-first** (see `harness/skills/tdd.md`): failing
|
|
21
21
|
test → minimal code to pass → next slice
|
|
22
|
-
b. Run `
|
|
22
|
+
b. Run `infinity_validate` with `{feature, task}` to validate
|
|
23
23
|
c. If PASS → task marked complete, advance to next task
|
|
24
24
|
d. If FAIL → fix issues, re-validate (retry up to `retry.tasks.maxRetries`)
|
|
25
25
|
4. When all tasks in a feature pass → feature marked complete
|
|
26
26
|
5. When all features pass → phase gate passes
|
|
27
|
-
6. Run `
|
|
27
|
+
6. Run `infinity_advance` to advance to VERIFY
|
|
28
28
|
|
|
29
29
|
## Rationalizations to Avoid
|
|
30
30
|
| Excuse | Rebuttal |
|
|
@@ -39,9 +39,9 @@ producing instructions for each. Validate after each task before advancing.
|
|
|
39
39
|
- Tests that only test the implementation, not the behavior
|
|
40
40
|
|
|
41
41
|
## Verification
|
|
42
|
-
- [ ] Each task validated with `
|
|
42
|
+
- [ ] Each task validated with `infinity_validate` scoped to that feature and task
|
|
43
43
|
- [ ] All features marked `passes: true` in feature-list.json
|
|
44
|
-
- [ ] `
|
|
44
|
+
- [ ] `infinity_validate` passes (full phase gates)
|
|
45
45
|
|
|
46
46
|
## Handoff
|
|
47
|
-
On gate pass: `
|
|
47
|
+
On gate pass: `infinity_advance` (Generator → Evaluator for VERIFY)
|
|
@@ -33,8 +33,8 @@ feature list.
|
|
|
33
33
|
these criteria really prove the sprint worked?)
|
|
34
34
|
8. **Create a feature branch**: `git checkout -b feature/<short-slug>` (the
|
|
35
35
|
gate rejects work on main/master)
|
|
36
|
-
9. Run `
|
|
37
|
-
10. If PASS → `
|
|
36
|
+
9. Run `infinity_validate` to check gates
|
|
37
|
+
10. If PASS → `infinity_advance` to advance to PLAN
|
|
38
38
|
|
|
39
39
|
## Rationalizations to Avoid
|
|
40
40
|
| Excuse | Rebuttal |
|
|
@@ -52,7 +52,7 @@ feature list.
|
|
|
52
52
|
- [ ] Sprint contract agreed with non-placeholder verification criteria
|
|
53
53
|
- [ ] On a feature branch (not main/master)
|
|
54
54
|
- [ ] Folder structure agreed and documented
|
|
55
|
-
- [ ] `
|
|
55
|
+
- [ ] `infinity_validate` passes
|
|
56
56
|
|
|
57
57
|
## Handoff
|
|
58
|
-
On gate pass: `
|
|
58
|
+
On gate pass: `infinity_advance` (Planner → continues as Planner for PLAN)
|
|
@@ -23,8 +23,8 @@ a unit of work that BUILD can implement and VERIFY can validate independently.
|
|
|
23
23
|
needs `definitionOfDone` (user-visible outcomes). Gates reject
|
|
24
24
|
placeholders.
|
|
25
25
|
5. Commit the plan (`git commit -am "plan: feature list"`)
|
|
26
|
-
6. Run `
|
|
27
|
-
7. If PASS → `
|
|
26
|
+
6. Run `infinity_validate` to check gates
|
|
27
|
+
7. If PASS → `infinity_advance` to advance to BUILD
|
|
28
28
|
|
|
29
29
|
> The sprint contract was agreed in DEFINE. If PLAN reveals the scope was
|
|
30
30
|
> wrong, renegotiate it now (`contract propose` → `contract review`) — not
|
|
@@ -44,7 +44,7 @@ a unit of work that BUILD can implement and VERIFY can validate independently.
|
|
|
44
44
|
## Verification
|
|
45
45
|
- [ ] `feature-list.json` exists with features and tasks
|
|
46
46
|
- [ ] Sprint contract proposed and agreed
|
|
47
|
-
- [ ] `
|
|
47
|
+
- [ ] `infinity_validate` passes
|
|
48
48
|
|
|
49
49
|
## Handoff
|
|
50
|
-
On gate pass: `
|
|
50
|
+
On gate pass: `infinity_advance` (Planner → Generator for BUILD)
|
|
@@ -14,7 +14,7 @@ up-to-date with upstream.
|
|
|
14
14
|
|
|
15
15
|
## Process
|
|
16
16
|
1. Read `harness/progress.md`, `AGENTS.md`, and `harness/evaluator-rubric.md`
|
|
17
|
-
2. Run `
|
|
17
|
+
2. Run `/infinity:status` to see current state
|
|
18
18
|
3. Run the two-axis review from `harness/skills/code-review.md`:
|
|
19
19
|
spec axis (against `specs/prd.md` + sprint contract + acceptance criteria)
|
|
20
20
|
and standards axis (repo conventions + smell baseline). Fix what's real.
|
|
@@ -22,8 +22,8 @@ up-to-date with upstream.
|
|
|
22
22
|
- Architecture, test coverage, code quality, documentation, performance, security
|
|
23
23
|
5. Check documentation: README.md, CHANGELOG.md, architecture docs
|
|
24
24
|
6. Ensure branch is up-to-date: `git push` if needed
|
|
25
|
-
7. Run `
|
|
26
|
-
8. If PASS → `
|
|
25
|
+
7. Run `infinity_validate` to check gates
|
|
26
|
+
8. If PASS → `infinity_advance` to advance to SHIP
|
|
27
27
|
|
|
28
28
|
## Rationalizations to Avoid
|
|
29
29
|
| Excuse | Rebuttal |
|
|
@@ -41,7 +41,7 @@ up-to-date with upstream.
|
|
|
41
41
|
- [ ] Evaluator rubric score >= 8/12
|
|
42
42
|
- [ ] README.md, CHANGELOG.md exist and are current
|
|
43
43
|
- [ ] Branch up-to-date with upstream
|
|
44
|
-
- [ ] `
|
|
44
|
+
- [ ] `infinity_validate` passes
|
|
45
45
|
|
|
46
46
|
## Handoff
|
|
47
|
-
On gate pass: `
|
|
47
|
+
On gate pass: `infinity_advance` (Evaluator → Generator for SHIP)
|
|
@@ -10,13 +10,13 @@ clean working tree, and ensure all ship gates pass.
|
|
|
10
10
|
|
|
11
11
|
## Process
|
|
12
12
|
1. Read `harness/progress.md` and `AGENTS.md`
|
|
13
|
-
2. Run `
|
|
13
|
+
2. Run `/infinity:status` to see current state
|
|
14
14
|
3. Finalize `CHANGELOG.md` with version, date, and changes
|
|
15
15
|
4. Verify working tree is clean: `git status`
|
|
16
16
|
5. Create version tag: `git tag v<version>`
|
|
17
17
|
6. Ensure LICENSE, CONTRIBUTING.md exist
|
|
18
|
-
7. Run `
|
|
19
|
-
8. If PASS → `
|
|
18
|
+
7. Run `infinity_validate` to check ship gates
|
|
19
|
+
8. If PASS → `infinity_advance` (pipeline complete!)
|
|
20
20
|
9. Create checkpoint: `infinity-harness checkpoint create release-<version>`
|
|
21
21
|
|
|
22
22
|
## Rationalizations to Avoid
|
|
@@ -37,7 +37,7 @@ clean working tree, and ensure all ship gates pass.
|
|
|
37
37
|
- [ ] Version tag created: `git tag -l "v*"`
|
|
38
38
|
- [ ] CHANGELOG.md updated with version + changes
|
|
39
39
|
- [ ] README.md, LICENSE, CONTRIBUTING.md exist
|
|
40
|
-
- [ ] `
|
|
40
|
+
- [ ] `infinity_validate` passes
|
|
41
41
|
|
|
42
42
|
## Handoff
|
|
43
|
-
On gate pass: Pipeline complete! `
|
|
43
|
+
On gate pass: Pipeline complete! `/infinity:status` shows "Pipeline complete".
|
|
@@ -14,14 +14,14 @@ duplicates, flatten deep nesting, and ensure tests still pass after changes.
|
|
|
14
14
|
|
|
15
15
|
## Process
|
|
16
16
|
1. Read `harness/progress.md` and `AGENTS.md`
|
|
17
|
-
2. Run `
|
|
17
|
+
2. Run `infinity_brief` to see the current step
|
|
18
18
|
3. For each feature:
|
|
19
19
|
a. Review code for: code smells, deep nesting, DRY violations, dead code
|
|
20
20
|
b. Simplify: consolidate duplicate logic, flatten conditionals, remove unused
|
|
21
21
|
c. Run `npm test` to ensure tests still pass after simplification
|
|
22
|
-
d. Run `
|
|
23
|
-
4. When all features simplified → run `
|
|
24
|
-
5. If PASS → `
|
|
22
|
+
d. Run `infinity_validate` with `{feature, task}` per task
|
|
23
|
+
4. When all features simplified → run `infinity_validate` (full phase)
|
|
24
|
+
5. If PASS → `infinity_advance` to advance to REVIEW
|
|
25
25
|
|
|
26
26
|
## Rationalizations to Avoid
|
|
27
27
|
| Excuse | Rebuttal |
|
|
@@ -39,7 +39,7 @@ duplicates, flatten deep nesting, and ensure tests still pass after changes.
|
|
|
39
39
|
- [ ] Code smells reduced (subjective — use judgment)
|
|
40
40
|
- [ ] No new dead code introduced
|
|
41
41
|
- [ ] Tests still pass: `npm test`
|
|
42
|
-
- [ ] `
|
|
42
|
+
- [ ] `infinity_validate` passes
|
|
43
43
|
|
|
44
44
|
## Handoff
|
|
45
|
-
On gate pass: `
|
|
45
|
+
On gate pass: `infinity_advance` (Simplifier → Evaluator for REVIEW)
|
|
@@ -14,15 +14,15 @@ role runs tests, checks coverage, and validates behavior against the PRD.
|
|
|
14
14
|
|
|
15
15
|
## Process
|
|
16
16
|
1. Read `harness/progress.md`, `AGENTS.md`, and `specs/prd.md`
|
|
17
|
-
2. Run `
|
|
17
|
+
2. Run `infinity_brief` to see the current verification step
|
|
18
18
|
3. For each feature:
|
|
19
19
|
a. Run the test suite: `npm test`
|
|
20
20
|
b. Check coverage: `{{coverageCmd}}` (if coverage gate enabled)
|
|
21
21
|
c. Verify behavior matches acceptance criteria from PRD
|
|
22
|
-
d. Run `
|
|
22
|
+
d. Run `infinity_validate` with `{feature, task}` per task
|
|
23
23
|
4. If any task fails → fix and re-validate (retry)
|
|
24
|
-
5. When all features verified → run `
|
|
25
|
-
6. If PASS → `
|
|
24
|
+
5. When all features verified → run `infinity_validate` (full phase)
|
|
25
|
+
6. If PASS → `infinity_advance` to advance to SIMPLIFY or REVIEW
|
|
26
26
|
|
|
27
27
|
## Rationalizations to Avoid
|
|
28
28
|
| Excuse | Rebuttal |
|
|
@@ -40,7 +40,7 @@ role runs tests, checks coverage, and validates behavior against the PRD.
|
|
|
40
40
|
- [ ] All tests pass: `npm test`
|
|
41
41
|
- [ ] Coverage meets threshold (if gate enabled)
|
|
42
42
|
- [ ] Behavior matches PRD acceptance criteria
|
|
43
|
-
- [ ] `
|
|
43
|
+
- [ ] `infinity_validate` passes
|
|
44
44
|
|
|
45
45
|
## Handoff
|
|
46
|
-
On gate pass: `
|
|
46
|
+
On gate pass: `infinity_advance` (Evaluator → Simplifier for SIMPLIFY, or Evaluator for REVIEW)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: capability-acquisition
|
|
3
|
-
description: The capability ladder — HAVE, ACQUIRE, CREATE, KEEP — for skills,
|
|
4
|
-
tags: [meta, capability, acquire, search, skill,
|
|
5
|
-
when: a task needs knowledge,
|
|
3
|
+
description: The capability ladder — HAVE, ACQUIRE, CREATE, KEEP — for skills, extensions and project scripts
|
|
4
|
+
tags: [meta, capability, acquire, search, skill, extension, tool, script, ladder, library]
|
|
5
|
+
when: a task needs knowledge, an integration, or an executable the project lacks
|
|
6
6
|
phases: []
|
|
7
7
|
kind: meta
|
|
8
8
|
provenance: { origin: built-in }
|
|
@@ -10,64 +10,66 @@ provenance: { origin: built-in }
|
|
|
10
10
|
|
|
11
11
|
# Capability Acquisition — The Ladder
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
The task needs something you do not have. Work the ladder in order, and leave
|
|
14
|
+
the result behind so the next task starts one rung higher.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
pi has three kinds of capability. Pick the right shape first — most wasted
|
|
17
|
+
effort here is building the wrong one.
|
|
17
18
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
| You need | Build | Lives in |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| Knowledge or method — how to do X well | a **skill** | `.pi/skills/<name>.md` |
|
|
22
|
+
| A repeatable action — reset fixtures, run a codemod | a **script** | the repo, run through bash |
|
|
23
|
+
| A tool the model can call, or a slash command | an **extension** | its own package, `pi install`ed |
|
|
24
|
+
| A fact — does API X support Y? | neither | `research.md`, written into `harness/docs/` |
|
|
23
25
|
|
|
24
|
-
##
|
|
26
|
+
## 1 — HAVE: check before you build
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
the
|
|
28
|
-
|
|
28
|
+
- **Skills already loaded.** This package ships 28. The brief names the ones
|
|
29
|
+
that match the current task; `/skill:<name>` invokes any of them.
|
|
30
|
+
- **Scripts already in the repo.** `package.json` scripts, `Makefile`,
|
|
31
|
+
`scripts/`. Read before you write — the thing you are about to build is
|
|
32
|
+
often already there under a name you did not guess.
|
|
33
|
+
- **Extensions already installed.** `pi list`.
|
|
29
34
|
|
|
30
|
-
|
|
31
|
-
GitHub, crates, …). Browse-only sources are listed after — use them only
|
|
32
|
-
if you have web access.
|
|
35
|
+
## 2 — ACQUIRE: take what exists
|
|
33
36
|
|
|
34
|
-
**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
- **A skill** is plain markdown. Copy one in, then *adapt* it: trim to the
|
|
38
|
+
useful core, re-point its references at this project's surfaces, and add an
|
|
39
|
+
attribution line naming the source and its licence.
|
|
40
|
+
- **An extension**: `pi install npm:<pkg> -l` (project-local, so the team gets
|
|
41
|
+
it through `.pi/settings.json`) or `pi install git:<host>/<repo>`. Pin the
|
|
42
|
+
version, and read what it registers before you trust it.
|
|
39
43
|
|
|
40
|
-
**
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
**Choosing among candidates**, in order: actively maintained → widely used →
|
|
45
|
+
permissive licence (MIT/Apache/BSD) → small and composable. Never adopt
|
|
46
|
+
something that wants to own the whole process — the harness owns the process.
|
|
43
47
|
|
|
44
|
-
|
|
45
|
-
infinity-harness capability add skill <path> --from <url>
|
|
46
|
-
infinity-harness capability add mcp <name> --command npx --args -y,<pkg>@<exact-version> \
|
|
47
|
-
--tags ... --description "..." --trust curated
|
|
48
|
-
infinity-harness capability add tool <file> --run "..." --tags ... --description "..."
|
|
49
|
-
```
|
|
48
|
+
## 3 — CREATE: nothing usable exists
|
|
50
49
|
|
|
51
|
-
**
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
- **A skill** → write it per `writing-skills.md` into `.pi/skills/<name>.md`.
|
|
51
|
+
pi loads it on the next start. There is nothing to register.
|
|
52
|
+
- **A script** → build it per `building-tools.md`, and name it where a cold
|
|
53
|
+
reader will look (`AGENTS.md`, or `package.json` scripts).
|
|
54
|
+
- **An extension** → only when the capability has to be a tool the model calls
|
|
55
|
+
or a slash command. It is a package with a `pi.extensions` entry;
|
|
56
|
+
`pi install ./<dir> -l` loads it straight from a checkout.
|
|
54
57
|
|
|
55
|
-
##
|
|
58
|
+
## 4 — KEEP: or you will do this again
|
|
56
59
|
|
|
57
|
-
|
|
58
|
-
infinity-harness capability create skill|tool|mcp <name>
|
|
59
|
-
```
|
|
60
|
+
A capability that lives only in this session is not a capability.
|
|
60
61
|
|
|
61
|
-
- skill
|
|
62
|
-
|
|
63
|
-
-
|
|
64
|
-
|
|
62
|
+
- **Commit it.** A skill in `.pi/skills/` and a script in the repo both travel
|
|
63
|
+
with the project.
|
|
64
|
+
- **Make it findable.** Tags in a skill's frontmatter are how the brief
|
|
65
|
+
surfaces it later; a script nobody can find is a script nobody runs.
|
|
65
66
|
|
|
66
|
-
##
|
|
67
|
+
## 5 — Budget: never block the pipeline
|
|
67
68
|
|
|
68
|
-
Acquisition fits
|
|
69
|
+
Acquisition fits inside one working session. If it does not conclude, or you
|
|
69
70
|
have no network:
|
|
70
71
|
|
|
71
|
-
1. Record the gap
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
1. Record the gap in `harness/lessons-decisions.md` — what was needed, what
|
|
73
|
+
you tried, what you would try next.
|
|
74
|
+
2. Carry on with general best practice. A missing skill is not a blocked task,
|
|
75
|
+
and it is never a reason to mark work complete that is not.
|
|
@@ -31,9 +31,8 @@ provenance: { origin: built-in }
|
|
|
31
31
|
consistently; flags kebab-case with `--long` forms; `-` means stdin/
|
|
32
32
|
stdout where files are expected; respect `NO_COLOR` and non-TTY (no
|
|
33
33
|
spinners into pipes).
|
|
34
|
-
- **Errors say what + why + what next:** `✗ config not found:
|
|
35
|
-
|
|
36
|
-
for an expected failure.
|
|
34
|
+
- **Errors say what + why + what next:** `✗ config not found: ./app.config.json
|
|
35
|
+
— run: myapp init`. Never a bare stack trace for an expected failure.
|
|
37
36
|
- **Fast startup matters.** A CLI invoked in loops pays its startup cost
|
|
38
37
|
×N — lazy-load heavy imports per subcommand.
|
|
39
38
|
|
|
@@ -24,7 +24,7 @@ provenance: { origin: "mattpocock/skills", license: MIT, adapted: true }
|
|
|
24
24
|
trade-off. Do **not** invent new behaviour. Always resolve; never
|
|
25
25
|
`--abort`.
|
|
26
26
|
4. **Run the project's automated checks** — typecheck, then tests, then
|
|
27
|
-
lint (`
|
|
27
|
+
lint (`infinity_validate` runs the configured set). Fix anything the
|
|
28
28
|
merge broke.
|
|
29
29
|
5. **Finish the merge/rebase.** Stage everything and commit. If rebasing,
|
|
30
30
|
continue until all commits are rebased. Record anything surprising:
|
|
@@ -29,7 +29,7 @@ catch any of these tells:
|
|
|
29
29
|
what you're trying to achieve, the exact error/failure, the attempts
|
|
30
30
|
made, and what each attempt ruled out. Writing this usually exposes the
|
|
31
31
|
gap — half the time you solve it here.
|
|
32
|
-
2. **Re-read the brief and the skill** (`
|
|
32
|
+
2. **Re-read the brief and the skill** (`infinity_brief`; the skill it
|
|
33
33
|
references). Stuck often means a constraint was missed, not that the
|
|
34
34
|
problem is hard.
|
|
35
35
|
3. **Reframe ONCE** — one genuinely different angle, not a variation:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "infinity-harness",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "A pi agent extension that runs a gated build pipeline unattended \u2014 enforces phases, validates with deterministic gates, and keeps working for hours or days without losing the plan.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
package/src/core/brief.ts
CHANGED
|
@@ -24,6 +24,16 @@ import * as P from "./paths.ts";
|
|
|
24
24
|
import { readText } from "./fsx.ts";
|
|
25
25
|
import { loadSkills, matchSkills } from "./skills.ts";
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* What the agent calls to have its work judged.
|
|
29
|
+
*
|
|
30
|
+
* This said `harness validate` for a long time — a command line that has not
|
|
31
|
+
* existed since the CLI was ported into `src/`. A brief that ends by telling
|
|
32
|
+
* the model to run a command that does not exist is a brief that ends in a
|
|
33
|
+
* failed shell call and a confused retry, every single turn.
|
|
34
|
+
*/
|
|
35
|
+
const VALIDATE_TOOL = "infinity_validate";
|
|
36
|
+
|
|
27
37
|
/**
|
|
28
38
|
* Two is the number that gets read. One hides a better match; five is a
|
|
29
39
|
* reading list, and a reading list is a thing you skip.
|
|
@@ -95,7 +105,7 @@ export async function buildBrief(targetDir: string, options: BuildBriefOptions =
|
|
|
95
105
|
}
|
|
96
106
|
: null,
|
|
97
107
|
criteria: collectCriteria(feature, nextTask?.criteria),
|
|
98
|
-
validateCommand:
|
|
108
|
+
validateCommand: VALIDATE_TOOL,
|
|
99
109
|
gate,
|
|
100
110
|
progress: {
|
|
101
111
|
tasksDone: progress.tasksDone,
|
|
@@ -252,7 +262,7 @@ export function renderBrief(brief: Brief, config?: HarnessConfig): string {
|
|
|
252
262
|
L.push("");
|
|
253
263
|
L.push("THE LOOP");
|
|
254
264
|
L.push(" 1. Do the work described above.");
|
|
255
|
-
L.push(` 2.
|
|
265
|
+
L.push(` 2. Call the ${brief.validateCommand} tool (a human types /infinity:validate).`);
|
|
256
266
|
L.push(" 3. FAIL → fix the listed checks and validate again.");
|
|
257
267
|
L.push(" 4. PASS → the harness advances the phase and issues the next brief.");
|
|
258
268
|
L.push("");
|