ultimate-pi 0.11.0 → 0.13.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/.agents/skills/ck-search/SKILL.md +11 -87
- package/.agents/skills/cocoindex-search/SKILL.md +35 -0
- package/.agents/skills/harness-debate-plan/SKILL.md +44 -0
- package/.agents/skills/harness-decisions/SKILL.md +1 -1
- package/.agents/skills/harness-orchestration/SKILL.md +54 -28
- package/.agents/skills/harness-plan/SKILL.md +15 -20
- package/.pi/PACKAGING.md +1 -0
- package/.pi/SYSTEM.md +21 -20
- package/.pi/agents/harness/adversary.md +0 -1
- package/.pi/agents/harness/evaluator.md +0 -1
- package/.pi/agents/harness/executor.md +1 -2
- package/.pi/agents/harness/incident-recorder.md +0 -1
- package/.pi/agents/harness/meta-optimizer.md +0 -1
- package/.pi/agents/harness/planning/decompose.md +3 -4
- package/.pi/agents/harness/planning/execution-plan-author.md +30 -0
- package/.pi/agents/harness/planning/hypothesis-validator.md +23 -0
- package/.pi/agents/harness/planning/hypothesis.md +3 -4
- package/.pi/agents/harness/planning/plan-adversary.md +10 -42
- package/.pi/agents/harness/planning/plan-evaluator.md +18 -0
- package/.pi/agents/harness/planning/review-integrator.md +23 -0
- package/.pi/agents/harness/planning/scout-graphify.md +13 -5
- package/.pi/agents/harness/planning/scout-semantic.md +23 -11
- package/.pi/agents/harness/planning/scout-structure.md +12 -6
- package/.pi/agents/harness/planning/sprint-contract-auditor.md +18 -0
- package/.pi/agents/harness/planning/stack-researcher.md +24 -0
- package/.pi/agents/harness/tie-breaker.md +0 -1
- package/.pi/agents/harness/trace-librarian.md +0 -1
- package/.pi/extensions/debate-orchestrator.ts +90 -53
- package/.pi/extensions/harness-plan-approval.ts +2 -2
- package/.pi/extensions/harness-run-context.ts +150 -5
- package/.pi/extensions/harness-subagents.ts +17 -6
- package/.pi/extensions/lib/harness-cocoindex-refresh.ts +49 -0
- package/.pi/extensions/lib/harness-posthog.ts +6 -1
- package/.pi/extensions/lib/harness-spawn-budget.ts +75 -0
- package/.pi/extensions/lib/harness-subagent-auth.ts +123 -0
- package/.pi/extensions/lib/{harness-subagents/harness-subagent-policy.ts → harness-subagent-policy.ts} +8 -7
- package/.pi/extensions/lib/harness-subagent-precheck.ts +95 -0
- package/.pi/extensions/lib/harness-subagents-bridge.ts +122 -0
- package/.pi/extensions/lib/plan-approval/create-plan.ts +4 -7
- package/.pi/extensions/lib/plan-approval/plan-review.ts +1 -1
- package/.pi/extensions/lib/plan-approval/types.ts +7 -1
- package/.pi/extensions/lib/plan-debate-envelope.ts +84 -0
- package/.pi/extensions/lib/{harness-subagents/spawn-policy.ts → spawn-policy.ts} +1 -0
- package/.pi/extensions/policy-gate.ts +1 -1
- package/.pi/extensions/review-integrity.ts +48 -29
- package/.pi/harness/agents.manifest.json +37 -25
- package/.pi/harness/docs/adrs/0032-harness-command-orchestration.md +4 -3
- package/.pi/harness/docs/adrs/0033-parent-orchestrated-planning.md +2 -2
- package/.pi/harness/docs/adrs/0035-plan-phase-review-gate.md +27 -0
- package/.pi/harness/evals/smoke/fixtures/plan-phase/minimal-med/artifacts/review-round-r1.yaml +25 -0
- package/.pi/harness/evals/smoke/fixtures/plan-phase/minimal-med/artifacts/review-round-r4.yaml +26 -0
- package/.pi/harness/evals/smoke/fixtures/plan-phase/minimal-med/artifacts/sprint-audit-r4.yaml +5 -0
- package/.pi/harness/evals/smoke/fixtures/plan-phase/minimal-med/plan-packet.yaml +196 -0
- package/.pi/harness/evals/smoke/fixtures/plan-phase/minimal-med/plan-review.md +14 -0
- package/.pi/harness/evals/smoke/fixtures/plan-phase/minimal-med/research-brief.yaml +32 -0
- package/.pi/harness/evals/smoke/run-context.fixture.json +1 -1
- package/.pi/harness/evals/smoke/smoke-harness-plan.mjs +88 -0
- package/.pi/harness/specs/harness-posthog-event.schema.json +6 -1
- package/.pi/harness/specs/plan-execution-plan-brief.schema.json +13 -0
- package/.pi/harness/specs/plan-execution-plan.schema.json +255 -0
- package/.pi/harness/specs/plan-packet.schema.json +14 -5
- package/.pi/harness/specs/plan-review-round-draft.schema.json +68 -0
- package/.pi/harness/specs/plan-sprint-audit-turn.schema.json +29 -0
- package/.pi/harness/specs/plan-stack-brief.schema.json +65 -0
- package/.pi/harness/specs/plan-validation-turn.schema.json +42 -0
- package/.pi/harness/specs/round-result.schema.json +16 -9
- package/.pi/lib/debate-orchestrator-types.ts +38 -0
- package/.pi/lib/harness-agent-discovery.mjs +81 -0
- package/.pi/lib/harness-run-context.ts +64 -38
- package/.pi/lib/harness-yaml.mjs +73 -0
- package/.pi/lib/harness-yaml.ts +90 -0
- package/.pi/prompts/harness-auto.md +13 -11
- package/.pi/prompts/harness-critic.md +2 -2
- package/.pi/prompts/harness-eval.md +3 -3
- package/.pi/prompts/harness-incident.md +2 -2
- package/.pi/prompts/harness-plan.md +83 -92
- package/.pi/prompts/harness-review.md +2 -2
- package/.pi/prompts/harness-router-tune.md +1 -1
- package/.pi/prompts/harness-run.md +2 -2
- package/.pi/prompts/harness-setup.md +30 -17
- package/.pi/prompts/harness-trace.md +2 -2
- package/.pi/scripts/README.md +1 -0
- package/.pi/scripts/harness-agents-manifest.mjs +1 -1
- package/.pi/scripts/harness-cli-verify.sh +24 -14
- package/.pi/scripts/harness-cocoindex-bootstrap.sh +182 -0
- package/.pi/scripts/harness-verify.mjs +38 -19
- package/.pi/scripts/validate-plan-dag.mjs +258 -0
- package/.pi/scripts/vendor-sync-pi-subagents.sh +19 -0
- package/.pi/skills/ast-grep/SKILL.md +2 -2
- package/.pi/skills/ccc/SKILL.md +142 -0
- package/.pi/skills/ccc/references/management.md +110 -0
- package/CHANGELOG.md +22 -0
- package/THIRD_PARTY_NOTICES.md +15 -0
- package/biome.json +2 -2
- package/package.json +7 -4
- package/vendor/pi-subagents/LICENSE +21 -0
- package/vendor/pi-subagents/UPSTREAM_PIN.md +11 -0
- package/vendor/pi-subagents/src/agents.ts +357 -0
- package/vendor/pi-subagents/src/subagents.ts +1463 -0
- package/.pi/agents/harness/planner.md +0 -13
- package/.pi/agents/harness/planning/hypothesis-eval.md +0 -59
- package/.pi/agents/harness/planning/planner.md +0 -20
- package/.pi/extensions/lib/harness-subagents/agent-loader.ts +0 -126
- package/.pi/extensions/lib/harness-subagents/agent-manifest.ts +0 -119
- package/.pi/extensions/lib/harness-subagents/agent-parser.ts +0 -87
- package/.pi/extensions/lib/harness-subagents/blackboard-tool.ts +0 -118
- package/.pi/extensions/lib/harness-subagents/blackboard.ts +0 -175
- package/.pi/extensions/lib/harness-subagents/parent-ask-user-bridge.ts +0 -10
- package/.pi/extensions/lib/harness-subagents/parent-harness-ui-bridge.ts +0 -137
- package/.pi/extensions/lib/harness-subagents/parent-harness-ui-hooks.ts +0 -77
- package/.pi/extensions/lib/harness-subagents/types-blackboard.ts +0 -27
- package/.pi/extensions/lib/harness-subagents/vendored/agent-manager.ts +0 -558
- package/.pi/extensions/lib/harness-subagents/vendored/agent-runner.ts +0 -666
- package/.pi/extensions/lib/harness-subagents/vendored/agent-types.ts +0 -175
- package/.pi/extensions/lib/harness-subagents/vendored/context.ts +0 -59
- package/.pi/extensions/lib/harness-subagents/vendored/cross-extension-rpc.ts +0 -134
- package/.pi/extensions/lib/harness-subagents/vendored/custom-agents.ts +0 -5
- package/.pi/extensions/lib/harness-subagents/vendored/default-agents.ts +0 -123
- package/.pi/extensions/lib/harness-subagents/vendored/env.ts +0 -43
- package/.pi/extensions/lib/harness-subagents/vendored/group-join.ts +0 -144
- package/.pi/extensions/lib/harness-subagents/vendored/index.ts +0 -2460
- package/.pi/extensions/lib/harness-subagents/vendored/invocation-config.ts +0 -52
- package/.pi/extensions/lib/harness-subagents/vendored/memory.ts +0 -182
- package/.pi/extensions/lib/harness-subagents/vendored/model-resolver.ts +0 -92
- package/.pi/extensions/lib/harness-subagents/vendored/output-file.ts +0 -115
- package/.pi/extensions/lib/harness-subagents/vendored/prompts.ts +0 -103
- package/.pi/extensions/lib/harness-subagents/vendored/schedule-store.ts +0 -177
- package/.pi/extensions/lib/harness-subagents/vendored/schedule.ts +0 -416
- package/.pi/extensions/lib/harness-subagents/vendored/settings.ts +0 -210
- package/.pi/extensions/lib/harness-subagents/vendored/skill-loader.ts +0 -108
- package/.pi/extensions/lib/harness-subagents/vendored/types.ts +0 -187
- package/.pi/extensions/lib/harness-subagents/vendored/ui/agent-widget.ts +0 -639
- package/.pi/extensions/lib/harness-subagents/vendored/ui/conversation-viewer.ts +0 -324
- package/.pi/extensions/lib/harness-subagents/vendored/ui/schedule-menu.ts +0 -110
- package/.pi/extensions/lib/harness-subagents/vendored/usage.ts +0 -71
- package/.pi/extensions/lib/harness-subagents/vendored/worktree.ts +0 -195
- /package/.pi/extensions/{00-ultimate-pi-system-prompt.ts → custom-system-prompt.ts} +0 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* validate-plan-dag — deterministic ExecutionPlan DAG checks (YAML packet in).
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { access } from "node:fs/promises";
|
|
7
|
+
import { constants } from "node:fs";
|
|
8
|
+
import { dirname, join, resolve } from "node:path";
|
|
9
|
+
import { fileURLToPath } from "node:url";
|
|
10
|
+
import { readYamlFile, writeYamlFile } from "../lib/harness-yaml.mjs";
|
|
11
|
+
|
|
12
|
+
const ROOT = join(dirname(fileURLToPath(import.meta.url)), "..", "..");
|
|
13
|
+
|
|
14
|
+
const MINIMUMS = {
|
|
15
|
+
low: { phases: 2, work_items: 5, acceptance_checks: 3, risks: 0 },
|
|
16
|
+
med: { phases: 3, work_items: 8, acceptance_checks: 5, risks: 3 },
|
|
17
|
+
high: { phases: 4, work_items: 12, acceptance_checks: 8, risks: 3 },
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
function fail(msg) {
|
|
21
|
+
console.error(`validate-plan-dag: FAIL: ${msg}`);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function ok(msg) {
|
|
26
|
+
console.log(` ✓ ${msg}`);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function topoSort(workItems) {
|
|
30
|
+
const ids = new Set(workItems.map((w) => w.work_item_id));
|
|
31
|
+
const adj = new Map();
|
|
32
|
+
for (const w of workItems) {
|
|
33
|
+
adj.set(w.work_item_id, (w.depends_on ?? []).filter((d) => ids.has(d)));
|
|
34
|
+
}
|
|
35
|
+
const visited = new Set();
|
|
36
|
+
const stack = new Set();
|
|
37
|
+
const order = [];
|
|
38
|
+
const cycles = [];
|
|
39
|
+
|
|
40
|
+
function dfs(n, path) {
|
|
41
|
+
if (stack.has(n)) {
|
|
42
|
+
cycles.push([...path, n]);
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (visited.has(n)) return;
|
|
46
|
+
visited.add(n);
|
|
47
|
+
stack.add(n);
|
|
48
|
+
for (const d of adj.get(n) ?? []) dfs(d, [...path, n]);
|
|
49
|
+
stack.delete(n);
|
|
50
|
+
order.push(n);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
for (const id of ids) dfs(id, []);
|
|
54
|
+
order.reverse();
|
|
55
|
+
return { order, cycles };
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function computeCriticalPath(workItems) {
|
|
59
|
+
const ids = new Set(workItems.map((w) => w.work_item_id));
|
|
60
|
+
const len = new Map();
|
|
61
|
+
for (const w of workItems) len.set(w.work_item_id, 0);
|
|
62
|
+
let changed = true;
|
|
63
|
+
while (changed) {
|
|
64
|
+
changed = false;
|
|
65
|
+
for (const w of workItems) {
|
|
66
|
+
const deps = (w.depends_on ?? []).filter((d) => ids.has(d));
|
|
67
|
+
const base = deps.length === 0 ? 0 : Math.max(...deps.map((d) => len.get(d) ?? 0)) + 1;
|
|
68
|
+
if (base > (len.get(w.work_item_id) ?? 0)) {
|
|
69
|
+
len.set(w.work_item_id, base);
|
|
70
|
+
changed = true;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const maxLen = Math.max(0, ...len.values());
|
|
75
|
+
const end = workItems.filter((w) => len.get(w.work_item_id) === maxLen).map((w) => w.work_item_id);
|
|
76
|
+
// Backtrack one longest path
|
|
77
|
+
const path = [];
|
|
78
|
+
let cur = end[0];
|
|
79
|
+
if (!cur) return [];
|
|
80
|
+
const byId = new Map(workItems.map((w) => [w.work_item_id, w]));
|
|
81
|
+
while (cur) {
|
|
82
|
+
path.unshift(cur);
|
|
83
|
+
const w = byId.get(cur);
|
|
84
|
+
const deps = (w?.depends_on ?? []).filter((d) => ids.has(d));
|
|
85
|
+
if (deps.length === 0) break;
|
|
86
|
+
cur = deps.reduce((a, b) => ((len.get(a) ?? 0) >= (len.get(b) ?? 0) ? a : b));
|
|
87
|
+
}
|
|
88
|
+
return path;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function validateExecutionPlan(packet, projectRoot = ROOT) {
|
|
92
|
+
const errors = [];
|
|
93
|
+
const ep = packet.execution_plan;
|
|
94
|
+
if (!ep) {
|
|
95
|
+
errors.push("execution_plan required");
|
|
96
|
+
return { status: "fail", errors, report: null };
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const risk = packet.risk_level ?? "med";
|
|
100
|
+
const min = MINIMUMS[risk] ?? MINIMUMS.med;
|
|
101
|
+
const phases = ep.phases ?? [];
|
|
102
|
+
const workItems = ep.work_items ?? [];
|
|
103
|
+
const conflicts = [];
|
|
104
|
+
|
|
105
|
+
if (phases.length < min.phases) {
|
|
106
|
+
errors.push(`need >= ${min.phases} phases for risk ${risk}`);
|
|
107
|
+
}
|
|
108
|
+
if (workItems.length < min.work_items) {
|
|
109
|
+
errors.push(`need >= ${min.work_items} work_items for risk ${risk}`);
|
|
110
|
+
}
|
|
111
|
+
const ac = packet.acceptance_checks ?? [];
|
|
112
|
+
if (ac.length < min.acceptance_checks) {
|
|
113
|
+
errors.push(`need >= ${min.acceptance_checks} acceptance_checks`);
|
|
114
|
+
}
|
|
115
|
+
if ((ep.risk_register ?? []).length < min.risks) {
|
|
116
|
+
errors.push(`need >= ${min.risks} risks for risk ${risk}`);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const phaseIds = new Set(phases.map((p) => p.phase_id));
|
|
120
|
+
const phaseIndex = new Map(phases.map((p, i) => [p.phase_id, i]));
|
|
121
|
+
const wiIds = new Set(workItems.map((w) => w.work_item_id));
|
|
122
|
+
|
|
123
|
+
for (const p of phases) {
|
|
124
|
+
if (!p.exit_criteria?.length) errors.push(`phase ${p.phase_id} missing exit_criteria`);
|
|
125
|
+
if (!p.work_item_ids?.length) errors.push(`phase ${p.phase_id} has no work items`);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
const wiInPhase = new Set();
|
|
129
|
+
for (const w of workItems) {
|
|
130
|
+
if (!phaseIds.has(w.phase_id)) {
|
|
131
|
+
errors.push(`work_item ${w.work_item_id} unknown phase_id`);
|
|
132
|
+
}
|
|
133
|
+
wiInPhase.add(w.work_item_id);
|
|
134
|
+
for (const d of w.depends_on ?? []) {
|
|
135
|
+
if (!wiIds.has(d)) errors.push(`work_item ${w.work_item_id} depends_on missing ${d}`);
|
|
136
|
+
}
|
|
137
|
+
if (!w.non_code && (!w.files || w.files.length === 0)) {
|
|
138
|
+
errors.push(`work_item ${w.work_item_id} needs files[] or non_code: true`);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
for (const p of phases) {
|
|
143
|
+
for (const wid of p.work_item_ids ?? []) {
|
|
144
|
+
if (!wiIds.has(wid)) errors.push(`phase ${p.phase_id} references missing ${wid}`);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const { order, cycles } = topoSort(workItems);
|
|
149
|
+
if (cycles.length) errors.push(`cycle detected: ${JSON.stringify(cycles[0])}`);
|
|
150
|
+
|
|
151
|
+
// File conflicts
|
|
152
|
+
for (let i = 0; i < workItems.length; i++) {
|
|
153
|
+
for (let j = i + 1; j < workItems.length; j++) {
|
|
154
|
+
const a = workItems[i];
|
|
155
|
+
const b = workItems[j];
|
|
156
|
+
const filesA = new Set(a.files ?? []);
|
|
157
|
+
const overlap = (b.files ?? []).filter((f) => filesA.has(f));
|
|
158
|
+
if (overlap.length === 0) continue;
|
|
159
|
+
const reachable = (from, to, seen = new Set()) => {
|
|
160
|
+
if (from === to) return true;
|
|
161
|
+
if (seen.has(from)) return false;
|
|
162
|
+
seen.add(from);
|
|
163
|
+
const w = workItems.find((x) => x.work_item_id === from);
|
|
164
|
+
for (const d of w?.depends_on ?? []) {
|
|
165
|
+
if (reachable(d, to, seen)) return true;
|
|
166
|
+
}
|
|
167
|
+
return false;
|
|
168
|
+
};
|
|
169
|
+
if (!reachable(a.work_item_id, b.work_item_id) && !reachable(b.work_item_id, a.work_item_id)) {
|
|
170
|
+
if ((phaseIndex.get(a.phase_id) ?? 0) === (phaseIndex.get(b.phase_id) ?? 0)) {
|
|
171
|
+
conflicts.push(
|
|
172
|
+
`file overlap ${overlap.join(",")} between ${a.work_item_id} and ${b.work_item_id} without dependency`,
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
const computedCp = computeCriticalPath(workItems);
|
|
180
|
+
const authorCp = ep.schedule_metadata?.critical_path_work_item_ids ?? [];
|
|
181
|
+
if (computedCp.length >= 3 && authorCp.length) {
|
|
182
|
+
const same =
|
|
183
|
+
authorCp.length === computedCp.length &&
|
|
184
|
+
authorCp.every((id, i) => id === computedCp[i]);
|
|
185
|
+
if (!same) {
|
|
186
|
+
errors.push(
|
|
187
|
+
`critical_path mismatch author=${authorCp.join("→")} computed=${computedCp.join("→")}`,
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
const acIds = new Set(
|
|
193
|
+
ac.map((c) => (typeof c === "string" ? c : c.id)).filter(Boolean),
|
|
194
|
+
);
|
|
195
|
+
for (const w of workItems) {
|
|
196
|
+
for (const acid of w.acceptance_check_ids ?? []) {
|
|
197
|
+
if (!acIds.has(acid)) errors.push(`${w.work_item_id} references orphan ${acid}`);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
for (const acid of acIds) {
|
|
201
|
+
const used = workItems.some((w) => (w.acceptance_check_ids ?? []).includes(acid));
|
|
202
|
+
if (!used) errors.push(`orphan acceptance check ${acid}`);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
const status = errors.length === 0 && conflicts.length === 0 ? "pass" : "fail";
|
|
206
|
+
const report = {
|
|
207
|
+
status,
|
|
208
|
+
topological_order: order,
|
|
209
|
+
cycles,
|
|
210
|
+
conflicts: [...conflicts, ...errors],
|
|
211
|
+
};
|
|
212
|
+
return { status, errors: [...errors, ...conflicts], report };
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
async function main() {
|
|
216
|
+
const args = process.argv.slice(2);
|
|
217
|
+
let packetPath = null;
|
|
218
|
+
let writeBack = false;
|
|
219
|
+
for (let i = 0; i < args.length; i++) {
|
|
220
|
+
if (args[i] === "--packet" && args[i + 1]) packetPath = args[++i];
|
|
221
|
+
else if (args[i] === "--write") writeBack = true;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if (!packetPath) {
|
|
225
|
+
console.error("Usage: validate-plan-dag.mjs --packet <plan-packet.yaml> [--write]");
|
|
226
|
+
process.exit(2);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const abs = resolve(packetPath);
|
|
230
|
+
try {
|
|
231
|
+
await access(abs, constants.R_OK);
|
|
232
|
+
} catch {
|
|
233
|
+
fail(`cannot read ${abs}`);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
const packet = await readYamlFile(abs);
|
|
237
|
+
const { status, errors, report } = validateExecutionPlan(packet, dirname(abs));
|
|
238
|
+
|
|
239
|
+
if (writeBack && report && packet.execution_plan) {
|
|
240
|
+
packet.execution_plan.dag_validation = {
|
|
241
|
+
status: report.status,
|
|
242
|
+
topological_order: report.topological_order,
|
|
243
|
+
cycles: report.cycles,
|
|
244
|
+
conflicts: report.conflicts,
|
|
245
|
+
};
|
|
246
|
+
await writeYamlFile(abs, packet);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
if (status !== "pass") {
|
|
250
|
+
for (const e of errors) console.error(` - ${e}`);
|
|
251
|
+
fail("validation failed");
|
|
252
|
+
}
|
|
253
|
+
ok(`DAG validation pass (${report.topological_order.length} work items)`);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
if (process.argv[1] && fileURLToPath(import.meta.url) === resolve(process.argv[1])) {
|
|
257
|
+
main();
|
|
258
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Re-fetch upstream pi-subagents from narumiruna/pi-extensions.
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
5
|
+
VEND="$ROOT/vendor/pi-subagents"
|
|
6
|
+
BASE="https://raw.githubusercontent.com/narumiruna/pi-extensions/main/extensions/pi-subagents"
|
|
7
|
+
|
|
8
|
+
mkdir -p "$VEND/src"
|
|
9
|
+
curl -fsSL "$BASE/LICENSE" -o "$VEND/LICENSE"
|
|
10
|
+
curl -fsSL "$BASE/src/subagents.ts" -o "$VEND/src/subagents.upstream.ts"
|
|
11
|
+
|
|
12
|
+
# Preserve ultimate-pi harness extensions (agents.ts, harness patches applied to subagents.ts manually or via merge).
|
|
13
|
+
if [[ ! -f "$VEND/src/agents.ts" ]]; then
|
|
14
|
+
curl -fsSL "$BASE/src/agents.ts" -o "$VEND/src/agents.ts"
|
|
15
|
+
fi
|
|
16
|
+
|
|
17
|
+
sed -i 's/from "typebox"/from "@sinclair\/typebox"/g' "$VEND/src/subagents.upstream.ts" 2>/dev/null || true
|
|
18
|
+
|
|
19
|
+
echo "Fetched upstream into $VEND/src/subagents.upstream.ts — merge harness changes into subagents.ts before commit."
|
|
@@ -23,7 +23,7 @@ Verifies with `sg --version`.
|
|
|
23
23
|
| Task | Tool | Why |
|
|
24
24
|
|------|------|-----|
|
|
25
25
|
| Find code by structure/pattern | **ast-grep** (`sg`) | AST-aware — knows what is a function call vs a string |
|
|
26
|
-
| Find code by concept/meaning | graphify /
|
|
26
|
+
| Find code by concept/meaning | graphify / `ccc search` | Architecture (graphify) vs implementation chunks (`ccc`) |
|
|
27
27
|
| Find exact literal string | `grep` | Only tool for non-code files or exact byte match |
|
|
28
28
|
| Explore architecture | graphify | Call graph, community detection |
|
|
29
29
|
|
|
@@ -319,7 +319,7 @@ Need to find code
|
|
|
319
319
|
├─ Structural pattern (function calls, imports, classes)? → sg -p 'pattern'
|
|
320
320
|
├─ Rewrite/codemod needed? → sg -p 'old' --rewrite 'new'
|
|
321
321
|
├─ Project-wide lint rule? → sg scan (with sgconfig.yml)
|
|
322
|
-
├─ Conceptual/semantic search? → graphify query or
|
|
322
|
+
├─ Conceptual/semantic search? → graphify query (architecture) or ccc search (implementation)
|
|
323
323
|
├─ Explore architecture? → graphify
|
|
324
324
|
└─ Exact literal string in non-code? → grep
|
|
325
325
|
```
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ccc
|
|
3
|
+
description: "This skill should be used when code search, file/directory summary lookup, or concept-guide lookup is needed (whether explicitly requested or as part of completing a task), when indexing the codebase after changes, or when the user asks about ccc, cocoindex-code, or the codebase index. Trigger phrases include 'search the codebase', 'find code related to', 'describe this file', 'read the concept guide', 'update the index', 'ccc', 'cocoindex-code'."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ccc - Semantic Code Search & Indexing
|
|
7
|
+
|
|
8
|
+
`ccc` is the CLI for CocoIndex Code, providing semantic search over the current codebase and index management.
|
|
9
|
+
|
|
10
|
+
## Ownership
|
|
11
|
+
|
|
12
|
+
The agent owns the `ccc` lifecycle for the current project — initialization, indexing, and searching. Do not ask the user to perform these steps; handle them automatically.
|
|
13
|
+
|
|
14
|
+
- **Initialization**: If `ccc search` or `ccc index` fails with an initialization error (e.g., "Not in an initialized project directory"), run `bash "$UP_PKG/.pi/scripts/harness-cocoindex-bootstrap.sh"` from the project root (or `ccc init` + `ccc index` when not in ultimate-pi harness), then retry the original command.
|
|
15
|
+
- **Index freshness**: Keep the index up to date by running `ccc index` (or `ccc search --refresh`) when the index may be stale — e.g., at the start of a session, or after making significant code changes (new files, refactors, renamed modules). There is no need to re-index between consecutive searches if no code was changed in between.
|
|
16
|
+
- **Installation**: If `ccc` itself is not found (command not found), refer to [management.md](references/management.md) for installation instructions and inform the user.
|
|
17
|
+
|
|
18
|
+
### ultimate-pi harness
|
|
19
|
+
|
|
20
|
+
- **Parent / main agents:** follow ownership above (`ccc index` when stale after large edits).
|
|
21
|
+
- **`harness/planning/scout-semantic`:** use **`ccc search` only** — the harness runs incremental `ccc index` before subagent spawns. Never run `ccc index`, `ccc init`, or `ccc search --refresh` in scouts.
|
|
22
|
+
- **Lane contract:** graphify = callers/communities/architecture; `ccc` = implementation-by-meaning (chunks). Do not use `ccc` for “who calls X” — use `graphify explain` / `graphify path`.
|
|
23
|
+
|
|
24
|
+
## Searching the Codebase
|
|
25
|
+
|
|
26
|
+
To perform a semantic search:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
ccc search <query terms>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The query should describe the concept, functionality, or behavior to find, not exact code syntax. For example:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
ccc search database connection pooling
|
|
36
|
+
ccc search user authentication flow
|
|
37
|
+
ccc search error handling retry logic
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Filtering Results
|
|
41
|
+
|
|
42
|
+
- **By language** (`--lang`, repeatable): restrict results to specific languages.
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
ccc search --lang python --lang markdown database schema
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
- **By path** (`--path`): restrict results to a glob pattern relative to project root. If omitted, defaults to the current working directory (only results under that subdirectory are returned).
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
ccc search --path 'src/api/*' request validation
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Pagination
|
|
55
|
+
|
|
56
|
+
Results default to the first page. To retrieve additional results:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
ccc search --offset 5 --limit 5 database schema
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
If all returned results look relevant, use `--offset` to fetch the next page — there are likely more useful matches beyond the first page.
|
|
63
|
+
|
|
64
|
+
### Working with Search Results
|
|
65
|
+
|
|
66
|
+
Search results include file paths and line ranges. To explore a result in more detail:
|
|
67
|
+
|
|
68
|
+
- Use the editor's built-in file reading capabilities (e.g., the `Read` tool) to load the matched file and read lines around the returned range for full context.
|
|
69
|
+
- When working in a terminal without a file-reading tool, use `sed -n '<start>,<end>p' <file>` to extract a specific line range.
|
|
70
|
+
|
|
71
|
+
### Following Hints in Search Output
|
|
72
|
+
|
|
73
|
+
Search results are a mixed ranking of code chunks, per-file/dir summaries, and (when configured) curated concept guides — all scored against the same query. Two kinds of hit come with a follow-up command embedded in the output:
|
|
74
|
+
|
|
75
|
+
- `[summary]` — a file or directory summary. Read with `ccc describe <path>`.
|
|
76
|
+
- `[guide]` — a curated concept guide. Read with `ccc guide <slug>`.
|
|
77
|
+
|
|
78
|
+
When a hit carries one of these tags, follow the hint: the synthesised text is usually a faster read than chasing through individual files. Conversely, do **not** run `ccc describe .` or `ccc guide` proactively as a triage step — let search rank what's relevant and act on what it returns.
|
|
79
|
+
|
|
80
|
+
## Describing Files and Directories
|
|
81
|
+
|
|
82
|
+
Per-file and per-directory summaries (when configured for the project) condense each file's public API, contracts, and role into a short markdown block. They are typically faster to consult than reading the source.
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
ccc describe src/auth/session.py # one file
|
|
86
|
+
ccc describe src/auth/ # directory: summary + children tree
|
|
87
|
+
ccc describe . # project root overview
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Use `describe` when you already know the path you want; let `ccc search` find paths for you when you don't.
|
|
91
|
+
|
|
92
|
+
## Concept Guides
|
|
93
|
+
|
|
94
|
+
Some projects configure cross-cutting concept guides in `.cocoindex_code/guides.yml` — synthesised markdown documents for architectural topics that span many files (e.g. memoization, plugin-SDK boundary, channel routing). Each guide names canonical files, end-to-end flow, and contracts/invariants.
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
ccc guide # list available guides + descriptions
|
|
98
|
+
ccc guide <slug> # print one guide
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Discovery is search-driven: a relevant guide will surface in `ccc search` results tagged `[guide]` with a `ccc guide <slug>` hint. Run `ccc guide` (no args) only when first orienting in an unfamiliar codebase or when the user explicitly asks for the guide list — not as a routine first step.
|
|
102
|
+
|
|
103
|
+
### Authoring `guides.yml` Interactively
|
|
104
|
+
|
|
105
|
+
When the user wants to add or improve concept guides, collaborate on the slug list rather than dumping a finished YAML. Good guide candidates are **named subsystems the codebase obviously has** — cross-cutting lifecycles, registration/dispatch protocols, end-to-end data paths. Single-file or symbol-specific topics do not warrant a guide; per-file summaries already cover those.
|
|
106
|
+
|
|
107
|
+
Recommended flow:
|
|
108
|
+
|
|
109
|
+
1. **Survey the codebase.** Use `ccc describe .` and a few likely subdirectory summaries to enumerate the project's subsystems and inter-edge boundaries.
|
|
110
|
+
2. **Propose candidates.** Suggest 5–10 slugs with one-line descriptions, framed to name the canonical starting file or directory for each topic. Show them to the user as a list.
|
|
111
|
+
3. **Iterate.** Ask which to keep, drop, rename, or merge. Surface non-obvious dependencies (`deps:`) so a higher-level guide can cite a lower-level one rather than restate it. Cycles are rejected at load time.
|
|
112
|
+
4. **Write the YAML.** Add the agreed entries to `.cocoindex_code/guides.yml` (creating the file if absent). Confirm `defaults.enabled: true` and that the project's summary feature is enabled — guides require summaries.
|
|
113
|
+
5. **Generate.** Run `ccc index` to drive the per-guide agent loop and produce `<slug>.md` files under `.cocoindex_code/guides/`. Re-run after editing descriptions to refresh.
|
|
114
|
+
|
|
115
|
+
Schema:
|
|
116
|
+
|
|
117
|
+
```yaml
|
|
118
|
+
defaults:
|
|
119
|
+
enabled: true # disables all guides when false
|
|
120
|
+
model: openai/gpt-5.4-nano # falls back to summary.model when omitted
|
|
121
|
+
session_budget: 200
|
|
122
|
+
max_logical_depth: 3
|
|
123
|
+
max_turns_per_session: 18
|
|
124
|
+
|
|
125
|
+
guides:
|
|
126
|
+
- slug: memoization # [a-z0-9][a-z0-9-]*
|
|
127
|
+
description: |
|
|
128
|
+
What this guide covers, framed for the reader.
|
|
129
|
+
Name the canonical starting files (e.g. "start with src/cache.py").
|
|
130
|
+
deps: [other-slug] # optional; must not cycle
|
|
131
|
+
max_turns_per_session: 28 # optional per-entry overrides
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
A multi-line description is fine and often clearer than one terse sentence — the description seeds the guide-generation agent's question, so concrete file/directory anchors pay off.
|
|
135
|
+
|
|
136
|
+
## Settings
|
|
137
|
+
|
|
138
|
+
To view or edit embedding model configuration, include/exclude patterns, or language overrides, see [settings.md](references/settings.md).
|
|
139
|
+
|
|
140
|
+
## Management & Troubleshooting
|
|
141
|
+
|
|
142
|
+
For installation, initialization, daemon management, troubleshooting, and cleanup commands, see [management.md](references/management.md).
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# ccc Management
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
|
|
5
|
+
Install CocoIndex Code via pipx. Two install styles:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pipx install 'cocoindex-code[full]' # batteries included (local embeddings via sentence-transformers)
|
|
9
|
+
pipx install cocoindex-code # slim (LiteLLM-only; requires a cloud embedding provider + API key)
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The `[full]` extra pulls in `sentence-transformers` so the first-run default (local embeddings, no API key) works out of the box. The slim install is for environments where you don't want the torch/transformers deps and plan to use a LiteLLM-supported cloud provider instead.
|
|
13
|
+
|
|
14
|
+
To upgrade to the latest version:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pipx upgrade cocoindex-code
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
After installation, the `ccc` command is available globally.
|
|
21
|
+
|
|
22
|
+
## Project Initialization
|
|
23
|
+
|
|
24
|
+
Run from the root directory of the project to index:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
ccc init
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**First run (global settings don't exist yet)** — `ccc init` prompts interactively for the embedding provider (sentence-transformers / litellm) and model, then runs a one-off test embed via the daemon to confirm the model works. Accept the defaults for the sentence-transformers path, or pick litellm and enter a model identifier.
|
|
31
|
+
|
|
32
|
+
**Subsequent runs** (global settings already exist) — prompts are skipped; only project settings and `.gitignore` are set up.
|
|
33
|
+
|
|
34
|
+
To skip the interactive prompts on the first run (e.g. in a script or container), pass `--litellm-model MODEL`:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
ccc init --litellm-model openai/text-embedding-3-small
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
This is also the only way to pick a LiteLLM model when stdin isn't a TTY and you've done a slim install.
|
|
41
|
+
|
|
42
|
+
`ccc init` creates:
|
|
43
|
+
- `~/.cocoindex_code/global_settings.yml` (user-level, embedding config + env vars).
|
|
44
|
+
- `.cocoindex_code/settings.yml` (project-level, include/exclude patterns).
|
|
45
|
+
|
|
46
|
+
If `.git` exists in the directory, `.cocoindex_code/` is automatically added to `.gitignore`.
|
|
47
|
+
|
|
48
|
+
Use `-f` to skip the confirmation prompt if `ccc init` detects a potential parent project root.
|
|
49
|
+
|
|
50
|
+
After initialization, edit the settings files if needed (see [settings.md](settings.md) for format details), then run `ccc index` to build the initial index. If the model test printed `[FAIL]` during `init`, edit `global_settings.yml` (and optionally add API keys under the commented `envs:` block) and verify with `ccc doctor` before indexing.
|
|
51
|
+
|
|
52
|
+
## Troubleshooting
|
|
53
|
+
|
|
54
|
+
### Diagnostics
|
|
55
|
+
|
|
56
|
+
Run `ccc doctor` to check system health end-to-end:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
ccc doctor
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
This checks global settings, daemon status, embedding model (runs a test embedding), and — if run from within a project — file matching (walks files using the same logic as the indexer) and index status. Results stream incrementally. Always points to `daemon.log` at the end for further investigation.
|
|
63
|
+
|
|
64
|
+
### Checking Project Status
|
|
65
|
+
|
|
66
|
+
To view the current project's index status:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
ccc status
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
This shows whether indexing is ongoing and index statistics.
|
|
73
|
+
|
|
74
|
+
### Daemon Management
|
|
75
|
+
|
|
76
|
+
The daemon starts automatically on first use. To check its status:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
ccc daemon status
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
This shows whether the daemon is running, its version, uptime, and loaded projects.
|
|
83
|
+
|
|
84
|
+
To restart the daemon (useful if it gets into a bad state):
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
ccc daemon restart
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
To stop the daemon:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
ccc daemon stop
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Cleanup
|
|
97
|
+
|
|
98
|
+
To reset a project's index (removes databases, keeps settings):
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
ccc reset
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
To fully remove all CocoIndex Code data for a project (including settings):
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
ccc reset --all
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Both commands prompt for confirmation. Use `-f` to skip.
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,28 @@ All notable changes to this project are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [v0.13.0] — 2026-05-18
|
|
8
|
+
|
|
9
|
+
### ✨ Features
|
|
10
|
+
|
|
11
|
+
- **CocoIndex Code:** replace `@beaconbay/ck-search` with offline `ccc` semantic search; `harness-cocoindex-bootstrap.sh`, pre-scout incremental index in `harness-subagents-bridge`, vendored `/skill:ccc`, `cocoindex-search` skill, and `ck-search` deprecation stub.
|
|
12
|
+
|
|
13
|
+
### 🔧 Chores
|
|
14
|
+
|
|
15
|
+
- Harness excludes for `graphify-out/`, `vendor/`, `raw/`, etc. in `.cocoindex_code/settings.yml`; `.gitignore` tracks `.cocoindex_code/`.
|
|
16
|
+
|
|
17
|
+
## [v0.12.0] — 2026-05-18
|
|
18
|
+
|
|
19
|
+
### ✨ Features
|
|
20
|
+
|
|
21
|
+
- **Harness subagents:** vendor `pi-subagents`; spawn budget, precheck, and policy bridge.
|
|
22
|
+
- **Router spawn auth:** forward concrete provider/model + API key to subprocesses using `--no-extensions` (fixes planning scout 401 with `router/auto`).
|
|
23
|
+
- **Plan review gate:** debate orchestration, execution-plan schemas, `write_harness_yaml`, plan-phase smoke fixture (ADR 0035).
|
|
24
|
+
|
|
25
|
+
### 🔧 Chores
|
|
26
|
+
|
|
27
|
+
- Stop tracking harness runtime and local graphify artifacts in git.
|
|
28
|
+
|
|
7
29
|
## [v0.11.0] — 2026-05-17
|
|
8
30
|
|
|
9
31
|
### ✨ Features
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -14,3 +14,18 @@
|
|
|
14
14
|
- **License:** MIT (see upstream repository)
|
|
15
15
|
- **Pinned revision:** See [vendor/pi-vcc/UPSTREAM_PIN.md](vendor/pi-vcc/UPSTREAM_PIN.md)
|
|
16
16
|
- ultimate-pi loads it from [`vendor/pi-vcc`](vendor/pi-vcc) via [`.pi/extensions/ultimate-pi-vcc.ts`](.pi/extensions/ultimate-pi-vcc.ts). Harness configuration is env-only: `HARNESS_VCC_COMPACTION`, `HARNESS_VCC_DEBUG` ([`.pi/extensions/lib/harness-vcc-settings.ts`](.pi/extensions/lib/harness-vcc-settings.ts)). Maintainer refresh: `npm run vendor:sync-vcc`.
|
|
17
|
+
|
|
18
|
+
## pi-subagents (vendored)
|
|
19
|
+
|
|
20
|
+
- **Project:** https://github.com/narumiruna/pi-extensions (`extensions/pi-subagents`)
|
|
21
|
+
- **npm:** `@narumitw/pi-subagents@0.1.26`
|
|
22
|
+
- **License:** MIT ([vendor/pi-subagents/LICENSE](vendor/pi-subagents/LICENSE))
|
|
23
|
+
- **Pinned revision:** See [vendor/pi-subagents/UPSTREAM_PIN.md](vendor/pi-subagents/UPSTREAM_PIN.md)
|
|
24
|
+
- ultimate-pi loads it from [`vendor/pi-subagents`](vendor/pi-subagents) via [`.pi/extensions/harness-subagents.ts`](.pi/extensions/harness-subagents.ts) with harness discovery, spawn gates, and subprocess env. Maintainer refresh: `npm run vendor:sync-subagents`.
|
|
25
|
+
|
|
26
|
+
## CocoIndex Code (CLI + skill)
|
|
27
|
+
|
|
28
|
+
- **Project:** https://github.com/cocoindex-io/cocoindex-code
|
|
29
|
+
- **License:** Apache-2.0
|
|
30
|
+
- **Install:** `uv tool install 'cocoindex-code[full]'` (see `/harness-setup` §2.4)
|
|
31
|
+
- ultimate-pi vendors the upstream agent skill at [`.pi/skills/ccc/`](.pi/skills/ccc/) and bootstraps indexes via [`.pi/scripts/harness-cocoindex-bootstrap.sh`](.pi/scripts/harness-cocoindex-bootstrap.sh). Replaces deprecated `@beaconbay/ck-search`.
|
package/biome.json
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"!graphify-books-out/**/*",
|
|
15
15
|
"!vendor/**/*",
|
|
16
16
|
"!.pi/harness/active-run.json",
|
|
17
|
-
"!.pi/harness/runs/**/run-context.
|
|
18
|
-
"!.pi/harness/runs/**/plan-packet.
|
|
17
|
+
"!.pi/harness/runs/**/run-context.yaml",
|
|
18
|
+
"!.pi/harness/runs/**/plan-packet.yaml"
|
|
19
19
|
]
|
|
20
20
|
},
|
|
21
21
|
"formatter": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultimate-pi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Ultimate AI coding harness for pi.dev — extensible skills, Obsidian wiki knowledge layer, compressed context, deterministic output",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -67,22 +67,24 @@
|
|
|
67
67
|
"README.md",
|
|
68
68
|
"THIRD_PARTY_NOTICES.md",
|
|
69
69
|
"vendor/pi-model-router",
|
|
70
|
+
"vendor/pi-subagents",
|
|
70
71
|
"vendor/pi-vcc"
|
|
71
72
|
],
|
|
72
73
|
"peerDependencies": {
|
|
73
74
|
"@earendil-works/pi-coding-agent": "*"
|
|
74
75
|
},
|
|
75
76
|
"scripts": {
|
|
76
|
-
"check:ts": "tsc --noEmit --target ES2023 --lib ES2023 --moduleResolution nodenext --module nodenext --skipLibCheck .pi/extensions/
|
|
77
|
+
"check:ts": "tsc --noEmit --target ES2023 --lib ES2023 --moduleResolution nodenext --module nodenext --skipLibCheck .pi/extensions/custom-system-prompt.ts .pi/lib/harness-run-context.ts .pi/lib/harness-ui-state.ts .pi/extensions/harness-run-context.ts .pi/extensions/lib/harness-vcc-settings.ts .pi/extensions/dotenv-loader.ts .pi/extensions/lib/posthog-node.d.ts .pi/extensions/lib/harness-posthog.ts .pi/extensions/lib/harness-paths.ts .pi/extensions/pi-model-router-harness.ts .pi/extensions/provider-payload-sanitize.ts .pi/extensions/harness-telemetry.ts .pi/extensions/harness-ask-user.ts .pi/extensions/harness-plan-approval.ts .pi/extensions/lib/ask-user/schema.ts .pi/extensions/lib/ask-user/types.ts .pi/extensions/lib/ask-user/validate.ts .pi/extensions/lib/ask-user/dialog.ts .pi/extensions/lib/ask-user/fallback.ts .pi/extensions/lib/ask-user/render.ts .pi/extensions/lib/plan-approval/types.ts .pi/extensions/lib/plan-approval/schema.ts .pi/extensions/lib/plan-approval/validate.ts .pi/extensions/lib/plan-approval/format-plan.ts .pi/extensions/lib/plan-approval/dialog.ts .pi/extensions/lib/plan-approval/fallback.ts .pi/extensions/lib/plan-approval/render.ts .pi/extensions/lib/plan-approval/create-plan.ts .pi/extensions/harness-subagents.ts .pi/extensions/lib/harness-subagents-bridge.ts .pi/extensions/lib/harness-cocoindex-refresh.ts .pi/extensions/lib/harness-subagent-auth.ts .pi/extensions/lib/harness-subagent-policy.ts .pi/extensions/lib/harness-subagent-precheck.ts .pi/extensions/lib/harness-spawn-budget.ts .pi/extensions/lib/spawn-policy.ts vendor/pi-subagents/src/agents.ts vendor/pi-subagents/src/subagents.ts .pi/extensions/trace-recorder.ts .pi/extensions/observation-bus.ts .pi/extensions/drift-monitor.ts .pi/extensions/policy-gate.ts .pi/extensions/budget-guard.ts .pi/extensions/debate-orchestrator.ts .pi/extensions/harness-live-widget.ts .pi/extensions/sentrux-rules-sync.ts .pi/extensions/custom-header.ts .pi/extensions/harness-web-tools.ts .pi/extensions/harness-web-guard.ts .pi/extensions/lib/harness-web/run-cli.ts",
|
|
77
78
|
"vendor:sync-router": "bash .pi/scripts/vendor-sync-pi-model-router.sh",
|
|
78
79
|
"vendor:sync-vcc": "bash .pi/scripts/vendor-sync-pi-vcc.sh",
|
|
80
|
+
"vendor:sync-subagents": "bash .pi/scripts/vendor-sync-pi-subagents.sh",
|
|
79
81
|
"release": "bash .pi/scripts/release.sh",
|
|
80
82
|
"lint": "biome check",
|
|
81
83
|
"lint:fix": "biome check --fix",
|
|
82
84
|
"format": "biome format --write",
|
|
83
85
|
"format:check": "biome format",
|
|
84
86
|
"prepare": "lefthook install",
|
|
85
|
-
"test": "node --test test/harness-verify.test.mjs test/harness-ask-user.test.mjs test/harness-subagents-loader.test.mjs test/harness-
|
|
87
|
+
"test": "node --test test/harness-verify.test.mjs test/harness-ask-user.test.mjs test/harness-subagents-loader.test.mjs test/harness-subagent-precheck.test.mjs test/sentrux-rules-sync.test.mjs test/harness-budget-guard.test.mjs && node .pi/harness/evals/smoke/smoke-harness-plan.mjs --fixture && npx -y tsx --test test/harness-vcc-settings.test.ts test/harness-plan-phase-policy.test.mjs test/harness-subagent-policy.test.mjs test/harness-spawn-budget.test.mjs test/harness-turn-routing.test.mjs test/plan-approval-format.test.mjs test/plan-approval-dialog.test.mjs test/plan-approval-sync.test.mjs test/plan-create-plan.test.mjs test/plan-review-format.test.mjs test/debate-plan-phase.test.mjs",
|
|
86
88
|
"test:vcc": "npx -y tsx --test vendor/pi-vcc/tests/*.test.ts",
|
|
87
89
|
"harness:sentrux-bootstrap": "node .pi/scripts/harness-sentrux-bootstrap.mjs",
|
|
88
90
|
"harness:sentrux-sync": "node .pi/scripts/sentrux-rules-sync.mjs --force",
|
|
@@ -96,7 +98,8 @@
|
|
|
96
98
|
"@earendil-works/pi-tui": "0.74.1",
|
|
97
99
|
"@sinclair/typebox": "^0.34.49",
|
|
98
100
|
"lefthook": "2.1.6",
|
|
99
|
-
"typescript": "^6.0.3"
|
|
101
|
+
"typescript": "^6.0.3",
|
|
102
|
+
"yaml": "^2.8.0"
|
|
100
103
|
},
|
|
101
104
|
"dependencies": {
|
|
102
105
|
"@posthog/pi": "latest",
|