ultimate-pi 0.20.0 → 0.22.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.
- package/.agents/skills/harness-context/SKILL.md +3 -3
- package/.agents/skills/harness-debate-plan/SKILL.md +2 -2
- package/.agents/skills/harness-decisions/SKILL.md +68 -2
- package/.agents/skills/harness-eval/SKILL.md +1 -1
- package/.agents/skills/harness-git-commit/SKILL.md +72 -0
- package/.agents/skills/harness-governor/SKILL.md +6 -6
- package/.agents/skills/harness-ls-lint-setup/SKILL.md +59 -0
- package/.agents/skills/harness-orchestration/SKILL.md +4 -4
- package/.agents/skills/harness-plan/SKILL.md +14 -12
- package/.agents/skills/harness-review/SKILL.md +3 -3
- package/.agents/skills/harness-sentrux-repair/SKILL.md +48 -0
- package/.agents/skills/harness-sentrux-setup/SKILL.md +2 -2
- package/.agents/skills/harness-spec/SKILL.md +1 -1
- package/.agents/skills/harness-steer/SKILL.md +2 -2
- package/.agents/skills/posthog-analyst/SKILL.md +1 -1
- package/.agents/skills/sentrux/SKILL.md +6 -4
- package/.agents/skills/web-retrieval/SKILL.md +1 -1
- package/.agents/skills/wiki-save/SKILL.md +1 -1
- package/.pi/PACKAGING.md +6 -0
- package/.pi/SYSTEM.md +21 -3
- package/.pi/agents/harness/ls-lint-steward.md +49 -0
- package/.pi/agents/harness/planning/decompose.md +5 -5
- package/.pi/agents/harness/planning/execution-plan-author.md +1 -1
- package/.pi/agents/harness/planning/hypothesis-validator.md +1 -1
- package/.pi/agents/harness/planning/hypothesis.md +1 -1
- package/.pi/agents/harness/planning/plan-adversary.md +1 -1
- package/.pi/agents/harness/planning/plan-evaluator.md +2 -2
- package/.pi/agents/harness/planning/plan-synthesizer.md +2 -2
- package/.pi/agents/harness/planning/review-integrator.md +1 -1
- package/.pi/agents/harness/planning/sprint-contract-auditor.md +5 -5
- package/.pi/agents/harness/reviewing/evaluator.md +1 -1
- package/.pi/agents/harness/running/executor.md +2 -2
- package/.pi/agents/harness/sentrux-repair-advisor.md +50 -0
- package/.pi/agents/harness/sentrux-steward.md +2 -2
- package/.pi/agents/pi-pi/prompt-expert.md +17 -2
- package/.pi/auto-commit.json +9 -2
- package/.pi/extensions/debate-orchestrator.ts +3 -0
- package/.pi/extensions/harness-anchored-edit.ts +7 -9
- package/.pi/extensions/harness-ask-user.ts +13 -34
- package/.pi/extensions/harness-debate-tools.ts +43 -4
- package/.pi/extensions/harness-live-widget.ts +28 -19
- package/.pi/extensions/harness-run-context.ts +278 -115
- package/.pi/extensions/harness-web-tools.ts +598 -471
- package/.pi/extensions/ls-lint-rules-sync.ts +103 -0
- package/.pi/extensions/observation-bus.ts +4 -0
- package/.pi/extensions/policy-gate.ts +270 -229
- package/.pi/extensions/sentrux-rules-sync.ts +2 -0
- package/.pi/extensions/soundboard.ts +48 -48
- package/.pi/harness/README.md +4 -0
- package/.pi/harness/agents.manifest.json +24 -16
- package/.pi/harness/agents.policy.yaml +49 -82
- package/.pi/harness/docs/adrs/0052-ls-lint-naming-lifecycle.md +45 -0
- package/.pi/harness/docs/adrs/0052-sentrux-structured-repair.md +38 -0
- package/.pi/harness/docs/adrs/0053-plan-task-clarification-gate.md +39 -0
- package/.pi/harness/docs/adrs/0054-harness-native-ask-user.md +40 -0
- package/.pi/harness/docs/adrs/0055-auto-commit-coauthor-lifecycle.md +40 -0
- package/.pi/harness/docs/adrs/README.md +5 -0
- package/.pi/harness/docs/practice-map.md +10 -5
- package/.pi/harness/evals/smoke/ls-lint-stub.json +10 -0
- package/.pi/harness/evolution/self-healing-rules.json +16 -0
- package/.pi/harness/ls-lint/naming.manifest.json +128 -0
- package/.pi/harness/sentrux/architecture.manifest.json +1 -1
- package/.pi/harness/specs/auto-commit.schema.json +63 -0
- package/.pi/harness/specs/ls-lint-manifest-proposal.schema.json +80 -0
- package/.pi/harness/specs/ls-lint-signal.schema.json +47 -0
- package/.pi/harness/specs/naming-manifest.schema.json +54 -0
- package/.pi/harness/specs/plan-task-clarification.schema.json +88 -0
- package/.pi/harness/specs/sentrux-diagnostics.schema.json +173 -0
- package/.pi/harness/specs/sentrux-repair-plan.schema.json +133 -0
- package/.pi/harness/specs/sentrux-report.schema.json +119 -0
- package/.pi/harness/specs/sentrux-signal.schema.json +34 -1
- package/.pi/lib/agents-policy.d.mts +26 -51
- package/.pi/lib/agents-policy.mjs +41 -28
- package/.pi/lib/agt/build-evaluation-context.ts +136 -64
- package/.pi/lib/ask-user/constants.mjs +3 -0
- package/.pi/lib/ask-user/constants.ts +4 -0
- package/.pi/lib/ask-user/contracts/glimpse-parse.ts +56 -0
- package/.pi/lib/ask-user/contracts/glimpse-payload-build.ts +58 -0
- package/.pi/lib/ask-user/contracts/glimpse-payload.ts +38 -0
- package/.pi/lib/ask-user/core/questionnaire.ts +74 -0
- package/.pi/lib/ask-user/dialog.ts +2 -314
- package/.pi/lib/ask-user/fallback.ts +2 -78
- package/.pi/lib/ask-user/format.ts +85 -0
- package/.pi/lib/ask-user/glimpseui.d.ts +10 -0
- package/.pi/lib/ask-user/index.ts +114 -0
- package/.pi/lib/ask-user/merge-task-clarification.ts +98 -0
- package/.pi/lib/ask-user/policy.mjs +43 -0
- package/.pi/lib/ask-user/policy.ts +104 -0
- package/.pi/lib/ask-user/presenters/glimpse.ts +130 -0
- package/.pi/lib/ask-user/presenters/headless.ts +131 -0
- package/.pi/lib/ask-user/presenters/select.ts +60 -0
- package/.pi/lib/ask-user/presenters/tui.ts +373 -0
- package/.pi/lib/ask-user/presenters/types.ts +13 -0
- package/.pi/lib/ask-user/render.ts +40 -9
- package/.pi/lib/ask-user/schema.ts +66 -13
- package/.pi/lib/ask-user/types.ts +60 -3
- package/.pi/lib/ask-user/validate-core.mjs +193 -7
- package/.pi/lib/ask-user/validate.ts +53 -34
- package/.pi/lib/harness-anchored-edit/package.json +3 -0
- package/.pi/lib/harness-artifact-gate.ts +75 -21
- package/.pi/lib/harness-auto-commit-config.mjs +321 -0
- package/.pi/lib/harness-lens/clients/lsp/client.ts +62 -39
- package/.pi/lib/harness-lens/clients/tool-policy.ts +73 -181
- package/.pi/lib/harness-lens/index.ts +241 -108
- package/.pi/lib/harness-lens/tools/lsp-navigation.ts +10 -8
- package/.pi/lib/harness-repair-brief.ts +84 -25
- package/.pi/lib/harness-run-context.ts +42 -52
- package/.pi/lib/harness-sentrux-parse.mjs +272 -0
- package/.pi/lib/harness-sentrux-root.mjs +78 -0
- package/.pi/lib/harness-slash-completions.ts +116 -0
- package/.pi/lib/harness-spawn-topology.ts +121 -87
- package/.pi/lib/harness-subagent-submit-registry.ts +10 -0
- package/.pi/lib/harness-subagents-bridge.ts +4 -1
- package/.pi/lib/harness-ui-state.ts +95 -48
- package/.pi/lib/plan-approval/dialog.ts +5 -0
- package/.pi/lib/plan-approval/validate.ts +1 -1
- package/.pi/lib/plan-approval-readiness.ts +32 -0
- package/.pi/lib/plan-debate-gate.ts +154 -114
- package/.pi/lib/plan-task-clarification.ts +158 -0
- package/.pi/prompts/harness-auto.md +2 -2
- package/.pi/prompts/harness-ls-lint-steward.md +43 -0
- package/.pi/prompts/harness-plan.md +63 -13
- package/.pi/prompts/harness-review.md +44 -10
- package/.pi/prompts/harness-run.md +35 -13
- package/.pi/prompts/harness-sentrux-steward.md +2 -2
- package/.pi/prompts/harness-setup.md +74 -5
- package/.pi/prompts/harness-steer.md +6 -5
- package/.pi/prompts/wiki-save.md +5 -4
- package/.pi/scripts/README.md +8 -0
- package/.pi/scripts/generate-agents-policy-yaml.mjs +14 -2
- package/.pi/scripts/harness-auto-commit-bootstrap.mjs +96 -0
- package/.pi/scripts/harness-cli-verify.sh +47 -0
- package/.pi/scripts/harness-git-churn.mjs +77 -0
- package/.pi/scripts/harness-git-commit.mjs +173 -0
- package/.pi/scripts/harness-ls-lint-bootstrap.mjs +142 -0
- package/.pi/scripts/harness-ls-lint-cli.mjs +184 -0
- package/.pi/scripts/harness-seed-project-contracts.mjs +47 -0
- package/.pi/scripts/harness-sentrux-diagnostics.mjs +230 -0
- package/.pi/scripts/harness-sentrux-report.mjs +256 -0
- package/.pi/scripts/harness-verify.mjs +361 -125
- package/.pi/scripts/ls-lint-rules-sync.mjs +265 -0
- package/.pi/scripts/run-tests.mjs +1 -0
- package/.pi/settings.example.json +1 -0
- package/.sentrux/rules.toml +1 -1
- package/AGENTS.md +2 -0
- package/CHANGELOG.md +32 -0
- package/README.md +13 -4
- package/package.json +13 -6
- package/vendor/pi-vcc/src/hooks/before-compact.ts +86 -60
|
@@ -8,7 +8,7 @@ description: Compile task-specific harness context using context-mode and graphi
|
|
|
8
8
|
## When to use
|
|
9
9
|
|
|
10
10
|
- Preparing context for `/harness-plan`, `/harness-run`, or `/harness-auto`
|
|
11
|
-
- Navigating harness-related code and
|
|
11
|
+
- Navigating harness-related code and governance decisions without reading entire repos
|
|
12
12
|
|
|
13
13
|
## Mandatory: context-mode only
|
|
14
14
|
|
|
@@ -25,7 +25,7 @@ Use these in rough priority order — not every tool on every task:
|
|
|
25
25
|
| Structural code patterns | `sg -p '…'` (ast-grep) |
|
|
26
26
|
| Semantic implementation search | `ccc search` (harness pre-indexes before subprocess spawns) |
|
|
27
27
|
| File detail | context-mode maps/signatures, then targeted reads |
|
|
28
|
-
| Harness governance |
|
|
28
|
+
| Harness governance | approved policies and decision logs in the target project |
|
|
29
29
|
|
|
30
30
|
For `/harness-plan` Phase 1, parent compiles findings into `artifacts/planning-context.yaml` — see **harness-plan** skill.
|
|
31
31
|
|
|
@@ -33,7 +33,7 @@ For `/harness-plan` Phase 1, parent compiles findings into `artifacts/planning-c
|
|
|
33
33
|
|
|
34
34
|
Compact context block:
|
|
35
35
|
|
|
36
|
-
- Relevant
|
|
36
|
+
- Relevant governance decisions (id/title + one-line decision)
|
|
37
37
|
- Extension entry points (policy-gate, trace-recorder, harness-telemetry)
|
|
38
38
|
- Schema versions in play
|
|
39
39
|
|
|
@@ -5,7 +5,7 @@ description: Plan-phase Review Gate debate — pi-messenger threads, lane YAML,
|
|
|
5
5
|
|
|
6
6
|
# harness-debate-plan
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Review Gate RACI: parent is chair; lane agents provide structured evidence in sequence.
|
|
9
9
|
|
|
10
10
|
Use when running **Phase 5** of `/harness-plan` — **Fagan-style structured inspection** per focus (`spec` | `wbs` | `schedule` | `quality`). Parent is **chair**; within-round dialogue (claims → rebuttals → clarifications → counters → integrate).
|
|
11
11
|
|
|
@@ -78,4 +78,4 @@ Resume: `harness_debate_round_status({ round_index: N })` → run listed `next_t
|
|
|
78
78
|
|
|
79
79
|
Do not `approve_plan` on `policy_decision: block`. On `human_required` → `ask_user` first.
|
|
80
80
|
|
|
81
|
-
Rubrics:
|
|
81
|
+
Rubrics: use the focus-specific checklist ids passed by the parent for the active round.
|
|
@@ -54,7 +54,73 @@ Parent orchestrator calls **`approve_plan`** with the full `plan_packet` (scroll
|
|
|
54
54
|
}
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
##
|
|
57
|
+
## Phase 0 — task contract (before reconnaissance)
|
|
58
|
+
|
|
59
|
+
Use during **`/harness-plan` Phase 0** only. Purpose: disambiguate the **task** (scope, success, risk) — not research-backed implementation forks (those are Phase 4 after Phase 3.5).
|
|
60
|
+
|
|
61
|
+
### Example (Phase 0 — success criteria)
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"question": "What does done look like for this task?",
|
|
66
|
+
"context": "The request could mean harness-only changes, product code, or docs. Phase 0 must lock acceptance before reconnaissance.",
|
|
67
|
+
"options": [
|
|
68
|
+
{ "title": "Harness contract only", "description": "Changes under .pi/harness and prompts; harness-verify passes" },
|
|
69
|
+
{ "title": "End-to-end feature", "description": "User-visible behavior + tests in the app repo" },
|
|
70
|
+
{ "title": "Docs / decision-record only", "description": "No runtime code changes" }
|
|
71
|
+
],
|
|
72
|
+
"allowFreeform": true
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Example (Phase 0 — risk when `--risk` omitted)
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"question": "What risk level should tailor debate and research depth?",
|
|
81
|
+
"options": [
|
|
82
|
+
{ "title": "Low", "description": "Small, localized change; fast plan-verify profile" },
|
|
83
|
+
{ "title": "Med (default)", "description": "Typical feature or multi-file harness work" },
|
|
84
|
+
{ "title": "High", "description": "Architecture, security, or broad blast radius" }
|
|
85
|
+
],
|
|
86
|
+
"allowFreeform": false
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Example (Phase 0 — questionnaire: scope + success in one call)
|
|
91
|
+
|
|
92
|
+
Use **`questions[]`** when ≥2 independent dimensions must be resolved together. One tool call per clarification round (not one sub-question per round). After the user answers, merge into `artifacts/task-clarification.yaml` — do not hand-edit YAML for structured fields.
|
|
93
|
+
|
|
94
|
+
```json
|
|
95
|
+
{
|
|
96
|
+
"question": "Lock the task contract before reconnaissance",
|
|
97
|
+
"context": "Phase 0 task-clarification gate. Answer both forks to set scope and acceptance.",
|
|
98
|
+
"questions": [
|
|
99
|
+
{
|
|
100
|
+
"title": "Scope surface",
|
|
101
|
+
"options": [
|
|
102
|
+
{ "title": "Harness only", "description": ".pi/harness, prompts, verify" },
|
|
103
|
+
{ "title": "Product code", "description": "App/runtime changes + tests" }
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"title": "Done means",
|
|
108
|
+
"options": [
|
|
109
|
+
{ "title": "Tests green", "description": "CI + harness-verify pass" },
|
|
110
|
+
{ "title": "Docs shipped", "description": "User-facing docs updated" }
|
|
111
|
+
],
|
|
112
|
+
"allowMultiple": true
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"allowComment": true
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Parent: map the tool result with `applyAskUserToTaskClarification` (see `.pi/lib/ask-user/merge-task-clarification.ts`) before `write_harness_yaml`.
|
|
120
|
+
|
|
121
|
+
**Rich UI:** `HARNESS_ASK_USER_UI=auto` tries Glimpse when available; WSL without a display falls back to TUI (`ui_degraded` in tool details). Use `displayMode: "inline"` only for transcript-inline prompts (e.g. under a plan block).
|
|
122
|
+
|
|
123
|
+
## Example (plan — scope) — Phase 4 fork, not Phase 0
|
|
58
124
|
|
|
59
125
|
```json
|
|
60
126
|
{
|
|
@@ -69,6 +135,6 @@ Parent orchestrator calls **`approve_plan`** with the full `plan_packet` (scroll
|
|
|
69
135
|
|
|
70
136
|
## Who calls what
|
|
71
137
|
|
|
72
|
-
- **Parent orchestrator** during `/harness-plan` — `ask_user` for clarification
|
|
138
|
+
- **Parent orchestrator** during `/harness-plan` — Phase 0: `ask_user` for **task contract** → `artifacts/task-clarification.yaml`; later: **`approve_plan`** then **`create_plan`** for the plan file; Phase 4: `ask_user` for **dialectical forks** only.
|
|
73
139
|
- `harness/planning/*` (scouts, decompose, hypothesis, hypothesis-eval) — JSON only; no `ask_user` / `approve_plan` / `create_plan`.
|
|
74
140
|
- `harness/reviewing/evaluator`, `harness/reviewing/adversary`, and `harness/reviewing/tie-breaker` — emit `human_required`; the **parent orchestrator** calls `ask_user`.
|
|
@@ -9,4 +9,4 @@ description: >-
|
|
|
9
9
|
|
|
10
10
|
Use **`harness-review`** skill and **`/harness-review`** instead.
|
|
11
11
|
|
|
12
|
-
The master command runs benchmark + policy verdict (+ adversary unless `--quick`) with `submit_eval_verdict` / `submit_adversary_report` and parent `harness_artifact_ready` gates
|
|
12
|
+
The master command runs benchmark + policy verdict (+ adversary unless `--quick`) with `submit_eval_verdict` / `submit_adversary_report` and parent `harness_artifact_ready` gates.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: harness-git-commit
|
|
3
|
+
description: Commit staged git changes with configurable message format and Co-authored-by trailer from .pi/auto-commit.json. Use when the user asks to commit, when /harness-auto or harness run completion requires a commit, or before any git commit — never use raw git commit -m.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# harness-git-commit
|
|
7
|
+
|
|
8
|
+
Deterministic commits via bundled CLI. Config merges **project** `.pi/auto-commit.json` over **package** defaults (`$UP_PKG/.pi/auto-commit.json`). Project `coAuthor` fully replaces the package default after merge.
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- User explicitly asks to create a git commit
|
|
13
|
+
- Harness pipeline step says commit after review pass
|
|
14
|
+
- You are about to run `git commit`, `git commit -m`, or `git commit --amend`
|
|
15
|
+
|
|
16
|
+
## Forbidden
|
|
17
|
+
|
|
18
|
+
- **Do not** run raw `git commit` / `git commit -m` / `git commit --amend` in shell
|
|
19
|
+
- **Do not** hardcode `Co-authored-by:` lines in shell or HEREDOC — use this skill's CLI instead of HEREDOC `git commit` when committing harness work
|
|
20
|
+
- **Do not** `git push` unless the user asked
|
|
21
|
+
- **Do not** commit unless the user asked (or harness-auto locked gate explicitly requires it)
|
|
22
|
+
|
|
23
|
+
## Workflow
|
|
24
|
+
|
|
25
|
+
1. Resolve `UP_PKG` — see [`$UP_PKG/.pi/scripts/README.md`](../../.pi/scripts/README.md) (`harness-resolve-up-pkg.mjs`).
|
|
26
|
+
2. From **project root** (repo that owns `.pi/auto-commit.json`, not a submodule):
|
|
27
|
+
```bash
|
|
28
|
+
node "$UP_PKG/.pi/scripts/harness-auto-commit-bootstrap.mjs"
|
|
29
|
+
```
|
|
30
|
+
3. Stage files: `git add …` (CLI does not stage).
|
|
31
|
+
4. Commit via CLI (examples):
|
|
32
|
+
```bash
|
|
33
|
+
# Conventional subject from config template
|
|
34
|
+
node "$UP_PKG/.pi/scripts/harness-git-commit.mjs" \
|
|
35
|
+
--type fix --scope my-app --subject "short description"
|
|
36
|
+
|
|
37
|
+
# Full message override (--message wins over --subject)
|
|
38
|
+
node "$UP_PKG/.pi/scripts/harness-git-commit.mjs" \
|
|
39
|
+
--message "chore(release): bump version" --body "- detail lines"
|
|
40
|
+
|
|
41
|
+
# Amend: preserve body, ensure trailer
|
|
42
|
+
node "$UP_PKG/.pi/scripts/harness-git-commit.mjs" --amend --message "$(git log -1 --format=%B)"
|
|
43
|
+
|
|
44
|
+
# Preview only
|
|
45
|
+
node "$UP_PKG/.pi/scripts/harness-git-commit.mjs" --dry-run --subject "preview"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Config (project `.pi/auto-commit.json`)
|
|
49
|
+
|
|
50
|
+
| Field | Purpose |
|
|
51
|
+
|-------|---------|
|
|
52
|
+
| `message.template` | `{type}({scope}): {subject}` when scope set |
|
|
53
|
+
| `message.templateNoScope` | `{type}: {subject}` when scope empty |
|
|
54
|
+
| `message.typeDefault` / `scopeDefault` | Defaults for omitted CLI flags |
|
|
55
|
+
| `message.coAuthorTrailer` | `Co-authored-by: {login} <{email}>` |
|
|
56
|
+
| `coAuthor.login` / `coAuthor.email` | Attribution (project overrides package) |
|
|
57
|
+
| `coAuthor.required` | When false, skip trailer (default true) |
|
|
58
|
+
|
|
59
|
+
Edit project file to change format or co-author for external repos.
|
|
60
|
+
|
|
61
|
+
## Limitations
|
|
62
|
+
|
|
63
|
+
- Skill + CLI only — humans or bypassing agents can still run raw `git commit`
|
|
64
|
+
- Submodule/nested repos: commit from the root that owns `.pi/auto-commit.json`
|
|
65
|
+
- Squash/rebase on GitHub may drop co-author trailers — not fixable here
|
|
66
|
+
- Signed commits: pass `--signoff` on CLI if needed; GPG `-S` is caller responsibility
|
|
67
|
+
|
|
68
|
+
## References
|
|
69
|
+
|
|
70
|
+
- Auto-commit lifecycle policy: use bootstrap + commit CLI so co-author and message format stay consistent.
|
|
71
|
+
- Scripts — `harness-git-commit.mjs`, `harness-auto-commit-bootstrap.mjs`
|
|
72
|
+
- Library — `.pi/lib/harness-auto-commit-config.mjs`
|
|
@@ -14,11 +14,11 @@ description: Enforce harness governance phases, policy gates, budgets, and promo
|
|
|
14
14
|
## Workflow
|
|
15
15
|
|
|
16
16
|
1. Read current phase from `/harness-policy-status` or session `harness-policy-state`.
|
|
17
|
-
2. Check
|
|
17
|
+
2. Check governance policies: phase constitution, eval promotion rules, Sentrux requirements, drift handling, rules lifecycle, and AGT policy/security layers.
|
|
18
18
|
3. Tool allow/deny is enforced by AGT `PolicyEngine` + `.pi/harness/policies/*.yaml` (parent `policy-gate`, subprocess `harness-subagent-governance`). Disable with `HARNESS_AGT_POLICY=0`. Audit: `.pi/harness/runs/<run_id>/agt-audit.jsonl`.
|
|
19
19
|
4. For promotion: require eval pass, no abort lock, debate consensus if escalated, Sentrux when `HARNESS_SENTRUX_REQUIRED=true` (`artifacts/sentrux-signal.yaml` from `/harness-run`, not executor self-report).
|
|
20
|
-
5. **Intent vs observation:**
|
|
21
|
-
6. After approved
|
|
20
|
+
5. **Intent vs observation:** Sentrux manifest changes → `/harness-sentrux-steward` + chair + formal decision record when material, then `sentrux-rules-sync --force`. Naming manifest changes → `/harness-ls-lint-steward` + chair, then `ls-lint-rules-sync --force`. CLI degradation after execute → fix paths or replan — do not tune manifest on a single noisy run.
|
|
21
|
+
6. After approved Sentrux edits: `harness-sentrux-bootstrap.mjs --force` or `/harness-sentrux-sync`; emit `harness-architecture-changed`. After naming edits: `harness-ls-lint-bootstrap.mjs --force` or `/harness-ls-lint-sync`; emit `harness-naming-changed`.
|
|
22
22
|
7. Run `node "$UP_PKG/.pi/scripts/harness-verify.mjs"` before claiming release readiness (includes AGT policy doctor).
|
|
23
23
|
|
|
24
24
|
## Spec Distiller integration
|
|
@@ -30,13 +30,13 @@ When refining plans from noisy requirements:
|
|
|
30
30
|
3. When gates return `human_required` or promotion is blocked, the orchestrator calls `ask_user` — do not guess scope.
|
|
31
31
|
4. Reference graphify wiki or `graphify query` for architecture constraints before execute.
|
|
32
32
|
|
|
33
|
-
## Budgets
|
|
33
|
+
## Budgets
|
|
34
34
|
|
|
35
35
|
- Default: **`HARNESS_BUDGET_ENFORCE` off** — token/debate caps are telemetry-only (`harness-budget-telemetry`, `harness-budget-soft-limit`). They do **not** block phases or debate lanes.
|
|
36
36
|
- Do **not** skip reconnaissance artifacts (`planning-context.yaml`), debate rounds, or `approve_plan` because of soft budget hints in the widget.
|
|
37
37
|
- Re-enable hard caps only with `HARNESS_BUDGET_ENFORCE=1` and `HARNESS_BUDGET_HARD_STOP` / `HARNESS_DEBATE_HARD_STOP`.
|
|
38
38
|
|
|
39
|
-
## Subagent artifacts
|
|
39
|
+
## Subagent artifacts
|
|
40
40
|
|
|
41
41
|
- Subagents call scoped **`submit_*`** tools; parent verifies with **`harness_artifact_ready`**, not JSON parsing from `finalOutput`.
|
|
42
42
|
- Parent **`write_harness_yaml`** is for merges (`research-brief.yaml`, plan shell) — not subagent payloads.
|
|
@@ -44,4 +44,4 @@ When refining plans from noisy requirements:
|
|
|
44
44
|
## Rules
|
|
45
45
|
|
|
46
46
|
- Never auto-merge; harness-auto may open PR only when all gates pass (see release-readiness-report).
|
|
47
|
-
- Do not invoke posthog-analyst in Phase 2
|
|
47
|
+
- Do not invoke posthog-analyst in Phase 2.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: harness-ls-lint-setup
|
|
3
|
+
description: Bootstrap ls-lint filename rules for harness projects — seed naming.manifest.json, generate merge-safe .ls-lint.yml, and document bootstrap vs --force sync. Use during /harness-setup, when adding ls-lint to a repo, or when .ls-lint.yml is missing or out of date.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# harness-ls-lint-setup
|
|
7
|
+
|
|
8
|
+
## When to use
|
|
9
|
+
|
|
10
|
+
- `/harness-setup` Step 4.3 (ls-lint naming bootstrap)
|
|
11
|
+
- Target repo has no `.ls-lint.yml` or `harness-verify` reports naming config drift
|
|
12
|
+
- User edited `.pi/harness/ls-lint/naming.manifest.json` (`global_rules`, `scoped_rules`, `ignores`)
|
|
13
|
+
|
|
14
|
+
## Roles (do not conflate)
|
|
15
|
+
|
|
16
|
+
| Role | Agent / command | Layer |
|
|
17
|
+
|------|-----------------|-------|
|
|
18
|
+
| **Bootstrap** | `harness-ls-lint-bootstrap.mjs` | Greenfield seed + first sync |
|
|
19
|
+
| **Steward** | `harness/ls-lint-steward`, `/harness-ls-lint-steward` | Proposes manifest changes (`artifacts/ls-lint-manifest-proposal.yaml`); chair applies |
|
|
20
|
+
| **Sync** | `ls-lint-rules-sync.mjs`, `/harness-ls-lint-sync` | Regenerates `.ls-lint.yml` from manifest after intent change |
|
|
21
|
+
| **Observation** | `/harness-run`, `/harness-review` | `harness-ls-lint-cli.mjs` → `artifacts/ls-lint-signal.yaml` |
|
|
22
|
+
|
|
23
|
+
Never auto-sync manifest from directory trees. Material manifest edits need steward evidence + chair approval.
|
|
24
|
+
|
|
25
|
+
## Canonical layout
|
|
26
|
+
|
|
27
|
+
| Path | Role |
|
|
28
|
+
|------|------|
|
|
29
|
+
| `.pi/harness/ls-lint/naming.manifest.json` | Source of truth |
|
|
30
|
+
| `.ls-lint.yml` | Generated ls-lint config (commit to git) |
|
|
31
|
+
| `.ls-lint/.harness-naming-meta.json` | Sync metadata (gitignored) |
|
|
32
|
+
|
|
33
|
+
Custom YAML **outside** `# --- harness:managed:start/end ---` is preserved on every sync.
|
|
34
|
+
|
|
35
|
+
## Commands (resolve `UP_PKG` via `.pi/scripts/README.md`)
|
|
36
|
+
|
|
37
|
+
| Situation | Command |
|
|
38
|
+
|-----------|---------|
|
|
39
|
+
| First-time / harness-setup (idempotent) | `node "$UP_PKG/.pi/scripts/harness-ls-lint-bootstrap.mjs"` |
|
|
40
|
+
| After manifest edits | `node "$UP_PKG/.pi/scripts/harness-ls-lint-bootstrap.mjs" --force` |
|
|
41
|
+
| CI / verify only | `node "$UP_PKG/.pi/scripts/ls-lint-rules-sync.mjs" --check` |
|
|
42
|
+
| Run/review observation | `node "$UP_PKG/.pi/scripts/harness-ls-lint-cli.mjs"` or `--json` |
|
|
43
|
+
| In pi session | `/harness-ls-lint-sync` (extension; uses `--force`) |
|
|
44
|
+
|
|
45
|
+
## Workflow
|
|
46
|
+
|
|
47
|
+
1. Ensure ls-lint CLI is installed (`harness-setup` Step 2.9 or `harness-cli-verify.sh`).
|
|
48
|
+
2. Run bootstrap from **project root**:
|
|
49
|
+
```bash
|
|
50
|
+
node "$UP_PKG/.pi/scripts/harness-ls-lint-bootstrap.mjs"
|
|
51
|
+
```
|
|
52
|
+
3. `node "$UP_PKG/.pi/scripts/harness-ls-lint-cli.mjs"` — fix violations or tune manifest rules/ignores.
|
|
53
|
+
4. Commit `.ls-lint.yml` and project-specific `naming.manifest.json`.
|
|
54
|
+
|
|
55
|
+
## References
|
|
56
|
+
|
|
57
|
+
- Naming lifecycle policy: steward proposal + chair approval before material manifest changes.
|
|
58
|
+
- Scripts — `ls-lint-rules-sync.mjs`, `harness-ls-lint-bootstrap.mjs`, `harness-ls-lint-cli.mjs`
|
|
59
|
+
- Agent — `harness/ls-lint-steward`
|
|
@@ -8,14 +8,14 @@ description: >-
|
|
|
8
8
|
|
|
9
9
|
# Harness orchestration
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Follow the orchestration rules and phase sequence in this skill directly.
|
|
12
12
|
|
|
13
13
|
## Team management rules
|
|
14
14
|
|
|
15
15
|
1. **Parallelism law** — Parallel `tasks` only when outputs are independent inputs to a later merge (implementation ∥ stack). Never parallelize debate lanes or decompose ∥ hypothesis.
|
|
16
16
|
2. **Two-pizza cap per batch** — Max 2 research lanes, 1 optional `planning-context` subagent, 1 executor, 1 debate agent per `subagent` call.
|
|
17
17
|
3. **No redundant thinkers** — Downstream agents read artifacts; do not re-derive.
|
|
18
|
-
4. **Sequential dependency chain** — planning context → decompose → hypothesis → research → author → DAG → debate → approve → execute → **/harness-review** → optional **/harness-steer** loop
|
|
18
|
+
4. **Sequential dependency chain** — planning context → decompose → hypothesis → research → author → DAG → debate → approve → execute → **/harness-review** → optional **/harness-steer** loop.
|
|
19
19
|
5. **Path-first parent tools** — `approve_plan`, `create_plan`, `submit_*` via `source_path`, `merge_harness_yaml`, `harness_synthesize_repair_brief`.
|
|
20
20
|
6. **Debate = meeting** — Parent is chair; parallel_probes allows evaluator ∥ adversary per batch.
|
|
21
21
|
7. **Tool intelligence** — Parent uses graphify, sg, ccc, and reads by task need; subprocesses optional.
|
|
@@ -41,7 +41,7 @@ Harness subprocesses load **`harness-subagent-submit`** (`PI_HARNESS_SUBPROCESS=
|
|
|
41
41
|
|---------|---------|
|
|
42
42
|
| `/harness-plan` | Parent: planning context (tools) → decompose → hypothesis → Phase 3.5 artifacts → PlanPacket → eligibility + Review Gate → `approve_plan` + `create_plan` |
|
|
43
43
|
| `/harness-run` | `harness/running/executor` (single worker) |
|
|
44
|
-
| `/harness-review` | Parent verify → `evaluator` benchmark → `evaluator` verdict → `adversary` → optional `tie-breaker`
|
|
44
|
+
| `/harness-review` | Parent verify → `evaluator` benchmark → `evaluator` verdict → `adversary` → optional `tie-breaker` |
|
|
45
45
|
| `/harness-eval` | **Deprecated** → `/harness-review` |
|
|
46
46
|
| `/harness-critic` | **Deprecated** → `/harness-review` |
|
|
47
47
|
| `/harness-auto` | plan per `/harness-plan`; `--quick` skips adversary + tie-breaker in review |
|
|
@@ -80,5 +80,5 @@ Then execution-plan-author, DAG gate, debate eligibility, sequential debate roun
|
|
|
80
80
|
|
|
81
81
|
## References
|
|
82
82
|
|
|
83
|
-
-
|
|
83
|
+
- Subagent isolation, submit-tool artifact flow, and spawn-context contract: `.pi/harness/specs/harness-spawn-context.schema.json`
|
|
84
84
|
- `node "$UP_PKG/.pi/scripts/harness-agents-manifest.mjs" --check`
|
|
@@ -5,7 +5,7 @@ description: Agent-native harness plans — lakes/context bundles, planning cont
|
|
|
5
5
|
|
|
6
6
|
# harness-plan
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Use this skill's phase order, spawn laws, and artifact contract directly.
|
|
9
9
|
|
|
10
10
|
## When to use
|
|
11
11
|
|
|
@@ -16,26 +16,28 @@ description: Agent-native harness plans — lakes/context bundles, planning cont
|
|
|
16
16
|
1. **Parallelism law** — Parallel `tasks` only for independent lanes (implementation ∥ stack ≤2). Never parallelize debate or decompose ∥ hypothesis.
|
|
17
17
|
2. **Two-pizza cap** — Max 1 debate agent, 1 optional planning-context subagent, per `subagent` call.
|
|
18
18
|
3. **No redundant thinkers** — Read upstream YAML; do not re-run graphify in decompose when `planning-context` architecture coverage is ok.
|
|
19
|
-
4. **Sequential chain** — planning context → decompose → hypothesis → research → author → DAG → debate → approve.
|
|
19
|
+
4. **Sequential chain** — task clarification → planning context → decompose → hypothesis → research → author → DAG → debate → approve.
|
|
20
20
|
5. **Tool intelligence** — Parent picks graphify, sg, ccc by task; no mandatory tool-tied scout subprocesses.
|
|
21
21
|
|
|
22
22
|
## Workflow (parent orchestrator)
|
|
23
23
|
|
|
24
|
-
1. **Phase
|
|
25
|
-
2. **
|
|
26
|
-
3. **Sequential**
|
|
27
|
-
4. **
|
|
28
|
-
5.
|
|
29
|
-
6. `
|
|
30
|
-
7.
|
|
31
|
-
8. **`
|
|
32
|
-
9. **`
|
|
24
|
+
1. **Phase 0:** `artifacts/task-clarification.yaml` — investigate (code + web OK), `ask_user` until unambiguous, gate before any planning subagent.
|
|
25
|
+
2. **Phase 1:** Compile `artifacts/planning-context.yaml` with tools (default) or optional `planning-context` subagent; inherit Phase 0 grounding.
|
|
26
|
+
3. **Sequential** decompose → gate `artifacts/decomposition.yaml`.
|
|
27
|
+
4. **Sequential** hypothesis (requires decomposition).
|
|
28
|
+
5. **Phase 3.5:** `implementation-research.yaml` + `stack.yaml` (parent inline and/or parallel researchers).
|
|
29
|
+
6. Draft `PlanPacket` shell; `ask_user` on material fork **after** Phase 3.5 (research-backed; not Phase 0).
|
|
30
|
+
7. `execution-plan-author` → merge `execution_plan`.
|
|
31
|
+
8. **`validate-plan-dag.mjs`** (must pass).
|
|
32
|
+
9. **`harness_plan_debate_eligibility`** — `parallel_probes` spawns plan-evaluator ∥ plan-adversary, then integrator round.
|
|
33
|
+
10. **`approve_plan({ human_summary? })`** / **`create_plan()`** — packet from `plan_packet_path` on disk (path-first).
|
|
33
34
|
|
|
34
35
|
`--quick` skips semantic coverage in planning context and post-run adversary only — **not** adequate reconnaissance, implementation/stack artifacts (med/high risk), or plan debate.
|
|
35
36
|
|
|
36
37
|
## Rules
|
|
37
38
|
|
|
38
|
-
- On-disk plan artifacts are **YAML** (`plan-packet.yaml`, `research-brief.yaml`, `planning-context.yaml`).
|
|
39
|
+
- On-disk plan artifacts are **YAML** (`task-clarification.yaml`, `plan-packet.yaml`, `research-brief.yaml`, `planning-context.yaml`).
|
|
40
|
+
- Phase 0 allows codebase + web reads; blocks planning subagents and plan artifacts until clarification is `ready`.
|
|
39
41
|
- Subagents read-only; parent writes run artifacts and calls `approve_plan` / `create_plan`.
|
|
40
42
|
- context-mode only on harness paths.
|
|
41
43
|
- Phase 3.5 artifacts required for med/high risk unless documented waiver.
|
|
@@ -9,7 +9,7 @@ description: >-
|
|
|
9
9
|
|
|
10
10
|
# harness-review
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Monitoring and Controlling flow: measure → judge → red team.
|
|
13
13
|
|
|
14
14
|
## When to use
|
|
15
15
|
|
|
@@ -21,7 +21,7 @@ description: >-
|
|
|
21
21
|
|
|
22
22
|
| Phase | Practice | Actor | Artifact |
|
|
23
23
|
|-------|----------|-------|----------|
|
|
24
|
-
| 1 | Automated QC +
|
|
24
|
+
| 1 | Automated QC + fitness functions | Parent | `harness-verify.mjs`, Sentrux gate, ls-lint CLI, `benchmark-log.yaml`, `sentrux-signal.yaml`, `ls-lint-signal.yaml` |
|
|
25
25
|
| 2 | Measure actuals (EVM) | `harness/reviewing/evaluator` benchmark | `eval-verdict.yaml` |
|
|
26
26
|
| 2b | Controlling | Parent | Write `review-outcome.yaml`; route via `remediation_class` (not fail-fast abort) |
|
|
27
27
|
| 6 | Outcome | Parent | `review-outcome.yaml` → `/harness-steer` or replan |
|
|
@@ -42,7 +42,7 @@ Pass `sentrux-signal.yaml` path to evaluator `mode: benchmark` spawn context. Ev
|
|
|
42
42
|
|
|
43
43
|
## Rules
|
|
44
44
|
|
|
45
|
-
- Parent never writes eval/adversary YAML — subprocess `submit_*` only
|
|
45
|
+
- Parent never writes eval/adversary YAML — subprocess `submit_*` only.
|
|
46
46
|
- Auto-claim run ownership unless `--readonly`.
|
|
47
47
|
- Disk verdict drives `next_recommended_command` (`resolveCompletionStatuses`).
|
|
48
48
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: harness-sentrux-repair
|
|
3
|
+
description: |
|
|
4
|
+
OSS Sentrux capture, diagnostics synthesis, and repair-plan loop for harness runs.
|
|
5
|
+
Use during /harness-run post-work, /harness-review Phase 1/1b, /harness-steer, or when
|
|
6
|
+
artifacts/sentrux-report.json or sentrux-repair-plan.yaml are mentioned. No Sentrux Pro or MCP.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# harness-sentrux-repair
|
|
10
|
+
|
|
11
|
+
Structured structural feedback for the harness. **OSS CLI only.**
|
|
12
|
+
|
|
13
|
+
## Artifacts (per run)
|
|
14
|
+
|
|
15
|
+
| File | Producer |
|
|
16
|
+
|------|----------|
|
|
17
|
+
| `artifacts/sentrux-report.json` | `harness-sentrux-report.mjs` (single check+gate scan) |
|
|
18
|
+
| `artifacts/sentrux-diagnostics.json` | `harness-sentrux-diagnostics.mjs` |
|
|
19
|
+
| `artifacts/sentrux-signal.yaml` | report script `--signal` (schema 1.1.0) |
|
|
20
|
+
| `artifacts/sentrux-repair-plan.yaml` | `harness/sentrux-repair-advisor` via `submit_sentrux_repair_plan` |
|
|
21
|
+
|
|
22
|
+
## Commands
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
node "$UP_PKG/.pi/scripts/harness-sentrux-report.mjs" --out "<run_dir>" --run-id "<id>" --signal
|
|
26
|
+
node "$UP_PKG/.pi/scripts/harness-sentrux-diagnostics.mjs" --report "<run_dir>/artifacts/sentrux-report.json" --out "<run_dir>" --churn
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Re-run capture only when artifacts are missing or `HARNESS_SENTRUX_RESCAN=1`.
|
|
30
|
+
|
|
31
|
+
## Phase wiring
|
|
32
|
+
|
|
33
|
+
- **`/harness-run`** — post-executor capture (replaces separate check+gate + hand-written signal).
|
|
34
|
+
- **`/harness-review`** — Phase 1: reuse or capture; Phase 1b: spawn `harness/sentrux-repair-advisor` when violations/degradation.
|
|
35
|
+
- **`/harness-steer`** — `repair-brief.yaml` merges `[sentrux:…]` directives from repair plan.
|
|
36
|
+
|
|
37
|
+
## Agent boundaries
|
|
38
|
+
|
|
39
|
+
| Agent | Role |
|
|
40
|
+
|-------|------|
|
|
41
|
+
| `harness/sentrux-steward` | Manifest intent proposals (`submit_sentrux_manifest_proposal`) |
|
|
42
|
+
| `harness/sentrux-repair-advisor` | Code repair plan only (`submit_sentrux_repair_plan`); no bash |
|
|
43
|
+
|
|
44
|
+
## Related
|
|
45
|
+
|
|
46
|
+
- **sentrux** skill — CLI install, rules sync, gate loop
|
|
47
|
+
- **harness-sentrux-setup** — bootstrap manifest/rules
|
|
48
|
+
- **harness-review** / **harness-steer** prompts
|
|
@@ -20,7 +20,7 @@ description: Bootstrap Sentrux architectural rules for harness projects — seed
|
|
|
20
20
|
| **Sync** | `sentrux-rules-sync.mjs`, `/harness-sentrux-sync` | Regenerates `rules.toml` from manifest after intent change |
|
|
21
21
|
| **Observation** | `/harness-run`, `/harness-review` | `harness-sentrux-cli.mjs gate --save` / `check` / `gate` → `artifacts/sentrux-signal.yaml` |
|
|
22
22
|
|
|
23
|
-
Never auto-sync manifest from directory trees. Material manifest edits need steward evidence + chair approval
|
|
23
|
+
Never auto-sync manifest from directory trees. Material manifest edits need steward evidence + chair approval.
|
|
24
24
|
|
|
25
25
|
## Canonical layout
|
|
26
26
|
|
|
@@ -63,7 +63,7 @@ Do **not** copy ultimate-pi's layer paths blindly into unrelated layouts — edi
|
|
|
63
63
|
|
|
64
64
|
## References
|
|
65
65
|
|
|
66
|
-
-
|
|
66
|
+
- Rules lifecycle policy: manifest is source of truth; bootstrap/sync regenerate rules from approved intent.
|
|
67
67
|
- Scripts — `.pi/scripts/sentrux-rules-sync.mjs`, `harness-sentrux-bootstrap.mjs`, `harness-sentrux-cli.mjs`
|
|
68
68
|
- Agents — `harness/sentrux-bootstrap` (setup), `harness/sentrux-steward` (intent proposals)
|
|
69
69
|
- Specs — `sentrux-manifest-proposal.schema.json`, `sentrux-signal.schema.json`
|
|
@@ -17,7 +17,7 @@ description: Draft or refine harness artifact contracts under .pi/harness/specs.
|
|
|
17
17
|
2. Edit or add schema under `.pi/harness/specs/`.
|
|
18
18
|
3. Update affected extensions to emit matching custom entries.
|
|
19
19
|
4. Run `node "$UP_PKG/.pi/scripts/harness-verify.mjs"` (see `.pi/scripts/README.md`).
|
|
20
|
-
5. Add or update
|
|
20
|
+
5. Add or update a formal decision record in the target project's standard decision-log location for breaking changes.
|
|
21
21
|
|
|
22
22
|
## Rules
|
|
23
23
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: harness-steer
|
|
3
|
-
description: Post-review repair loop via harness-steer and executor repair mode
|
|
3
|
+
description: Post-review repair loop via harness-steer and executor repair mode.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# harness-steer
|
|
@@ -11,4 +11,4 @@ Use after `/harness-review` when `artifacts/review-outcome.yaml` has `remediatio
|
|
|
11
11
|
2. Set policy phase `execute`; spawn `harness/running/executor` with `mode: repair`.
|
|
12
12
|
3. Always follow with `/harness-review`.
|
|
13
13
|
|
|
14
|
-
See `.pi/prompts/harness-steer.md`
|
|
14
|
+
See `.pi/prompts/harness-steer.md` for the steer-loop procedure and guardrails.
|
|
@@ -264,7 +264,7 @@ status: complete
|
|
|
264
264
|
| Medium | ... | ... | ... | ... |
|
|
265
265
|
|
|
266
266
|
## Next Steps
|
|
267
|
-
[What to do with these findings. Suggest
|
|
267
|
+
[What to do with these findings. Suggest a formal decision record update if recommendations are significant.]
|
|
268
268
|
```
|
|
269
269
|
|
|
270
270
|
After filing, update `vault/wiki/index.md` (add to analyses if category exists, or note inline), update `vault/wiki/log.md` (append entry at TOP), and update `vault/wiki/hot.md` (add key findings to Recent Context).
|
|
@@ -42,6 +42,7 @@ Run from the **target repo root** (where `.sentrux/rules.toml` lives), or prefer
|
|
|
42
42
|
| CI / pre-commit | `node "$UP_PKG/.pi/scripts/harness-sentrux-cli.mjs" check` | Exit 0 = pass, 1 = violations |
|
|
43
43
|
| Before agent work | `node "$UP_PKG/.pi/scripts/harness-sentrux-cli.mjs" gate --save` | Save session baseline |
|
|
44
44
|
| After agent work | `node "$UP_PKG/.pi/scripts/harness-sentrux-cli.mjs" gate` | Detect degradation vs baseline |
|
|
45
|
+
| Harness run/review capture | `harness-sentrux-report.mjs` + `harness-sentrux-diagnostics.mjs` | Single scan → JSON artifacts |
|
|
45
46
|
| Explore structure | `sentrux` or `sentrux .` | GUI treemap (optional) |
|
|
46
47
|
|
|
47
48
|
Typical agent loop:
|
|
@@ -75,9 +76,10 @@ Custom TOML outside `# --- harness:managed:start/end ---` is preserved on sync.
|
|
|
75
76
|
| `/harness-sentrux-sync` | Force-regenerate rules from manifest (pi command) |
|
|
76
77
|
| `harness-verify.mjs` | Runs rules sync and Sentrux checks when rules are present |
|
|
77
78
|
| **observation-bus** | Maps `harness-sentrux-signal` custom entries → evaluator observations |
|
|
78
|
-
| **harness-
|
|
79
|
+
| **harness-sentrux-repair** skill | Report/diagnostics scripts + `sentrux-repair-advisor` + repair plan artifact |
|
|
80
|
+
| **harness-eval** | Evaluate phase may require a Sentrux quality signal before promotion |
|
|
79
81
|
|
|
80
|
-
High level: **execute**
|
|
82
|
+
High level: **execute** runs one capture (`sentrux-report.json`, `sentrux-diagnostics.json`, signal v1.1.0); **review** may spawn **sentrux-repair-advisor** (Phase 1b); **steer** merges repair plan into `repair-brief.yaml`. No Sentrux Pro or MCP in Pi sessions.
|
|
81
83
|
|
|
82
84
|
## Related skills
|
|
83
85
|
|
|
@@ -94,6 +96,6 @@ High level: **execute** uses CLI gate/check around edits; **evaluate** consumes
|
|
|
94
96
|
|
|
95
97
|
## References
|
|
96
98
|
|
|
97
|
-
-
|
|
98
|
-
-
|
|
99
|
+
- Quality gate policy: require a structural signal for evaluate/promotion decisions when configured.
|
|
100
|
+
- Rules lifecycle policy: manifest is source of truth; sync rules from manifest after approved intent changes.
|
|
99
101
|
- `CONTRIBUTING.md` — Sentrux quick start
|
|
@@ -160,4 +160,4 @@ Diagnostics: `python3 "$UP_PKG/.pi/scripts/harness-web.py" status` (JSON).
|
|
|
160
160
|
| `HARNESS_WEB_HEURISTIC_ANGLES_FILE` | — | Extra heuristic angles YAML |
|
|
161
161
|
| `HARNESS_WEB_FAST_MODEL` / `EXPANDER` / `QUALITY` | — | Web subagent models |
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
Internal implementation notes are package-maintainer-only; this skill already contains the external-facing operating guidance.
|
|
@@ -4,7 +4,7 @@ description: >
|
|
|
4
4
|
Save the current conversation, answer, or insight into the Obsidian wiki vault as a
|
|
5
5
|
structured note. Analyzes the chat, determines the right note type, creates frontmatter,
|
|
6
6
|
files it in the correct wiki folder, and updates index, log, and hot cache.
|
|
7
|
-
Triggers on: "save this", "save that answer", "/save", "file this",
|
|
7
|
+
Triggers on: "save this", "save that answer", "/wiki-save", "/save", "file this",
|
|
8
8
|
"save to wiki", "save this session", "file this conversation", "keep this",
|
|
9
9
|
"save this analysis", "add this to the wiki".
|
|
10
10
|
allowed-tools: Read Write Edit Glob Grep
|
package/.pi/PACKAGING.md
CHANGED
|
@@ -10,6 +10,12 @@ Aligned with [pi packages](https://github.com/badlogic/pi-mono/blob/main/package
|
|
|
10
10
|
| `skills` | `.agents/skills`, `.pi/skills` | Agent Skills + pi-local skills |
|
|
11
11
|
| `prompts` | `.pi/prompts` | Slash-command prompt templates |
|
|
12
12
|
|
|
13
|
+
### Slash autocomplete
|
|
14
|
+
|
|
15
|
+
- **Prompt templates** (`.pi/prompts/*.md`): YAML `description` + optional `argument-hint` per [Pi prompt-templates](https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/docs/prompt-templates.md). Filename → `/command` (e.g. `harness-plan.md` → `/harness-plan`). `release.md` is dev-only and excluded from npm `files`.
|
|
16
|
+
- **Extension commands** (`.pi/extensions/*.ts`): `pi.registerCommand({ description, getArgumentCompletions? })` for dynamic args (run IDs, `--strict`, etc.). Shared helpers: `.pi/lib/harness-slash-completions.ts`.
|
|
17
|
+
- **Contract:** `node "$UP_PKG/.pi/scripts/harness-verify.mjs"` validates shipped prompt frontmatter.
|
|
18
|
+
|
|
13
19
|
Pi does **not** define `scripts`, `agents`, or `providers` in the manifest.
|
|
14
20
|
|
|
15
21
|
- **Harness scripts** → `.pi/scripts/` — run via `node` / `bash` and `$UP_PKG` (see `.pi/scripts/README.md`); do not require npm script aliases in consumer `package.json`
|