@ikie-dev/cli 9.9.1 → 9.9.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.
Files changed (19) hide show
  1. package/.ikie/ferments/019f2cb6-1bd2-714a-8edd-5c7440e536e2/reviews/phase-phase-1-1.json +41 -0
  2. package/.ikie/ferments/019f2cb6-1bd2-714a-8edd-5c7440e536e2/runtime.json +11 -0
  3. package/.ikie/ferments/019f2cb6-1c3e-72d9-a88d-8f639b9ba138/reviews/phase-phase-1-1.json +47 -0
  4. package/.ikie/ferments/019f2cb6-1c3e-72d9-a88d-8f639b9ba138/runtime.json +13 -0
  5. package/.ikie/ferments/019f2cb6-1caa-736a-9d87-411cc0c93174/reviews/phase-phase-1-1.json +40 -0
  6. package/.ikie/ferments/019f2cb6-1caa-736a-9d87-411cc0c93174/runtime.json +9 -0
  7. package/.ikie/ferments/019f2cb6-1cd1-76c3-a3de-59ed401d4aa1/reviews/phase-phase-1-1.json +40 -0
  8. package/.ikie/ferments/019f2cb6-1cd1-76c3-a3de-59ed401d4aa1/runtime.json +9 -0
  9. package/.ikie/ferments/019f2cb6-1cf2-716a-b444-f4b8bc835d8a/reviews/phase-phase-1-1.json +40 -0
  10. package/.ikie/ferments/019f2cb6-1cf2-716a-b444-f4b8bc835d8a/runtime.json +9 -0
  11. package/.ikie/ferments/019f2cb6-1d0d-72af-b2e0-e60c6215e6d3/reviews/phase-phase-1-1.json +40 -0
  12. package/.ikie/ferments/019f2cb6-1d0d-72af-b2e0-e60c6215e6d3/runtime.json +9 -0
  13. package/.ikie/ferments/019f2cb6-1d33-7338-aafb-d8d6918de205/reviews/phase-phase-1-1.json +40 -0
  14. package/.ikie/ferments/019f2cb6-1d33-7338-aafb-d8d6918de205/runtime.json +9 -0
  15. package/.ikie/ferments/019f2cb6-1d55-71db-82e2-91216d201a8a/reviews/phase-phase-1-1.json +62 -0
  16. package/.ikie/ferments/019f2cb6-1d55-71db-82e2-91216d201a8a/runtime.json +9 -0
  17. package/package.json +1 -1
  18. package/src/extensions/ferment/tools/escalate.ts +14 -2
  19. package/src/extensions/ferment/tools/phases.ts +21 -8
