gcf-aif-ext 0.20.2 → 0.22.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/GLOSSARY.md +26 -0
- package/README.md +19 -0
- package/commands/gcf.js +92 -6
- package/extension.json +6 -1
- package/injections/improve-plan.md +7 -0
- package/injections/plan-context.md +10 -1
- package/lib/bundle.js +4 -5
- package/lib/changes.js +643 -0
- package/lib/config-set.js +19 -1
- package/lib/design-check.js +47 -18
- package/lib/design-parts.js +27 -17
- package/lib/design.js +24 -3
- package/lib/domain.js +4 -2
- package/lib/edits.js +2 -13
- package/lib/gate.js +13 -1
- package/lib/gcf-paths.js +10 -0
- package/lib/git.js +22 -2
- package/lib/index-gen.js +5 -4
- package/lib/linter.js +5 -3
- package/lib/plan-check.js +52 -2
- package/lib/tree-file.js +107 -0
- package/node_modules/cnlp-kit/CHANGELOG.md +23 -0
- package/node_modules/cnlp-kit/README.md +27 -1
- package/node_modules/cnlp-kit/bin/cnlp.js +1 -1
- package/node_modules/cnlp-kit/cnlp-format.md +13 -0
- package/node_modules/cnlp-kit/package.json +1 -1
- package/node_modules/cnlp-kit/profiles/glossary.md +38 -0
- package/node_modules/cnlp-kit/skills/cnlp-glossary/SKILL.md +50 -0
- package/node_modules/cnlp-kit/src/cnlp.js +10 -5
- package/node_modules/cnlp-kit/src/config.js +40 -3
- package/package.json +3 -2
- package/profiles/game.md +6 -0
- package/profiles/glossary.md +15 -14
- package/profiles/plan.md +52 -0
- package/skills/gcf-adopt/SKILL.md +1 -1
- package/skills/gcf-ingest/SKILL.md +4 -4
- package/skills/gcf-init/SKILL.md +1 -1
- package/skills/gcf-vision/SKILL.md +1 -1
- package/templates/agents-block.md +7 -2
- package/templates/config.yml +4 -0
- package/templates/game.md +3 -0
- package/templates/glossary.md +5 -5
package/GLOSSARY.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
purpose:
|
|
2
|
+
- GCF's method: the words its skills, templates and agent block use for a game's design and its work
|
|
3
|
+
|
|
4
|
+
terms:
|
|
5
|
+
- term: work item
|
|
6
|
+
means: one piece of work in `gcf/work/<id>.md`: a feature, a bug, a tech task, a spike or a release
|
|
7
|
+
avoid: ticket, user story, epic
|
|
8
|
+
|
|
9
|
+
- term: design unit
|
|
10
|
+
means: one designed thing (a mechanic, rule, entity, resource or constraint) in `gcf/design/` until it goes into work
|
|
11
|
+
avoid: feature spec
|
|
12
|
+
|
|
13
|
+
- term: verdict
|
|
14
|
+
means: the human's keep, tune or kill of an item they played
|
|
15
|
+
avoid: rating, grade
|
|
16
|
+
|
|
17
|
+
- term: playtest
|
|
18
|
+
means: the human playing a built milestone or item and saying how it felt
|
|
19
|
+
avoid: test session
|
|
20
|
+
|
|
21
|
+
- term: milestone
|
|
22
|
+
means: a slice of the game the human plays as one, in the order `gcf/game.md` gives
|
|
23
|
+
avoid: sprint
|
|
24
|
+
|
|
25
|
+
- term: pillar
|
|
26
|
+
means: a quality the game must keep, in `gcf/PILLARS.md`, changed only on the human's word
|
package/README.md
CHANGED
|
@@ -50,6 +50,24 @@ 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.22.0
|
|
54
|
+
|
|
55
|
+
- **`gcf changes`**: what is not committed, anywhere in the project, read only. `gcf changes [--worktree <id>] [--json]` lists the main checkout or a run's worktree: each file's status against the base (a worktree's base is where it left the main checkout, so what the run committed on its branch shows too, with its state `branch`, `open` or `both`), and what a board's click does (`text`, `image`, `binary`, `listed`). `gcf changes diff --path <p>` gives a text file's diff, and `gcf changes file --path <p> --side base|now --json` a picture's bytes as base64. `gcf/.metrics/` and `.gcf-session/` are never listed.
|
|
56
|
+
- **`no_diff:`** in `gcf/config.yml` (`gcf config set no_diff --value=<lines>`, one glob a line, the first list among the settings): files a board lists and never opens. GCF names no stack's files, the list is the project's. Links, submodules, nested repositories, anything on disk that is no regular file and Git LFS files are listed and never opened, with no setting.
|
|
57
|
+
- `gcf edits diff` no longer reads through a link: a new file under `gcf/` that is a link, or lies behind a folder link or a Windows junction, says so and shows no byte of what it points to; a new file past 16 MB is cut, not read whole.
|
|
58
|
+
- A keep no longer fails on the text it collapses itself: `camelcase-member-list` flags three bullets in a row each **headed** by a CamelCase name (`HealthComponent holds the pool`), not sentences that mention one, paths or file names.
|
|
59
|
+
- A move the commit gate refuses says so in its own words and ends with `gcf-refusal: {"code":"gate","problems":[…]}`: the line of the file, what to do, none of git's warnings around it. Before, it read `commit failed:` with git's raw output, and the line number counted from below the frontmatter.
|
|
60
|
+
- The domain's `sections.changes` tells a board the core can read this. Update the board with it: one before 0.20 shows the `no_diff` list as one line of commas, and saving that makes it one glob.
|
|
61
|
+
|
|
62
|
+
### 0.21.0
|
|
63
|
+
|
|
64
|
+
- Bundles `cnlp-kit` 3.10. Its project glossary is GCF's glossary now: **`GLOSSARY.md` at the project root**, beside `cnlp.config.json`, in cnlp's own shape — a `purpose:` block and `terms:` records of `term`, `means` and an optional `avoid` (a comma list). `npx --yes cnlp-kit check` finds it by name and rejects every word it avoids in the systems docs and `PILLARS.md`; `ai-factory gcf design check` (the commit gate) rejects them in design units and work items (M4). An `avoid:` is the project's deny list everywhere: list only a word wrong in every document, and prefer a phrase ("tile hand") to a bare word with other uses.
|
|
65
|
+
- GCF ships no `glossary` profile of its own any more: one by that name took cnlp's place, and a `GLOSSARY.md` the `cnlp-glossary` skill writes failed the check. The units of measure a project adds move to an optional `units:` block of `gcf/game.md`.
|
|
66
|
+
- The commit gate and the `dirty` refusal of a move cover `GLOSSARY.md` as they cover `gcf/`: a commit of the glossary alone runs the design check.
|
|
67
|
+
- `GLOSSARY.md` in this package lists GCF's own words (work item, design unit, verdict, playtest, milestone, pillar) and what each replaces; the tests hold GCF's skills to it. It is not copied into a project.
|
|
68
|
+
- **The plan form** (CNL-P profile `plan`): a work item's plan is written in blocks, one idea a line — `context:` (facts found in the code), `decisions:` (records `id`, `pick`, `why`, optional `rejects` and `cost`), `tasks:` (`- [ ] t1 <action> (d1)` under `### Phase N:` lines, as aif-implement ticks them), `pillar_check:`, `verification:`. aif-plan learns it from the injection, aif-improve keeps it from a new injection. `gcf plan check` lists the plan's form problems (a line over 250 characters, an unquantified comparative, a word the glossary avoids) as `format:` lines that never fail it, and `plan-log.csv` counts them in a 4th column. A plan already in work (a ticked task) is not asked to change its form; `## Settings`, `## Handoff` and `## Outcome` stay sections.
|
|
69
|
+
- **Upgrading a project that has `gcf/glossary.md`**: `design check` reports it (not a block) until it moves, and until then its words hold nowhere. Move it by hand: `git mv gcf/glossary.md GLOSSARY.md`; add a `purpose:` block (what the game is, in 1 line); turn each `not:` into `avoid:`, keeping only words wrong in every document (run `npx --yes cnlp-kit check` and `ai-factory gcf design check` to see where a word is used); move a `units:` block into `gcf/game.md`; commit.
|
|
70
|
+
|
|
53
71
|
### 0.20.2
|
|
54
72
|
|
|
55
73
|
- `edits diff|commit|discard` also take the paths from `--path-file <file|->`, one a line: a board sends a refusal's paths on stdin. Hundreds of them no longer run past Windows' 32K command line, neither in the command nor in the git calls of a move's commit: `git diff` and `git ls-files` go in parts, `git commit` takes a long list from `--pathspec-from-file` (git 2.25+; a move's few paths stay arguments).
|
|
@@ -362,6 +380,7 @@ Removal leaves `gcf/` and `cnlp.config.json` in place. It also leaves the pre-co
|
|
|
362
380
|
- branches — `worktree <id>`, `verify <id> --mark`, `integrate [<id>...]`: a run in its own worktree, the `GCF-Verified` trailer, the merge into main and the move; every committed move holds `.gcf-session/main.lock`
|
|
363
381
|
- design and sources — `design check`, `design export`, `design import`, `design part`, `design save`, `design discard`, `design commit`, `design migrate`, `anchor`, `section`, `quotes`, `lint`
|
|
364
382
|
- hand edits under `gcf/` — `edits diff|commit|discard --path <p>…`: what a move's `dirty` refusal names, shown, committed or put back
|
|
383
|
+
- what is uncommitted, anywhere in the project — `changes [--worktree <id>] [--json]`, `changes diff --path <p>`, `changes file --path <p> --side base|now`: read only; the project's `no_diff:` globs, links, submodules, nested repositories and Git LFS files are listed and never opened
|
|
365
384
|
- setup — `init`, `index`, `hooks-install`
|
|
366
385
|
|
|
367
386
|
Every move of an item makes one commit `gcf(<move>): <id>` with every file it touched — the item, history or graveyard, `LIVE.md`, the systems documents, the parent feature, a removal item, the archived plan. `take`, `item new` and `inbox` do not commit. These are plain Node scripts with no LLM in the loop: the same functions the skills call, the pre-commit gate runs, and the harness gates against.
|
package/commands/gcf.js
CHANGED
|
@@ -620,7 +620,9 @@ function registerDesign(gcf) {
|
|
|
620
620
|
});
|
|
621
621
|
design
|
|
622
622
|
.command('export')
|
|
623
|
-
.description(
|
|
623
|
+
.description(
|
|
624
|
+
'Glue game.md, GLOSSARY.md, PILLARS.md and the units into one bundle a designer edits',
|
|
625
|
+
)
|
|
624
626
|
.option('--system <name>', 'only this subsystem')
|
|
625
627
|
.option('--milestone <name>', 'only the units of this milestone')
|
|
626
628
|
.option('--out <file>', 'write the bundle here instead of stdout')
|
|
@@ -793,6 +795,72 @@ function registerEdits(gcf) {
|
|
|
793
795
|
});
|
|
794
796
|
}
|
|
795
797
|
|
|
798
|
+
function registerChanges(gcf) {
|
|
799
|
+
const changes = () => lib('changes');
|
|
800
|
+
const TREE = "a run's worktree, by its item id; the main checkout without it";
|
|
801
|
+
// `changes` takes `--worktree` and `--json` too, whatever word they follow: its own are here.
|
|
802
|
+
const allOf = (o, cmd) => cmd?.optsWithGlobals?.() ?? o;
|
|
803
|
+
const group = gcf
|
|
804
|
+
.command('changes')
|
|
805
|
+
.description("What is not committed in the main checkout or a run's worktree: read only")
|
|
806
|
+
.allowExcessArguments(false)
|
|
807
|
+
.option('--worktree <id>', TREE)
|
|
808
|
+
.option('--json', '{tree, base, count, files, trees, more, watch}')
|
|
809
|
+
.action(async (o) => {
|
|
810
|
+
const r = await (await changes()).changesOf(process.cwd(), { worktree: o.worktree });
|
|
811
|
+
out(o.json, r, (x) =>
|
|
812
|
+
x.files.length
|
|
813
|
+
? [
|
|
814
|
+
...x.files.map(
|
|
815
|
+
(f) =>
|
|
816
|
+
`${f.status}${f.state ? ` (${f.state})` : ''} ` +
|
|
817
|
+
`${f.from ? `${f.from} -> ` : ''}${f.path}${f.why ? ` [${f.why}]` : ''}`,
|
|
818
|
+
),
|
|
819
|
+
...(x.more ? [`and ${x.more} more`] : []),
|
|
820
|
+
].join('\n')
|
|
821
|
+
: 'nothing uncommitted',
|
|
822
|
+
);
|
|
823
|
+
});
|
|
824
|
+
group
|
|
825
|
+
.command('diff')
|
|
826
|
+
.description("A text file's diff against the tree's base")
|
|
827
|
+
.requiredOption('--path <path>', 'a path from the list')
|
|
828
|
+
.option('--worktree <id>', TREE)
|
|
829
|
+
.option('--json', '{tree, path, diff, index?, open?, cut}')
|
|
830
|
+
.action(async (own, cmd) => {
|
|
831
|
+
const o = allOf(own, cmd);
|
|
832
|
+
const r = await (await changes()).changeDiff(process.cwd(), o.path, { worktree: o.worktree });
|
|
833
|
+
out(o.json, r, (x) =>
|
|
834
|
+
[
|
|
835
|
+
x.diff,
|
|
836
|
+
x.index && `in the index, not on disk:\n${x.index}`,
|
|
837
|
+
x.open && `not committed:\n${x.open}`,
|
|
838
|
+
x.eol && `line endings only: ${x.eol.join(', ')}`,
|
|
839
|
+
!x.diff &&
|
|
840
|
+
!x.index &&
|
|
841
|
+
!x.open &&
|
|
842
|
+
(x.conflict ? 'conflict: resolve it to see a difference' : 'no difference in content'),
|
|
843
|
+
]
|
|
844
|
+
.filter(Boolean)
|
|
845
|
+
.join('\n'),
|
|
846
|
+
);
|
|
847
|
+
});
|
|
848
|
+
group
|
|
849
|
+
.command('file')
|
|
850
|
+
.description("A picture's bytes before or after, as base64 (a board draws them)")
|
|
851
|
+
.requiredOption('--path <path>', 'a picture from the list')
|
|
852
|
+
.requiredOption('--side <side>', 'base or now')
|
|
853
|
+
.option('--worktree <id>', TREE)
|
|
854
|
+
.option('--json', '{path, side, type, size, base64}')
|
|
855
|
+
.action(async (own, cmd) => {
|
|
856
|
+
const o = allOf(own, cmd);
|
|
857
|
+
const r = await (
|
|
858
|
+
await changes()
|
|
859
|
+
).changeFile(process.cwd(), o.path, o.side, { worktree: o.worktree });
|
|
860
|
+
out(true, r);
|
|
861
|
+
});
|
|
862
|
+
}
|
|
863
|
+
|
|
796
864
|
function registerMigrate(design) {
|
|
797
865
|
design
|
|
798
866
|
.command('migrate')
|
|
@@ -1541,17 +1609,28 @@ function registerPlan(gcf) {
|
|
|
1541
1609
|
.command('plan')
|
|
1542
1610
|
.description('The plan of a work item')
|
|
1543
1611
|
.command('check <id>')
|
|
1544
|
-
.description(
|
|
1612
|
+
.description(
|
|
1613
|
+
'Deterministic plan check: it exists, has task checkboxes, readset in budget; ' +
|
|
1614
|
+
'its form against the plan profile as format lines, which never fail it',
|
|
1615
|
+
)
|
|
1545
1616
|
.option('--json', 'machine output')
|
|
1546
1617
|
.action(async (id, o) => {
|
|
1547
1618
|
await touchSession(id);
|
|
1548
1619
|
const r = await (await lib('plan-check')).planCheck(process.cwd(), id);
|
|
1549
|
-
// Harness-PRD §11: the checks a plan took to converge.
|
|
1620
|
+
// Harness-PRD §11: the checks a plan took to converge; the last column, its format lines.
|
|
1550
1621
|
await (
|
|
1551
1622
|
await lib('metrics')
|
|
1552
|
-
).logMetric(process.cwd(), 'plan-log.csv', [
|
|
1623
|
+
).logMetric(process.cwd(), 'plan-log.csv', [
|
|
1624
|
+
id,
|
|
1625
|
+
r.ok ? 1 : 0,
|
|
1626
|
+
r.problems?.length ?? 0,
|
|
1627
|
+
r.format.length,
|
|
1628
|
+
]);
|
|
1553
1629
|
out(o.json, r, (x) =>
|
|
1554
|
-
|
|
1630
|
+
[
|
|
1631
|
+
...(x.ok ? [`${x.plan}: ${x.done}/${x.tasks} tasks done`] : x.problems),
|
|
1632
|
+
...x.format.map((f) => `format: ${f}`),
|
|
1633
|
+
].join('\n'),
|
|
1555
1634
|
);
|
|
1556
1635
|
if (!r.ok) process.exitCode = 1;
|
|
1557
1636
|
});
|
|
@@ -1645,7 +1724,13 @@ function registerSettings(gcf) {
|
|
|
1645
1724
|
await readConfig(gcfRoot()); // a config the rules refuse says so here
|
|
1646
1725
|
const list = await (await lib('config-set')).projectSettings(process.cwd());
|
|
1647
1726
|
out(o.json, list, (x) =>
|
|
1648
|
-
x
|
|
1727
|
+
x
|
|
1728
|
+
.map((s) =>
|
|
1729
|
+
Array.isArray(s.value)
|
|
1730
|
+
? `${s.key}: # ${s.label}\n${s.value.map((v) => ` ${v}`).join('\n')}`
|
|
1731
|
+
: `${s.key}: ${s.value ?? '-'} # ${s.label}`,
|
|
1732
|
+
)
|
|
1733
|
+
.join('\n'),
|
|
1649
1734
|
);
|
|
1650
1735
|
});
|
|
1651
1736
|
config
|
|
@@ -1889,6 +1974,7 @@ export function register(program) {
|
|
|
1889
1974
|
registerQuotes(gcf);
|
|
1890
1975
|
registerDesign(gcf);
|
|
1891
1976
|
registerEdits(gcf);
|
|
1977
|
+
registerChanges(gcf);
|
|
1892
1978
|
registerWhere(gcf);
|
|
1893
1979
|
registerMoves(gcf);
|
|
1894
1980
|
registerItem(gcf);
|
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.
|
|
4
|
+
"version": "0.22.0",
|
|
5
5
|
"description": "Game Context Framework for AI Factory",
|
|
6
6
|
"skills": [
|
|
7
7
|
"skills/gcf-init",
|
|
@@ -28,6 +28,11 @@
|
|
|
28
28
|
"position": "append",
|
|
29
29
|
"file": "./injections/plan-context.md"
|
|
30
30
|
},
|
|
31
|
+
{
|
|
32
|
+
"target": "aif-improve",
|
|
33
|
+
"position": "append",
|
|
34
|
+
"file": "./injections/improve-plan.md"
|
|
35
|
+
},
|
|
31
36
|
{
|
|
32
37
|
"target": "aif-review",
|
|
33
38
|
"position": "append",
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
## GCF: keep the plan's form (from gcf-aif-ext)
|
|
2
|
+
|
|
3
|
+
gcf_improve:
|
|
4
|
+
- when `gcf/` exists and the plan belongs to a work item, keep it in the plan form: blocks `context:`, `decisions:`, `tasks:`, `pillar_check:`, `verification:`, one idea a line
|
|
5
|
+
- move detail out of a task into the decision it cites, and do not say a fact twice
|
|
6
|
+
- keep every tick and every `### Phase` line: a ticked task is done work
|
|
7
|
+
- after the pass, run `ai-factory gcf plan check <item-id>` and fix each `format:` line; a format line is polish and never blocks
|
|
@@ -8,6 +8,15 @@ gcf_gate:
|
|
|
8
8
|
- 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
9
|
- 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>"`)
|
|
10
10
|
- write the plan to the item's `plan:` path, by default `.ai-factory/plans/<item-id>.md`, with task checkboxes
|
|
11
|
+
- write it in the plan form below, not in TASK-FORMAT.md's Context, Decisions and Tasks: keep `## Settings`, leave out Commit Plan and Roadmap Linkage
|
|
11
12
|
- a design-unit item: shape the plan by its slots — intent, behavior, refusal, boundaries, persistence, feel envelopes, contract, interactions, constraints, miss criterion; a hard unit plans its tests from `statement`, `threshold` or `fields`
|
|
12
13
|
- a bug item: the first task writes the test that reproduces `repro:`, the fix comes after it
|
|
13
|
-
- after the plan, run `ai-factory gcf plan check <item-id>`: a failure is fixed in the plan before implementation
|
|
14
|
+
- after the plan, run `ai-factory gcf plan check <item-id>`: a failure is fixed in the plan before implementation; fix each `format:` line too, which never blocks
|
|
15
|
+
|
|
16
|
+
gcf_plan_form:
|
|
17
|
+
- one idea a line, 150 characters as the target and 250 the limit; a fact is said once, and a task cites the decision it follows
|
|
18
|
+
- `context:` bullets of facts found in the code and the readset; the item's own text is not restated
|
|
19
|
+
- `decisions:` records `- id: d1` with `pick:` and `why:`, and `rejects:` or `cost:` when there is one
|
|
20
|
+
- `tasks:` lines `- [ ] t1 <action> (d1, d2)`, grouped under `### Phase N: <name>` lines
|
|
21
|
+
- `pillar_check:` one `<pillar>: <effect>` line per pillar the work touches, and at most one `untouched: <pillars>` line
|
|
22
|
+
- `verification:` the commands that prove it, then what the human checks by hand
|
package/lib/bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// The structured entry (GCF-PRD §11.10): `design export` glues game.md,
|
|
1
|
+
// The structured entry (GCF-PRD §11.10): `design export` glues game.md, GLOSSARY.md, PILLARS.md
|
|
2
2
|
// and the units into one bundle a designer edits; `design import` brings it back without a
|
|
3
3
|
// model. A board's form saves one part the same way (`design save`, lib/design-parts.js).
|
|
4
4
|
// Each part carries the hash it was exported with, so an import tells a designer's edit from
|
|
@@ -8,14 +8,13 @@ import { existsSync } from 'node:fs';
|
|
|
8
8
|
import { createHash } from 'node:crypto';
|
|
9
9
|
import path from 'node:path';
|
|
10
10
|
import { bodyIssues } from 'cnlp-kit';
|
|
11
|
-
import { readDesign, loadDocProfile, PILLARS_MAX, SLUG_RE } from './design.js';
|
|
11
|
+
import { readDesign, loadDocProfile, PILLARS_MAX, SLUG_RE, DOC_FILES, docPath } from './design.js';
|
|
12
12
|
import { buildLedger } from './ledger.js';
|
|
13
13
|
import { designCheck, recordsIn } from './design-check.js';
|
|
14
14
|
import { atomicWrite, withFileRollback, resolveInside } from './safe-path.js';
|
|
15
15
|
import { writeIndex } from './index-gen.js';
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
export const DOC_FILES = { game: 'game.md', glossary: 'glossary.md', pillars: 'PILLARS.md' };
|
|
17
|
+
export { DOC_FILES, docPath };
|
|
19
18
|
const DOCS = Object.keys(DOC_FILES);
|
|
20
19
|
// A part opens with a marker comment, not with a heading: a `# notes` line inside game.md or a
|
|
21
20
|
// purpose is content, and a heading boundary would cut the document there.
|
|
@@ -227,7 +226,7 @@ const NOTES = {
|
|
|
227
226
|
/** The file each write touches. */
|
|
228
227
|
function fileOf(root, w) {
|
|
229
228
|
// validName already holds a doc to DOCS; resolveInside is the second lock on the path.
|
|
230
|
-
if (w.kind === 'doc') return resolveInside(root,
|
|
229
|
+
if (w.kind === 'doc') return resolveInside(path.dirname(root), docPath(w.name));
|
|
231
230
|
|
|
232
231
|
return resolveInside(path.join(root, 'design'), `${w.kind === 'system' ? w.name : w.system}.md`);
|
|
233
232
|
}
|