@joenandez/academy 0.4.0-rc.1 → 0.5.12

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 (121) hide show
  1. package/.claude-plugin/marketplace.json +5 -0
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +414 -0
  4. package/README.md +66 -117
  5. package/hooks/backstory/.claude-plugin/plugin.json +11 -0
  6. package/hooks/backstory/SOURCE +2 -0
  7. package/hooks/backstory/bin/backstory +9 -0
  8. package/hooks/backstory/hooks/hooks.json +45 -0
  9. package/hooks/backstory/scripts/knowledge.mjs +87 -0
  10. package/hooks/backstory/scripts/memory.mjs +685 -0
  11. package/hooks/backstory/scripts/tool-tick.mjs +1 -0
  12. package/hooks/backstory/skills/capture/SKILL.md +71 -0
  13. package/hooks/backstory/skills/capture/references/knowledge-capture-input.json +16 -0
  14. package/hooks/backstory/skills/capture/references/tagging-policy.md +29 -0
  15. package/hooks/backstory/skills/memory/SKILL.md +70 -0
  16. package/hooks/backstory/skills/setup/SKILL.md +85 -0
  17. package/hooks/context_metrics.mjs +67 -0
  18. package/hooks/hook_runtime.mjs +43 -2
  19. package/hooks/memory_bridge.mjs +286 -52
  20. package/hooks/memory_store.mjs +78 -26
  21. package/hooks/register_session.mjs +76 -14
  22. package/hooks/roque/.claude-plugin/plugin.json +6 -0
  23. package/hooks/roque/LICENSE +21 -0
  24. package/hooks/roque/SOURCE +1 -0
  25. package/hooks/roque/hooks.json +38 -0
  26. package/hooks/roque/package.json +3 -0
  27. package/hooks/roque/roque.js +1690 -0
  28. package/hooks/sync_memory.mjs +12 -6
  29. package/package.json +7 -3
  30. package/scripts/cli/agent-gate.mjs +70 -0
  31. package/scripts/cli/agent-id.mjs +37 -0
  32. package/scripts/cli/archive.mjs +39 -38
  33. package/scripts/cli/archived.mjs +4 -2
  34. package/scripts/cli/args-kinds.mjs +33 -0
  35. package/scripts/cli/args-notes.mjs +42 -0
  36. package/scripts/cli/args-owner.mjs +37 -0
  37. package/scripts/cli/args-run.mjs +38 -0
  38. package/scripts/cli/args.mjs +47 -104
  39. package/scripts/cli/beads.mjs +57 -0
  40. package/scripts/cli/codex.mjs +66 -12
  41. package/scripts/cli/core.mjs +117 -41
  42. package/scripts/cli/create.mjs +224 -76
  43. package/scripts/cli/curator-feed-codex.mjs +81 -0
  44. package/scripts/cli/curator-feed-observations.mjs +97 -0
  45. package/scripts/cli/curator-feed-scope.mjs +124 -0
  46. package/scripts/cli/curator-feed-sources.mjs +172 -0
  47. package/scripts/cli/curator-feed.mjs +318 -0
  48. package/scripts/cli/default-name.mjs +73 -0
  49. package/scripts/cli/doctor.mjs +67 -2
  50. package/scripts/cli/eventlog.mjs +6 -2
  51. package/scripts/cli/exit-code.mjs +9 -0
  52. package/scripts/cli/first-run.mjs +115 -0
  53. package/scripts/cli/heartbeat.mjs +135 -0
  54. package/scripts/cli/helm-skip.mjs +20 -0
  55. package/scripts/cli/hire-headless.mjs +37 -22
  56. package/scripts/cli/hire.mjs +8 -2
  57. package/scripts/cli/inspect.mjs +36 -18
  58. package/scripts/cli/lifecycle.mjs +95 -49
  59. package/scripts/cli/main.mjs +32 -2
  60. package/scripts/cli/memory-env.mjs +124 -0
  61. package/scripts/cli/migrate.mjs +13 -7
  62. package/scripts/cli/next-steps.mjs +13 -0
  63. package/scripts/cli/nightly-launch.mjs +118 -0
  64. package/scripts/cli/nightly.mjs +228 -0
  65. package/scripts/cli/notes.mjs +58 -8
  66. package/scripts/cli/owner-config.mjs +181 -0
  67. package/scripts/cli/owner-jobs.mjs +201 -0
  68. package/scripts/cli/prompt-append.mjs +135 -0
  69. package/scripts/cli/rename.mjs +90 -109
  70. package/scripts/cli/run-context.mjs +50 -0
  71. package/scripts/cli/run.mjs +236 -79
  72. package/scripts/cli/scaffold.mjs +119 -126
  73. package/scripts/cli/schedule-errors.mjs +70 -0
  74. package/scripts/cli/sessions.mjs +10 -3
  75. package/scripts/cli/skills-check.mjs +147 -0
  76. package/scripts/cli/skills.mjs +170 -0
  77. package/scripts/cli/start.mjs +201 -0
  78. package/scripts/cli/templates.mjs +119 -45
  79. package/scripts/cli/tldr.mjs +184 -0
  80. package/scripts/cli/toml-string.mjs +76 -0
  81. package/scripts/cli/user-work-view.mjs +48 -0
  82. package/scripts/cli/writable-dirs.mjs +23 -0
  83. package/scripts/cli/yaml.mjs +1 -1
  84. package/skills/hire/SKILL.md +112 -100
  85. package/skills/hire/references/owner.md +68 -0
  86. package/templates/agents/claude-code/knowledge-curator.md +5 -2
  87. package/templates/agents/codex/knowledge-curator.toml +2 -1
  88. package/templates/operating-model/base.md +78 -0
  89. package/templates/operating-model/owner.md +11 -0
  90. package/templates/operating-model/principal.md +9 -0
  91. package/templates/operating-model/specialist.md +9 -0
  92. package/templates/packs/owner/craft.md +32 -0
  93. package/templates/packs/owner/identity.md +13 -0
  94. package/templates/packs/owner/mandate.md +26 -0
  95. package/templates/packs/owner/owner/SKILL.md +118 -0
  96. package/templates/packs/owner/owner-feedback/SKILL.md +49 -0
  97. package/templates/packs/owner/owner-heartbeat/SKILL.md +35 -0
  98. package/templates/packs/owner/owner-nightly/SKILL.md +114 -0
  99. package/templates/packs/owner/owner-review/SKILL.md +70 -0
  100. package/templates/packs/owner/owner-work/SKILL.md +53 -0
  101. package/templates/packs/principal/craft.md +27 -0
  102. package/templates/packs/principal/identity.md +13 -0
  103. package/templates/packs/principal/mandate.md +23 -0
  104. package/templates/packs/principal/principal-brief/SKILL.md +44 -0
  105. package/templates/packs/principal/principal-intro/SKILL.md +95 -0
  106. package/templates/packs/principal/principal-nightly/SKILL.md +152 -0
  107. package/templates/skills/check-in/SKILL.md +34 -24
  108. package/templates/skills/knowledge-curation/SKILL.md +89 -48
  109. package/templates/skills/local-rules/SKILL.md +86 -0
  110. package/templates/skills/nightly-consolidation/SKILL.md +131 -100
  111. package/templates/skills/skill-method/SKILL.md +79 -0
  112. package/templates/skills/user-nightly/SKILL.md +143 -0
  113. package/templates/skills/work-graph/SKILL.md +75 -0
  114. package/conformance/README.md +0 -60
  115. package/conformance/discovery.test.mjs +0 -140
  116. package/conformance/envelope.test.mjs +0 -185
  117. package/conformance/error-codes.test.mjs +0 -125
  118. package/conformance/harness.mjs +0 -180
  119. package/conformance/identity.test.mjs +0 -125
  120. package/docs/integration-guide.md +0 -1026
  121. package/templates/skills/self-update/SKILL.md +0 -121