@@ -0,0 +1,41 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "fermentId": "019f2cb6-1bd2-714a-8edd-5c7440e536e2",
4
+ "phaseId": "phase-1",
5
+ "phaseName": "Phase 1",
6
+ "attempt": 1,
7
+ "timestamp": "2026-07-04T10:39:20.095Z",
8
+ "goal": "Build 1",
9
+ "summary": "phase done",
10
+ "stepSummaries": " 1. Step 1 [done]",
11
+ "diffAvailable": true,
12
+ "diffFilesChanged": "file.ts",
13
+ "flags": [],
14
+ "derivedGrade": "A",
15
+ "reviewerRationale": "All gates pass; project checks validate.",
16
+ "gateVerdicts": [
17
+ {
18
+ "id": "F1",
19
+ "verdict": "pass",
20
+ "rationale": "All step verifications were real.",
21
+ "evidence": "step-1 used smoke"
22
+ },
23
+ {
24
+ "id": "F2",
25
+ "verdict": "pass",
26
+ "rationale": "Phase goal delivered.",
27
+ "evidence": "feature.ts:1-40"
28
+ },
29
+ {
30
+ "id": "F3",
31
+ "verdict": "pass",
32
+ "rationale": "Nothing deferred.",
33
+ "evidence": "n/a"
34
+ }
35
+ ],
36
+ "projectChecks": {
37
+ "discovered": false,
38
+ "anyFailed": false,
39
+ "commands": []
40
+ }
41
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "stepStartCounts": {},
4
+ "blockRetries": {},
5
+ "lastBlockHashes": {},
6
+ "stepCompleteAttempts": {},
7
+ "phaseStartRefs": {
8
+ "phase-1": "abc123"
9
+ },
10
+ "stepStartRefs": {}
11
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "fermentId": "019f2cb6-1c3e-72d9-a88d-8f639b9ba138",
4
+ "phaseId": "phase-1",
5
+ "phaseName": "Phase 1",
6
+ "attempt": 1,
7
+ "timestamp": "2026-07-04T10:39:20.150Z",
8
+ "goal": "Build 1",
9
+ "summary": "phase done",
10
+ "stepSummaries": " 1. Step 1 [done]",
11
+ "diffAvailable": false,
12
+ "flags": [
13
+ {
14
+ "problem": "Gate F1 flagged: All steps were proxy-verified — no real behavior was exercised.",
15
+ "evidence": "step-1 used test -f, step-2 used grep",
16
+ "severity": "block",
17
+ "redirect": "Address F1 before completing this phase. The flag was self-reported — fix the underlying problem and re-submit the gate with verdict 'pass' (or 'omitted' with rationale if the gate truly does not apply)."
18
+ }
19
+ ],
20
+ "derivedGrade": "F",
21
+ "reviewerRationale": "1 block flag(s) raised — see attached gate verdicts and project checks.",
22
+ "gateVerdicts": [
23
+ {
24
+ "id": "F1",
25
+ "verdict": "flag",
26
+ "rationale": "All steps were proxy-verified — no real behavior was exercised.",
27
+ "evidence": "step-1 used test -f, step-2 used grep"
28
+ },
29
+ {
30
+ "id": "F2",
31
+ "verdict": "pass",
32
+ "rationale": "Phase artifact exists.",
33
+ "evidence": "feature.ts"
34
+ },
35
+ {
36
+ "id": "F3",
37
+ "verdict": "pass",
38
+ "rationale": "Nothing deferred.",
39
+ "evidence": "n/a"
40
+ }
41
+ ],
42
+ "projectChecks": {
43
+ "discovered": false,
44
+ "anyFailed": false,
45
+ "commands": []
46
+ }
47
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "stepStartCounts": {},
4
+ "blockRetries": {
5
+ "phase-1": 1
6
+ },
7
+ "lastBlockHashes": {
8
+ "phase-1": "f329a724"
9
+ },
10
+ "stepCompleteAttempts": {},
11
+ "phaseStartRefs": {},
12
+ "stepStartRefs": {}
13
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "fermentId": "019f2cb6-1caa-736a-9d87-411cc0c93174",
4
+ "phaseId": "phase-1",
5
+ "phaseName": "Phase 1",
6
+ "attempt": 1,
7
+ "timestamp": "2026-07-04T10:39:20.262Z",
8
+ "goal": "Build 1",
9
+ "summary": "phase done",
10
+ "stepSummaries": " 1. Step 1 [done]",
11
+ "diffAvailable": false,
12
+ "flags": [],
13
+ "derivedGrade": "A",
14
+ "reviewerRationale": "All gates pass; project checks validate.",
15
+ "gateVerdicts": [
16
+ {
17
+ "id": "F1",
18
+ "verdict": "pass",
19
+ "rationale": "All step verifications were real.",
20
+ "evidence": "step-1 used smoke"
21
+ },
22
+ {
23
+ "id": "F2",
24
+ "verdict": "pass",
25
+ "rationale": "Phase goal delivered.",
26
+ "evidence": "feature.ts:1-40"
27
+ },
28
+ {
29
+ "id": "F3",
30
+ "verdict": "pass",
31
+ "rationale": "Nothing deferred.",
32
+ "evidence": "n/a"
33
+ }
34
+ ],
35
+ "projectChecks": {
36
+ "discovered": false,
37
+ "anyFailed": false,
38
+ "commands": []
39
+ }
40
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "stepStartCounts": {},
4
+ "blockRetries": {},
5
+ "lastBlockHashes": {},
6
+ "stepCompleteAttempts": {},
7
+ "phaseStartRefs": {},
8
+ "stepStartRefs": {}
9
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "fermentId": "019f2cb6-1cd1-76c3-a3de-59ed401d4aa1",
4
+ "phaseId": "phase-1",
5
+ "phaseName": "Phase 1",
6
+ "attempt": 1,
7
+ "timestamp": "2026-07-04T10:39:20.296Z",
8
+ "goal": "Build 1",
9
+ "summary": "phase done",
10
+ "stepSummaries": " 1. Step 1 [done]",
11
+ "diffAvailable": false,
12
+ "flags": [],
13
+ "derivedGrade": "A",
14
+ "reviewerRationale": "All gates pass; project checks validate.",
15
+ "gateVerdicts": [
16
+ {
17
+ "id": "F1",
18
+ "verdict": "pass",
19
+ "rationale": "All step verifications were real.",
20
+ "evidence": "step-1 used smoke"
21
+ },
22
+ {
23
+ "id": "F2",
24
+ "verdict": "pass",
25
+ "rationale": "Phase goal delivered.",
26
+ "evidence": "feature.ts:1-40"
27
+ },
28
+ {
29
+ "id": "F3",
30
+ "verdict": "pass",
31
+ "rationale": "Nothing deferred.",
32
+ "evidence": "n/a"
33
+ }
34
+ ],
35
+ "projectChecks": {
36
+ "discovered": false,
37
+ "anyFailed": false,
38
+ "commands": []
39
+ }
40
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "stepStartCounts": {},
4
+ "blockRetries": {},
5
+ "lastBlockHashes": {},
6
+ "stepCompleteAttempts": {},
7
+ "phaseStartRefs": {},
8
+ "stepStartRefs": {}
9
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "fermentId": "019f2cb6-1cf2-716a-b444-f4b8bc835d8a",
4
+ "phaseId": "phase-1",
5
+ "phaseName": "Phase 1",
6
+ "attempt": 1,
7
+ "timestamp": "2026-07-04T10:39:20.327Z",
8
+ "goal": "Build 1",
9
+ "summary": "phase done",
10
+ "stepSummaries": " 1. Step 1 [done]",
11
+ "diffAvailable": false,
12
+ "flags": [],
13
+ "derivedGrade": "A",
14
+ "reviewerRationale": "All gates pass; project checks validate.",
15
+ "gateVerdicts": [
16
+ {
17
+ "id": "F1",
18
+ "verdict": "pass",
19
+ "rationale": "All step verifications were real.",
20
+ "evidence": "step-1 used smoke"
21
+ },
22
+ {
23
+ "id": "F2",
24
+ "verdict": "pass",
25
+ "rationale": "Phase goal delivered.",
26
+ "evidence": "feature.ts:1-40"
27
+ },
28
+ {
29
+ "id": "F3",
30
+ "verdict": "pass",
31
+ "rationale": "Nothing deferred.",
32
+ "evidence": "n/a"
33
+ }
34
+ ],
35
+ "projectChecks": {
36
+ "discovered": false,
37
+ "anyFailed": false,
38
+ "commands": []
39
+ }
40
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "stepStartCounts": {},
4
+ "blockRetries": {},
5
+ "lastBlockHashes": {},
6
+ "stepCompleteAttempts": {},
7
+ "phaseStartRefs": {},
8
+ "stepStartRefs": {}
9
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "fermentId": "019f2cb6-1d0d-72af-b2e0-e60c6215e6d3",
4
+ "phaseId": "phase-1",
5
+ "phaseName": "Phase 1",
6
+ "attempt": 1,
7
+ "timestamp": "2026-07-04T10:39:20.366Z",
8
+ "goal": "Build 1",
9
+ "summary": "phase done",
10
+ "stepSummaries": " 1. Step 1 [done]",
11
+ "diffAvailable": false,
12
+ "flags": [],
13
+ "derivedGrade": "A",
14
+ "reviewerRationale": "All gates pass; project checks validate.",
15
+ "gateVerdicts": [
16
+ {
17
+ "id": "F1",
18
+ "verdict": "pass",
19
+ "rationale": "All step verifications were real.",
20
+ "evidence": "step-1 used smoke"
21
+ },
22
+ {
23
+ "id": "F2",
24
+ "verdict": "pass",
25
+ "rationale": "Phase goal delivered.",
26
+ "evidence": "feature.ts:1-40"
27
+ },
28
+ {
29
+ "id": "F3",
30
+ "verdict": "pass",
31
+ "rationale": "Nothing deferred.",
32
+ "evidence": "n/a"
33
+ }
34
+ ],
35
+ "projectChecks": {
36
+ "discovered": false,
37
+ "anyFailed": false,
38
+ "commands": []
39
+ }
40
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "stepStartCounts": {},
4
+ "blockRetries": {},
5
+ "lastBlockHashes": {},
6
+ "stepCompleteAttempts": {},
7
+ "phaseStartRefs": {},
8
+ "stepStartRefs": {}
9
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "fermentId": "019f2cb6-1d33-7338-aafb-d8d6918de205",
4
+ "phaseId": "phase-1",
5
+ "phaseName": "Phase 1",
6
+ "attempt": 1,
7
+ "timestamp": "2026-07-04T10:39:20.392Z",
8
+ "goal": "Build 1",
9
+ "summary": "phase done",
10
+ "stepSummaries": " 1. Step 1 [done]",
11
+ "diffAvailable": false,
12
+ "flags": [],
13
+ "derivedGrade": "A",
14
+ "reviewerRationale": "All gates pass; project checks validate.",
15
+ "gateVerdicts": [
16
+ {
17
+ "id": "F1",
18
+ "verdict": "pass",
19
+ "rationale": "All step verifications were real.",
20
+ "evidence": "step-1 used smoke"
21
+ },
22
+ {
23
+ "id": "F2",
24
+ "verdict": "pass",
25
+ "rationale": "Phase goal delivered.",
26
+ "evidence": "feature.ts:1-40"
27
+ },
28
+ {
29
+ "id": "F3",
30
+ "verdict": "pass",
31
+ "rationale": "Nothing deferred.",
32
+ "evidence": "n/a"
33
+ }
34
+ ],
35
+ "projectChecks": {
36
+ "discovered": false,
37
+ "anyFailed": false,
38
+ "commands": []
39
+ }
40
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "stepStartCounts": {},
4
+ "blockRetries": {},
5
+ "lastBlockHashes": {},
6
+ "stepCompleteAttempts": {},
7
+ "phaseStartRefs": {},
8
+ "stepStartRefs": {}
9
+ }
@@ -0,0 +1,62 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "fermentId": "019f2cb6-1d55-71db-82e2-91216d201a8a",
4
+ "phaseId": "phase-1",
5
+ "phaseName": "Phase 1",
6
+ "attempt": 1,
7
+ "timestamp": "2026-07-04T10:39:20.440Z",
8
+ "goal": "Build 1",
9
+ "summary": "phase done",
10
+ "stepSummaries": " 1. Step 1 [done]",
11
+ "diffAvailable": false,
12
+ "flags": [],
13
+ "derivedGrade": "A",
14
+ "reviewerRationale": "All gates pass; project checks validate.",
15
+ "gateVerdicts": [
16
+ {
17
+ "id": "F1",
18
+ "verdict": "pass",
19
+ "rationale": "All step verifications were real.",
20
+ "evidence": "step-1 used smoke"
21
+ },
22
+ {
23
+ "id": "F2",
24
+ "verdict": "pass",
25
+ "rationale": "Phase goal delivered.",
26
+ "evidence": "feature.ts:1-40"
27
+ },
28
+ {
29
+ "id": "F3",
30
+ "verdict": "pass",
31
+ "rationale": "Nothing deferred.",
32
+ "evidence": "n/a"
33
+ }
34
+ ],
35
+ "projectChecks": {
36
+ "discovered": true,
37
+ "anyFailed": false,
38
+ "commands": [
39
+ {
40
+ "kind": "test",
41
+ "command": "npm test",
42
+ "exitCode": 0,
43
+ "durationMs": 0,
44
+ "timedOut": false
45
+ },
46
+ {
47
+ "kind": "lint",
48
+ "command": "npm run lint",
49
+ "exitCode": 0,
50
+ "durationMs": 0,
51
+ "timedOut": false
52
+ },
53
+ {
54
+ "kind": "typecheck",
55
+ "command": "npm run typecheck",
56
+ "exitCode": 0,
57
+ "durationMs": 0,
58
+ "timedOut": false
59
+ }
60
+ ]
61
+ }
62
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "stepStartCounts": {},
4
+ "blockRetries": {},
5
+ "lastBlockHashes": {},
6
+ "stepCompleteAttempts": {},
7
+ "phaseStartRefs": {},
8
+ "stepStartRefs": {}
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikie-dev/cli",
3
- "version": "9.9.1",
3
+ "version": "9.9.3",
4
4
  "description": "ikie — a coding agent CLI powered by ikie AI",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -2,6 +2,7 @@ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent"
