ctxr-cli 0.10.0 → 0.11.1

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 (64) hide show
  1. package/README.md +13 -4
  2. package/dist/commands/init.d.ts.map +1 -1
  3. package/dist/commands/init.js +9 -2
  4. package/dist/commands/init.js.map +1 -1
  5. package/dist/config/defaults.d.ts +59 -3
  6. package/dist/config/defaults.d.ts.map +1 -1
  7. package/dist/config/defaults.js +61 -3
  8. package/dist/config/defaults.js.map +1 -1
  9. package/dist/config/schema.d.ts +4 -1
  10. package/dist/config/schema.d.ts.map +1 -1
  11. package/dist/config/schema.js +14 -1
  12. package/dist/config/schema.js.map +1 -1
  13. package/dist/core/agents-doc.d.ts.map +1 -1
  14. package/dist/core/agents-doc.js +2 -1
  15. package/dist/core/agents-doc.js.map +1 -1
  16. package/dist/core/checks/integrity-checks.d.ts.map +1 -1
  17. package/dist/core/checks/integrity-checks.js +36 -0
  18. package/dist/core/checks/integrity-checks.js.map +1 -1
  19. package/dist/core/checks/manifest.d.ts.map +1 -1
  20. package/dist/core/checks/manifest.js +2 -0
  21. package/dist/core/checks/manifest.js.map +1 -1
  22. package/dist/core/checks/store-checks.d.ts +12 -0
  23. package/dist/core/checks/store-checks.d.ts.map +1 -0
  24. package/dist/core/checks/store-checks.js +37 -0
  25. package/dist/core/checks/store-checks.js.map +1 -0
  26. package/dist/core/convention-doc.d.ts.map +1 -1
  27. package/dist/core/convention-doc.js +15 -9
  28. package/dist/core/convention-doc.js.map +1 -1
  29. package/dist/core/graph/model.d.ts +7 -6
  30. package/dist/core/graph/model.d.ts.map +1 -1
  31. package/dist/core/graph/model.js +11 -7
  32. package/dist/core/graph/model.js.map +1 -1
  33. package/dist/core/note-templates.d.ts +68 -0
  34. package/dist/core/note-templates.d.ts.map +1 -0
  35. package/dist/core/note-templates.js +170 -0
  36. package/dist/core/note-templates.js.map +1 -0
  37. package/dist/core/notes/list.d.ts.map +1 -1
  38. package/dist/core/notes/list.js +5 -0
  39. package/dist/core/notes/list.js.map +1 -1
  40. package/dist/core/reconcile.d.ts.map +1 -1
  41. package/dist/core/reconcile.js +9 -0
  42. package/dist/core/reconcile.js.map +1 -1
  43. package/dist/core/skills.d.ts.map +1 -1
  44. package/dist/core/skills.js +25 -15
  45. package/dist/core/skills.js.map +1 -1
  46. package/dist/core/write-lifecycle/path-gate.d.ts.map +1 -1
  47. package/dist/core/write-lifecycle/path-gate.js +4 -1
  48. package/dist/core/write-lifecycle/path-gate.js.map +1 -1
  49. package/dist/version.d.ts +1 -1
  50. package/dist/version.js +1 -1
  51. package/package.json +1 -1
  52. package/templates/agents/canonical.md +5 -1
  53. package/templates/notes/Company.md +25 -0
  54. package/templates/notes/Concept.md +29 -0
  55. package/templates/notes/Deal.md +25 -0
  56. package/templates/notes/Note.md +6 -0
  57. package/templates/notes/People.md +19 -0
  58. package/templates/notes/Project.md +19 -0
  59. package/templates/skills/ctxr-ingest-orchestration.md +4 -1
  60. package/templates/skills/ctxr-placement.md +21 -2
  61. package/templates/skills/ctxr-session-capture.md +5 -1
  62. package/templates/skills/ctxr-session-lifecycle.md +10 -0
  63. package/templates/skills/ctxr-submit.md +27 -2
  64. package/templates/skills/ctxr-upgrade.md +2 -1
