gcf-aif-ext 0.18.5 → 0.18.7
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 +8 -0
- package/extension.json +1 -1
- package/lib/design-check.js +11 -1
- package/lib/work-ops.js +12 -5
- package/package.json +1 -1
- package/profiles/unit-constraint.md +2 -2
- package/profiles/unit-entity.md +2 -2
- package/profiles/unit-mechanic.md +2 -2
- package/profiles/unit-resource.md +2 -2
- package/profiles/unit-rule.md +2 -2
package/README.md
CHANGED
|
@@ -50,6 +50,14 @@ 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.18.7
|
|
54
|
+
|
|
55
|
+
- `tuning:` and `notes:` hold the operator's own words: the design check no longer applies the CNL-P lexicon to them (the 250-character line limit, `never` and the rest). Before, a tune remark longer than 250 characters made the pre-commit gate refuse the move with `M1: … exceeds the 250 hard limit`. The shape stays checked: every line a `- ` bullet, the blocks in the profile's order. Every other block of a unit keeps the limit.
|
|
56
|
+
|
|
57
|
+
### 0.18.6
|
|
58
|
+
|
|
59
|
+
- A multi-line note of `gcf verdict tune` or `gcf unblock --note` (the board's What to change box) is written as one bullet per line. Before, the second line went in without `- ` and the pre-commit gate refused the move with `M1: "tuning:" is a bullet-list — every item opens with "- "`.
|
|
60
|
+
|
|
53
61
|
### 0.18.5
|
|
54
62
|
|
|
55
63
|
- `gcf verdict tune` and `gcf unblock --note` put a new `tuning:` / `notes:` block where the unit's profile orders it, before `notes:` and `provenance:`; a verdict merge does the same with `feel:` and `open:` in `systems/`. Before, the block went to the end of the body and the pre-commit gate refused the move with `M1: blocks out of order`. A block a hand left out of order moves to its place on the next write, so a `tuning:` inserted by hand as a workaround needs no cleanup.
|
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.18.
|
|
4
|
+
"version": "0.18.7",
|
|
5
5
|
"description": "Game Context Framework for AI Factory",
|
|
6
6
|
"skills": [
|
|
7
7
|
"skills/gcf-init",
|
package/lib/design-check.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { readFile } from 'node:fs/promises';
|
|
5
5
|
import { existsSync } from 'node:fs';
|
|
6
6
|
import path from 'node:path';
|
|
7
|
-
import { bodyIssues, parseBlocks, itemsOf, readRecords } from 'cnlp-kit';
|
|
7
|
+
import { bodyIssues, lexiconIssues, parseBlocks, itemsOf, readRecords } from 'cnlp-kit';
|
|
8
8
|
import {
|
|
9
9
|
SLUG_RE,
|
|
10
10
|
UNIT_TYPES,
|
|
@@ -20,6 +20,7 @@ import { buildLedger } from './ledger.js';
|
|
|
20
20
|
import { sourceBodies } from './anchors.js';
|
|
21
21
|
import { collapseLines } from './verdict-fs.js';
|
|
22
22
|
import { fieldOf } from './question-fields.js';
|
|
23
|
+
import { blocksOf } from './systems-doc.js';
|
|
23
24
|
|
|
24
25
|
// Units a number may carry. A project adds its own in the `units:` block of glossary.md.
|
|
25
26
|
// Bare `px` is absent on purpose: its size depends on the screen density.
|
|
@@ -291,9 +292,18 @@ async function bodyProblems(body, type, stage = 'card') {
|
|
|
291
292
|
);
|
|
292
293
|
const owed = (m) =>
|
|
293
294
|
stage === 'design' && CARD_STAGE.some((k) => m === `missing required block "${k}:"`);
|
|
295
|
+
// `tuning:` and `notes:` are the operator's words, not a text an agent compressed: they keep
|
|
296
|
+
// the shape (a bullet each), not the lexicon (a 250-char line, "never").
|
|
297
|
+
const said = blocksOf(body).filter((b) => OPERATOR_BLOCKS.includes(b.key));
|
|
298
|
+
const spoken = new Set(
|
|
299
|
+
lexiconIssues(parseBlocks(body).prose, profile.mood)
|
|
300
|
+
.filter((i) => said.some((b) => i.line >= b.start && i.line <= b.end))
|
|
301
|
+
.map((i) => `${i.line} ${i.message}`),
|
|
302
|
+
);
|
|
294
303
|
const issues = bodyIssues(body, profile).filter(
|
|
295
304
|
(i) =>
|
|
296
305
|
!owed(i.message) &&
|
|
306
|
+
!spoken.has(`${i.line} ${i.message}`) &&
|
|
297
307
|
!(tbdLines.has(i.line) && i.message.includes('carries a value on the key line')),
|
|
298
308
|
);
|
|
299
309
|
|
package/lib/work-ops.js
CHANGED
|
@@ -296,12 +296,19 @@ const unverifiedTail = (opts) =>
|
|
|
296
296
|
(opts.unticked ? ` (unticked: ${opts.unticked})` : '');
|
|
297
297
|
|
|
298
298
|
const writeItem = (item, data, body = item.body) => atomicWrite(item.file, serialize(data, body));
|
|
299
|
-
/**
|
|
300
|
-
|
|
299
|
+
/**
|
|
300
|
+
* A note into an item's `key:` block, where its unit profile orders it (M1). A note from a
|
|
301
|
+
* multi-line box gives a bullet per line: a line without `- ` breaks the bullet-list (M1).
|
|
302
|
+
*/
|
|
303
|
+
const upsertItemNote = async (item, key, note) =>
|
|
301
304
|
upsertBlock(
|
|
302
305
|
item.body,
|
|
303
306
|
key,
|
|
304
|
-
|
|
307
|
+
String(note)
|
|
308
|
+
.split(/\r?\n/)
|
|
309
|
+
.map((l) => l.trim().replace(/^[-*]\s+/, ''))
|
|
310
|
+
.filter(Boolean)
|
|
311
|
+
.map((l) => `- ${l}`),
|
|
305
312
|
UNIT_ITEM_TYPES.includes(item.data.type) ? await blockOrder(`unit-${item.data.type}`) : [],
|
|
306
313
|
);
|
|
307
314
|
|
|
@@ -683,7 +690,7 @@ async function tune(m, note) {
|
|
|
683
690
|
'redesigned envelope is a new item with reopens: <this id>',
|
|
684
691
|
);
|
|
685
692
|
if (item.data.status === 'unplayed') unplay(m, item);
|
|
686
|
-
const body = note ? await
|
|
693
|
+
const body = note ? await upsertItemNote(item, 'tuning', note) : item.body;
|
|
687
694
|
const data = {
|
|
688
695
|
...without(item.data, 'frozen'),
|
|
689
696
|
status: 'ready',
|
|
@@ -807,7 +814,7 @@ async function unblockItemUnlocked(projectDir, id, opts = {}) {
|
|
|
807
814
|
const { note = '', commit = true } = opts;
|
|
808
815
|
const m = await begin(projectDir, id, 'unblock');
|
|
809
816
|
if (m.item.data.status === 'parked') dropKnownIssue(m, id);
|
|
810
|
-
const body = note ? await
|
|
817
|
+
const body = note ? await upsertItemNote(m.item, 'notes', note) : m.item.body;
|
|
811
818
|
// A feature whose child died while it was blocked owes the operator that decision first; the
|
|
812
819
|
// death is the one parentWaits wrote into `blocked:`, not any death of the feature's past.
|
|
813
820
|
const childDied = / child \S+ died/.test(String(m.item.data.blocked ?? ''));
|
package/package.json
CHANGED
|
@@ -30,12 +30,12 @@ sections:
|
|
|
30
30
|
- key: tuning
|
|
31
31
|
form: bullet-list
|
|
32
32
|
required: no
|
|
33
|
-
note: work stage only -
|
|
33
|
+
note: work stage only - the operator's verdict remarks, a bullet per line, read before the rebuild; the operator's own words, so no line limit
|
|
34
34
|
|
|
35
35
|
- key: notes
|
|
36
36
|
form: bullet-list
|
|
37
37
|
required: no
|
|
38
|
-
note: work stage only - the operator's answers and delivered files,
|
|
38
|
+
note: work stage only - the operator's answers and delivered files from each unblock; the operator's own words, so no line limit
|
|
39
39
|
|
|
40
40
|
- key: provenance
|
|
41
41
|
form: record-list
|
package/profiles/unit-entity.md
CHANGED
|
@@ -26,12 +26,12 @@ sections:
|
|
|
26
26
|
- key: tuning
|
|
27
27
|
form: bullet-list
|
|
28
28
|
required: no
|
|
29
|
-
note: work stage only -
|
|
29
|
+
note: work stage only - the operator's verdict remarks, a bullet per line, read before the rebuild; the operator's own words, so no line limit
|
|
30
30
|
|
|
31
31
|
- key: notes
|
|
32
32
|
form: bullet-list
|
|
33
33
|
required: no
|
|
34
|
-
note: work stage only - the operator's answers and delivered files,
|
|
34
|
+
note: work stage only - the operator's answers and delivered files from each unblock; the operator's own words, so no line limit
|
|
35
35
|
|
|
36
36
|
- key: provenance
|
|
37
37
|
form: record-list
|
|
@@ -77,12 +77,12 @@ sections:
|
|
|
77
77
|
- key: tuning
|
|
78
78
|
form: bullet-list
|
|
79
79
|
required: no
|
|
80
|
-
note: work stage only -
|
|
80
|
+
note: work stage only - the operator's verdict remarks, a bullet per line, read before the rebuild; the operator's own words, so no line limit
|
|
81
81
|
|
|
82
82
|
- key: notes
|
|
83
83
|
form: bullet-list
|
|
84
84
|
required: no
|
|
85
|
-
note: work stage only - the operator's answers and delivered files,
|
|
85
|
+
note: work stage only - the operator's answers and delivered files from each unblock; the operator's own words, so no line limit
|
|
86
86
|
|
|
87
87
|
- key: provenance
|
|
88
88
|
form: record-list
|
|
@@ -57,12 +57,12 @@ sections:
|
|
|
57
57
|
- key: tuning
|
|
58
58
|
form: bullet-list
|
|
59
59
|
required: no
|
|
60
|
-
note: work stage only -
|
|
60
|
+
note: work stage only - the operator's verdict remarks, a bullet per line, read before the rebuild; the operator's own words, so no line limit
|
|
61
61
|
|
|
62
62
|
- key: notes
|
|
63
63
|
form: bullet-list
|
|
64
64
|
required: no
|
|
65
|
-
note: work stage only - the operator's answers and delivered files,
|
|
65
|
+
note: work stage only - the operator's answers and delivered files from each unblock; the operator's own words, so no line limit
|
|
66
66
|
|
|
67
67
|
- key: provenance
|
|
68
68
|
form: record-list
|
package/profiles/unit-rule.md
CHANGED
|
@@ -30,12 +30,12 @@ sections:
|
|
|
30
30
|
- key: tuning
|
|
31
31
|
form: bullet-list
|
|
32
32
|
required: no
|
|
33
|
-
note: work stage only -
|
|
33
|
+
note: work stage only - the operator's verdict remarks, a bullet per line, read before the rebuild; the operator's own words, so no line limit
|
|
34
34
|
|
|
35
35
|
- key: notes
|
|
36
36
|
form: bullet-list
|
|
37
37
|
required: no
|
|
38
|
-
note: work stage only - the operator's answers and delivered files,
|
|
38
|
+
note: work stage only - the operator's answers and delivered files from each unblock; the operator's own words, so no line limit
|
|
39
39
|
|
|
40
40
|
- key: provenance
|
|
41
41
|
form: record-list
|