package/README.md CHANGED
@@ -1,27 +1,17 @@
1
+
1
2
  # Academy
2
3
 
3
- Portable, workspace-aware AI agents, and a published JSON contract that lets a
4
- client product drive them.
4
+ Portable, workspace-aware AI agents, and a published JSON contract that lets a client product drive them.
5
5
 
6
- An Academy agent is a directory of Markdown, not a framework object. Eight boot
7
- surfaces describe who the agent is and what it is working on. Academy compiles
8
- them into one system prompt and launches the agent through Claude Code or Codex
9
- against whatever project you are in. Every command also answers JSON, so a
10
- desktop app, a web service, or another CLI can render and manage agents without
11
- reading Academy's source.
6
+ An Academy agent is a directory of Markdown, not a framework object. Nine boot surfaces describe who the agent is and what it is working on. Academy compiles them into one system prompt and launches the agent through Claude Code or Codex against whatever project you are in. Every command also answers JSON, so a desktop app, a web service, or another CLI can render and manage agents without reading Academy's source.
12
7
 
13
- **Status: `0.4.0-rc.1`, contract version 1.** Academy is not on the npm registry
14
- yet. Install it from a checkout, as below.
8
+ **Status:** `0.4.0-rc.1`**, contract version 1.** Academy is not on the npm registry yet. Install it from a checkout, as below.
15
9
 
