gcf-aif-ext 0.31.0 → 0.34.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/README.md CHANGED
@@ -50,6 +50,33 @@ Updating preserves `gcf/`, `cnlp.config.json` and the pre-commit hook. Run `ai-f
50
50
 
51
51
  On Windows, run `extension add` and `extension update` from PowerShell or cmd, not Git Bash: the installer unpacks with `tar`, and Git Bash's GNU tar reads `C:\…` as a remote host (`Cannot connect to C: resolve failed`). The Windows `tar.exe` handles it.
52
52
 
53
+ ### 0.34.0
54
+
55
+ Update together with gcf-board 0.34.0 and gcf-harness-aif-ext 0.33.0 ([Until-Records-Plan](https://github.com/VirtualMaestro/GCF/blob/main/docs/Until-Records-Plan.md)). Then run `ai-factory gcf init`: the `AGENTS.md` block changed (a session starts with `ai-factory gcf audit` and states its first line; a fired D2 goes to the human, who answers on the record itself). If the audit then reports inbox entries from before the categories, run `ai-factory gcf inbox migrate` once.
56
+
57
+ - **A fired assumption reaches the operator.** A D2 whose `until:` fired and has no `answer:` is a stale until record the audit's first line names (`stale until-records: q-019 retune(input) — ask the human`); an answered one is `answered`, never stale. `gcf board --json` gives such a D2 `category: decision` with `fired: true`, and a D2 of `manual(...)` or no trigger left unanswered past `question_stale_after_commits` (20) `category: decision` with `aged: true` and `commits`: the board shows both among the decisions. The human answers on the record (`gcf question answer q-NNN`, or Overrule on the board), never as a new D1; the agent then writes the answer into each slot citing `assumed: q-NNN` and drops the record, except while an unplayed item cites it.
58
+ - **`retune(<sys>)` counts only the tunes after the record.** It fires on a tune verdict of the subsystem after the commit that wrote the D2 (or the annotation's own line); a tune before it no longer makes a new record stale at birth, an uncommitted record is `open`, and a record outside git keeps the old rule: it fires once an item of the subsystem was tuned, or on any tune in the log.
59
+ - `stale_questions` keeps what the human still owes: unanswered D1, and unanswered D2 of `manual(...)` or no trigger past the limit; answered records and live `verdict()`/`retune()` ones are out.
60
+ - **GCF's own placeholders close by themselves.** `[until: manual(purpose of <s>)]` and `[until: manual(first verdict touching <s>)]` go when content arrives (`verdict keep`, `done --constraint`); writing a subsystem's purpose (`design save --kind system`, an import, a design commit) puts it in place of the marker in an existing `systems/<s>.md` in the same commit. Old markers in a project go at the next keep or design save of that subsystem. A marker left is listed in `audit --json` with `placeholder: true`, never in the first line or on the board. A human's own `manual()` stays.
61
+ - The readset takes a D2 an item cites as `assumed:` whatever its `sys:`, and lists `d2_fired`; plain `gcf context` prints each D2 record whole, `[fired: <trigger>]` on a fired one.
62
+
63
+ ### 0.33.0
64
+
65
+ Update together with gcf-board 0.33.0 and gcf-harness-aif-ext 0.32.0 ([Main-Run-Moves-Plan](https://github.com/VirtualMaestro/GCF/blob/main/docs/Main-Run-Moves-Plan.md)). Then run `ai-factory gcf init`: the `AGENTS.md` block changed.
66
+
67
+ - **An operator's move waits behind a card's main run instead of a refusal.** A move from a terminal (stdin is a tty) or from a board that passes `GCF_MOVE_TAG`, refused as `dirty` while a card's main run holds the checkout, waits without the main lock: it says `<move> waits: the run of <card> holds gcf/ edits (…)` and a `gcf-waiting: {"behind","paths"}` line on stderr, keeps `.gcf-session/waiting/<pid>.json`, looks once a second, and goes again from its first read once the refusal's paths are clean. Nothing is written while it waits. When the run ends with the paths still dirty (your own `gcf/` edits), it gets today's refusal. Ctrl-C, or the file `.gcf-session/waiting/<pid>.cancel` (`GCF_MOVE_CANCEL` names another), cancels it: nothing recorded.
68
+ - Sessions, threads, runs, a script's move without a tty or `GCF_MOVE_TAG`, and builds, push and play do not wait: refused as before. A card's claim yields up to 5 s to a waiting move about to go.
69
+ - With an older board (no `GCF_MOVE_TAG`) a move from the board is refused as before.
70
+
71
+ ### 0.32.0
72
+
73
+ Update together with gcf-board 0.32.0 (`gcf board --json` is `schema: 6`; each refuses the other's old schema) and gcf-harness-aif-ext 0.31.0 ([Fallback-Fidelity-Plan](https://github.com/VirtualMaestro/GCF/blob/main/docs/Fallback-Fidelity-Plan.md)). Then run `ai-factory gcf init`: the `AGENTS.md` block changed.
74
+
75
+ - **`run_mode` is `main` by default.** To keep parallel runs in worktrees, set `run_mode: worktree` in `gcf/config.yml` (or Settings). An item whose worktree copy or `work/<id>` branch still lives runs in `worktree` until the copy closes, whatever the default; a kept session resumes where it ran. `gcf audit` says `run_mode is main by default now; set worktree to keep parallel runs` while `run_mode` is unset and worktree copies live. The board read gives each card `runs_in`: its own `run_mode`, else its kept session's place, else `worktree` while its copy lives, else the project's.
76
+ - **Review defaults:** `review.plan` is `codex:astra:medium`, `claude:fable:medium`, `claude:fable:medium`; `review.code` is `codex:sol:high`, `claude:opus:high`. Lists already in `gcf/config.yml` stay as they are.
77
+ - **Stand-ins:** a review row that cannot make its pass gives way to the next of its stand-ins: a Codex `medium` row to `claude:fable:medium`, then `claude:opus:high`; a Codex `high` row to `claude:opus:high`; `claude:fable:medium` to `claude:opus:high`; any other row has none. After the last one, the session's own model makes the pass. `gcf review row --json` gives the row's `fallback`; the board read carries the table as `review_fallback`.
78
+ - **`gcf plan pass --for <row>`:** a pass made by a stand-in or by the session records the row it stands for (`, for agent:model:effort` in the pass line); the verdict counts the same. An older board loses the Passes fold on such a line: update it together.
79
+
53
80
  ### 0.27.0
54
81
 
55
82
  - **`gcf changes push` and `gcf changes pull`** ([Push-Plan](https://github.com/VirtualMaestro/GCF/blob/main/docs/Push-Plan.md)): the board's Push and Pull. Push sends the main checkout's branch to its upstream, fast-forward only: no `+`, no `--force`, no `--no-verify`, and no flag that adds one. With no upstream it pushes to `origin`, or the only remote, with `-u`; `--remote <name>` picks another. Pull is `fetch` and `merge --ff-only` of the same target: a branch with commits of its own over the remote's is refused as `diverged`, main untouched, and the merge is the agent's (`git pull --no-rebase`). Pull claims the checkout as a build by click does: no run starts meanwhile.
@@ -307,7 +334,7 @@ Update together with gcf-harness-aif-ext 0.12.0 and gcf-board 0.6.0 (docs/Sessio
307
334
  - `ai-factory gcf question answer <q-id> --text="<answer>"` writes the human's answer into its record of `gcf/open-questions.md` and commits. An answered D1 no longer blocks its units; the next agent on the unit puts the answer into its slot (`answer: q-NNN`) and removes the record. `gcf board --json` questions carry `question`, `proposed`, `blocks` and `answer`.
308
335
  - `ai-factory gcf claim <id>` / `release <id>`: an agent session working an item in the main checkout marks it running. The session's own `context`, `plan check` and `verify` on the item keep the mark fresh (so do a harness run on main and its readset-guard hook), a move on the item clears it, and 2 hours without either expire it. The board and the audit read it as `running`, so a harness run does not take the item, and the core refuses any move on it but the session's own (`submit`, `close`, `block` with `--claimed`). The mark names its owner (`GCF_RUN_OWNER` of a harness run, else `CLAUDE_CODE_SESSION_ID`): another owner's claim and `--claimed` moves are refused while it is fresh.
309
336
  - `prioritize` leaves the rank of a ready item it does not name (a running one): the named items take the free ranks around it.
310
- - `run_mode: worktree | main` in `gcf/config.yml` (Methodology §7): a project whose agent works through an editor bound to the project folder sets `main`. `gcf board --json` carries it.
337
+ - `run_mode: main | worktree` in `gcf/config.yml` (Methodology §7): `main` by default (one card at a time in the project folder); set `worktree` to keep parallel runs, each in its own copy. A card the harness keeps a session record of (`.gcf-session/runs/<id>.agent.json` `mode`) runs where that session ran, and one whose worktree copy or `work/<id>` branch lives runs in `worktree` until it is closed, whatever the default (its own `run_mode` comes first); `gcf audit` names a project that leaves `run_mode` unset while such copies live. `gcf board --json` carries the project's mode and each item's `runs_in`.
311
338
  - `/gcf-card` cuts several items along subsystem boundaries, marks two items of one subsystem that change different files `parallel: ok`, ranks them with `prioritize`, and keeps `depends` for real needs only.
312
339
 
313
340
  ### 0.6.0
@@ -322,7 +349,7 @@ Update together with gcf-harness-aif-ext 0.12.0 and gcf-board 0.6.0 (docs/Sessio
322
349
 
323
350
  - `gcf init` restamps an unplayed item frozen by 0.4.0 (the hash of its body alone), so its `live:` is guarded too — only while that `live:` is still the one its close committed. Commit the restamped items it names.
324
351
  - While a harness run drives an item (`.gcf-session/runs/<id>.lock` held by a live process), the core refuses any move on it, `/gcf-run` on main included, and `gcf integrate` leaves its branch unmerged; the audit and the board read it as `running`. A lock left by a run that died is taken over. `gcf board --json` reports WIP as `{count, limit, over}`.
325
- - The audit reads the `until:` of every D2 record in `open-questions.md`: a fired one is a stale until record, and the assumption goes back to the human.
352
+ - The audit reads the `until:` of every D2 record in `open-questions.md`: a fired one is a stale until record, and the assumption goes back to the human (0.34.0 refines this, see there).
326
353
  - `gcf design check` reads the text of an HTML comment in a unit or an item for forbidden words (M4) and numbers (M5); a `gcf:allow` pragma and a tool's marked region are skipped.
327
354
  - An unplayed tune or kill keeps a systems-doc line the doc held before the item's close.
328
355
  - `gcf playtest session` groups the checklist by subsystem and warns when the build is not of main: the remote's default branch when the clone knows it, else any branch but a detached HEAD or a `work/` one.
@@ -427,7 +454,7 @@ Every move of an item makes one commit `gcf(<move>): <id>` with every file it to
427
454
  **CNLP profiles and a work item schema** for the documents the agent reads — one profile per unit type, shared by a unit and its item — plus injections into `aif-plan`, `aif-review` and `aif-commit`.
428
455
 
429
456
 
430
- Review passes (Hold-Plan, Operator-Tasks-Plan t2): `review.plan` and `review.code` of `gcf/config.yml` are lists of rows `{agent: claude|codex, model, effort}` (`gcf config set review.plan --value "claude:opus:high, codex:astra:medium"`, `none`: no review; defaults opus·high ×2 and Codex astra·medium for the plan, opus·high ×2 for the code); row k makes pass k, the next only while the last found something blocking. `gcf review row <id> --kind plan|code --pass k [--diff] --json` names the row (and writes the code's diff for the reviewer to `.gcf-session/review/<id>.diff`: from where the card's work started to the disk, new files in, `gcf/` and `no_diff` out). `gcf plan pass <id> --blocking N --polish M [--by agent:model:effort] [--kind code]` records each pass in the plan's `## Passes` (the code's `## Reviews`) and answers continue, converged or stalled; `gcf review stall <id> --kind plan|code` blocks a review that does not converge (`stall.plan|code`; a card's old `stall` is the plan's), and the human answers with `gcf review more <id> --passes N` or `gcf review accept <id>`. `plan_passes` and `plan_review:` are gone: `gcf audit` names the one `config set review.plan` command that moves them, and that set drops them.
457
+ Review passes (Hold-Plan, Operator-Tasks-Plan t2): `review.plan` and `review.code` of `gcf/config.yml` are lists of rows `{agent: claude|codex, model, effort}` (`gcf config set review.plan --value "claude:opus:high, codex:astra:medium"`, `none`: no review; defaults Codex astra·medium and fable·medium ×2 for the plan, Codex sol·high and opus·high for the code); row k makes pass k, the next only while the last found something blocking. A row that cannot make its pass gives way to a model of its size (Fallback-Fidelity-Plan d2): Codex medium to fable·medium then opus·high, Codex high and fable·medium to opus·high, any other to none; `gcf board --json` carries the rules as `review_fallback`. `gcf review row <id> --kind plan|code --pass k [--diff] --json` names the row and its `fallback` (and writes the code's diff for the reviewer to `.gcf-session/review/<id>.diff`: from where the card's work started to the disk, new files in, `gcf/` and `no_diff` out). `gcf plan pass <id> --blocking N --polish M [--by agent:model:effort [--for agent:model:effort]] [--kind code]` records each pass (`, for` the row, when someone else made it: `self` or a stand-in) in the plan's `## Passes` (the code's `## Reviews`) and answers continue, converged or stalled; `gcf review stall <id> --kind plan|code` blocks a review that does not converge (`stall.plan|code`; a card's old `stall` is the plan's), and the human answers with `gcf review more <id> --passes N` or `gcf review accept <id>`. `plan_passes` and `plan_review:` are gone: `gcf audit` names the one `config set review.plan` command that moves them, and that set drops them.
431
458
 