2
2
  import { findFirstPlannedPhase } from "../../../ferment/engine.js"
3
3
  import { captureGitHead } from "../phase-evidence.js"
4
4
  import type { FermentRuntime } from "../runtime.js"
5
+ import { scheduleFermentWakeUp } from "../scheduler.js"
5
6
  import { createApplyAndPersist, toolOk } from "../tool-helpers.js"
6
7
  import { applyFermentToolProfile, profileForFerment } from "../tool-scope.js"
7
8
 
@@ -28,9 +29,15 @@ export function registerEscalateTool(pi: ExtensionAPI, runtime: FermentRuntime):
28
29
  }
29
30
 
30
31
  const currentProfile = profileForFerment(ferment)
32
+
31
33
  if (currentProfile === "implementation") {
34
+ scheduleFermentWakeUp(pi, runtime, {
35
+ deliverAs: "followUp",
36
+ fermentId: ferment.id,
37
+ tag: "Tool refresh",
38
+ })
32
39
  return toolOk(
33
- `Already in implementation phase (ferment: ${ferment.id}). All tools should be available. If something is still missing, check your permissions config.`,
40
+ "The ferment is already in implementation phase. If bash/edit/write/start_ferment_step are not listed in this turn, stop now; a queued follow-up will continue with the refreshed implementation toolset.",
34
41
  )
35
42
  }