16
10
  ## Requirements
17
11
 
18
12
  - **Node.js 18 or later.** The CLI is pure ESM Node with no npm dependencies.
19
- - **`helm-tasks`** on your `PATH` — the scheduler Academy registers each agent's
20
- nightly consolidation job with. This is a hard dependency of the agent
21
- lifecycle: without it `create`, `hire --spec`, `delete`, `rename`, and
22
- `archive` fail with `runtime_unavailable`. Read commands are unaffected.
23
- - **A runtime.** `claude` for Claude Code, `codex` for Codex. You need the one
24
- you intend to launch. `doctor` reports which are available.
13
+ - `tldr-agents` — Academy registers each agent's nightly consolidation job through `tldr-agents tasks`. Academy resolves the front door from `SUBSPACE_TLDR_AGENTS_BIN`, the Claude plugin registry, or the canonical tldr fallback install. This is a hard dependency of the agent lifecycle: without it `create`, `hire --spec`, `start`, `stop`, `delete`, and `archive` fail with `runtime_unavailable`. Read commands are unaffected.
14
+ - **A runtime.** `claude` for Claude Code, `codex` for Codex. You need the one you intend to launch. `doctor` reports which are available.
25
15
 
26
16
  ## Install
27
17
 
@@ -31,17 +21,13 @@ cd academy
31
21
  npm link # makes `academy` available globally
32
22
  ```
33
23
 
34
- There is no build step and no `npm install`. Then confirm the link resolved and
35
- read the version Academy reports for itself:
24
+ There is no build step and no `npm install`. Then confirm the link resolved and read the version Academy reports for itself:
36
25
 
37
26
  ```bash
38
27
  academy doctor --json
39
28
  ```
40
29
 
41
- `doctor` is the discovery command and the version source; there is no
42
- `academy --version`. Its payload names the supported contract versions, the
43
- build version, the package root, the agents root, the event log, the published
44
- command list, runtime availability, and health counts.
30
+ `doctor` is the discovery command and the version source; there is no `academy --version`. Its payload names the supported contract versions, the build version, the package root, the agents root, the event log, the published command list, runtime availability, and health counts.
45
31
 
46
32
  ## Create and run an agent
47
33
 
@@ -53,157 +39,120 @@ academy list
53
39
  academy inspect kai --json
54
40
  ```
55
41
 
56
- Agents live at `~/.academy/agents/<name>/` by default. Set `AGENTS_ROOT` to put
57
- them anywhere else; two installs with different roots are fully independent.
42
+ Agents live at `~/.academy/agents/<name>/` by default. Set `AGENTS_ROOT` to put them anywhere else; two installs with different roots are fully independent.
58
43
 
59
- `academy hire` is the interactive alternative to `create`: it runs a domain
60
- research flow and writes all eight surfaces for you. `academy hire --spec
61
- <file> --json` does the same headlessly from a JSON specification.
44
+ `academy hire` is the interactive alternative to `create`: it runs a domain research flow and writes the agent's surfaces for you. `academy hire --spec <file> --json` does the same headlessly from a JSON specification.
62
45
 
