ai-fob 1.7.0 → 1.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,31 +29,73 @@ command with no arguments on its own line:
29
29
  4. `/skill:agent-browser` — Browser Tool Constraint (NEVER macOS `open`;
30
30
  ALWAYS `agent-browser open`).
31
31
 
32
- Derive identifiers from $1: task slug = basename of the spec parent directory
33
- minus the leading `NN_` prefix (e.g. `specs/17_pi-build-phase/hl-plan.md`
34
- `pi-build-phase`). `phaseKebab` = the HL plan's phase-$2 section heading
35
- (lowercase, hyphenated). If either is unavailable, ask the user.
36
-
37
- Call the `state` tool three times with arguments shaped like:
32
+ Derive identifiers from $1:
33
+ - `SPEC_DIR` = `dirname($1)` the actual on-disk directory, numeric prefix
34
+ preserved (e.g. `specs/01_kanban-core-ui-schema/HL_PLAN.md`
35
+ `specs/01_kanban-core-ui-schema/`).
36
+ - `task` (slug) = basename of `SPEC_DIR` minus the leading `NN_` prefix
37
+ (e.g. `01_kanban-core-ui-schema` `kanban-core-ui-schema`). The slug
38
+ is what STATE.md uses internally.
39
+ - `PHASE_DIR` = `${SPEC_DIR}/phase-$2/` — where your artifacts live.
40
+ - `phaseKebab` = the HL plan's phase-$2 section heading (lowercase,
41
+ hyphenated). If any of these is unavailable, ask the user.
42
+
43
+ Scaffold the Phase block in STATE.md if needed (idempotent — leaves any
44
+ existing Phase block intact):
38
45
 
39
46
  ```json
40
- { "operation": "mark_step_start", "task": "<slug>", "phase": $2, "step": 0 }
41
47
  { "operation": "init_phase", "task": "<slug>", "phase": $2, "phaseKebab": "<derived>" }
42
- { "operation": "reconcile", "task": "<slug>", "phase": $2 }
43
48
  ```
44
49
 
45
- After `reconcile` returns, read `details.reconcile.entryStep` (0..6) as the
46
- starting step. If `entryStep > 0`, present `details.reconcile.table` to the
47
- user as a banner (echo $@ for context) and resume at `entryStep`. Do NOT
48
- re-execute any step `< entryStep`. The reconciler is the single source of
49
- truth for resume.
50
-
51
- When Step 0 is complete:
50
+ **Resume detection — YOU do it, not a tool.** Trust your eyes over any
51
+ classifier. Read `specs/STATE.md` and inspect `PHASE_DIR` on disk:
52
+
53
+ 1. Read `specs/STATE.md`; locate the `Phase $2` block under your task. Note
54
+ which Step markers are `[x]`, `[~]`, or `[ ]`.
55
+ 2. List `PHASE_DIR` (use the `bash` tool: `ls -la PHASE_DIR`). Note which
56
+ files are present.
57
+ 3. Canonical artifact ↔ Step mapping (from `phase-build-workflow` skill):
58
+ Step 1 → `explorer_findings.md` AND `docs_research.md`
59
+ Step 2 → `plan_V1.md`
60
+ Step 3 → `plan_validation_report.md`
61
+ Step 4 → `build_report.md`
62
+ Step 5 → `build_validation_report.md`
63
+ Step 6 → `phase_completion_report.md`
64
+ 4. Compute the resume entry step (`ENTRY_STEP`) as the lowest-numbered
65
+ step that is NOT already complete. For each step 1..6, "complete"
66
+ means BOTH:
67
+ - STATE.md marker is `[x]`, AND
68
+ - the canonical artifact(s) for that step are present in `PHASE_DIR`.
69
+ 5. Disagreement handling:
70
+ - STATE `[x]` AND artifact present → the step is done. Skip past it.
71
+ Do NOT re-run it. Do NOT modify its marker.
72
+ - STATE `[x]` AND artifact missing on disk → STOP and ask the user.
73
+ Show them the inconsistency (which step, which file expected,
74
+ directory listing). Do NOT silently reset markers.
75
+ - STATE `[~]` or `[ ]` → that's the `ENTRY_STEP`.
76
+ 6. Echo a one-line banner: `Resuming at Step <ENTRY_STEP> — Steps 1..<ENTRY_STEP-1> verified complete (STATE markers [x] AND artifacts present in PHASE_DIR).`
77
+ Then echo `$@` for any user context.
78
+
79
+ **Step 0 marker handling — do not touch STATE on a resume.** If
80
+ `ENTRY_STEP > 1` (this is a resume from a prior run), Step 0 was already
81
+ completed previously — leave its marker `[x]` alone and proceed directly
82
+ to `ENTRY_STEP`. Do NOT call `mark_step_start` or `mark_step_complete`
83
+ for Step 0.
84
+
85
+ If `ENTRY_STEP == 1` (this is a fresh phase, Steps 1..6 all `[ ]`), bracket
86
+ this Step 0 preparation with the usual markers:
52
87
 
53
88
  ```json
89
+ { "operation": "mark_step_start", "task": "<slug>", "phase": $2, "step": 0 }
54
90
  { "operation": "mark_step_complete", "task": "<slug>", "phase": $2, "step": 0 }
55
91
  ```
56
92
 
93
+ (The legacy `state.reconcile` operation still exists in the `task-state`
94
+ extension for diagnostic use, but is NO LONGER CONSULTED for resume.
95
+ Tool-codified verdicts proved less reliable than direct inspection: the
96
+ agent reading STATE.md and listing the phase directory is the source of
97
+ truth.)
98
+
57
99
  # Step 1 — Research (parallel: phase-explorer + phase-docs-researcher)
58
100
 
59
101
  Mark step start (step 1) via `state`.
@@ -858,7 +900,9 @@ summary as your final assistant message. Include:
858
900
 
859
901
  Do NOT:
860
902
 
861
- - Skip Step 0 (reconcile is mandatory; resume detection drives the entry).
903
+ - Skip Step 0 even on resume you must verify STATE.md ↔ PHASE_DIR
904
+ yourself before proceeding (read STATE.md, list the phase directory,
905
+ decide ENTRY_STEP; do NOT delegate the decision to `state.reconcile`).
862
906
  - Bypass either validator — `phase-plan-validator` and `phase-build-validator`
863
907
  MUST be called.
864
908
  - Continue past 3 fix cycles in either loop — escalate to the user instead.
@@ -887,5 +931,6 @@ Do NOT:
887
931
  # Execute this now
888
932
 
889
933
  Start by loading the four skills, then call `state` with
890
- `operation=init_phase, task=<derived>, phase=$2, phaseKebab=<derived>`, then
891
- `operation=reconcile` to detect resume, then proceed step by step.
934
+ `operation=init_phase, task=<derived>, phase=$2, phaseKebab=<derived>`,
935
+ then inspect `specs/STATE.md` and `PHASE_DIR` yourself to identify
936
+ `ENTRY_STEP` (the resume entry), then proceed step by step from there.
package/manifest.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.7.0",
2
+ "version": "1.7.2",
3
3
  "presets": {
4
4
  "coding": {
5
5
  "description": "Research-driven coding workflow",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-fob",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "Deploy research-driven AI coding assistant assets (skills, agents, commands) into your projects",
5
5
  "bin": {
6
6
  "ai-fob": "bin/install.js"