36
43
 
@@ -61,9 +68,14 @@ export function registerEscalateTool(pi: ExtensionAPI, runtime: FermentRuntime):
61
68
 
62
69
  const headRef = captureGitHead()
63
70
  if (headRef) runtime.setPhaseStartRef(ferment.id, planned.id, headRef)
71
+ scheduleFermentWakeUp(pi, runtime, {
72
+ deliverAs: "followUp",
73
+ fermentId: outcome.ferment.id,
74
+ tag: "Tool refresh",
75
+ })
64
76
 
65
77
  return toolOk(
66
- `Phase "${planned.name}" activated. Tool access upgraded to implementation you now have bash, edit, write, start_ferment_step, and all other execution tools.`,
78
+ `Phase "${planned.name}" activated. Implementation tools unlock on the next turn. Stop now; a queued follow-up will continue with the refreshed toolset.`,
67
79
  )
68
80
  },
69
81
  })
@@ -24,6 +24,7 @@ import { type PhaseEvidence, captureGitHead, gatherPhaseEvidence } from "../phas
24
24
  import { type ProjectCheckResult, runProjectChecks, summarizeProjectChecks } from "../project-tests.js"
25
25
  import { hashFlags, writeEscalationArtifact, writeReviewEvidence } from "../review-evidence.js"