63
- ## The eight boot surfaces
46
+ ## The nine boot surfaces
64
47
 
65
- Each agent directory holds eight editable Markdown files. `academy create` and
66
- every `academy run` compile them into
67
- `.academy/generated/academy-system-prompt.md` — roughly 5–6k tokens combined.
48
+ Every kind compiles the same nine Markdown files. `academy create` and every `academy run` compile them into `.academy/generated/academy-system-prompt.md`. The operating model comes first in that prompt. Academy appends it to the runtime's own prompt (Claude Code: `--append-system-prompt <text>`; Codex: `developer_instructions`). `docs/academy-work-model.md` describes the model.
68
49
 
69
- | Surface | Contains | Soft cap |
50
+ | Surface | Contains | Cap (tokens) |
70
51
  | --- | --- | --- |
71
- | `identity.md` | Values, character, voice, persona | ~400 |
72
- | `role.md` | Job, responsibilities, deliverable shape | ~400 |
73
- | `knowledge.md` | Domain expertise, frameworks, patterns | ~1500–2500 |
74
- | `goals.md` | Strategic objectives (cap 3) | ~150 |
75
- | `priorities.md` | Weekly direction (3–5 visible) | ~250 |
76
- | `threads.md` | Active work pursuits | ~700 |
77
- | `notes.md` | Micro-steering staging area | ~500 |
78
- | `dailys.md` | Last 7 working days | ~1000 |
79
-
80
- `academy tokens <name>` estimates the compiled prompt by surface, and
81
- `academy budget <name>` reports which surfaces are over their cap.
52
+ | `identity.md` | Name, persona, voice, relationships | 400 |
53
+ | `craft.md` | Method, principles, definition of done (no environment names) | 600 |
54
+ | `mandate.md` | Job, scope, limits, environment (the user writes it) | 600 |
55
+ | `work.md` | Goals, priorities, focus, Workstreams | 500 for a Principal, 1000 for other kinds |
56
+ | `knowledge.md` | What the agent learned here | 2500 |
57
+ | `notes.md` | Steering not yet in another file | 500 |
58
+ | `local-rules.md` | The user's rules for this agent | 500 |
59
+ | `user.md` | Who the user is (shared, curator writes it) | 1000 |
60
+ | `user-work.md` | The user's goals, priorities, Workstreams (shared, curator writes it) | 1000 |
61
+
62
+ `academy tokens <name>` estimates the compiled prompt by surface, and `academy budget <name>` reports which surfaces are over their cap. Every cap except `identity` and `craft` is enforced: `budget` reports an enforced surface over its cap, and plain `academy budget` then exits 1 (`--json` exits 0). The totals are 7,600 for a Principal and 8,100 for the others.
82
63
 
83
64
  ## Skills
84
65
 
85
- Skills are Academy's one extension primitive, and the same file shape serves
86
- both "a competency the agent has" and "how to use this tool". Academy renders
87
- them for Claude Code under `.claude/skills/` and for Codex under
88
- `.agents/skills/`, from one source.
66
+ Skills are Academy's one extension primitive, and the same file shape serves both "a competency the agent has" and "how to use this tool". Academy renders them for Claude Code under `.claude/skills/` and for Codex under `.agents/skills/`, from one source.
89
67
 
90
- Four universal skills ship with every agent: `check-in`, `self-update`,
91
- `nightly-consolidation`, and `knowledge-curation`. Nightly consolidation
92
- delegates evidence-backed graduation of notes into knowledge to a bounded
93
- knowledge-curator subagent and writes its report under `dreams/`.
68
+ Six universal skills ship with every agent: `check-in`, `work-graph`, `nightly-consolidation`, `knowledge-curation`, `local-rules`, and `skill-method`. Owners add the Owner pack, and the curator adds `user-nightly`. Nightly consolidation delegates evidence-backed graduation of notes into knowledge to a bounded knowledge-curator subagent and writes its report under `dreams/`.
94
69
 