@@ -0,0 +1,19 @@
1
+ ---
2
+ date_created: "{{date}}"
3
+ title: "{{title}}"
4
+ tags:
5
+ - People
6
+ ---
7
+ # {{title}}
8
+
9
+ ## Bio
10
+ <!-- Who they are: current role, organization, relevant history. -->
11
+
12
+ ## Relationship
13
+ <!-- How you know them, and in what context. -->
14
+
15
+ ## Communication Log
16
+ <!-- Dated entries, one per exchange: ### YYYY-MM-DD — context -->
17
+
18
+ ## Follow-ups
19
+ <!-- - [ ] Task text (added YYYY-MM-DD, due YYYY-MM-DD) -->
@@ -0,0 +1,19 @@
1
+ ---
2
+ date_created: "{{date}}"
3
+ title: "{{title}}"
4
+ tags:
5
+ - Project
6
+ ---
7
+ # {{title}}
8
+
9
+ ## Goal
10
+ <!-- What done looks like. Work with no end state is an area, not a project. -->
11
+
12
+ ## Open threads
13
+ <!-- Unresolved decisions and blockers; each links where it was raised. -->
14
+
15
+ ## Follow-ups
16
+ <!-- - [ ] Task text (added YYYY-MM-DD, due YYYY-MM-DD) -->
17
+
18
+ ## Related
19
+ <!-- Links out to related notes. -->
@@ -38,7 +38,10 @@ to put the file — "create a new note" is one option among several, never the d
38
38
  - Source discipline: a field the source does not confirm is "not reported" — never inferred from
39
39
  silence in either direction.
40
40
  5. Write the note the decision calls for — create it, expand it, merge, restructure, or add a section —
41
- preserving prior content in every case but the deliberate rewrite.
41
+ preserving prior content in every case but the deliberate rewrite. A NEW note starts from a template
42
+ under `__TEMPLATES_PATH__`, with `{{title}}` and `{{date}}` substituted as you write (`ctxr-placement`
43
+ picks which). An EXISTING note is extended in place — never re-cut from a template, which would throw
44
+ away the content that made it worth expanding.
42
45
  6. Register the source against whatever note you just wrote:
43
46
  `ctxr ingest <path> --into <note> --source-type <type> --source-id <id>`. Every row of the table above
44
47
  ends here, not just the first: the command retains the capture under the capture tier's month, freezes
@@ -9,8 +9,20 @@ __LAYER_STEP__
9
9
  - Match on what the content IS. When two sibling locations both seem to fit, name the distinction between
10
10
  them (abstract vs concrete; outward-facing vs inward-facing; who-we-are vs how-it-runs) and pick by
11
11
  altitude and audience, not by keyword.
12
- - Read one or two sibling notes in the chosen location and match their shape — frontmatter keys, heading
13
- style, bullets vs prose — before writing.
12
+ - If the chosen location has a `README.md`, read it first: a folder with one answer about what its notes
13
+ look like states it there, and that answer wins over anything you would infer.
14
+
15
+ ## 2b. Which template?
16
+
17
+ Start a new note from a template under `__TEMPLATES_PATH__` — never a blank file, and never by copying a
18
+ sibling wholesale. List that directory and pick the kind the content actually is; `Note` is the base when
19
+ nothing more specific fits, and it is also the file to copy when this store needs a kind it does not have.
20
+ Substitute `{{title}}` and `{{date}}` as you write — no command expands them, and `ctxr lint` reports a
21
+ note that lands with one still in it.
22
+
23
+ The template is the starting shape, not a cage: delete a section that does not apply rather than leaving
24
+ it empty, and add one the note needs. Read a sibling note only for what the template leaves open — house
25
+ phrasing, bullets vs prose, which tags this location uses.
14
26
 
15
27
  ## 3. Sub-item under an existing location, or a new top-level one?
16
28
 
@@ -37,6 +49,13 @@ manufactures an artifact for the graveyard; capture the durable slice by hand in
37
49
  Add a one-line wikilink from the relevant hub note so the new note is not an orphan; `ctxr lint` flags
38
50
  orphans and notes without a catalog entry.
39
51
 
52
+ ## An existing note
53
+
54
+ A note that already exists is EXTENDED, never restarted from a template: add the section it now needs,
55
+ preserve what is there, and leave its frontmatter alone. Re-cutting a note from a template to "bring it up
56
+ to standard" destroys the content that made it worth keeping — a note that has outgrown its starting shape
57
+ is doing the right thing.
58
+
40
59
  ## Relocating an existing note
41
60
 
42
61
  `ctxr archive <path>` to retire it; a plain tracked `git mv` for an ordinary re-placement. Either way the
@@ -84,7 +84,11 @@ notes:
84
84
  path: <layer>/<location>/<Title>.md
85
85
  mode: create # or: append
86
86
  body: |
87
- matching the frontmatter and style of the sibling notes (`ctxr-placement` decides the location)
87
+ for create: started from a template under `__TEMPLATES_PATH__`, with {{title}} and {{date}}
88
+ substituted, sections that do not apply deleted rather than left empty
89
+ for append: only the new material, extending the note rather than restarting it — the
90
+ command appends your body verbatim and never rewrites what is already there
91
+ (`ctxr-placement` decides both the location and the template)
88
92
  ```
89
93
 
90
94
  Then run `ctxr session capture --proposal <file>`. It validates and writes every item independently —
@@ -29,6 +29,16 @@ deferring is a normal answer, and the session is unaffected by it. A `cli.update
29
29
  means the check could not be completed; it says nothing about whether an upgrade is due, so proceed
