ctxr-cli 0.20.1 → 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.
Files changed (100) hide show
  1. package/README.md +55 -8
  2. package/dist/adapters/builtin/index.d.ts.map +1 -1
  3. package/dist/adapters/builtin/index.js +8 -1
  4. package/dist/adapters/builtin/index.js.map +1 -1
  5. package/dist/adapters/harness/antigravity.d.ts +18 -0
  6. package/dist/adapters/harness/antigravity.d.ts.map +1 -0
  7. package/dist/adapters/harness/antigravity.js +24 -0
  8. package/dist/adapters/harness/antigravity.js.map +1 -0
  9. package/dist/adapters/harness/codex.d.ts +22 -0
  10. package/dist/adapters/harness/codex.d.ts.map +1 -0
  11. package/dist/adapters/harness/codex.js +28 -0
  12. package/dist/adapters/harness/codex.js.map +1 -0
  13. package/dist/adapters/types.d.ts +9 -0
  14. package/dist/adapters/types.d.ts.map +1 -1
  15. package/dist/commands/archive.d.ts +4 -3
  16. package/dist/commands/archive.d.ts.map +1 -1
  17. package/dist/commands/archive.js +28 -23
  18. package/dist/commands/archive.js.map +1 -1
  19. package/dist/commands/ingest.d.ts.map +1 -1
  20. package/dist/commands/ingest.js +22 -1
  21. package/dist/commands/ingest.js.map +1 -1
  22. package/dist/commands/init.d.ts +2 -0
  23. package/dist/commands/init.d.ts.map +1 -1
  24. package/dist/commands/init.js +20 -3
  25. package/dist/commands/init.js.map +1 -1
  26. package/dist/commands/publish-urls.d.ts +32 -0
  27. package/dist/commands/publish-urls.d.ts.map +1 -0
  28. package/dist/commands/publish-urls.js +125 -0
  29. package/dist/commands/publish-urls.js.map +1 -0
  30. package/dist/config/defaults.d.ts +26 -0
  31. package/dist/config/defaults.d.ts.map +1 -1
  32. package/dist/config/defaults.js +25 -1
  33. package/dist/config/defaults.js.map +1 -1
  34. package/dist/config/schema.d.ts +19 -0
  35. package/dist/config/schema.d.ts.map +1 -1
  36. package/dist/config/schema.js +31 -0
  37. package/dist/config/schema.js.map +1 -1
  38. package/dist/core/agents-doc.d.ts +26 -0
  39. package/dist/core/agents-doc.d.ts.map +1 -1
  40. package/dist/core/agents-doc.js +94 -40
  41. package/dist/core/agents-doc.js.map +1 -1
  42. package/dist/core/checks/harness-portability-checks.d.ts +32 -0
  43. package/dist/core/checks/harness-portability-checks.d.ts.map +1 -1
  44. package/dist/core/checks/harness-portability-checks.js +177 -2
  45. package/dist/core/checks/harness-portability-checks.js.map +1 -1
  46. package/dist/core/checks/integrity-checks.d.ts.map +1 -1
  47. package/dist/core/checks/integrity-checks.js +34 -14
  48. package/dist/core/checks/integrity-checks.js.map +1 -1
  49. package/dist/core/checks/organize-checks.d.ts +5 -0
  50. package/dist/core/checks/organize-checks.d.ts.map +1 -1
  51. package/dist/core/checks/organize-checks.js +57 -4
  52. package/dist/core/checks/organize-checks.js.map +1 -1
  53. package/dist/core/convention-doc.d.ts.map +1 -1
  54. package/dist/core/convention-doc.js +5 -2
  55. package/dist/core/convention-doc.js.map +1 -1
  56. package/dist/core/conventions.d.ts +7 -0
  57. package/dist/core/conventions.d.ts.map +1 -1
  58. package/dist/core/conventions.js +3 -0
  59. package/dist/core/conventions.js.map +1 -1
  60. package/dist/core/errors.d.ts +22 -0
  61. package/dist/core/errors.d.ts.map +1 -1
  62. package/dist/core/errors.js +52 -0
  63. package/dist/core/errors.js.map +1 -1
  64. package/dist/core/ingest/required-sections.d.ts +3 -3
  65. package/dist/core/ingest/required-sections.d.ts.map +1 -1
  66. package/dist/core/ingest/required-sections.js +79 -16
  67. package/dist/core/ingest/required-sections.js.map +1 -1
  68. package/dist/core/notes/list.d.ts.map +1 -1
  69. package/dist/core/notes/list.js +3 -0
  70. package/dist/core/notes/list.js.map +1 -1
  71. package/dist/core/reconcile.d.ts.map +1 -1
  72. package/dist/core/reconcile.js +2 -1
  73. package/dist/core/reconcile.js.map +1 -1
  74. package/dist/core/skills.d.ts.map +1 -1
  75. package/dist/core/skills.js +28 -4
  76. package/dist/core/skills.js.map +1 -1
  77. package/dist/run.d.ts.map +1 -1
  78. package/dist/run.js +15 -2
  79. package/dist/run.js.map +1 -1
  80. package/dist/version.d.ts +1 -1
  81. package/dist/version.js +1 -1
  82. package/package.json +3 -3
  83. package/templates/agents/canonical.md +3 -8
  84. package/templates/agents/capture-and-ingest.md +1 -36
  85. package/templates/agents/conventions.md +3 -1
  86. package/templates/agents/guidance-index.md +5 -0
  87. package/templates/agents/mission.md +2 -0
  88. package/templates/agents/retrieval-leg-routing.md +7 -42
  89. package/templates/conventions/baseline-conventions.md +20 -9
  90. package/templates/conventions/house-conventions-seed.md +10 -0
  91. package/templates/skills/ctxr-capture.md +35 -4
  92. package/templates/skills/ctxr-derived-artifacts.md +6 -0
  93. package/templates/skills/ctxr-ingest-orchestration.md +5 -1
  94. package/templates/skills/ctxr-mission.md +40 -31
  95. package/templates/skills/ctxr-organize-audit.md +30 -6
  96. package/templates/skills/ctxr-placement.md +5 -0
  97. package/templates/skills/ctxr-publish.md +2 -1
  98. package/templates/skills/ctxr-research.md +108 -0
  99. package/templates/skills/ctxr-second-opinion.md +5 -0
  100. package/templates/skills/ctxr-submit.md +28 -4