95
70
  ## Commands
96
71
 
97
- Fourteen commands are contract. `doctor` publishes the list, and a client should
98
- read it from there rather than hard-coding it.
72
+ Sixteen commands are contract. `doctor` publishes the list, and a client should read it from there rather than hard-coding it.
99
73
 
100
74
  ```bash
101
75
  academy doctor [--json] # discovery, health, and the version source
102
76
  academy list [--json] # every agent, plus the archived ones
103
77
  academy inspect <name> [--json] # one agent
104
78
  academy tokens <name> [--json] # compiled prompt size by surface
105
- academy budget <name> [--json] # surfaces over their soft cap
79
+ academy budget <name> [--json] # surfaces over their cap
106
80
  academy sessions [--agent <name>] [--json]
107
81
  academy events --since <seq> [--logid <id>] [--json]
108
- academy create <name> [--json]
82
+ academy create [<name>] [--json] # no name: the next default for the kind
109
83
  academy hire # interactive
110
84
  academy hire --spec <file> [--json] # headless
111
- academy rename <old> <new> [--json]
85
+ academy rename <old> <new> [--json] # changes the name only; no job changes
112
86
  academy archive <name> [--json]
113
87
  academy unarchive <name> [--json]
114
88
  academy delete <name> [--json]
115
89
  academy migrate [--dry-run] [--json]
90
+ academy start <name> [--mandate <file>] [--json] # register jobs; an Owner needs a signed mandate
91
+ academy stop <name> [--json] # delete the jobs; the files stay
116
92
  ```
117
93
 
118
- `run`, `nightly`, `notes`, `clean`, and `root` also work and are deliberately
119
- not contract: `run` spawns with inherited stdio and can never emit an envelope,
120
- `nightly` is called by the scheduler, and the rest are conveniences for a
121
- person. See §6 of the integration guide.
94
+ `run`, `nightly`, `notes`, `clean`, and `root` also work and are deliberately not contract: `run` spawns with inherited stdio and can never emit an envelope, `nightly` is called by the scheduler, and the rest are conveniences for a person.
122
95
 
123
96
  ## For client authors
124
97
 
125
- Everything a client may depend on is in
126
- [`docs/integration-guide.md`](docs/integration-guide.md): the response envelope,
127
- the exit rule, the compatibility floor, all fourteen published commands, the
128
- fifteen error codes, the event log, the agent directory layout, and an explicit
129
- list of what is **not** contract. Anything not in that document is internal and
130
- may change in any release.
98
+ A client should discover Academy through `academy doctor --json`, which names the supported contract versions and the published command list, and should read that list rather than hard-coding it.
131
99
 
132
- The shape in one line: success is JSON on stdout with exit 0, failure is JSON on
133
- stderr with exit 1, and exit status is 0 if and only if `ok` is true.
100
+ The shape in one line: success is JSON on stdout with exit 0, failure is JSON on stderr with exit 1, and exit status is 0 if and only if `ok` is true.
134
101
 
135
102
  ```json
136
103
  { "contract_version": 1, "ok": true, "command": "doctor", "version": "0.4.0-rc.1" }
137
104
  ```
138
105
 
139
- Academy ships a conformance suite for client authors. It imports no Academy
140
- source and asserts only what a client can observe:
106
+ ## Academy is client-agnostic, with one documented exception
141
107
 
142
- ```bash
143
- node --test conformance/*.test.mjs # this build
144
- ACADEMY_BIN=/path/to/academy node --test conformance/*.test.mjs # any build
145
- ```
108
+ No identifier in Academy's source names a specific client product, with exactly one deliberate exception: **the memory sync bridge**, `hooks/memory_bridge.mjs`. It copies observation memory from one specific host product into an agent's `memory/observations/` for nightly consolidation. It is **always on**: every scaffolded agent carries its tool permission and nightly guidance, and the Stop hook always tries the copy. Outside that host it does nothing, because it copies only when the host's own environment keys and observations directory exist.
146
109
 
