ctxr-cli 0.4.1 → 0.5.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/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +55 -7
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/rollup-write.d.ts.map +1 -1
- package/dist/commands/rollup-write.js +8 -0
- package/dist/commands/rollup-write.js.map +1 -1
- package/dist/commands/verify.d.ts +9 -2
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +46 -23
- package/dist/commands/verify.js.map +1 -1
- package/dist/config/defaults.d.ts +18 -2
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +18 -2
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/schema.d.ts +14 -4
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +45 -9
- package/dist/config/schema.js.map +1 -1
- package/dist/core/agents-doc.d.ts +63 -12
- package/dist/core/agents-doc.d.ts.map +1 -1
- package/dist/core/agents-doc.js +191 -41
- package/dist/core/agents-doc.js.map +1 -1
- package/dist/core/checks/harness-portability-checks.d.ts +12 -0
- package/dist/core/checks/harness-portability-checks.d.ts.map +1 -0
- package/dist/core/checks/harness-portability-checks.js +39 -0
- package/dist/core/checks/harness-portability-checks.js.map +1 -0
- package/dist/core/checks/integrity-checks.d.ts +25 -1
- package/dist/core/checks/integrity-checks.d.ts.map +1 -1
- package/dist/core/checks/integrity-checks.js +136 -3
- package/dist/core/checks/integrity-checks.js.map +1 -1
- package/dist/core/checks/manifest.d.ts.map +1 -1
- package/dist/core/checks/manifest.js +2 -0
- package/dist/core/checks/manifest.js.map +1 -1
- package/dist/core/checks/organize-checks.d.ts +12 -0
- package/dist/core/checks/organize-checks.d.ts.map +1 -1
- package/dist/core/checks/organize-checks.js +51 -1
- package/dist/core/checks/organize-checks.js.map +1 -1
- package/dist/core/convention-doc.d.ts +33 -0
- package/dist/core/convention-doc.d.ts.map +1 -0
- package/dist/core/convention-doc.js +110 -0
- package/dist/core/convention-doc.js.map +1 -0
- package/dist/core/conventions.d.ts +25 -5
- package/dist/core/conventions.d.ts.map +1 -1
- package/dist/core/conventions.js +65 -3
- package/dist/core/conventions.js.map +1 -1
- package/dist/core/fs/fenced-region.d.ts +38 -0
- package/dist/core/fs/fenced-region.d.ts.map +1 -1
- package/dist/core/fs/fenced-region.js +88 -2
- package/dist/core/fs/fenced-region.js.map +1 -1
- package/dist/core/migrations/registry.d.ts.map +1 -1
- package/dist/core/migrations/registry.js +6 -1
- package/dist/core/migrations/registry.js.map +1 -1
- package/dist/core/migrations/rename-conventions-path.d.ts +26 -0
- package/dist/core/migrations/rename-conventions-path.d.ts.map +1 -0
- package/dist/core/migrations/rename-conventions-path.js +86 -0
- package/dist/core/migrations/rename-conventions-path.js.map +1 -0
- package/dist/core/notes/list.js +2 -2
- package/dist/core/notes/list.js.map +1 -1
- package/dist/core/reconcile.d.ts.map +1 -1
- package/dist/core/reconcile.js +31 -4
- package/dist/core/reconcile.js.map +1 -1
- package/dist/core/rollup.d.ts +2 -2
- package/dist/core/rollup.d.ts.map +1 -1
- package/dist/core/rollup.js +24 -3
- package/dist/core/rollup.js.map +1 -1
- package/dist/core/write-lifecycle/path-gate.js +1 -1
- package/dist/core/write-lifecycle/path-gate.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/templates/agents/canonical.md +1 -7
- package/templates/agents/{store-conventions.md → conventions.md} +2 -4
- package/templates/agents/mission.md +5 -0
- package/templates/conventions/baseline-convention.md +60 -0
- package/templates/conventions/custom-convention-seed.md +21 -0
- package/templates/agents/store-conventions-empty.md +0 -7
package/dist/core/rollup.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { extractLinkTargets } from './graph/model.js';
|
|
3
3
|
import { htmlCommentFence } from './markers.js';
|
|
4
|
+
import { parseNote } from './notes/parse.js';
|
|
4
5
|
/** The single fenced region `rollup write` writes into, and the frontmatter timestamp it stamps alongside it. */
|
|
5
6
|
export const ROLLUP_FENCE = htmlCommentFence('rollup');
|
|
6
7
|
export const ROLLED_UP_FIELD = 'rolled_up';
|
|
@@ -67,10 +68,30 @@ export function checkMissionStaleness(note, staleDays, now) {
|
|
|
67
68
|
return null;
|
|
68
69
|
return { entity: note.path, rolledUp, newestBacklink: null };
|
|
69
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* compose-store-guidance-documents: the mission document typically lives
|
|
73
|
+
* under the guidance directory, which is excluded from the store's note
|
|
74
|
+
* listing (tool-owned instruction docs are never notes — see
|
|
75
|
+
* `excludedPrefixesFor`), so it is read directly by path here rather than
|
|
76
|
+
* looked up in the `notes` array `findStaleRollups` already has. A missing
|
|
77
|
+
* file (never seeded, or a hand-configured path that doesn't exist yet)
|
|
78
|
+
* yields no candidate, the same as the old array-lookup did when nothing
|
|
79
|
+
* matched.
|
|
80
|
+
*/
|
|
81
|
+
async function readMissionNote(root, missionPath) {
|
|
82
|
+
try {
|
|
83
|
+
return await parseNote(path.join(root, missionPath), missionPath);
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
if (err.code === 'ENOENT')
|
|
87
|
+
return null;
|
|
88
|
+
throw err;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
70
91
|
/**
|
|
71
92
|
* Every entity with a rollup section (optionally narrowed to one), reported
|
|
72
|
-
* stale per `checkRollupStaleness`, plus — when `missionPath` names a
|
|
73
|
-
* that exists
|
|
93
|
+
* stale per `checkRollupStaleness`, plus — when `missionPath` names a
|
|
94
|
+
* document that exists on disk — that one path via `checkMissionStaleness`
|
|
74
95
|
* instead of the backlink-based entity scan, even when it carries no
|
|
75
96
|
* `ROLLUP_FENCE` yet (an unwritten mission document must surface as
|
|
76
97
|
* needing its first write, not be silently excluded by `hasRollupSection`).
|
|
@@ -88,7 +109,7 @@ export async function findStaleRollups(git, root, notes, options = {}, staleDays
|
|
|
88
109
|
byPath.set(entry.entity, entry);
|
|
89
110
|
}
|
|
90
111
|
if (options.missionPath && (!options.entity || options.entity === options.missionPath)) {
|
|
91
|
-
const missionNote =
|
|
112
|
+
const missionNote = await readMissionNote(root, options.missionPath);
|
|
92
113
|
if (missionNote) {
|
|
93
114
|
const entry = checkMissionStaleness(missionNote, staleDays, now);
|
|
94
115
|
// The mission rule OWNS this path once configured: it overrides the
|
package/dist/core/rollup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup.js","sourceRoot":"","sources":["../../src/core/rollup.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"rollup.js","sourceRoot":"","sources":["../../src/core/rollup.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,iHAAiH;AACjH,MAAM,CAAC,MAAM,YAAY,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;AACvD,MAAM,CAAC,MAAM,eAAe,GAAG,WAAW,CAAC;AAE3C,MAAM,UAAU,gBAAgB,CAAC,IAAU;IACzC,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,YAAY,CAAC,KAAsB,EAAE,UAAkB;IAC9D,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAC9C,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,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AM,KAAK,GAAG,MAAM,oBAAoB,CAAC,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QACjF,IAAI,KAAK;YAAE,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC7C,CAAC;IAED,IAAI,OAAO,CAAC,WAAW,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,KAAK,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QACvF,MAAM,WAAW,GAAG,MAAM,eAAe,CAAC,IAAI,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;QACrE,IAAI,WAAW,EAAE,CAAC;YAChB,MAAM,KAAK,GAAG,qBAAqB,CAAC,WAAW,EAAE,SAAS,EAAE,GAAG,CAAC,CAAC;YACjE,oEAAoE;YACpE,oEAAoE;YACpE,kEAAkE;YAClE,oCAAoC;YACpC,IAAI,KAAK;gBAAE,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;;gBAC7C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC;IAED,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -52,7 +52,7 @@ function isUnderAnyPrefix(relativePath, prefixes) {
|
|
|
52
52
|
* not a gap — see `sanctionedPath`'s test for the refusal this now produces.
|
|
53
53
|
*/
|
|
54
54
|
function contextureOwnedPrefixes(config) {
|
|
55
|
-
const prefixes = [config.catalog.path, config.harness.skills_path, config.harness.
|
|
55
|
+
const prefixes = [config.catalog.path, config.harness.skills_path, config.harness.guidance_path];
|
|
56
56
|
try {
|
|
57
57
|
for (const adapter of configuredAdapters(config, 'harness-generation'))
|
|
58
58
|
prefixes.push(adapter.entryFileName);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"path-gate.js","sourceRoot":"","sources":["../../../src/core/write-lifecycle/path-gate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAOtD,SAAS,eAAe,CAAC,MAAc;IACrC,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AACpC,CAAC;AAaD,KAAK,UAAU,gBAAgB,CAAC,IAAY,EAAE,YAAoB;IAChE,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAChD,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC5E,IAAI,GAAG,KAAK,EAAE,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QAC/D,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;IACnC,CAAC;IAED,+FAA+F;IAC/F,gGAAgG;IAChG,iEAAiE;IACjE,IAAI,QAAQ,GAAG,MAAM,CAAC;IACtB,OAAO,QAAQ,KAAK,cAAc,IAAI,CAAC,UAAU,CAAC,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AM,EAAE,+GAA+G;SACxH,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;AACtB,CAAC;AAOD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAAmB,EAAE,IAAY,EAAE,YAAoB;IAC1F,MAAM,UAAU,GAAG,MAAM,gBAAgB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAC9D,IAAI,UAAU,CAAC,IAAI,KAAK,eAAe,EAAE,CAAC;QACxC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;IACD,IAAI,UAAU,CAAC,IAAI,KAAK,gBAAgB,EAAE,CAAC;QACzC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,2CAA2C,EAAE,CAAC;IACjF,CAAC;IAED,MAAM,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IACvE,MAAM,EAAE,GAAG,EAAE,GAAG,UAAU,CAAC;IAC3B,IAAI,GAAG,KAAK,eAAe,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,eAAe,GAAG,CAAC,EAAE,CAAC;QACrE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;IACD,IAAI,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/B,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;IACD,OAAO;QACL,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,4BAA4B,GAAG,4CAA4C,MAAM,CAAC,OAAO,CAAC,cAAc,IAAI;KACrH,CAAC;AACJ,CAAC"}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -16,11 +16,5 @@ Every write to this store happens inside a session worktree, never directly on t
|
|
|
16
16
|
|
|
17
17
|
### Identity and memory
|
|
18
18
|
|
|
19
|
-
Identity, persona, and durable cross-session memory for the agent working this store belong to its harness, not to this store — the store holds knowledge and
|
|
19
|
+
Identity, persona, and durable cross-session memory for the agent working this store belong to its harness, not to this store — the store holds knowledge and skills, documented as portable markdown under `__SKILLS_PATH__`, never a persona or memory file of its own.
|
|
20
20
|
__MISSION_POINTER__
|
|
21
|
-
|
|
22
|
-
### Skill index
|
|
23
|
-
|
|
24
|
-
Judgment-driven operations, documented as portable markdown under `__SKILLS_PATH__` — read one directly, no harness-specific discovery required:
|
|
25
|
-
|
|
26
|
-
__SKILL_INDEX__
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
## Store conventions
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
__CONVENTION_BODY__
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
A note that applies to only one agent harness (not every harness reading this store) belongs below that harness's own managed import in its own entry file, never here — every file in this directory is indexed into every harness's entry document equally.
|
|
5
|
+
A note that applies to only one agent harness (not every harness reading this store) belongs below that harness's own managed import in its own entry file, never here — every file in this directory is inlined into every harness's entry document equally.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Baseline conventions
|
|
3
|
+
description: Contexture's shipped conventions, rendered from this store's own configuration.
|
|
4
|
+
---
|
|
5
|
+
<!-- Owned by contexture — written by `ctxr init`, refreshed by `ctxr update`. Do not edit; add this store's own conventions in a separate file (e.g. custom-convention.md) instead. -->
|
|
6
|
+
|
|
7
|
+
These are the rules that hold regardless of which operation you're doing; a skill states the procedure for one operation.
|
|
8
|
+
|
|
9
|
+
## Visibility
|
|
10
|
+
|
|
11
|
+
The visibility field is `__VISIBILITY_FIELD__:`. It resolves in this order: (1) an explicit value in the note's own frontmatter; (2) a directory default declared in `contexture.yaml` for the note's path; (3) failing both, the configured default context, `__DEFAULT_CONTEXT__` — run `ctxr note resolve <path>` to see which step produced a given note's value.
|
|
12
|
+
|
|
13
|
+
Configured directory defaults:
|
|
14
|
+
|
|
15
|
+
__DIRECTORY_DEFAULTS_TABLE__
|
|
16
|
+
|
|
17
|
+
If a note's placement is ambiguous between two contexts, resolve to the more restrictive one rather than guessing broad — promote it later if it proves reusable.
|
|
18
|
+
|
|
19
|
+
Exclusion from retrieval (`retrieval.exclude_paths`, the leg-routing section above) is a path decision, never a visibility value — a path being excluded and a note's visibility are two independent axes. Do not invent a visibility value to mean "not indexed"; if a location should never be retrieved, its path belongs in `retrieval.exclude_paths`, not in a note's visibility field.
|
|
20
|
+
|
|
21
|
+
## Disclosure
|
|
22
|
+
|
|
23
|
+
`ctxr check <path> --audience <name>` decides whether a note's content may flow to an external audience, evaluated in this fixed order — a rung, once it produces a verdict, is final:
|
|
24
|
+
|
|
25
|
+
1. **Hard walls** — configured rules matching the note's path or the audience, evaluated before anything else.
|
|
26
|
+
2. **Explicit audience tag** — an `audience:` value on the note matching the requested audience.
|
|
27
|
+
3. **Internal-audience rule** — derived from the note's resolved visibility, for an audience configured as internal.
|
|
28
|
+
4. **External default** — no rule matched: **ASK**, never a silent ALLOW or DENY.
|
|
29
|
+
|
|
30
|
+
Configured hard walls:
|
|
31
|
+
|
|
32
|
+
__HARD_WALLS_LIST__
|
|
33
|
+
|
|
34
|
+
Configured internal audiences:
|
|
35
|
+
|
|
36
|
+
__INTERNAL_AUDIENCES_LIST__
|
|
37
|
+
|
|
38
|
+
Run `ctxr check <path> --scan` to check one note for a marker leaking across a wall.
|
|
39
|
+
|
|
40
|
+
## Links and the relation vocabulary
|
|
41
|
+
|
|
42
|
+
Wikilinks (`[[Note Name]]`) are the edge substrate the graph is built from. A dangling link — pointing at a note that doesn't yet exist — is a candidate for a new note or a typo, not an error; nothing about it needs fixing before a commit.
|
|
43
|
+
|
|
44
|
+
__RELATION_VOCABULARY__
|
|
45
|
+
|
|
46
|
+
## Archiving
|
|
47
|
+
|
|
48
|
+
`ctxr archive <path>` retires a note via a single tracked rename into `__ARCHIVE_PATH__`, preserving its git history and its visibility value unchanged — never a status tag on a note that stays in place. It reports every other note that links to the archived one, so those links can be reviewed; a dangling link left behind is not itself an error (see Links, above).
|
|
49
|
+
|
|
50
|
+
## Git and sessions
|
|
51
|
+
|
|
52
|
+
Nothing reaches `__DEFAULT_BRANCH__` un-gated — every write happens inside a session worktree under `__WORKTREES_PATH__`, landed only through a reviewed pull request (see the Write path rule above).
|
|
53
|
+
|
|
54
|
+
`ctxr session land` fast-forwards the store's canonical clone itself once a PR merges — wherever the command was invoked from — as long as that clone is on `__DEFAULT_BRANCH__` and can fast-forward cleanly from its remote; if it can't (diverged, no remote, or already elsewhere), the command reports why instead of forcing it, and the clone is never checked out, reset, or discarded to make it fast-forward.
|
|
55
|
+
|
|
56
|
+
The pre-push hook refuses a direct push to `__DEFAULT_BRANCH__`; `CONTEXTURE_ALLOW_DEFAULT_BRANCH_PUSH=1` is its emergency override — for genuine emergencies, not routine use. A generated harness permission config (for example, a harness-generation adapter's `.claude/settings.json`) bakes in the absolute path of whichever checkout generated it, so it is correct for exactly that checkout and should not be committed as though it were portable; re-run the adapter's generate command in a new checkout instead.
|
|
57
|
+
|
|
58
|
+
## Directory-scoped conventions
|
|
59
|
+
|
|
60
|
+
Some folders may carry their own conventions that apply only when working within them — typically as a `README.md` at that folder's root. Read a folder's own `README.md`, if it has one, before making changes inside it; nothing else in this store scans for these automatically.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Custom conventions
|
|
3
|
+
description: This store's own conventions, on top of the shipped baseline.
|
|
4
|
+
---
|
|
5
|
+
<!-- This store's own conventions — delete any prompt below that doesn't apply, and add your own sections freely. -->
|
|
6
|
+
|
|
7
|
+
## Placement
|
|
8
|
+
|
|
9
|
+
<!-- Distinctions between sibling folders or layers that aren't obvious from their descriptions alone in AGENTS.md. -->
|
|
10
|
+
|
|
11
|
+
## Content style
|
|
12
|
+
|
|
13
|
+
<!-- How notes are written here: tone, structure, formatting conventions beyond what AGENTS.md already states. -->
|
|
14
|
+
|
|
15
|
+
## Tags
|
|
16
|
+
|
|
17
|
+
<!-- Any tag vocabulary this store uses, and what each tag means. -->
|
|
18
|
+
|
|
19
|
+
## Store context
|
|
20
|
+
|
|
21
|
+
<!-- Anything a new agent working this store would need to know that doesn't fit elsewhere: who it's for, what it covers, what's out of scope. -->
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
## Store conventions
|
|
2
|
-
|
|
3
|
-
This store declares no convention documents yet. Operator-authored conventions (content style, field
|
|
4
|
-
semantics, house rules) belong as markdown files under `__CONVENTIONS_PATH__` — each is
|
|
5
|
-
indexed here on regeneration, referenced by path, never inlined.
|
|
6
|
-
|
|
7
|
-
A note that applies to only one agent harness (not every harness reading this store) belongs below that harness's own managed import in its own entry file, never here — every file in this directory is indexed into every harness's entry document equally.
|