26
26
  import { type FermentRuntime, defaultFermentRuntime } from "../runtime.js"
27
+ import { scheduleFermentWakeUp } from "../scheduler.js"
27
28
  import { MAX_BLOCK_RETRIES } from "../state.js"
28
29
  import {
29
30
  createApplyAndPersist,
@@ -578,11 +579,17 @@ export function registerPhaseTools(pi: ExtensionAPI, runtime: FermentRuntime = d
578
579
  .join("\n")
579
580
  const dm = formatDecisionsAndMemories(fresh)
580
581
  const dmSection = dm ? `\n\n${dm}` : ""
582
+
583
+ // The active tool schema refreshes only after this model turn ends.
584
+ // Queue the real next action as a follow-up and tell the model not to
585
+ // attempt implementation-only tools inside the stale planning turn.
586
+ scheduleFermentWakeUp(pi, runtime, {
587
+ deliverAs: "followUp",
588
+ fermentId: fresh.id,
589
+ tag: "Tool refresh",
590
+ })
581
591
  return toolOk(
582
- withNextActionHint(
583
- `Parallel group ${target.groupIndex} activated (${groupPhases.length} phases running concurrently).\nferment_id: ${fresh.id}\nparallel_group: ${target.groupIndex}\nphase_ids: ${groupPhases.map((p) => p.id).join(", ")}\n\n${phaseLines}\n\nRun all parallel phases concurrently: call refine_ferment_phase + start_ferment_step for each phase simultaneously.${dmSection}`,
584
- fresh,
585
- ),
592
+ `Parallel group ${target.groupIndex} activated (${groupPhases.length} phases running concurrently).\nferment_id: ${fresh.id}\nparallel_group: ${target.groupIndex}\nphase_ids: ${groupPhases.map((p) => p.id).join(", ")}\n\n${phaseLines}${dmSection}\n\nImplementation tools unlock on the next turn. Stop now; a queued follow-up will continue with the refreshed toolset.`,
586
593
  )
587
594
  }
588
595
 
@@ -612,11 +619,17 @@ export function registerPhaseTools(pi: ExtensionAPI, runtime: FermentRuntime = d
612
619
  : "\nNo steps yet — call refine_ferment_phase to populate them."
613
620
  const dm = formatDecisionsAndMemories(fresh)
614
621
  const dmSection = dm ? `\n\n${dm}` : ""
622
+
623
+ // The active tool schema refreshes only after this model turn ends.
624
+ // Queue the real next action as a follow-up and tell the model not to
625
+ // attempt implementation-only tools inside the stale planning turn.
626
+ scheduleFermentWakeUp(pi, runtime, {
627
+ deliverAs: "followUp",
628
+ fermentId: fresh.id,
629
+ tag: "Tool refresh",
630
+ })
615
631
  return toolOk(
616
- withNextActionHint(
617
- `Phase "${target.name}" activated.\nferment_id: ${fresh.id}\nphase_id: ${target.id}${stepList}${dmSection}`,
618
- fresh,
619
- ),
632
+ `Phase "${target.name}" activated.\nferment_id: ${fresh.id}\nphase_id: ${target.id}${stepList}${dmSection}\n\nImplementation tools unlock on the next turn. Stop now; a queued follow-up will continue with the refreshed toolset.`,
620
633
  )
621
634
  },
622
635
  })