147
- Every test builds its own throwaway install with a fresh temporary `HOME` and
148
- `AGENTS_ROOT`, so it can drive the full lifecycle without reaching any agent on
149
- the machine running it. `conformance/README.md` explains each file.
110
+ Treat it as an exception, not as a pattern. It is not a plugin point and not a template for a second client.
150
111
 
151
- ## Academy is client-agnostic, with one documented exception
112
+ ## Roque in agent sessions
113
+
114
+ Academy ships Roque, a hook that keeps a long session on track across compaction. Every Academy agent session loads it. Claude sessions load it with `--plugin-dir`. Codex sessions get two hook groups in `~/.codex/hooks.json`.
152
115
 
153
- No identifier in Academy's source names a specific client product, with exactly
154
- one deliberate exception: **the memory sync bridge**,
155
- `hooks/memory_bridge.mjs`. It copies observation memory from one specific host
156
- product into an agent's `memory/observations/` for nightly consolidation, and it
157
- is **off unless `ACADEMY_MEMORY_BRIDGE=1` is set**. Unset, a scaffolded agent
158
- names no client at all — no client-named environment key is read, no
159
- client-named tool permission is written, and no client-named prose appears in
160
- any skill.
116
+ - At 75% and 90% of the compaction point, Roque adds a hint. The hint tells the agent to keep a state file at `.roque/state/<session>.md` in the project.
117
+ - After compaction, Roque gives the state file content back to the agent.
118
+ - For Claude, Roque saves each compaction summary under `~/.roque`.
119
+ - Each Claude agent session has a compaction window of 430000 tokens. Set `CLAUDE_CODE_AUTO_COMPACT_WINDOW` before `academy run` to use another value. Codex sessions keep the user's Codex config.
120
+ - To turn Roque off in one project, create the file `.roque/off` there.
121
+ - To use Roque in normal Claude sessions, run `claude plugin install roque@academy-local`.
161
122
 
162
- Treat it as an exception, not as a pattern. It is not a plugin point and not a
163
- template for a second client. Integration guide §12 has the full statement.
123
+ Roque changes are made in the Roque repository. They ship with the Academy release: the release runs `npm run sync:roque`, which tests Roque `main` and copies the build to `hooks/roque/`. Do not edit `hooks/roque/roque.js` by hand.
164
124
 
165
125
  ## Layout
166
126
 
167
- ```
127
+ ```plaintext
168
128
  academy/
169
129
  ├── .claude-plugin/ # plugin + marketplace manifests
170
130
  ├── bin/academy # CLI entry
131
+ ├── scripts/agent.mjs # CLI dispatcher
171
132
  ├── scripts/cli/ # CLI implementation
172
- ├── scripts/release-check.mjs # read-only release readiness gate
173
- ├── scripts/publish-tree.mjs # allow-list publish tree generator
174
133
  ├── skills/hire/SKILL.md # the hire skill
175
- ├── templates/skills/ # universal skills copied into every agent
176
- ├── conformance/ # client conformance suite
177
- ├── docs/integration-guide.md # the published client contract
134
+ ├── templates/ # universal skills and subagents copied into every agent
178
135
  └── hooks/
179
136
  ├── hooks.json # lifecycle hook config