432
459
  ## Docs
433
460
 
package/commands/gcf.js CHANGED
@@ -324,6 +324,7 @@ function registerContext(gcf) {
324
324
  .action(async (itemId, opts) => {
325
325
  await touchSession(itemId);
326
326
  const { buildContext, writeReadset } = await lib('context');
327
+ const { fieldOf } = await lib('question-fields');
327
328
  const ctx = await buildContext(process.cwd(), itemId);
328
329
  if (opts.readset) await writeReadset(process.cwd(), ctx);
329
330
  // Metric 1 (GCF-PRD §14): readset size over time, one csv line per call.
@@ -339,6 +340,15 @@ function registerContext(gcf) {
339
340
  [
340
341
  ...c.files.map((f) => `${f.path} (${f.tokens_est})`),
341
342
  ...(c.graveyard_hits.length ? ['graveyard hits:', ...c.graveyard_hits] : []),
343
+ // Whole records: a plan written without a run reads the value and the answer here.
344
+ ...(c.d2.length ? ['D2 assumptions:'] : []),
345
+ ...c.d2.map((rec) => {
346
+ const id = rec.match(/^- id:\s*(\S+)/)?.[1];
347
+
348
+ const mark = ` [fired: ${fieldOf(rec, 'until')}]`;
349
+
350
+ return c.d2_fired.includes(id) ? rec.replace(/^.*/, (l) => l + mark) : rec;
351
+ }),
342
352
  `total ~${c.total_tokens_est} / ${c.budget}${c.over_budget ? ' OVER BUDGET' : ''}`,
343
353
  ].join('\n'),
344
354
  );
@@ -1541,7 +1551,11 @@ function registerAgent(item) {
1541
1551
  .description(
1542
1552
  "Set where an item's runs go: main or worktree over the project's run_mode (commit)",
1543
1553
  )
1544
- .requiredOption('--run <mode>', "main, worktree, or default: the project's run_mode")
1554
+ .requiredOption(
1555
+ '--run <mode>',
1556
+ 'main, worktree, or default: where its kept session ran, else its live worktree copy, ' +
1557
+ "else the project's run_mode",
1558
+ )
1545
1559
  .option('--no-commit', 'skip the commit (tests only)')
1546
1560
  .action(async (id, o) => {
1547
1561
  const r = await (
@@ -1763,33 +1777,44 @@ function registerDecide(gcf) {
1763
1777
  }
1764
1778
 
1765
1779
  /**
1766
- * An inbox move (`plan`: its files, the ones that may carry edits not yet committed, and how to
1767
- * make it); with `commit`, committed alone under the main lock — a board has no console to
1768
- * commit from. Entries added before without a commit ride along with it. Returns the commit
1769
- * hash, or null.
1780
+ * An inbox move (`make` builds its plan: its files, the ones that may carry edits not yet
1781
+ * committed, and how to make it); with `commit`, committed alone under the main lock — a board
1782
+ * has no console to commit from. Entries added before without a commit ride along with it.
1783
+ * Returns the commit hash, or null, and the plan it made.
1784
+ * @template {{files: string[], inputs?: string[], apply: () => Promise<unknown>}} P
1770
1785
  * @param {boolean | undefined} commit
1771
1786
  * @param {string} message
1772
- * @param {{files: string[], inputs?: string[], apply: () => Promise<unknown>}} plan
1787
+ * @param {() => P | Promise<P>} make
1773
1788
  * @param {string} key the domain's move key, for the commit's trailer
1789
+ * @returns {Promise<{hash: string | null, plan: P}>}
1774
1790
  */
1775
- async function inboxMove(commit, message, plan, key) {
1791
+ async function inboxMove(commit, message, make, key) {
1776
1792
  if (!commit) {
1793
+ const plan = await make();
1777
1794
  await plan.apply();
1778
1795
 
1779
- return null;
1796
+ return { hash: null, plan };
1780
1797
  }
1781
1798
 
1782
1799
  const { commitMove } = await lib('commit-move');
1783
- const loose = (await lib('inbox')).untrackedEntries(process.cwd());
1784
-
1785
- return commitMove(process.cwd(), message, {
1786
- files: [...plan.files, ...loose],
1787
- inputs: [...(plan.inputs ?? plan.files), ...loose],
1788
- mutate: async () => {
1789
- await plan.apply();
1790
- },
1791
- commit: true,
1792
- key,
1800
+ const { untrackedEntries } = await lib('inbox');
1801
+
1802
+ // Read under the lock: a move that waited behind a main run plans again from what is there
1803
+ // now, the entries and pictures added meanwhile included.
1804
+ return (await lib('main-lock')).withMainLock(process.cwd(), async () => {
1805
+ const plan = await make();
1806
+ const loose = untrackedEntries(process.cwd());
1807
+ const hash = await commitMove(process.cwd(), message, {
1808
+ files: [...plan.files, ...loose],
1809
+ inputs: [...(plan.inputs ?? plan.files), ...loose],
1810
+ mutate: async () => {
1811
+ await plan.apply();
1812
+ },
1813
+ commit: true,
1814
+ key,
1815
+ });
1816
+
1817
+ return { hash, plan };
1793
1818
  });
1794
1819
  }
1795
1820
 
@@ -1821,12 +1846,13 @@ function registerInboxSort(inbox) {
1821
1846
  await refuseOnWork('sort an entry');
1822
1847
  const { planCategory } = await lib('inbox');
1823
1848
  const { gcfRoot } = await lib('gcf-paths');
1824
- const plan = await planCategory(gcfRoot(), id, {
1825
- category: o.category,
1826
- detail: o.detail,
1827
- vocab: await vocabulary(),
1828
- });
1829
- const hash = await inboxMove(o.commit, `gcf(inbox): sort ${id}`, plan, 'inbox-category');
1849
+ const vocab = await vocabulary();
1850
+ const { hash, plan } = await inboxMove(
1851
+ o.commit,
1852
+ `gcf(inbox): sort ${id}`,
1853
+ () => planCategory(gcfRoot(), id, { category: o.category, detail: o.detail, vocab }),
1854
+ 'inbox-category',
1855
+ );
1830
1856
  const { category, detail } = plan.entry;
1831
1857
  console.log(`${id} is ${category}${detail ? `:${detail}` : ''}${shortHash(hash)}`);
1832
1858
  });
@@ -1839,9 +1865,14 @@ function registerInboxSort(inbox) {
1839
1865
  await refuseOnWork('put an entry away');
1840
1866
  const { planLater } = await lib('inbox');
1841
1867
  const { gcfRoot } = await lib('gcf-paths');
1842
- const plan = await planLater(gcfRoot(), id, !o.off, await vocabulary());
1868
+ const vocab = await vocabulary();
1843
1869
  const [key, what] = o.off ? ['inbox-back', 'back'] : ['inbox-later', 'later'];
1844
- const hash = await inboxMove(o.commit, `gcf(inbox): ${what} ${id}`, plan, key);
1870
+ const { hash } = await inboxMove(
1871
+ o.commit,
1872
+ `gcf(inbox): ${what} ${id}`,
1873
+ () => planLater(gcfRoot(), id, !o.off, vocab),
1874
+ key,
1875
+ );
1845
1876
  console.log(`${id} ${o.off ? 'back from Later' : 'in Later'}${shortHash(hash)}`);
1846
1877
  });
1847
1878
  registerInboxCategories(inbox);
@@ -1871,12 +1902,17 @@ function registerInboxCategories(inbox) {
1871
1902
  await refuseOnWork('migrate the inbox');
1872
1903
  const { planMigrate } = await lib('inbox');
1873
1904
  const { gcfRoot } = await lib('gcf-paths');
1874
- const plan = await planMigrate(gcfRoot());
1875
- const n = plan.migrated.length;
1905
+ const first = await planMigrate(gcfRoot());
1906
+ const n = first.migrated.length;
1876
1907
  // Nothing old left: no commit, so a second run changes nothing.
1877
- const hash = n
1878
- ? await inboxMove(true, `gcf(inbox): ${n} entries to categories`, plan, 'inbox-migrate')
1879
- : null;
1908
+ const { hash, plan } = n
1909
+ ? await inboxMove(
1910
+ true,
1911
+ `gcf(inbox): ${n} entries to categories`,
1912
+ () => planMigrate(gcfRoot()),
1913
+ 'inbox-migrate',
1914
+ )
1915
+ : { hash: null, plan: first };
1880
1916
  const line = (m) =>
1881
1917
  `${m.id} → ${m.category}${m.dropped.length ? ` (dropped: ${m.dropped.join(', ')})` : ''}`;
1882
1918
  out(o.json, { migrated: plan.migrated, hash }, (r) =>
@@ -1920,14 +1956,16 @@ function registerInboxDrop(inbox) {
1920
1956
  await refuseOnWork('erase an entry');
1921
1957
  const { planDrop } = await lib('inbox');
1922
1958
  const { gcfRoot } = await lib('gcf-paths');
1923
- const plan = await planDrop(gcfRoot(), id);
1924
1959
  const { inHead } = await lib('git');
1925
- const committed = inHead(process.cwd(), plan.files[0]);
1960
+ const committed = inHead(
1961
+ process.cwd(),
1962
+ (await planDrop(gcfRoot(), id)).files[0], // the entry's own file
1963
+ );
1926
1964
  // An entry never committed leaves nothing to commit: it is only erased, from the index too.
1927
- const hash = await inboxMove(
1965
+ const { hash, plan } = await inboxMove(
1928
1966
  o.commit && committed,
1929
1967
  `gcf(inbox): drop ${id}`,
1930
- plan,
1968
+ () => planDrop(gcfRoot(), id),
1931
1969
  'inbox-drop',
1932
1970
  );
1933
1971
  if (!committed)
@@ -1996,7 +2034,8 @@ function registerInbox(gcf) {
1996
2034
  item: o.item,
1997
2035
  vocab: await vocabulary(),
1998
2036
  });
1999
- const hash = await inboxMove(o.commit, 'gcf(inbox): add', plan, 'inbox-add');
2037
+ // A new entry reads nothing that a wait could change: its plan holds.
2038
+ const { hash } = await inboxMove(o.commit, 'gcf(inbox): add', () => plan, 'inbox-add');
2000
2039
  console.log(`${plan.entry.id}${shortHash(hash)}`);
2001
2040
  });
2002
2041
  registerInboxSort(inbox);
@@ -2036,8 +2075,12 @@ function registerLessons(gcf) {
2036
2075
  if (!Array.isArray(list)) throw new Error(`${o.from}: lessons must be a JSON array`);
2037
2076
  if (!list.length) return console.log(`recorded 0 lessons for ${id}`);
2038
2077
  const { gcfRoot } = await lib('gcf-paths');
2039
- const plan = planLessons(gcfRoot(), id, list);
2040
- const hash = await inboxMove(o.commit, `gcf(lessons): ${id}`, plan, 'lessons');
2078
+ const { hash, plan } = await inboxMove(
2079
+ o.commit,
2080
+ `gcf(lessons): ${id}`,
2081
+ () => planLessons(gcfRoot(), id, list),
2082
+ 'lessons',
2083
+ );
2041
2084
  console.log(`recorded ${plan.entries.length} lessons for ${id}${shortHash(hash)}`);
2042
2085
  });
2043
2086
  }
@@ -2120,6 +2163,10 @@ function registerPlanPasses(plan) {
2120
2163
  .requiredOption('--blocking <n>', 'findings that block the plan')
2121
2164
  .requiredOption('--polish <n>', 'findings that only polish it')
2122
2165
  .option('--by <reviewer>', 'who made the pass: agent:model:effort (gcf review row), or self')
2166
+ .option(
2167
+ '--for <row>',
2168
+ 'the row the pass was asked of (agent:model:effort) when --by stood in for it',
2169
+ )
2123
2170
  .option('--kind <kind>', 'plan (## Passes) or code (## Reviews)', 'plan')
2124
2171
  .option('--json', 'machine output')
2125
2172
  .action(async (id, o) => {
@@ -2130,6 +2177,7 @@ function registerPlanPasses(plan) {
2130
2177
  blocking: Number(o.blocking),
2131
2178
  polish: Number(o.polish),
2132
2179
  by: o.by,
2180
+ for: o.for,
2133
2181
  kind: o.kind,
2134
2182
  });
2135
2183
  out(o.json, r, (x) => `pass ${x.pass}: ${x.verdict} (${x.passes.join(', ')})`);
@@ -2161,6 +2209,9 @@ function registerReview(gcf) {
2161
2209
  out(o.json, r, (x) =>
2162
2210
  [
2163
2211
  `pass ${x.pass}: ${x.by ?? 'no review'}`,
2212
+ ...(x.fallback.length
2213
+ ? [`fallback: ${x.fallback.map((f) => `${f.agent}:${f.model}:${f.effort}`).join(', ')}`]
2214
+ : []),
2164
2215
  ...(x.diff ? [`diff: ${x.diff.file}`] : []),
2165
2216
  ].join('\n'),
2166
2217
  );
package/extension.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/lee-to/ai-factory/2.x/schemas/extension.schema.json",
3
3
  "name": "gcf-aif-ext",
4
- "version": "0.31.0",
4
+ "version": "0.34.0",
5
5
  "description": "Game Context Framework for AI Factory",
6
6
  "skills": [
7
7
  "skills/gcf-init",
@@ -4,6 +4,9 @@ gcf_gate:
4
4
  - when `gcf/` exists and the task names a work item, run `ai-factory gcf context <item-id>` first
5
5
  - the returned file list is the readset: read those files, `gcf/INDEX.md` and `gcf/config.yml`, and nothing else under `gcf/`; `gcf/LIVE.md` in it says what the game already does
6
6
  - its `graveyard_hits` and `d2` lines are context too: what was buried before, and the assumptions in force with their `until:`
7
+ - a `d2` record marked `[fired: <trigger>]` (its id in `d2_fired`) is the human's call now: do not plan on its value
8
+ - only when the plan depends on that value, stop: `ai-factory gcf block <item-id> --reason "needs the human's answer to <q-NNN> (its until fired)"`, unless the item is already blocked on it
9
+ - a fired D2 is not re-filed as a D1: the human answers its own record
7
10
  - `over_budget: true` in the result: stop and record a D1 question instead of planning
8
11
  - an id in `depends:` that lives in `gcf/design/`, or as an item in any status but unplayed, parked or awaiting-verdict, is not played: do not plan on top of it, stop
9
12
  - a dependency awaiting its verdict is planned on: the close of this item then waits for that verdict (`ai-factory gcf block <id> --reason "waits for <dep>"`)