@joenandez/academy 0.4.0 → 0.5.13
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/.claude-plugin/marketplace.json +5 -0
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +415 -0
- package/README.md +67 -122
- package/hooks/backstory/.claude-plugin/plugin.json +11 -0
- package/hooks/backstory/LICENSE +21 -0
- package/hooks/backstory/SOURCE +2 -0
- package/hooks/backstory/bin/backstory +9 -0
- package/hooks/backstory/hooks/hooks.json +45 -0
- package/hooks/backstory/scripts/knowledge.mjs +87 -0
- package/hooks/backstory/scripts/memory.mjs +685 -0
- package/hooks/backstory/scripts/tool-tick.mjs +1 -0
- package/hooks/backstory/skills/capture/SKILL.md +71 -0
- package/hooks/backstory/skills/capture/references/knowledge-capture-input.json +16 -0
- package/hooks/backstory/skills/capture/references/tagging-policy.md +29 -0
- package/hooks/backstory/skills/memory/SKILL.md +70 -0
- package/hooks/backstory/skills/setup/SKILL.md +85 -0
- package/hooks/context_metrics.mjs +67 -0
- package/hooks/hook_runtime.mjs +43 -2
- package/hooks/memory_bridge.mjs +286 -52
- package/hooks/memory_store.mjs +78 -26
- package/hooks/register_session.mjs +76 -14
- package/hooks/roque/.claude-plugin/plugin.json +6 -0
- package/hooks/roque/LICENSE +21 -0
- package/hooks/roque/SOURCE +1 -0
- package/hooks/roque/hooks.json +38 -0
- package/hooks/roque/package.json +3 -0
- package/hooks/roque/roque.js +1690 -0
- package/hooks/sync_memory.mjs +11 -7
- package/package.json +10 -3
- package/scripts/cli/agent-gate.mjs +70 -0
- package/scripts/cli/agent-id.mjs +37 -0
- package/scripts/cli/archive.mjs +39 -38
- package/scripts/cli/archived.mjs +4 -2
- package/scripts/cli/args-kinds.mjs +33 -0
- package/scripts/cli/args-notes.mjs +42 -0
- package/scripts/cli/args-owner.mjs +37 -0
- package/scripts/cli/args-run.mjs +38 -0
- package/scripts/cli/args.mjs +47 -104
- package/scripts/cli/beads.mjs +57 -0
- package/scripts/cli/codex.mjs +66 -12
- package/scripts/cli/core.mjs +117 -41
- package/scripts/cli/create.mjs +224 -76
- package/scripts/cli/curator-feed-codex.mjs +81 -0
- package/scripts/cli/curator-feed-observations.mjs +97 -0
- package/scripts/cli/curator-feed-scope.mjs +124 -0
- package/scripts/cli/curator-feed-sources.mjs +172 -0
- package/scripts/cli/curator-feed.mjs +318 -0
- package/scripts/cli/default-name.mjs +73 -0
- package/scripts/cli/doctor.mjs +67 -2
- package/scripts/cli/eventlog.mjs +6 -2
- package/scripts/cli/exit-code.mjs +9 -0
- package/scripts/cli/first-run.mjs +115 -0
- package/scripts/cli/heartbeat.mjs +135 -0
- package/scripts/cli/helm-skip.mjs +20 -0
- package/scripts/cli/hire-headless.mjs +37 -22
- package/scripts/cli/hire.mjs +8 -2
- package/scripts/cli/inspect.mjs +36 -18
- package/scripts/cli/lifecycle.mjs +95 -49
- package/scripts/cli/main.mjs +32 -2
- package/scripts/cli/memory-env.mjs +124 -0
- package/scripts/cli/migrate.mjs +13 -7
- package/scripts/cli/next-steps.mjs +13 -0
- package/scripts/cli/nightly-launch.mjs +118 -0
- package/scripts/cli/nightly.mjs +228 -0
- package/scripts/cli/notes.mjs +58 -8
- package/scripts/cli/owner-config.mjs +181 -0
- package/scripts/cli/owner-jobs.mjs +201 -0
- package/scripts/cli/prompt-append.mjs +135 -0
- package/scripts/cli/rename.mjs +90 -109
- package/scripts/cli/run-context.mjs +50 -0
- package/scripts/cli/run.mjs +236 -79
- package/scripts/cli/scaffold.mjs +119 -126
- package/scripts/cli/schedule-errors.mjs +70 -0
- package/scripts/cli/sessions.mjs +10 -3
- package/scripts/cli/skills-check.mjs +147 -0
- package/scripts/cli/skills.mjs +170 -0
- package/scripts/cli/start.mjs +201 -0
- package/scripts/cli/templates.mjs +119 -45
- package/scripts/cli/tldr.mjs +184 -0
- package/scripts/cli/toml-string.mjs +76 -0
- package/scripts/cli/user-work-view.mjs +48 -0
- package/scripts/cli/writable-dirs.mjs +23 -0
- package/scripts/cli/yaml.mjs +1 -1
- package/skills/hire/SKILL.md +112 -100
- package/skills/hire/references/owner.md +68 -0
- package/templates/agents/claude-code/knowledge-curator.md +5 -2
- package/templates/agents/codex/knowledge-curator.toml +2 -1
- package/templates/operating-model/base.md +78 -0
- package/templates/operating-model/owner.md +11 -0
- package/templates/operating-model/principal.md +9 -0
- package/templates/operating-model/specialist.md +9 -0
- package/templates/packs/owner/craft.md +32 -0
- package/templates/packs/owner/identity.md +13 -0
- package/templates/packs/owner/mandate.md +26 -0
- package/templates/packs/owner/owner/SKILL.md +118 -0
- package/templates/packs/owner/owner-feedback/SKILL.md +49 -0
- package/templates/packs/owner/owner-heartbeat/SKILL.md +35 -0
- package/templates/packs/owner/owner-nightly/SKILL.md +114 -0
- package/templates/packs/owner/owner-review/SKILL.md +70 -0
- package/templates/packs/owner/owner-work/SKILL.md +53 -0
- package/templates/packs/principal/craft.md +27 -0
- package/templates/packs/principal/identity.md +13 -0
- package/templates/packs/principal/mandate.md +23 -0
- package/templates/packs/principal/principal-brief/SKILL.md +44 -0
- package/templates/packs/principal/principal-intro/SKILL.md +95 -0
- package/templates/packs/principal/principal-nightly/SKILL.md +152 -0
- package/templates/skills/check-in/SKILL.md +34 -24
- package/templates/skills/knowledge-curation/SKILL.md +89 -48
- package/templates/skills/local-rules/SKILL.md +86 -0
- package/templates/skills/nightly-consolidation/SKILL.md +131 -100
- package/templates/skills/skill-method/SKILL.md +79 -0
- package/templates/skills/user-nightly/SKILL.md +143 -0
- package/templates/skills/work-graph/SKILL.md +75 -0
- package/conformance/README.md +0 -60
- package/conformance/discovery.test.mjs +0 -140
- package/conformance/envelope.test.mjs +0 -185
- package/conformance/error-codes.test.mjs +0 -125
- package/conformance/harness.mjs +0 -180
- package/conformance/identity.test.mjs +0 -125
- package/docs/integration-guide.md +0 -1042
- package/templates/skills/self-update/SKILL.md +0 -121
package/README.md
CHANGED
|
@@ -1,51 +1,33 @@
|
|
|
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.
|
|
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
|
|
14
|
-
Install it with `npm install -g @joenandez/academy`.
|
|
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
|
-
-
|
|
20
|
-
|
|
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
|
|
|
28
18
|
```bash
|
|
29
|
-
# Stable release install
|
|
30
|
-
npm install -g @joenandez/academy
|
|
31
|
-
|
|
32
|
-
# Contributor checkout
|
|
33
19
|
git clone https://github.com/joenandez/academy.git
|
|
34
20
|
cd academy
|
|
35
21
|
npm link # makes `academy` available globally
|
|
36
22
|
```
|
|
37
23
|
|
|
38
|
-
There is no build step and no `npm install`. Then confirm the link resolved and
|
|
39
|
-
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:
|
|
40
25
|
|
|
41
26
|
```bash
|
|
42
27
|
academy doctor --json
|
|
43
28
|
```
|
|
44
29
|
|
|
45
|
-
`doctor` is the discovery command and the version source; there is no
|
|
46
|
-
`academy --version`. Its payload names the supported contract versions, the
|
|
47
|
-
build version, the package root, the agents root, the event log, the published
|
|
48
|
-
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.
|
|
49
31
|
|
|
50
32
|
## Create and run an agent
|
|
51
33
|
|
|
@@ -57,157 +39,120 @@ academy list
|
|
|
57
39
|
academy inspect kai --json
|
|
58
40
|
```
|
|
59
41
|
|
|
60
|
-
Agents live at `~/.academy/agents/<name>/` by default. Set `AGENTS_ROOT` to put
|
|
61
|
-
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.
|
|
62
43
|
|
|
63
|
-
`academy hire` is the interactive alternative to `create`: it runs a domain
|
|
64
|
-
research flow and writes all eight surfaces for you. `academy hire --spec
|
|
65
|
-
<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.
|
|
66
45
|
|
|
67
|
-
## The
|
|
46
|
+
## The nine boot surfaces
|
|
68
47
|
|
|
69
|
-
|
|
70
|
-
every `academy run` compile them into
|
|
71
|
-
`.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.
|
|
72
49
|
|
|
73
|
-
| Surface | Contains |
|
|
50
|
+
| Surface | Contains | Cap (tokens) |
|
|
74
51
|
| --- | --- | --- |
|
|
75
|
-
| `identity.md` |
|
|
76
|
-
| `
|
|
77
|
-
| `
|
|
78
|
-
| `
|
|
79
|
-
| `
|
|
80
|
-
| `
|
|
81
|
-
| `
|
|
82
|
-
| `
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
`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.
|
|
86
63
|
|
|
87
64
|
## Skills
|
|
88
65
|
|
|
89
|
-
Skills are Academy's one extension primitive, and the same file shape serves
|
|
90
|
-
both "a competency the agent has" and "how to use this tool". Academy renders
|
|
91
|
-
them for Claude Code under `.claude/skills/` and for Codex under
|
|
92
|
-
`.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.
|
|
93
67
|
|
|
94
|
-
|
|
95
|
-
`nightly-consolidation`, and `knowledge-curation`. Nightly consolidation
|
|
96
|
-
delegates evidence-backed graduation of notes into knowledge to a bounded
|
|
97
|
-
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/`.
|
|
98
69
|
|
|
99
70
|
## Commands
|
|
100
71
|
|
|
101
|
-
|
|
102
|
-
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.
|
|
103
73
|
|
|
104
74
|
```bash
|
|
105
75
|
academy doctor [--json] # discovery, health, and the version source
|
|
106
76
|
academy list [--json] # every agent, plus the archived ones
|
|
107
77
|
academy inspect <name> [--json] # one agent
|
|
108
78
|
academy tokens <name> [--json] # compiled prompt size by surface
|
|
109
|
-
academy budget <name> [--json] # surfaces over their
|
|
79
|
+
academy budget <name> [--json] # surfaces over their cap
|
|
110
80
|
academy sessions [--agent <name>] [--json]
|
|
111
81
|
academy events --since <seq> [--logid <id>] [--json]
|
|
112
|
-
academy create <name> [--json]
|
|
82
|
+
academy create [<name>] [--json] # no name: the next default for the kind
|
|
113
83
|
academy hire # interactive
|
|
114
84
|
academy hire --spec <file> [--json] # headless
|
|
115
|
-
academy rename <old> <new> [--json]
|
|
85
|
+
academy rename <old> <new> [--json] # changes the name only; no job changes
|
|
116
86
|
academy archive <name> [--json]
|
|
117
87
|
academy unarchive <name> [--json]
|
|
118
88
|
academy delete <name> [--json]
|
|
119
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
|
|
120
92
|
```
|
|
121
93
|
|
|
122
|
-
`run`, `nightly`, `notes`, `clean`, and `root` also work and are deliberately
|
|
123
|
-
not contract: `run` spawns with inherited stdio and can never emit an envelope,
|
|
124
|
-
`nightly` is called by the scheduler, and the rest are conveniences for a
|
|
125
|
-
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.
|
|
126
95
|
|
|
127
96
|
## For client authors
|
|
128
97
|
|
|
129
|
-
|
|
130
|
-
[`docs/integration-guide.md`](docs/integration-guide.md): the response envelope,
|
|
131
|
-
the exit rule, the compatibility floor, all fourteen published commands, the
|
|
132
|
-
fifteen error codes, the event log, the agent directory layout, and an explicit
|
|
133
|
-
list of what is **not** contract. Anything not in that document is internal and
|
|
134
|
-
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.
|
|
135
99
|
|
|
136
|
-
The shape in one line: success is JSON on stdout with exit 0, failure is JSON on
|
|
137
|
-
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.
|
|
138
101
|
|
|
139
102
|
```json
|
|
140
|
-
{ "contract_version": 1, "ok": true, "command": "doctor", "version": "0.4.0" }
|
|
103
|
+
{ "contract_version": 1, "ok": true, "command": "doctor", "version": "0.4.0-rc.1" }
|
|
141
104
|
```
|
|
142
105
|
|
|
143
|
-
Academy
|
|
144
|
-
source and asserts only what a client can observe:
|
|
106
|
+
## Academy is client-agnostic, with one documented exception
|
|
145
107
|
|
|
146
|
-
|
|
147
|
-
node --test conformance/*.test.mjs # this build
|
|
148
|
-
ACADEMY_BIN=/path/to/academy node --test conformance/*.test.mjs # any build
|
|
149
|
-
```
|
|
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.
|
|
150
109
|
|
|
151
|
-
|
|
152
|
-
`AGENTS_ROOT`, so it can drive the full lifecycle without reaching any agent on
|
|
153
|
-
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.
|
|
154
111
|
|
|
155
|
-
##
|
|
112
|
+
## Roque in agent sessions
|
|
156
113
|
|
|
157
|
-
|
|
158
|
-
one deliberate exception: **the memory sync bridge**,
|
|
159
|
-
`hooks/memory_bridge.mjs`. It copies observation memory from one specific host
|
|
160
|
-
product into an agent's `memory/observations/` for nightly consolidation, and it
|
|
161
|
-
is **off unless `ACADEMY_MEMORY_BRIDGE=1` is set**. Unset, a scaffolded agent
|
|
162
|
-
names no client at all — no client-named environment key is read, no
|
|
163
|
-
client-named tool permission is written, and no client-named prose appears in
|
|
164
|
-
any skill.
|
|
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`.
|
|
165
115
|
|
|
166
|
-
|
|
167
|
-
|
|
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`.
|
|
122
|
+
|
|
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.
|
|
168
124
|
|
|
169
125
|
## Layout
|
|
170
126
|
|
|
171
|
-
```
|
|
127
|
+
```plaintext
|
|
172
128
|
academy/
|
|
173
129
|
├── .claude-plugin/ # plugin + marketplace manifests
|
|
174
130
|
├── bin/academy # CLI entry
|
|
131
|
+
├── scripts/agent.mjs # CLI dispatcher
|
|
175
132
|
├── scripts/cli/ # CLI implementation
|
|
176
|
-
├── scripts/release-check.mjs # read-only release readiness gate
|
|
177
|
-
├── scripts/publish-tree.mjs # allow-list publish tree generator
|
|
178
133
|
├── skills/hire/SKILL.md # the hire skill
|
|
179
|
-
├── templates/
|
|
180
|
-
├── conformance/ # client conformance suite
|
|
181
|
-
├── docs/integration-guide.md # the published client contract
|
|
134
|
+
├── templates/ # universal skills and subagents copied into every agent
|
|
182
135
|
└── hooks/
|
|
183
136
|
├── hooks.json # lifecycle hook config
|
|
184
|
-
└── memory_bridge.mjs # the one client-specific file,
|
|
137
|
+
└── memory_bridge.mjs # the one client-specific file, always on
|
|
185
138
|
```
|
|
186
139
|
|
|
187
140
|
## Design notes
|
|
188
141
|
|
|
189
|
-
- **No adapters.** External CLIs are used as-is. A missing capability is a
|
|
190
|
-
|
|
191
|
-
- **
|
|
192
|
-
|
|
193
|
-
- **
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
`node scripts/release-check.mjs` is the read-only readiness gate. It mutates
|
|
204
|
-
nothing, packs into a temporary directory, asserts the packed file list against
|
|
205
|
-
the declared published surface, runs the conformance suite against the unpacked
|
|
206
|
-
tarball, and proves `git status --porcelain` is byte-identical before and after.
|
|
207
|
-
`.agents/skills/release/SKILL.md` is the release procedure and calls it from
|
|
208
|
-
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.
|
|
209
155
|
|
|
210
156
|
## Licence
|
|
211
157
|
|
|
212
|
-
MIT. See
|
|
213
|
-
[`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,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Joe Fernandez
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -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
|
+
}
|