180
- └── memory_bridge.mjs # the one client-specific file, off by default
137
+ └── memory_bridge.mjs # the one client-specific file, always on
181
138
  ```
182
139
 
183
140
  ## Design notes
184
141
 
185
- - **No adapters.** External CLIs are used as-is. A missing capability is a
186
- feature request against that project, not glue here.
187
- - **Skills are the unifying primitive.** One file shape for competencies and for
188
- tool documentation, rendered for both runtimes from one source.
189
- - **Generated system prompt.** The eight surfaces stay editable Markdown.
190
- Compilation at launch is local file IO only; the slow work stays nightly.
191
- - **Lifecycle hooks only.** Hooks are for runtime side effects, not for startup
192
- context transport.
193
- - **Portable plugin layout.** Each agent has a `.claude-plugin/` symlink to this
194
- package, so running Claude Code inside the agent directory keeps Academy's
195
- lifecycle hooks available.
196
-
197
- ## Releasing
198
-
199
- `node scripts/release-check.mjs` is the read-only readiness gate. It mutates
200
- nothing, packs into a temporary directory, asserts the packed file list against
201
- the declared published surface, runs the conformance suite against the unpacked
202
- tarball, and proves `git status --porcelain` is byte-identical before and after.
203
- `.agents/skills/release/SKILL.md` is the release procedure and calls it from
204
- every mode.
142
+ - **No adapters.** External CLIs are used as-is. A missing capability is a feature request against that project, not glue here.
143
+ - **Skills are the unifying primitive.** One file shape for competencies and for tool documentation, rendered for both runtimes from one source.
144
+ - **Generated system prompt.** The nine surfaces stay editable Markdown. Compilation at launch is local file IO only; the slow work stays nightly.
145
+ - **Lifecycle hooks only.** Hooks are for runtime side effects, not for startup context transport.
146
+ - **Portable plugin layout.** Each agent has a `.claude-plugin/` symlink to this package, so running Claude Code inside the agent directory keeps Academy's lifecycle hooks available.
147
+
148
+ ## Contributing
149
+
150
+ Academy is open source under the MIT licence. You can read the source, use it, fork it, and change it for your own needs.
151
+
152
+ Academy is not open to contributions, and pull requests are not accepted. This repository is generated from a private repository at each release, so a change made here cannot be merged.
153
+
154
+ Issues are welcome. If you find a bug or have an idea, open an issue.
205
155
 
206
156
  ## Licence
207
157
 
208
- MIT. See [`LICENSE`](LICENSE). Changes are recorded in
209
- [`CHANGELOG.md`](CHANGELOG.md).
158
+ MIT. See `LICENSE`. Changes are recorded in `CHANGELOG.md`.
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "backstory",
3
+ "version": "0.1.0",
4
+ "description": "Automatic observation memory for Claude Code: captures what each turn accomplished, stores it locally in SQLite/FTS5, and brings it back at session start and on demand. Also Capture: typed, tagged project knowledge the agent saves and looks up, in its own store.",
5
+ "author": {
6
+ "name": "Joe Fernandez",
7
+ "email": "joe@bycodename.com"
8
+ },
9
+ "license": "MIT",
10
+ "keywords": ["memory", "observations", "context", "sqlite", "fts5", "knowledge"]
11
+ }
@@ -0,0 +1,2 @@
1
+ f71ddb76f8c09bef78d455d6dca3d30c2327020f
2
+ dirty: true
@@ -0,0 +1,9 @@
1
+ #!/bin/sh
2
+ # Backstory's one CLI; Claude Code puts the plugin's bin/ on PATH. Knowledge commands go to the
3
+ # knowledge bundle; setup, admin, and observation recall commands go to the memory bundle.
4
+ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
5
+ case "$1" in
6
+ search|load|capture|tags|history|inspect|registry) BUNDLE=knowledge ;;
7
+ *) BUNDLE=memory ;;
8
+ esac
9
+ exec node "$SCRIPT_DIR/../scripts/$BUNDLE.mjs" "$@"
@@ -0,0 +1,45 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "startup|resume|clear|compact",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/memory.mjs\" hook --host claude --event SessionStart"
10
+ }
11
+ ]
12
+ }
13
+ ],
14
+ "UserPromptSubmit": [
15
+ {
16
+ "hooks": [
17
+ {
18
+ "type": "command",
19
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/memory.mjs\" hook --host claude --event UserPromptSubmit"
20
+ }
21
+ ]
22
+ }
23
+ ],
24
+ "Stop": [
25
+ {
26
+ "hooks": [
27
+ {
28
+ "type": "command",
29
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/memory.mjs\" hook --host claude --event Stop"
30
+ }
31
+ ]
32
+ }
33
+ ],
34
+ "PostToolUse": [
35
+ {
36
+ "hooks": [
37
+ {
38
+ "type": "command",
39
+ "command": "node \"${CLAUDE_PLUGIN_ROOT}/scripts/tool-tick.mjs\" --host claude"
40
+ }
41
+ ]
42
+ }
43
+ ]
44
+ }
45
+ }