30
30
  without mentioning it.
31
31
 
32
+ ## Between turns
33
+
34
+ A session is not a turn. The worktree persists across as many exchanges as the work takes, and ending a
35
+ turn with uncommitted changes on the branch is the session's normal resting state — not an obligation to
36
+ discharge before replying. Say in one line what is uncommitted and which worktree holds it, then stop.
37
+
38
+ Nothing about a finished piece of work ends the session. `ctxr-submit` is what ends it, and it waits to
39
+ be asked — see its own entry condition. An agent that treats delivering the thing it was asked for as the
40
+ signal to wrap up will submit into the middle of a conversation that had more coming.
41
+
32
42
  ## Re-scan before any plan
33
43
 
34
44
  Re-scan whenever state may have moved under you — before presenting a plan, before running `ctxr-submit`,
@@ -2,6 +2,29 @@ The submit half of the session lifecycle — everything up to and including open
2
2
  `ctxr-land` is the other half, after review; `ctxr-session-lifecycle` covers what surrounds both (starting
3
3
  a session, the conflict playbook, sequencing several pull requests) and is not repeated here.
4
4
 
5
+ ## When
6
+
7
+ Fires on an explicit request to wrap up — "submit", "open the PR", "push it", "ship it" — or on the
8
+ operator's own closing utterance ("done", "that's all", a sign-off). That request is the whole reason step 8
9
+ needs no further confirmation: it is the consent for the push and the pull-request open. Enter without
10
+ one and there is nothing behind those steps.
11
+
12
+ Anti-triggers — do not enter this skill when: you have merely finished the task you were given (a
13
+ delivered piece of work is not a closing signal, and the next message is as likely to extend it as to
14
+ end it); a question, an error, or a requested follow-up is still outstanding; the operator's last message
15
+ asked for more work. Your own judgment that the work looks complete is never the signal, and neither is
16
+ your own summary saying so.
17
+
18
+ Two tells that you are here uninvited. Reaching for `ctxr doctor`, `ctxr lint`, or `ctxr catalog check`
19
+ to decide *whether* to submit — those live at step 5 and after, inside a submit already asked for, and
20
+ running them ahead of one is a rehearsal, not a check. And composing a question like "shall I open the
21
+ pull request?" — needing to ask is itself the answer: leave, and let the work continue.
22
+
23
+ Ending a turn without that signal is normal and is not this skill. Say in one line what is uncommitted
24
+ and which worktree holds it, then stop. The work is safe on the branch and the next message picks it up.
25
+
26
+ ## Steps
27
+
5
28
  1. Re-scan (mandatory — never replay a plan from an earlier snapshot): `git fetch origin`,
6
29
  `git status --short`, `git diff --stat`, `git diff --cached --stat`,
7
30
  `git ls-files --others --exclude-standard`, `git log --oneline origin/__DEFAULT_BRANCH__..HEAD`. State moves
@@ -26,5 +49,7 @@ a session, the conflict playbook, sequencing several pull requests) and is not r
26
49
  9. Verify before any retry: a transport error can arrive AFTER the push or the pull-request open already
27
50
  succeeded. Before retrying anything, `git ls-remote origin <branch>` and `gh pr list --head <branch>` —
28
51
  never replay a push or a pull-request open blindly.
29
- 10. Hand off: report the pull request, then point at `ctxr-land` for after review — landing is a separate
30
- decision and keeps its own explicit confirmation.
52
+ 10. Hand off: report the pull request's number and its url, and name what landing it takes —
53
+ `ctxr-land`, targeting that number — so the next step is one word away instead of something to
54
+ reconstruct later. Landing stays a separate decision and keeps its own explicit confirmation; never
55
+ run it from here.
@@ -37,7 +37,8 @@ step 3 gates on the operator rather than proceeding from the fact that a newer r
37
37
 
38
38
  6. Land the re-render as its own pull request. `ctxr update` produces generated-file churn — AGENTS.md
39
39
  sections, skill copies, hooks, adapter outputs — and mixing it into unrelated work makes both
40
- harder to review. Follow `ctxr-submit`, then `ctxr-land`.
40
+ harder to review. Submit it with `ctxr-submit` when the re-render is ready to go out; landing it is a
41
+ separate decision afterwards, and `ctxr-land` keeps its own confirmation.
41
42
 
42
43
  If step 4 or 5 fails, say which step and what the command reported. A partial upgrade — new executable,
43
44
  un-re-rendered store — is a real state worth naming: the store still works, and step 5 can be re-run on