ctxr-cli 0.20.1 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -5
- package/dist/adapters/builtin/index.d.ts.map +1 -1
- package/dist/adapters/builtin/index.js +8 -1
- package/dist/adapters/builtin/index.js.map +1 -1
- package/dist/adapters/harness/antigravity.d.ts +18 -0
- package/dist/adapters/harness/antigravity.d.ts.map +1 -0
- package/dist/adapters/harness/antigravity.js +24 -0
- package/dist/adapters/harness/antigravity.js.map +1 -0
- package/dist/adapters/harness/codex.d.ts +22 -0
- package/dist/adapters/harness/codex.d.ts.map +1 -0
- package/dist/adapters/harness/codex.js +28 -0
- package/dist/adapters/harness/codex.js.map +1 -0
- package/dist/adapters/types.d.ts +9 -0
- package/dist/adapters/types.d.ts.map +1 -1
- package/dist/commands/ingest.d.ts.map +1 -1
- package/dist/commands/ingest.js +13 -1
- package/dist/commands/ingest.js.map +1 -1
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +20 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/publish-urls.d.ts +32 -0
- package/dist/commands/publish-urls.d.ts.map +1 -0
- package/dist/commands/publish-urls.js +125 -0
- package/dist/commands/publish-urls.js.map +1 -0
- package/dist/config/defaults.d.ts +26 -0
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +25 -1
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/schema.d.ts +19 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +31 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/core/agents-doc.d.ts +26 -0
- package/dist/core/agents-doc.d.ts.map +1 -1
- package/dist/core/agents-doc.js +94 -40
- package/dist/core/agents-doc.js.map +1 -1
- package/dist/core/checks/harness-portability-checks.d.ts +32 -0
- package/dist/core/checks/harness-portability-checks.d.ts.map +1 -1
- package/dist/core/checks/harness-portability-checks.js +177 -2
- package/dist/core/checks/harness-portability-checks.js.map +1 -1
- package/dist/core/checks/integrity-checks.d.ts.map +1 -1
- package/dist/core/checks/integrity-checks.js +34 -14
- package/dist/core/checks/integrity-checks.js.map +1 -1
- package/dist/core/checks/organize-checks.d.ts +5 -0
- package/dist/core/checks/organize-checks.d.ts.map +1 -1
- package/dist/core/checks/organize-checks.js +57 -4
- package/dist/core/checks/organize-checks.js.map +1 -1
- package/dist/core/convention-doc.d.ts.map +1 -1
- package/dist/core/convention-doc.js +5 -2
- package/dist/core/convention-doc.js.map +1 -1
- package/dist/core/conventions.d.ts +7 -0
- package/dist/core/conventions.d.ts.map +1 -1
- package/dist/core/conventions.js +3 -0
- package/dist/core/conventions.js.map +1 -1
- package/dist/core/errors.d.ts +16 -0
- package/dist/core/errors.d.ts.map +1 -1
- package/dist/core/errors.js +32 -0
- package/dist/core/errors.js.map +1 -1
- package/dist/core/ingest/required-sections.d.ts +3 -3
- package/dist/core/ingest/required-sections.d.ts.map +1 -1
- package/dist/core/ingest/required-sections.js +79 -16
- package/dist/core/ingest/required-sections.js.map +1 -1
- package/dist/core/notes/list.d.ts.map +1 -1
- package/dist/core/notes/list.js +3 -0
- package/dist/core/notes/list.js.map +1 -1
- package/dist/core/reconcile.d.ts.map +1 -1
- package/dist/core/reconcile.js +2 -1
- package/dist/core/reconcile.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +12 -4
- package/dist/core/skills.js.map +1 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +14 -1
- package/dist/run.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/templates/agents/canonical.md +3 -8
- package/templates/agents/capture-and-ingest.md +1 -36
- package/templates/agents/conventions.md +3 -1
- package/templates/agents/guidance-index.md +5 -0
- package/templates/agents/mission.md +2 -0
- package/templates/agents/retrieval-leg-routing.md +7 -42
- package/templates/conventions/baseline-conventions.md +20 -9
- package/templates/conventions/house-conventions-seed.md +10 -0
- package/templates/skills/ctxr-capture.md +27 -3
- package/templates/skills/ctxr-derived-artifacts.md +6 -0
- package/templates/skills/ctxr-ingest-orchestration.md +5 -1
- package/templates/skills/ctxr-mission.md +40 -31
- package/templates/skills/ctxr-organize-audit.md +6 -0
- package/templates/skills/ctxr-placement.md +5 -0
- package/templates/skills/ctxr-publish.md +2 -1
- package/templates/skills/ctxr-second-opinion.md +5 -0
- package/templates/skills/ctxr-submit.md +28 -4
|
@@ -1,46 +1,11 @@
|
|
|
1
|
-
## Retrieval
|
|
1
|
+
## Retrieval
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
contexture builds and maintains the first two ahead of time; the third is yours.
|
|
3
|
+
Find before you write. contexture builds and maintains the catalog and the wikilink graph; consult them before your own search.
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
1. **Enter and expand** with `ctxr context gather`. It takes entry selectors — `--section <id>`, `--under <prefix>`, `--seed <path>`, `--entity <name>` — walks the graph out from them (`--hops`, `--type <relation>`), and returns each note with its catalog gloss and hop distance, so you open only what the glosses justify. Start an open conceptual question from a catalog section (`ctxr catalog show --section <id>`).
|
|
6
|
+
2. **Structure** — paths, hubs, orphans, clusters, bridges — comes from `ctxr graph query`; read the graph document at `__GRAPH_DOCUMENT_PATH__` for cluster context before writing.
|
|
7
|
+
3. **Widen** with your own content matching (e.g. ripgrep) for a literal string or identifier, excluding __EXCLUSION_PATHS__, and feed a hit back in as `--seed`. Captures under `__CAPTURE_ROOT__` are excluded because they are provenance, not notes: to learn whether the store already holds some material, search `__CAPTURE_ROOT__` directly, by content and by the `capture_file` a capture names.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
- `--under <prefix>` — every retrievable note under a path prefix
|
|
10
|
-
- `--seed <path>` — a note you already hold, including one your own search just found
|
|
11
|
-
- `--entity <name>` — every note linking to a concept
|
|
9
|
+
When a search finds nothing, retry with the vocabulary the note itself would use, expand acronyms, and walk the graph from the nearest note you did find.
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
returning each reachable note with its catalog gloss, its hop distance, and labels saying why it is
|
|
15
|
-
there — so you can triage the set without opening a single file, then read only what the glosses
|
|
16
|
-
justify:
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
ctxr context gather --section <id> --hops 1
|
|
20
|
-
ctxr context gather --seed <path> --hops 2 --type <relation>
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Results are ordered: live material before demoted (archived) material, nearer hops before farther,
|
|
24
|
-
then by how the note was reached, then by path. `no_gloss` on a result means the catalog has no
|
|
25
|
-
description for that note yet — the pass found it structurally, not by what it says.
|
|
26
|
-
|
|
27
|
-
For structure on its own — shortest path, hubs, orphans, clusters, bridges — query the graph directly
|
|
28
|
-
with `ctxr graph query ...`, and read the graph document at `__GRAPH_DOCUMENT_PATH__` (rebuilt by
|
|
29
|
-
`ctxr graph build`) for cluster context before writing.
|
|
30
|
-
|
|
31
|
-
**3. Widen.** For a literal or entity question the first two steps do not answer — a specific string,
|
|
32
|
-
an exact identifier, a phrase — use your own content-matching tool (e.g. grep/ripgrep) against the
|
|
33
|
-
store, scoped to exclude:
|
|
34
|
-
|
|
35
|
-
__EXCLUSION_PATHS__
|
|
36
|
-
|
|
37
|
-
Feed anything it finds back in as `--seed` to pick the pass up again from there.
|
|
38
|
-
|
|
39
|
-
Those exclusions are for finding knowledge. Captures under `__CAPTURE_ROOT__` are left out because they
|
|
40
|
-
are provenance, not notes, so a search scoped this way never finds one. When the question is whether
|
|
41
|
-
the store already holds some material — a document, a meeting, a thread — search `__CAPTURE_ROOT__`
|
|
42
|
-
directly, by content and by the `capture_file` a capture names. Finding nothing in the notes is not
|
|
43
|
-
evidence that it was never captured.
|
|
44
|
-
|
|
45
|
-
There is no `ctxr search` command. Nothing here takes a free-text query, and no result carries a
|
|
46
|
-
relevance score. Ranked or semantic search is deferred to a future version — do not look for one.
|
|
11
|
+
There is no `ctxr search` command: nothing takes a free-text query, and no result carries a relevance score.
|
|
@@ -2,26 +2,37 @@
|
|
|
2
2
|
title: Baseline conventions
|
|
3
3
|
description: Contexture's shipped conventions, rendered from this store's own configuration.
|
|
4
4
|
---
|
|
5
|
-
|
|
5
|
+
## Writing notes
|
|
6
|
+
|
|
7
|
+
- Write in outliner bullets, not prose paragraphs, unless asked otherwise. Link liberally with wikilinks, and when you create a note, search the store and suggest links to what already exists.
|
|
8
|
+
- Extend what a note says rather than overwrite it, unless a rewrite is asked for.
|
|
9
|
+
- Keep a note's `title:` equal to its filename stem, unique in the store: the catalog builds each entry's wikilink from `title:`, so a divergent title links to nothing.
|
|
10
|
+
- A task is a checkbox with a dated parenthetical: `- [ ] Task (added YYYY-MM-DD, due YYYY-MM-DD)`, `- [~] Task (added YYYY-MM-DD)` while in progress, `- [x] Task (done YYYY-MM-DD)`. Omit a date that does not apply.
|
|
11
|
+
|
|
12
|
+
## What stays out of the store
|
|
13
|
+
|
|
14
|
+
- Credentials and full card or account numbers never enter it — the last four digits only.
|
|
15
|
+
- Scratch and intermediate files go in `__SCRATCH_PATH__`, never the store or `$HOME`. Deliverables are not scratch: a page goes under `__PUBLISH_PATH__`, a note into the store.
|
|
16
|
+
- Notes carry no access control — whoever reads the store reads all of it. Place sensitive material deliberately, and say in the note when it must not be quoted onward.
|
|
17
|
+
|
|
18
|
+
## The store log
|
|
19
|
+
|
|
20
|
+
`__LOG_PATH__` is append-only: after an ingest, a lint pass, or a structural change, add `## [YYYY-MM-DD] <kind> | <title>` and a few bullets. At session start, if its last `lint` entry is more than seven days old or missing, suggest a lint pass.
|
|
6
21
|
|
|
7
22
|
## Links and the relation vocabulary
|
|
8
23
|
|
|
9
|
-
Wikilinks (`[[Note Name]]`) are the
|
|
24
|
+
Wikilinks (`[[Note Name]]`) are the edges the graph is built from. A dangling link is a candidate note or a typo, not an error.
|
|
10
25
|
|
|
11
26
|
__RELATION_VOCABULARY__
|
|
12
27
|
|
|
13
28
|
## Archiving
|
|
14
29
|
|
|
15
|
-
`ctxr archive <path>`
|
|
30
|
+
Retire a note with `ctxr archive <path>` — one tracked rename into `__ARCHIVE_DESTINATION__`, the note unchanged — never a status tag on a note left in place.
|
|
16
31
|
|
|
17
32
|
## Git and sessions
|
|
18
33
|
|
|
19
|
-
Nothing reaches `__DEFAULT_BRANCH__` un-gated
|
|
20
|
-
|
|
21
|
-
Landing (`ctxr-land`) fast-forwards the store's canonical clone itself once a PR merges — `git fetch origin && git merge --ff-only origin/__DEFAULT_BRANCH__`, run from that clone — as long as it is on `__DEFAULT_BRANCH__` and can fast-forward cleanly from its remote; if it can't (diverged, no remote, or already elsewhere), the skill reports why instead of forcing it, and the clone is never checked out, reset, or discarded to make it fast-forward.
|
|
22
|
-
|
|
23
|
-
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.
|
|
34
|
+
Nothing reaches `__DEFAULT_BRANCH__` un-gated: work happens in a session worktree under `__WORKTREES_PATH__` and lands through a reviewed pull request (`ctxr-submit`, then `ctxr-land`). The pre-push hook refuses a direct push to `__DEFAULT_BRANCH__`; `CONTEXTURE_ALLOW_DEFAULT_BRANCH_PUSH=1` overrides it, for genuine emergencies only.
|
|
24
35
|
|
|
25
36
|
## Directory-scoped conventions
|
|
26
37
|
|
|
27
|
-
|
|
38
|
+
A folder may carry its own `README.md`; read it before changing anything inside that folder.
|
|
@@ -11,6 +11,16 @@ Each entry states the rule, why it exists, and how to apply it:
|
|
|
11
11
|
Why: <what goes wrong without it — the observation that earned it>
|
|
12
12
|
Apply: <what to actually do, concretely>
|
|
13
13
|
|
|
14
|
+
Every rule in this file is inlined into AGENTS.md and loads on every turn of every session. A rule that
|
|
15
|
+
matters only for one task belongs in its own file here, whose frontmatter declares when to read it:
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
title: Content style
|
|
19
|
+
read_when: Before writing or restructuring a note's body
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
A file with `read_when` is not inlined; AGENTS.md lists it under "Read when", by its trigger and its path.
|
|
23
|
+
|
|
14
24
|
The Why is not decoration. Without the observation that earned a rule, no future reader can tell
|
|
15
25
|
whether it still holds or whether a one-off calcified into a convention — so it never gets retired,
|
|
16
26
|
and this file only ever grows. `ctxr-session-capture` proposes additions and removals at the end of a
|
|
@@ -9,6 +9,10 @@ on disk, a URL the user handed you. Do not assume any particular one is availabl
|
|
|
9
9
|
one: look at what is there, and if nothing can reach the material, say so and ask rather than
|
|
10
10
|
reconstructing it from memory or from what the user said about it.
|
|
11
11
|
|
|
12
|
+
Before a research pass on a topic, query the connected meeting and note sources for it first, and capture
|
|
13
|
+
what they hold. Desk research is the expensive move, and nothing else catches primary material that was
|
|
14
|
+
never captured, because every other check runs on what the store already holds.
|
|
15
|
+
|
|
12
16
|
When a source system returns several items and the request named one, confirm which before writing.
|
|
13
17
|
Capturing the wrong meeting is not recoverable by a later ingest — it is a record of something that did
|
|
14
18
|
not happen.
|
|
@@ -22,8 +26,26 @@ that has been improved is no longer evidence of anything.
|
|
|
22
26
|
Where the source supplies a summary of its own, keep it, clearly marked as the source's derivation, in
|
|
23
27
|
its own section beside the record rather than instead of it. A summary is what a service concluded; the
|
|
24
28
|
record is what happened. A store may require, per source type, the section its captures must carry — if
|
|
25
|
-
it does, a capture missing that section is refused at ingest, so
|
|
26
|
-
deciding a summary is
|
|
29
|
+
it does, a capture missing that section is refused at ingest, and so is one whose heading has nothing under
|
|
30
|
+
it or appears only inside a code block, so check the store's configuration before deciding a summary is
|
|
31
|
+
enough.
|
|
32
|
+
|
|
33
|
+
Perishable material — a promotion, a price, an offer with an end date — is kept for its durable mechanic,
|
|
34
|
+
not its momentary state: capture how it works, and keep the state that will change in a section a later
|
|
35
|
+
capture overwrites.
|
|
36
|
+
|
|
37
|
+
A file a note links to or displays (a PDF it cites, an image it shows) lives under `__CAPTURE_ROOT__assets/`,
|
|
38
|
+
never in a folder of its own beside the notes.
|
|
39
|
+
|
|
40
|
+
Several items from one source system covering the same occasion (two recordings of one meeting, a
|
|
41
|
+
transcript and its summary) are one source. Check them against each other by content and named entities —
|
|
42
|
+
string matching misses the same speech transcribed twice — and when they share an event, say so in each
|
|
43
|
+
capture and name which governs. A fact appearing in both is never corroborated by the pair. Where one
|
|
44
|
+
rendering is demonstrably worse, keep it and record its specific errors rather than discarding it.
|
|
45
|
+
|
|
46
|
+
When a source does not separate speakers, say so in the capture as a caveat on the whole file. Any
|
|
47
|
+
attribution built from it is inference, and a service's own summary attributing positions to named people
|
|
48
|
+
is not the record.
|
|
27
49
|
|
|
28
50
|
One capture per item. Two meetings in one file cannot be cited separately, deduplicated separately, or
|
|
29
51
|
retracted separately.
|
|
@@ -33,7 +55,9 @@ retracted separately.
|
|
|
33
55
|
In the capture's frontmatter:
|
|
34
56
|
|
|
35
57
|
- `source_type` — the source system's own name, lowercased. Use the same value the store already uses
|
|
36
|
-
for that system; a second spelling silently defeats deduplication.
|
|
58
|
+
for that system; a second spelling silently defeats deduplication. Name the same value on
|
|
59
|
+
`ctxr ingest --source-type`: a capture that says one source type and is ingested as another is refused,
|
|
60
|
+
and a store's required section is looked up under the type the capture is recorded under.
|
|
37
61
|
- `source_id` — that source type, then a slash, then the identifier the source system itself uses for
|
|
38
62
|
this item. Prefer an opaque, stable id over a title or a date, which get edited.
|
|
39
63
|
|
|
@@ -13,6 +13,12 @@ edit inside a fence that the next build erases).
|
|
|
13
13
|
or hand-add only your entries, matching the committed structure, and say so in the commit message.
|
|
14
14
|
3. Build, then read the result back: reported counts against the source (notes vs catalog entries, graph
|
|
15
15
|
nodes vs notes); your new notes present with non-zero links; nothing else lost.
|
|
16
|
+
A gloss flagged stale (`ctxr catalog check --stale`, or `ctxr doctor`'s catalog finding) is confirmed by
|
|
17
|
+
reviewing it, then stripping its `<!-- hash:… -->` marker once, so the next `ctxr catalog build` stamps a fresh
|
|
18
|
+
one. The marker is frozen on purpose — editing the gloss and rebuilding does not clear the finding, and
|
|
19
|
+
stripping it without reviewing the gloss confirms nothing. The graph is a per-checkout cache under the cache
|
|
20
|
+
paths: every clone and worktree starts without one, so build it at the point of use when `ctxr doctor` reports
|
|
21
|
+
it stale; no schedule keeps it fresh.
|
|
16
22
|
4. Fences: never hand-edit inside a `contexture:<region>` fence — the next build overwrites it. Hand
|
|
17
23
|
edits OUTSIDE a fence (catalog glosses, prose around a generated section) are preserved by every
|
|
18
24
|
build and are the right place for them. A note's own operator-defined fenced region (a ledger, a
|
|
@@ -36,7 +36,9 @@ to put the file — "create a new note" is one option among several, never the d
|
|
|
36
36
|
hunt down the now-stale verdict language further down. A corrected body under an uncorrected
|
|
37
37
|
headline is worse than either alone.
|
|
38
38
|
- Source discipline: a field the source does not confirm is "not reported" — never inferred from
|
|
39
|
-
silence in either direction.
|
|
39
|
+
silence in either direction. A quantity the store did not verify carries who claimed it, when, and
|
|
40
|
+
in what setting ("founder-claimed, 2026-09-16, recruiting pitch"): stripped of its setting, a pitch
|
|
41
|
+
number and a filed number look identical later. Say when a figure is checkable and unchecked.
|
|
40
42
|
5. Write the note the decision calls for — create it, expand it, merge, restructure, or add a section —
|
|
41
43
|
preserving prior content in every case but the deliberate rewrite. A NEW note starts from a template
|
|
42
44
|
under `__TEMPLATES_PATH__`, with `{{title}}` and `{{date}}` substituted as you write (`ctxr-placement`
|
|
@@ -49,3 +51,5 @@ to put the file — "create a new note" is one option among several, never the d
|
|
|
49
51
|
records its provenance exactly as a new one does, and a note built from several sources cites all of
|
|
50
52
|
them. A deliberate ingest despite an `alternate_source_match` is the same command.
|
|
51
53
|
7. Verify: `ctxr lint` (orphans, broken links, material still in the inbox) and `ctxr catalog check`.
|
|
54
|
+
8. Log it: append `## [YYYY-MM-DD] ingest | <title>` to `__LOG_PATH__`, with a bullet naming the note it informed
|
|
55
|
+
and what changed there.
|
|
@@ -1,36 +1,45 @@
|
|
|
1
|
-
Keep this store's mission
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
Keep this store's mission current: the short core every agent sees on every turn, inlined into AGENTS.md's
|
|
2
|
+
"Mission" section from the document named on its source line. The core is the operator's statement of what
|
|
3
|
+
matters now, so it is small, ranked, and dated. Everything else it once carried lives in a register note it
|
|
4
|
+
links to. Hand-written content outside the fenced region is never touched.
|
|
4
5
|
|
|
5
|
-
Run `ctxr rollup stale` (or `--for <mission_path>`) first
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
is out of date.
|
|
6
|
+
Run `ctxr rollup stale` (or `--for <mission_path>`) first. A mission never confirmed, or one confirmed more than
|
|
7
|
+
`organize.rollup_stale_days` ago, is reported stale on elapsed time alone; `ctxr lint` also reports any due date
|
|
8
|
+
in it that has passed. Use those rather than guessing from memory whether it is out of date.
|
|
9
9
|
|
|
10
|
-
1. Resolve `<mission_path>` from AGENTS.md's
|
|
11
|
-
this store, STOP — this skill has nothing to maintain; do not invent a path or create one
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
10
|
+
1. Resolve `<mission_path>` from the source line of AGENTS.md's "Mission" section. If no mission document is
|
|
11
|
+
configured for this store, STOP — this skill has nothing to maintain; do not invent a path or create one
|
|
12
|
+
unasked.
|
|
13
|
+
2. Gather from recent work: the current session's own changes, the store log at `__LOG_PATH__`, and every store
|
|
14
|
+
location the taxonomy declares (read AGENTS.md's "Placing a new note" section for the configured layers) —
|
|
15
|
+
not backlinks, and not a sample. A priority absent from every configured layer is not a store priority; treat
|
|
16
|
+
it as the operator's own working memory instead and leave it out.
|
|
17
|
+
3. Write the core, and only the core:
|
|
18
|
+
- **Primary mission** — one or two lines on what this store is for, right now.
|
|
19
|
+
- **Top priorities, in rank order** — three to five. Each names its status, its purpose, and its next useful
|
|
20
|
+
action; a priority with no next action is not actionable, and one with no purpose is not a priority —
|
|
21
|
+
resolve or downgrade it rather than carry it silently.
|
|
22
|
+
- **Not now** — what is deliberately set aside, one line each, so it is not mistaken for forgotten.
|
|
23
|
+
|
|
24
|
+
The core stays under `__MISSION_MAX_BYTES__` bytes; `ctxr doctor` fails above it. Per-item detail an agent
|
|
25
|
+
already finds elsewhere (a project's own next action, a status its note carries) is linked, not copied.
|
|
26
|
+
4. Keep the register in a note the core links to, placed by `ctxr-placement` like any other: back-burner items,
|
|
27
|
+
each stating plainly why it is not active right now (a size cutoff, a blocking dependency, a deliberate
|
|
28
|
+
deprioritization); sunset candidates (work whose end state is in sight or whose relevance is fading); and
|
|
29
|
+
open operational debt (deferred cleanup, known gaps, workarounds owed a real fix). Debt that is closed is
|
|
30
|
+
history: record it in `__LOG_PATH__` and remove it.
|
|
31
|
+
5. Propose, then write. The ranking and the mission are the operator's: show the proposed core and say what
|
|
32
|
+
moved and why, and write only once the operator confirms. A factual correction — a priority shipped,
|
|
33
|
+
blocked, or archived — is yours to make, and you say so in the report.
|
|
34
|
+
6. Synthesize into a file — bullets throughout, short clauses; skip any empty section silently (never "N/A",
|
|
35
|
+
"none", or "TBD"). Nothing dated later than today; no editorializing beyond the shape above.
|
|
36
|
+
7. Write: `ctxr rollup write <mission_path> --content-file <file>` — the same command `ctxr-rollup` uses for an
|
|
37
|
+
entity, applied here to the store's own mission path. It stamps the confirmation date AGENTS.md shows, and
|
|
38
|
+
is an idempotent fenced write (`changed: false` and a byte-identical file when the content matches;
|
|
39
|
+
mismatched markers abort with nothing written).
|
|
31
40
|
|
|
32
41
|
## Report
|
|
33
42
|
|
|
34
|
-
Mission path, `changed` or unchanged,
|
|
35
|
-
|
|
36
|
-
is a separate, explicit edit.
|
|
43
|
+
Mission path, `changed` or unchanged, what moved since the last write (a priority resolved, re-ranked, or
|
|
44
|
+
added; an item moved to the register), and any factual correction made without confirmation. Anything outside
|
|
45
|
+
the fence you want to fix is a separate, explicit edit.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
1. Run `ctxr lint` for the full health report — orphan notes, broken links, uningested inbox material,
|
|
2
2
|
catalog gaps. It always exits 0; its findings are observations for judgment, never a block.
|
|
3
|
+
After a lint pass, append `## [YYYY-MM-DD] lint | <one-line summary>` to `__LOG_PATH__`, with a bullet per
|
|
4
|
+
finding class you acted on — the log's last `lint` entry is how the next session knows one is due.
|
|
3
5
|
2. Run `ctxr doctor` for the invariants that DO block: catalog coverage, hook health, and more. Address doctor's failures before `ctxr-submit`; it runs the same checks.
|
|
4
6
|
|
|
5
7
|
## Placement review
|
|
@@ -18,6 +20,10 @@ note's frontmatter travels unchanged (never rewrite it on the move). Retiring is
|
|
|
18
20
|
not deletion. Verify with `git status --short` showing `R` (a rename, history preserved), not a delete
|
|
19
21
|
plus an add, then `ctxr catalog check`.
|
|
20
22
|
|
|
23
|
+
`ctxr archive` moves one note. A unit that lives as a folder of notes (a project with its supporting notes)
|
|
24
|
+
is retired whole: `git mv <folder> __ARCHIVE_DESTINATION__<name>`, then record in its hub note, in the past
|
|
25
|
+
tense, why it left. Archiving its notes one by one would scatter them across a flat destination.
|
|
26
|
+
|
|
21
27
|
## Stale rollups
|
|
22
28
|
|
|
23
29
|
`ctxr lint`'s rollup-stale finding (and `ctxr rollup stale` directly) names entity notes whose backlinks
|
|
@@ -31,6 +31,11 @@ clutter — worse than a slightly crowded existing one. Starting small and promo
|
|
|
31
31
|
starting big and hollow is not. Make the promotion trigger a rule, not a vibe, and write it INTO the
|
|
32
32
|
note: "Promote to its own top-level location the moment this holds 3+ distinct notes or topics."
|
|
33
33
|
|
|
34
|
+
A unit that will carry supporting notes (a project with its research, an exploration with its evidence)
|
|
35
|
+
gets a folder of its own. The graph clusters notes by their first __CLUSTER_DEPTH__ path segments, so
|
|
36
|
+
grouping such units under one common parent at that depth merges their clusters, and the graph then asserts
|
|
37
|
+
a relationship between them that does not exist.
|
|
38
|
+
|
|
34
39
|
## 4. What must never enter the store?
|
|
35
40
|
|
|
36
41
|
Credentials, full account numbers, and secrets never enter the store — last-4 only. This is a placement
|
|
@@ -51,7 +51,8 @@ says something.
|
|
|
51
51
|
When `gather` reports that an existing page belongs at the reported path too, it is because this
|
|
52
52
|
subject is acquiring a second page, and a subject's pages collect under one folder naming it. Move
|
|
53
53
|
that page there before you scaffold the new one, and tell the operator its URL changed — somebody
|
|
54
|
-
may already be holding that link. `
|
|
54
|
+
may already be holding that link. `ctxr publish urls` reports the old address beside the new one, and
|
|
55
|
+
`ctxr-submit` carries both into the pull request. `gather` moves nothing itself, and it names which signal counted
|
|
55
56
|
the page as this subject's; read that before you move anything, because the signal is a reading of
|
|
56
57
|
the page's README and can be wrong. Lead a page's source notes with the note it is a representation
|
|
57
58
|
of — that lead link is what says whose page this is, and everything after it is a citation.
|
|
@@ -13,6 +13,11 @@ what it reviews. Weighing the answers is your job, and steps 4 and 5 are how.
|
|
|
13
13
|
- **Poll** when the question is *which of these is better?* and being wrong costs mild regret: a name, a
|
|
14
14
|
framing, a piece of copy, which of several tools fits. If all three agreeing would settle it, it is a poll.
|
|
15
15
|
If you would still want each reviewer's top objections and a suggested edit, it is a critique.
|
|
16
|
+
A critique is required, not optional, before implementing a change that is architectural, irreversible, or touches
|
|
17
|
+
what may be disclosed and to whom — run it on the written plan before the work, never as a justification after it.
|
|
18
|
+
Its verdict, and the reasoning behind the option chosen, land in the pull request's body: for a structural change
|
|
19
|
+
the pull request and its commit are the decision record, and there is no separate governance step.
|
|
20
|
+
|
|
16
21
|
- **Answer directly** when there is one right answer, when the operator has already decided and wants
|
|
17
22
|
confirmation, or when the work is read-only investigation.
|
|
18
23
|
|
|
@@ -23,13 +23,25 @@ pull request?" — needing to ask is itself the answer: leave, and let the work
|
|
|
23
23
|
Ending a turn without that signal is normal and is not this skill. Say in one line what is uncommitted
|
|
24
24
|
and which worktree holds it, then stop. The work is safe on the branch and the next message picks it up.
|
|
25
25
|
|
|
26
|
+
## Routes
|
|
27
|
+
|
|
28
|
+
Every pull request takes one of three routes. Say which, and why, in its body:
|
|
29
|
+
|
|
30
|
+
- **Session** (the default): the session's work plus the capture it approved.
|
|
31
|
+
- **Own**: a new skill, a structural change (folders, the entry document, conventions), or a refactor touching five
|
|
32
|
+
or more files — reviewed on its own so it is not buried in content.
|
|
33
|
+
- **Housekeeping**: small appends nothing else depends on (a log line, a stray link fix), batched rather than folded
|
|
34
|
+
into unrelated work.
|
|
35
|
+
|
|
26
36
|
## Steps
|
|
27
37
|
|
|
28
38
|
1. Re-scan (mandatory — never replay a plan from an earlier snapshot): `git fetch origin`,
|
|
29
39
|
`git status --short`, `git diff --stat`, `git diff --cached --stat`,
|
|
30
40
|
`git ls-files --others --exclude-standard`, `git log --oneline origin/__DEFAULT_BRANCH__..HEAD`. State moves
|
|
31
41
|
under you while you work; name the delta from the previous scan rather than silently folding new work
|
|
32
|
-
into old buckets.
|
|
42
|
+
into old buckets. If the session touched or linked to an entity note, run `ctxr rollup stale --for <entity>`
|
|
43
|
+
(or a plain `ctxr rollup stale` when unsure which), and offer `ctxr-rollup` on anything flagged — never run a
|
|
44
|
+
rollup unasked; the operator decides.
|
|
33
45
|
2. Capture pass: run `ctxr-session-capture` exactly once here — closing a session is itself a capture
|
|
34
46
|
trigger; do not fire it again after submitting.
|
|
35
47
|
3. Stage surgically: `git add <paths>`, never `git add -A`; confirm with `git status --short` that the
|
|
@@ -39,11 +51,23 @@ and which worktree holds it, then stop. The work is safe on the branch and the n
|
|
|
39
51
|
5. Validate: run `ctxr doctor` (store scope, not `--staged` — a session's job is to leave the whole store
|
|
40
52
|
healthy, not merely pass one commit's gate). Fix a failure; never bypass it, and never proceed past it.
|
|
41
53
|
6. Commit: `git commit -m "<message>"`, describing the unit staged in step 3.
|
|
42
|
-
7. Name the branch:
|
|
54
|
+
7. Name the branch: `<prefix>/<short-slug>`, with a prefix from `skill/` `feat/` `project/` `notes/` `chore/`
|
|
55
|
+
`refactor/` `fix/` unless this store's conventions say otherwise. If it still carries a generated name,
|
|
56
|
+
`git branch -m "<name>"` before pushing — never
|
|
43
57
|
let a generated name reach the forge. A name given at `ctxr session start` does not settle this: it
|
|
44
58
|
named a worktree when the work began, and what ships is decided here.
|
|
45
|
-
8.
|
|
46
|
-
|
|
59
|
+
8. Before opening the pull request, run `ctxr publish urls --since origin/__DEFAULT_BRANCH__ --json`. When it
|
|
60
|
+
lists any page, the body gets a **Pages** section: a table with one row per page giving its status, its
|
|
61
|
+
preview address, and its published address — copied from the report, never rebuilt by hand. Mark a moved
|
|
62
|
+
page's old address as one that stops working, and a removed page's the same. Under the table state the
|
|
63
|
+
condition once: a preview resolves only while this pull request is open and the server can see this
|
|
64
|
+
session's worktree, and the published address resolves once the served checkout takes the landed commit.
|
|
65
|
+
When the report carries no preview, leave that column out; when it says no base URL is declared, say the
|
|
66
|
+
addresses are bare routes. When it lists no page, add no section.
|
|
67
|
+
Then run: `git push -u origin "<branch>"`, then `gh pr create --base __DEFAULT_BRANCH__ --title "<title>" --body
|
|
68
|
+
"<why / what changed / route / verification / follow-ups>"`. `gh` authenticates from its own credential
|
|
69
|
+
file: never export or interpolate a token, and never rewrite the origin's URL — it is a credential. The body answers those five questions; write the
|
|
70
|
+
why so a reviewer need not re-derive it. Do not stop to confirm first — the request to
|
|
47
71
|
submit is the consent for both, and `ctxr doctor` in step 5 is the gate on this path. If `gh` has no
|
|
48
72
|
reachable GitHub remote for this repository, `git push` still succeeds on its own — report the pushed
|
|
49
73
|
branch and give the operator the manual pull-request instructions instead of retrying `gh`.
|