package/README.md CHANGED
@@ -32,7 +32,10 @@ ctxr init
32
32
  `ctxr init` asks two questions, then creates the git repository (if there isn't one), scaffolds the store, and commits it:
33
33
 
34
34
  - **Which taxonomy profile?** `para` (Projects / Areas / Resources / Archives — the default), `zettelkasten` (no layers at all; structure emerges from links), or `diataxis` (Tutorials / How-to / Reference / Explanation). Or bring your own layer list with `--taxonomy <file.yaml>`.
35
- - **Which agent harnesses?** `claude-code` (default — its adapter generates `CLAUDE.md`, a one-line import of `AGENTS.md`) and/or `hermes-agent` (reads `AGENTS.md` directly, so it needs no entry file at all). `--harness none` opts out.
35
+ - **Which agent harnesses?** Any of:
36
+ - `claude-code` (the default). Its adapter generates `CLAUDE.md`, a one-line import of `AGENTS.md`.
37
+ - `hermes-agent`, `codex`, and `antigravity`. These read `AGENTS.md` directly, so they need no entry file at all. Codex and Antigravity also read `.agents/skills/` natively. See [Codex and Antigravity](#codex-and-antigravity).
38
+ - `--harness none` opts out.
36
39
 
37
40
  Non-interactively, pass them as flags — nothing ever blocks on a prompt:
38
41
 
@@ -48,15 +51,16 @@ After `ctxr init --profile para`:
48
51
 
49
52
  ```
50
53
  contexture.yaml single source of truth — what this store chose; the rest takes shipped defaults
51
- AGENTS.md generated entry document — six managed sections
54
+ AGENTS.md generated entry document — managed sections, held to a size budget
52
55
  CLAUDE.md harness entry file; a one-line managed import of AGENTS.md
53
56
  .claude/
54
57
  skills/ -> ../.agents/skills a bridge, so Claude Code auto-discovers the canonical skills
55
58
  .agents/skills/ THE canonical skills location, read natively by most harnesses
56
- ctxr-*/SKILL.md 16 contexture-owned skills (refreshed by `ctxr update`)
59
+ ctxr-*/SKILL.md 17 contexture-owned skills (refreshed by `ctxr update`)
57
60
  frontend-design/, eli5/ vendored third-party skills, with licenses and provenance
58
61
  .contexture/guidance/
59
62
  house-conventions.md your store's own rules — inlined into AGENTS.md verbatim
63
+ <topic>.md rules for one task — declare `read_when`, and AGENTS.md routes to them
60
64
  mission.md the standing "what's active right now" document
61
65
  .contexture/templates/
62
66
  Note.md the base every note shares — copy it to cut your own kind
@@ -90,7 +94,16 @@ Two distinctions make the rest of this readable:
90
94
 
91
95
  `ctxr init` writes two things an agent reads, both generated from your store's own config — never from a hardcoded layout:
92
96
 
93
- **`AGENTS.md`**, with six managed sections: *Store fundamentals* (root resolution, the frontmatter schema, the write path), *Mission*, *Retrieval: which leg to use*, *Capturing and ingesting*, *Placing a new note* (rendered from your actual taxonomy layers), and *Store conventions*.
97
+ **`AGENTS.md`**, with these managed sections:
98
+ - *Store fundamentals*: root resolution, the frontmatter schema, the write path.
99
+ - *Mission*.
100
+ - *Retrieval*.
101
+ - *Capturing and ingesting*.
102
+ - *Placing a new note*, rendered from your actual taxonomy layers.
103
+ - *Store conventions*.
104
+ - *Read when*, when any guidance loads on demand.
105
+
106
+ Every harness loads this file on every turn, so it is kept short. contexture's own share is held under a ceiling by a test, and procedure a skill already carries lives in that skill.
94
107
 
95
108
  **The skills**, installed as full copies at `.agents/skills/ctxr-<name>/SKILL.md`. That path is the cross-harness canonical location; a harness that reads its own branded directory instead gets that directory bridged to it (`.claude/skills/` is a symlink), so skill auto-discovery works with no wrapper and no second copy. A harness without auto-discovery reaches the same file by path from `AGENTS.md`. They're contexture-owned — refreshed by `ctxr update`, never hand-edited — and they're written against *your* store's configured taxonomy, so no shipped profile's layer names leak into them. Your own skills live alongside, untouched by sync. An owned skill may carry files beside its `SKILL.md` — `ctxr-second-opinion` ships the script that runs its reviewers — and update keeps that whole directory matching the package.
96
109
 
@@ -112,8 +125,42 @@ Two distinctions make the rest of this readable:
112
125
  | `ctxr-session-capture` | What a finished session produced that is worth keeping |
113
126
  | `ctxr-upgrade` | Whether to upgrade the installed CLI now, and asking before it does |
114
127
  | `ctxr-second-opinion` | Whether a plan or a taste call needs three different model families, and how to weigh what they say |
128
+ | `ctxr-research` | How to research a question against real sources — perspectives, source tiers, contradictions, review — with whatever web access the harness has |
129
+
130
+ Your house rules go in `.contexture/guidance/`.
131
+
132
+ **A file there is inlined into `AGENTS.md`'s *Store conventions* section in full**, so it loads for every harness at the start of every session. That's right for the rules that hold on every turn.
133
+
134
+ **A rule that matters only for one task belongs in its own file, with a trigger in its frontmatter:**
135
+
136
+ ```markdown
137
+ ---
138
+ title: Research style
139
+ read_when: Before a research pass or recording evidence
140
+ ---
141
+ ```
142
+
143
+ That file is not inlined. `AGENTS.md`'s *Read when* section lists it as one line: its trigger and its path.
144
+
145
+ **Size limits:**
146
+ - `ctxr lint` reports when `AGENTS.md` grows past `harness.entry_document_target_bytes`, which is 20 KiB by default.
147
+ - `ctxr doctor` fails when it grows past `harness.entry_document_max_bytes`. The default is 24,000 bytes, the smallest limit any supported harness reads in full, so a store works in Claude Code, Codex, and Antigravity whichever it declares.
148
+
149
+ ## Codex and Antigravity
150
+
151
+ Both read `AGENTS.md` at the store root and discover skills under `.agents/skills/` natively. A store targeting them needs no entry file and no bridged directory. Two things differ from Claude Code.
152
+
153
+ **They stop reading `AGENTS.md` at a fixed size, silently.**
154
+
155
+ | Harness | Stops reading at | Measured on | Can it be raised? |
156
+ |---|---:|---|---|
157
+ | Codex | 32,768 bytes | codex-cli 0.154.0 | Yes: set `project_doc_max_bytes` in your own `~/.codex/config.toml`. A repo-level `.codex/config.toml` is not honored for it. |
158
+ | Antigravity | about 24,000 bytes | agy 1.3.2 | No. |
159
+
160
+ - **Codex's limit covers every `AGENTS.md` it loads, combined**, from the repo root down to your working directory, so nested ones spend the same budget.
161
+ - **Every store is held to the smaller of the two, 24,000 bytes, by default**, whether or not it declares these harnesses. `ctxr doctor` fails past it, naming each harness that would cut the file off and the section where it stops. The remedy is to move task-specific guidance behind `read_when`, or trim the mission. A store that really runs only where nothing is cut off can raise `harness.entry_document_max_bytes`, which records that choice in its configuration.
115
162
 
116
- Your house rules go in `.contexture/guidance/house-conventions.md`. It's inlined into `AGENTS.md`'s *Store conventions* section in full, so it loads for every harness at the start of every session — there's no separate file an agent has to remember to open.
163
+ **Codex's sandbox keeps `.git` read-only.** Interactive Codex asks you to approve each git step of `ctxr-submit` outside its sandbox: `git add`, `git commit`, `git push`, `gh`. That includes session worktrees, whose git data lives in the main repository's `.git/worktrees/`.
117
164
 
118
165
  ## A session, end to end
119
166
 
@@ -238,7 +285,7 @@ ctxr archive <path>
238
285
 
239
286
  A new note starts from a template under `templates.path` (`.contexture/templates/` by default), never from a blank file and never by copying whichever sibling is nearest — that's how a store's notes drift out of any shape at all. `templates.installed` says which of the packaged library a store wants, defaulting to all of it and meaning "install none" when empty, exactly like `skills.vendored`; your own kinds sit in the same directory and are never touched, since contexture only owns the names it packages. A shipped template is contexture's: edit one and `ctxr update` puts it back. A house variant lives under a name the packaged set doesn't use, which nothing touches. A template is fixed content — the same bytes in every store — so the idea template carries the four relation sections literally, each with a note on what belongs under it, plus a `## Source` section for the prose account of where an idea came from (distinct from the `sources:` frontmatter `ctxr ingest` writes). `{{title}}` and `{{date}}` are the whole placeholder vocabulary; the agent substitutes them as it writes, no command expands them, and `ctxr lint` reports a note that landed with one still in it. An existing note is extended in place, never re-cut from a template.
240
287
 
241
- The `lint` / `doctor` split is the point: lint reports what's *worth reviewing* and never blocks; doctor reports what's *broken* and does. `ctxr archive` retires a note as a single tracked rename into `organize.archive_destination`, leaving its frontmatter byte-identical and reporting every note that linked to it — move it, don't tag it, or the active layers stop meaning anything. (The note must be committed first; archive won't rename something git isn't tracking.)
288
+ The `lint` / `doctor` split is the point: lint reports what's *worth reviewing* and never blocks; doctor reports what's *broken* and does. `ctxr archive` retires a note — or a folder of notes whole — as a single tracked rename to the same path beneath `organize.archive_destination` (`projects/Bet` → `archives/projects/Bet`), leaving every note byte-identical and reporting every note that linked to it — move it, don't tag it, or the active layers stop meaning anything. (The note must be committed first; archive won't rename something git isn't tracking.)
242
289
 
243
290
  → `ctxr-organize-audit`, `ctxr-derived-artifacts`.
244
291
 
@@ -279,7 +326,7 @@ Renders notes, catalog sections, the graph document, and published pages as cros
279
326
 
280
327
  A published page's navigation label follows its own declared `<title>`, falling back to its folder name when it declares none. A folder group is labelled with the declared name of the taxonomy layer whose path it matches — so a store's own words for its top-level folders reach the sidebar — and with the bare directory name otherwise; either way a group sits where its directory name sorts, not where its label does. The header's light/dark/system links choose a display theme, and the ☰ control shows and hides the navigation — both persist across pages via cookies, and neither requires client-side script. A published page itself is still served byte-verbatim, so neither the theme nor the navigation reaches into it; `ctxr publish new`'s scaffold instead follows the viewer's own system preference on its own.
281
328
 
282
- The **Preview** area, directly below the published pages, holds the pages your open session worktrees are carrying. A page is previewable from the moment its files exist on disk — before any commit, before any push, before a PR is opened or merged — because `serve` reads the worktree rather than asking git or a forge anything. Pages group by the worktree holding them at `/preview/<worktree>/<page>/index.html`, and a preview is byte-identical to what `/publish/<page>/index.html` will serve once the page lands, so what you read is what ships. Both routes address files rather than directories, so a page's address always names its index file — which is the address `ctxr publish new` and `ctxr publish check` report, so you never have to work out which of the two applies. A session worktree carrying no page appears nowhere, and nothing else inside one — notes, catalog, graph, config — becomes reachable.
329
+ The **Preview** area, directly below the published pages, holds the pages your open session worktrees are carrying. A page is previewable from the moment its files exist on disk — before any commit, before any push, before a PR is opened or merged — because `serve` reads the worktree rather than asking git or a forge anything. Pages group by the worktree holding them at `/preview/<worktree>/<page>/index.html`, and a preview is byte-identical to what `/publish/<page>/index.html` will serve once the page lands, so what you read is what ships. Both routes address files rather than directories, so a page's address always names its index file — which is the address `ctxr publish new` and `ctxr publish check` report, so you never have to work out which of the two applies. For a whole change set, `ctxr publish urls --staged` (or `--since <ref>`) reports every page added, modified, moved or removed with both addresses, which is what `ctxr-submit` puts in a pull request's **Pages** section; set `serve.previews: none` in `contexture.yaml` if previews never resolve for your reviewers. A session worktree carrying no page appears nowhere, and nothing else inside one — notes, catalog, graph, config — becomes reachable.
283
330
 
284
331
  ## Keeping a store current
285
332
 
@@ -333,7 +380,7 @@ To pin a value against a future default change, declare it. Nothing rewrites wha
333
380
  | `graph query …` | `neighbors`, `path`, `subgraph`, `hubs`, `clusters`, `bridges`, `orphans` |
334
381
  | `ingest <path> --into <note>` | Retain a capture with its source identity, and cite it from a note |
335
382
  | `source hash \| check \| stamp \| add-alt` | Dedupe and source identity, ahead of ingest |
336
- | `archive <path>` | Retire a note via one tracked rename |
383
+ | `archive <path>` | Retire a note, or a folder of notes whole, to its same path beneath the archive destination via one tracked rename |
337
384
  | `entry append <path>` | Append a line into a `contexture:<region>` fenced region |
338
385
  | `rollup gather \| write \| stale` | Entity synthesis: enumerate, write, find what's out of date |
339
386
  | `publish gather \| new \| check` | Resolve a subject, scaffold a page, run the structural gates |
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/builtin/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,OAAO,EAA0D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/builtin/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,OAAO,EAK9C,CAAC"}
@@ -1,8 +1,15 @@
1
+ import { antigravityHarnessAdapter } from '../harness/antigravity.js';
1
2
  import { claudeCodeHarnessAdapter } from '../harness/claude-code.js';
3
+ import { codexHarnessAdapter } from '../harness/codex.js';
2
4
  import { hermesAgentHarnessAdapter } from '../harness/hermes-agent.js';
3
5
  /**
4
6
  * Every adapter shipped with contexture itself, resolved by (kind, id)
5
7
  * against contexture.yaml's declared list.
6
8
  */
7
- export const BUILTIN_ADAPTERS = [claudeCodeHarnessAdapter, hermesAgentHarnessAdapter];
9
+ export const BUILTIN_ADAPTERS = [
10
+ claudeCodeHarnessAdapter,
11
+ hermesAgentHarnessAdapter,
12
+ codexHarnessAdapter,
13
+ antigravityHarnessAdapter,
14
+ ];
8
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/builtin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAGvE;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAuB,CAAC,wBAAwB,EAAE,yBAAyB,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/adapters/builtin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAGvE;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAuB;IAClD,wBAAwB;IACxB,yBAAyB;IACzB,mBAAmB;IACnB,yBAAyB;CAC1B,CAAC"}
@@ -0,0 +1,18 @@
1
+ import type { HarnessGenerationAdapter } from '../types.js';
2
+ /**
3
+ * A skills-only harness-generation adapter
4
+ * (support-codex-and-antigravity-harnesses): Antigravity loads `AGENTS.md` as
5
+ * an always-on rule and discovers workspace skills under `.agents/skills/`,
6
+ * so this adapter declares no entry file and needs no bridge on a store using
7
+ * the default skills path.
8
+ *
9
+ * No `GEMINI.md` wrapper: Antigravity loads `AGENTS.md` and `GEMINI.md` side
10
+ * by side, so a file importing the former would load the store's
11
+ * fundamentals twice.
12
+ *
13
+ * `entryDocumentMaxBytes` is the per-file rule cap Antigravity documents and
14
+ * agy 1.3.2 was measured against: content past about 24,000 bytes is never
15
+ * seen, and there is no setting that raises it.
16
+ */
17
+ export declare const antigravityHarnessAdapter: HarnessGenerationAdapter;
18
+ //# sourceMappingURL=antigravity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"antigravity.d.ts","sourceRoot":"","sources":["../../../src/adapters/harness/antigravity.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,yBAAyB,EAAE,wBAMvC,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { DEFAULT_SKILLS_PATH } from '../../config/defaults.js';
2
+ /**
3
+ * A skills-only harness-generation adapter
4
+ * (support-codex-and-antigravity-harnesses): Antigravity loads `AGENTS.md` as
5
+ * an always-on rule and discovers workspace skills under `.agents/skills/`,
6
+ * so this adapter declares no entry file and needs no bridge on a store using
7
+ * the default skills path.
8
+ *
9
+ * No `GEMINI.md` wrapper: Antigravity loads `AGENTS.md` and `GEMINI.md` side
10
+ * by side, so a file importing the former would load the store's
11
+ * fundamentals twice.
12
+ *
13
+ * `entryDocumentMaxBytes` is the per-file rule cap Antigravity documents and
14
+ * agy 1.3.2 was measured against: content past about 24,000 bytes is never
15
+ * seen, and there is no setting that raises it.
16
+ */
17
+ export const antigravityHarnessAdapter = {
18
+ id: 'antigravity',
19
+ kind: 'harness-generation',
20
+ interfaceVersion: 2,
21
+ skillsDir: DEFAULT_SKILLS_PATH,
22
+ entryDocumentMaxBytes: 24_000,
23
+ };
24
+ //# sourceMappingURL=antigravity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"antigravity.js","sourceRoot":"","sources":["../../../src/adapters/harness/antigravity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAG/D;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAA6B;IACjE,EAAE,EAAE,aAAa;IACjB,IAAI,EAAE,oBAAoB;IAC1B,gBAAgB,EAAE,CAAC;IACnB,SAAS,EAAE,mBAAmB;IAC9B,qBAAqB,EAAE,MAAM;CAC9B,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { HarnessGenerationAdapter } from '../types.js';
2
+ /**
3
+ * A skills-only harness-generation adapter
4
+ * (support-codex-and-antigravity-harnesses): Codex reads `AGENTS.md` at the
5
+ * store root and discovers skills under `.agents/skills/` natively, so this
6
+ * adapter declares no entry file and its skills directory is the canonical
7
+ * one — no bridge is created on a store using the default skills path.
8
+ *
9
+ * `entryDocumentMaxBytes` is Codex's `project_doc_max_bytes` default:
10
+ * measured on codex-cli 0.154.0, it stops reading project docs at exactly
11
+ * 32,768 bytes, combined across every `AGENTS.md` from the repo root down to
12
+ * the working directory. Only the operator's own `~/.codex/config.toml` (or
13
+ * `-c`) raises it — a repo-level `.codex/config.toml` is not honored for it,
14
+ * even with the project trusted. Antigravity's smaller limit sets the
15
+ * store-wide default regardless (lean-composed-entry-document D3).
16
+ *
17
+ * No permission config (design.md D4): Codex ignores a repo-level config for
18
+ * the settings that matter, and interactive Codex already asks the operator
19
+ * to approve each git step its sandbox refuses.
20
+ */
21
+ export declare const codexHarnessAdapter: HarnessGenerationAdapter;
22
+ //# sourceMappingURL=codex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../../src/adapters/harness/codex.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAE5D;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,mBAAmB,EAAE,wBAMjC,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { DEFAULT_SKILLS_PATH } from '../../config/defaults.js';
2
+ /**
3
+ * A skills-only harness-generation adapter
4
+ * (support-codex-and-antigravity-harnesses): Codex reads `AGENTS.md` at the
5
+ * store root and discovers skills under `.agents/skills/` natively, so this
6
+ * adapter declares no entry file and its skills directory is the canonical
7
+ * one — no bridge is created on a store using the default skills path.
8
+ *
9
+ * `entryDocumentMaxBytes` is Codex's `project_doc_max_bytes` default:
10
+ * measured on codex-cli 0.154.0, it stops reading project docs at exactly
11
+ * 32,768 bytes, combined across every `AGENTS.md` from the repo root down to
12
+ * the working directory. Only the operator's own `~/.codex/config.toml` (or
13
+ * `-c`) raises it — a repo-level `.codex/config.toml` is not honored for it,
14
+ * even with the project trusted. Antigravity's smaller limit sets the
15
+ * store-wide default regardless (lean-composed-entry-document D3).
16
+ *
17
+ * No permission config (design.md D4): Codex ignores a repo-level config for
18
+ * the settings that matter, and interactive Codex already asks the operator
19
+ * to approve each git step its sandbox refuses.
20
+ */
21
+ export const codexHarnessAdapter = {
22
+ id: 'codex',
23
+ kind: 'harness-generation',
24
+ interfaceVersion: 2,
25
+ skillsDir: DEFAULT_SKILLS_PATH,
26
+ entryDocumentMaxBytes: 32_768,
27
+ };
28
+ //# sourceMappingURL=codex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex.js","sourceRoot":"","sources":["../../../src/adapters/harness/codex.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAG/D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAA6B;IAC3D,EAAE,EAAE,OAAO;IACX,IAAI,EAAE,oBAAoB;IAC1B,gBAAgB,EAAE,CAAC;IACnB,SAAS,EAAE,mBAAmB;IAC9B,qBAAqB,EAAE,MAAM;CAC9B,CAAC"}
@@ -59,6 +59,15 @@ export interface HarnessGenerationAdapter extends Adapter<'harness-generation'>
59
59
  * AdapterDeclarationSchema.skills_dir).
60
60
  */
61
61
  skillsDir: string;
62
+ /**
63
+ * support-codex-and-antigravity-harnesses: the largest AGENTS.md, in bytes,
64
+ * this harness loads in full — content past it is silently never seen.
65
+ * Absent means the harness reads the whole document. Optional and additive,
66
+ * so `SUPPORTED_ADAPTER_INTERFACE_VERSION` stays at 2 (design.md D3). The
67
+ * smallest of these across the built-ins is every store's default
68
+ * `harness.entry_document_max_bytes` (lean-composed-entry-document D3).
69
+ */
70
+ entryDocumentMaxBytes?: number;
62
71
  /** The harness-specific file this adapter writes, relative to the store root (e.g. "CLAUDE.md"). Omit for a harness that reads AGENTS.md directly — no entry file is generated for it. */
63
72
  entryFileName?: string;
64
73
  render?(agentsMdPath: string): string[];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/adapters/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GAAG,oBAAoB,CAAC;AAE/C,MAAM,WAAW,OAAO,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW;IAC1D,IAAI,EAAE,CAAC,CAAC;IACR,EAAE,EAAE,MAAM,CAAC;IACX,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,eAAO,MAAM,mCAAmC,EAAE,MAAM,CAAC,WAAW,EAAE,MA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;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,wBAAyB,SAAQ,OAAO,CAAC,oBAAoB,CAAC;IAC7E;;;;;;;OAOG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;;;;;OAOG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,0LAA0L;IAC1L,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACxC,kFAAkF;IAClF,gBAAgB,CAAC,EAAE;QACjB,iEAAiE;QACjE,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,CAAC,KAAK,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC9D;;;;;;WAMG;QACH,YAAY,CAAC,KAAK,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACpE;;;;;WAKG;QACH,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;KACtC,CAAC;CACH;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,oBAAoB,EAAE,wBAAwB,CAAC;CAChD"}
@@ -15,9 +15,10 @@ export interface ArchiveData {
15
15
  * core/git/repo.ts's movePath, the Phase 1.5 primitive) — never a
16
16
  * read+delete+rewrite — so the note's frontmatter is untouched by
17
17
  * construction, and `git log --follow`
18
- * on the new path returns its full prior history. The destination lives
19
- * under `organize.archive_destination`, independent of taxonomy layer names,
20
- * so this works identically under any configured taxonomy (task 7.1). A
18
+ * on the new path returns its full prior history. The destination is the
19
+ * source's store-relative path beneath `organize.archive_destination`
20
+ * (research-and-capture-identity D4): the path is copied as it is, never
21
+ * interpreted, so this works identically under any configured taxonomy. A
21
22
  * shipped profile may seed that value at init
22
23
  * (archive-destination-from-taxonomy), but nothing here reads the taxonomy.
23
24
  *
@@ -1 +1 @@
1
- {"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../src/commands/archive.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAM7C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,eAAO,MAAM,QAAQ,EAAE,eAAuC,CAAC;AAE/D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAOD;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CA0ClH"}
1
+ {"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../src/commands/archive.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAM7C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,eAAO,MAAM,QAAQ,EAAE,eAAuC,CAAC;AAE/D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAOD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC,CA6ClH"}
@@ -1,7 +1,7 @@
1
- import { existsSync } from 'node:fs';
1
+ import { existsSync, statSync } from 'node:fs';
2
2
  import { mkdir } from 'node:fs/promises';
3
3
  import path from 'node:path';
4
- import { ArchiveDestinationExistsError, NoteNotFoundError, NoteNotTrackedError } from '../core/errors.js';
4
+ import { AlreadyArchivedError, ArchiveDestinationExistsError, NoteNotFoundError, NoteNotTrackedError } from '../core/errors.js';
5
5
  import { ExitCode } from '../core/exit-codes.js';
6
6
  import { isTracked, movePath } from '../core/git/repo.js';
7
7
  import { extractLinkTargets } from '../core/graph/model.js';
@@ -16,9 +16,10 @@ function toStoreRelativePath(env, store, givenPath) {
16
16
  * core/git/repo.ts's movePath, the Phase 1.5 primitive) — never a
17
17
  * read+delete+rewrite — so the note's frontmatter is untouched by
18
18
  * construction, and `git log --follow`
19
- * on the new path returns its full prior history. The destination lives
20
- * under `organize.archive_destination`, independent of taxonomy layer names,
21
- * so this works identically under any configured taxonomy (task 7.1). A
19
+ * on the new path returns its full prior history. The destination is the
20
+ * source's store-relative path beneath `organize.archive_destination`
21
+ * (research-and-capture-identity D4): the path is copied as it is, never
22
+ * interpreted, so this works identically under any configured taxonomy. A
22
23
  * shipped profile may seed that value at init
23
24
  * (archive-destination-from-taxonomy), but nothing here reads the taxonomy.
24
25
  *
@@ -28,39 +29,43 @@ function toStoreRelativePath(env, store, givenPath) {
28
29
  * operator is aware those notes now point at the archived location.
29
30
  */
30
31
  export async function execute(env, store, flags) {
31
- const relativePath = toStoreRelativePath(env, store, flags.path);
32
+ const relativePath = toStoreRelativePath(env, store, flags.path).replace(/\/+$/, '');
32
33
  const absolutePath = path.join(store.root, relativePath);
33
34
  if (!existsSync(absolutePath))
34
35
  throw new NoteNotFoundError(relativePath);
35
- const stem = path.basename(relativePath, '.md');
36
- const newRelativePath = path
37
- .join(store.config.organize.archive_destination, path.basename(relativePath))
38
- .split(path.sep)
39
- .join('/');
36
+ // research-and-capture-identity: a folder (a project with its supporting
37
+ // notes) archives whole — one tracked rename — rather than note by note.
38
+ // Either way the item keeps its path beneath the destination, so the archive
39
+ // shows where it lived and the reverse rename restores it.
40
+ const destination = store.config.organize.archive_destination.replace(/\/+$/, '');
41
+ if (relativePath === destination || relativePath.startsWith(`${destination}/`)) {
42
+ throw new AlreadyArchivedError(relativePath, store.config.organize.archive_destination);
43
+ }
44
+ const isFolder = statSync(absolutePath).isDirectory();
45
+ const newRelativePath = `${destination}/${relativePath}`;
40
46
  const newAbsolutePath = path.join(store.root, newRelativePath);
41
- if (newRelativePath !== relativePath && existsSync(newAbsolutePath)) {
47
+ if (existsSync(newAbsolutePath)) {
42
48
  throw new ArchiveDestinationExistsError(newRelativePath);
43
49
  }
44
50
  const notes = await listNotes(store.root, store.config);
51
+ const moving = isFolder ? notes.filter((note) => note.path.startsWith(`${relativePath}/`)) : notes.filter((note) => note.path === relativePath);
52
+ const movingPaths = new Set(moving.map((note) => note.path));
53
+ const stems = new Set(isFolder ? moving.map((note) => path.basename(note.path, '.md')) : [path.basename(relativePath, '.md')]);
45
54
  const linkingNotes = notes
46
- .filter((note) => note.path !== relativePath)
47
- .filter((note) => extractLinkTargets(note.body).includes(stem))
55
+ .filter((note) => !movingPaths.has(note.path))
56
+ .filter((note) => extractLinkTargets(note.body).some((target) => stems.has(target)))
48
57
  .map((note) => note.path)
49
58
  .sort();
50
- if (newRelativePath !== relativePath) {
51
- if (!(await isTracked(env.git, store.root, relativePath))) {
52
- throw new NoteNotTrackedError(relativePath);
53
- }
54
- await mkdir(path.dirname(newAbsolutePath), { recursive: true });
55
- await movePath(env.git, store.root, relativePath, newRelativePath);
59
+ if (!(await isTracked(env.git, store.root, relativePath))) {
60
+ throw new NoteNotTrackedError(relativePath);
56
61
  }
62
+ await mkdir(path.dirname(newAbsolutePath), { recursive: true });
63
+ await movePath(env.git, store.root, relativePath, newRelativePath);
57
64
  return {
58
65
  exitCode: ExitCode.Ok,
59
66
  data: { path: relativePath, newPath: newRelativePath, linkingNotes },
60
67
  findings: [],
61
- humanSummary: newRelativePath === relativePath
62
- ? `"${relativePath}" is already archived.`
63
- : `Archived "${relativePath}" to "${newRelativePath}"${linkingNotes.length > 0 ? ` (${linkingNotes.length} note(s) link to it)` : ''}.`,
68
+ humanSummary: `Archived ${isFolder ? `folder "${relativePath}" (${moving.length} note(s))` : `"${relativePath}"`} to "${newRelativePath}"${linkingNotes.length > 0 ? ` (${linkingNotes.length} note(s) link to it)` : ''}.`,
64
69
  storeRoot: store.root,
65
70
  schemaVersion: store.config.schema_version,
66
71
  };
@@ -1 +1 @@
1
- {"version":3,"file":"archive.js","sourceRoot":"","sources":["../../src/commands/archive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,6BAA6B,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC1G,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAGlD,MAAM,CAAC,MAAM,QAAQ,GAAoB,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AAY/D,SAAS,mBAAmB,CAAC,GAAW,EAAE,KAAY,EAAE,SAAiB;IACvE,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,C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{ existsSync } from 'node:fs';
2
2
  import { mkdir, rename, unlink } from 'node:fs/promises';
3
3
  import path from 'node:path';
4
4
  import { buildCatalog } from '../core/catalog/build.js';
5
- import { AlreadyIngestedError, CaptureDestinationExistsError, MissingRequiredCaptureSectionError, NoteNotFoundError } from '../core/errors.js';
5
+ import { AlreadyIngestedError, CaptureDestinationExistsError, CaptureSourceTypeMismatchError, MissingRequiredCaptureSectionError, NoteNotFoundError, SourceIdUnprefixedError, } from '../core/errors.js';
6
6
  import { ExitCode } from '../core/exit-codes.js';
7
7
  import { isUnderPrefix } from '../core/fs/prefix.js';
8
8
  import { writeFileAtomic } from '../core/fs/atomic.js';
@@ -69,10 +69,31 @@ function citedSources(frontmatter, capturePath) {
69
69
  export async function execute(env, store, flags) {
70
70
  const capturePath = toStoreRelativePath(env, store, flags.path);
71
71
  const notePath = toStoreRelativePath(env, store, flags.into);
72
+ /**
73
+ * research-and-capture-identity: the id is written onto the capture as
74
+ * given, so a bare one (`KAjUF…` instead of `circleback/KAjUF…`) would land
75
+ * in the store's debt form and defeat deduplication against every
76
+ * correctly prefixed record. Refused before anything is read or written.
77
+ */
78
+ if (!flags.sourceId.startsWith(`${flags.sourceType}/`)) {
79
+ throw new SourceIdUnprefixedError(flags.sourceId, flags.sourceType);
80
+ }
72
81
  const capture = await readOrThrow(store, capturePath);
73
82
  if (hasAssignedIdentity(capture)) {
74
83
  throw new AlreadyIngestedError(capturePath);
75
84
  }
85
+ /**
86
+ * The type a store's declaration is looked up under must be the type the
87
+ * capture is recorded under (harden-the-required-capture-section D2). A
88
+ * capture that already names its source and is ingested as a different one
89
+ * is refused rather than having one silently replace the other, before
90
+ * anything is read further, stamped, or moved. A capture that names none
91
+ * takes the invocation's; one that agrees is unremarkable.
92
+ */
93
+ const capturesOwnType = capture.frontmatter?.[SOURCE_TYPE_FIELD];
94
+ if (typeof capturesOwnType === 'string' && capturesOwnType.trim() !== '' && capturesOwnType !== flags.sourceType) {
95
+ throw new CaptureSourceTypeMismatchError(capturePath, capturesOwnType, flags.sourceType);
96
+ }
76
97
  /**
77
98
  * Before anything is written. A capture missing the section its store
78
99
  * requires is refused whole — not stamped, not moved, not cited — so a
@@ -1 +1 @@
1
- {"version":3,"file":"ingest.js","sourceRoot":"","sources":["../../src/commands/ingest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,kCAAkC,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC/I,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,aAAa,GACd,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAGzD,MAAM,CAAC,MAAM,QAAQ,GAAoB,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AAoB/D,SAAS,mBAAmB,CAAC,GAAW,EAAE,KAAY,EAAE,SAAiB;IACvE,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,I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Data {
26
26
  };
27
27
  schema_version: number;
28
28
  }
29
+ /** The ids `--harness` accepts, in prompt order — `src/run.ts` builds the option's help from this, so the two cannot list different harnesses. */
30
+ export declare const SELECTABLE_HARNESS_IDS: readonly string[];
29
31
  export declare function execute(env: RunEnv, flags: InitFlags): Promise<CommandOutcome<InitData>>;
30
32
  //# sourceMappingURL=init.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA+B1E,OAAO,EAKL,KAAK,mBAAmB,EACzB,MAAM,qBAAqB,CAAC;AAiB7B,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAkB5D,eAAO,MAAM,QAAQ,EAAE,eAAqC,CAAC;AAE7D,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2HAA2H;IAC3H,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB,EAAE,OAAO,CAAC;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,GAAG,EAAE;QAAE,kBAAkB,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC;IAC3F,wFAAwF;IACxF,QAAQ,EAAE;QAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,MAAM,EAAE,mBAAmB,EAAE,CAAA;KAAE,CAAC;IACpE,cAAc,EAAE,MAAM,CAAC;CACxB;AAkWD,wBAAsB,OAAO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O,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAY9F"}
@@ -3,7 +3,7 @@ import { mkdir, readFile } from 'node:fs/promises';
3
3
  import path from 'node:path';
4
4
  import { parse as parseYaml } from 'yaml';
5
5
  import { z } from 'zod';
6
- import { DEFAULT_ADAPTERS, DEFAULT_ARCHIVE_DESTINATION, DEFAULT_CAPTURE_ROOT, DEFAULT_CATALOG_PATH, DEFAULT_CATALOG_SECTION_MAX_BYTES, DEFAULT_CONVENTION_MAX_BYTES, DEFAULT_DERIVED_PATHS, DEFAULT_DIFF_SIZE_CEILING_LINES, DEFAULT_EXCLUDE_PATHS, DEFAULT_GATHER_MAX_NOTES, DEFAULT_GRAPH_SETTINGS, DEFAULT_GUIDANCE_PATH, DEFAULT_HOUSE_CONVENTIONS_FILE_NAME, DEFAULT_INBOX_PATH, DEFAULT_MISSION_PATH, DEFAULT_PUBLISH_PATH, DEFAULT_TEMPLATES_PATH, DEFAULT_INSTALLED_TEMPLATES, DEFAULT_ROLLUP_STALE_DAYS, DEFAULT_SESSION_BRANCH_PREFIX, DEFAULT_SKILLS_PATH, DEFAULT_TRACKING_PARAMS, DEFAULT_VENDORED_SKILLS, DEFAULT_WORKTREES_PATH, SHIPPED_DEFAULTS, } from '../config/defaults.js';
6
+ import { DEFAULT_ADAPTERS, DEFAULT_ARCHIVE_DESTINATION, DEFAULT_CAPTURE_ROOT, DEFAULT_CATALOG_PATH, DEFAULT_CATALOG_SECTION_MAX_BYTES, DEFAULT_CONVENTION_MAX_BYTES, DEFAULT_ENTRY_DOCUMENT_MAX_BYTES, DEFAULT_LOG_PATH, DEFAULT_MISSION_MAX_BYTES, DEFAULT_SCRATCH_PATH, DEFAULT_ENTRY_DOCUMENT_TARGET_BYTES, DEFAULT_DERIVED_PATHS, DEFAULT_DIFF_SIZE_CEILING_LINES, DEFAULT_EXCLUDE_PATHS, DEFAULT_GATHER_MAX_NOTES, DEFAULT_GRAPH_SETTINGS, DEFAULT_GUIDANCE_PATH, DEFAULT_HOUSE_CONVENTIONS_FILE_NAME, DEFAULT_INBOX_PATH, DEFAULT_MISSION_PATH, DEFAULT_PUBLISH_PATH, DEFAULT_TEMPLATES_PATH, DEFAULT_INSTALLED_TEMPLATES, DEFAULT_ROLLUP_STALE_DAYS, DEFAULT_SESSION_BRANCH_PREFIX, DEFAULT_SKILLS_PATH, DEFAULT_TRACKING_PARAMS, DEFAULT_VENDORED_SKILLS, DEFAULT_WORKTREES_PATH, SHIPPED_DEFAULTS, } from '../config/defaults.js';
7
7
  import { configPathFor, readConfig } from '../config/load.js';
8
8
  import { MIGRATION_STEPS } from '../config/migrations.js';
9
9
  import { renderStoreConfig } from '../config/render.js';
@@ -84,7 +84,11 @@ async function resolveTaxonomy(env, flags) {
84
84
  const SELECTABLE_HARNESSES = [
85
85
  { id: 'claude-code', name: 'Claude Code', description: 'Generates CLAUDE.md importing AGENTS.md.' },
86
86
  { id: 'hermes-agent', name: 'Hermes', description: 'Reads AGENTS.md directly — no entry file generated.' },
87
+ { id: 'codex', name: 'Codex', description: 'Reads AGENTS.md and .agents/skills/ directly; stops reading AGENTS.md at 32,768 bytes.' },
88
+ { id: 'antigravity', name: 'Antigravity', description: 'Reads AGENTS.md and .agents/skills/ directly; stops reading AGENTS.md at 24,000 bytes.' },
87
89
  ];
90
+ /** The ids `--harness` accepts, in prompt order — `src/run.ts` builds the option's help from this, so the two cannot list different harnesses. */
91
+ export const SELECTABLE_HARNESS_IDS = SELECTABLE_HARNESSES.map((h) => h.id);
88
92
  const DEFAULT_HARNESS_IDS = ['claude-code'];
89
93
  async function resolveHarnesses(env, flags) {
90
94
  if (flags.harness !== undefined) {
@@ -215,8 +219,21 @@ async function runInitCore(env, flags) {
215
219
  skills: { vendored: [...DEFAULT_VENDORED_SKILLS] },
216
220
  update_check: SHIPPED_DEFAULTS.update_check,
217
221
  ingest: { inbox_path: DEFAULT_INBOX_PATH, capture_root: DEFAULT_CAPTURE_ROOT, tracking_params: [...DEFAULT_TRACKING_PARAMS] },
218
- organize: { archive_destination: archiveDestination, rollup_stale_days: DEFAULT_ROLLUP_STALE_DAYS, mission_path: DEFAULT_MISSION_PATH },
219
- harness: { skills_path: DEFAULT_SKILLS_PATH, guidance_path: DEFAULT_GUIDANCE_PATH, convention_max_bytes: DEFAULT_CONVENTION_MAX_BYTES },
222
+ organize: {
223
+ archive_destination: archiveDestination,
224
+ rollup_stale_days: DEFAULT_ROLLUP_STALE_DAYS,
225
+ mission_path: DEFAULT_MISSION_PATH,
226
+ log_path: DEFAULT_LOG_PATH,
227
+ mission_max_bytes: DEFAULT_MISSION_MAX_BYTES,
228
+ },
229
+ harness: {
230
+ skills_path: DEFAULT_SKILLS_PATH,
231
+ guidance_path: DEFAULT_GUIDANCE_PATH,
232
+ convention_max_bytes: DEFAULT_CONVENTION_MAX_BYTES,
233
+ scratch_path: DEFAULT_SCRATCH_PATH,
234
+ entry_document_max_bytes: DEFAULT_ENTRY_DOCUMENT_MAX_BYTES,
235
+ entry_document_target_bytes: DEFAULT_ENTRY_DOCUMENT_TARGET_BYTES,
236
+ },
220
237
  adapters: resolvedAdapters,
221
238
  };
222
239
  // Round-trips through the schema internally; throws before any byte is written if it doesn't.