@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.
Files changed (122) hide show
  1. package/.claude-plugin/marketplace.json +5 -0
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +415 -0
  4. package/README.md +67 -122
  5. package/hooks/backstory/.claude-plugin/plugin.json +11 -0
  6. package/hooks/backstory/LICENSE +21 -0
  7. package/hooks/backstory/SOURCE +2 -0
  8. package/hooks/backstory/bin/backstory +9 -0
  9. package/hooks/backstory/hooks/hooks.json +45 -0
  10. package/hooks/backstory/scripts/knowledge.mjs +87 -0
  11. package/hooks/backstory/scripts/memory.mjs +685 -0
  12. package/hooks/backstory/scripts/tool-tick.mjs +1 -0
  13. package/hooks/backstory/skills/capture/SKILL.md +71 -0
  14. package/hooks/backstory/skills/capture/references/knowledge-capture-input.json +16 -0
  15. package/hooks/backstory/skills/capture/references/tagging-policy.md +29 -0
  16. package/hooks/backstory/skills/memory/SKILL.md +70 -0
  17. package/hooks/backstory/skills/setup/SKILL.md +85 -0
  18. package/hooks/context_metrics.mjs +67 -0
  19. package/hooks/hook_runtime.mjs +43 -2
  20. package/hooks/memory_bridge.mjs +286 -52
  21. package/hooks/memory_store.mjs +78 -26
  22. package/hooks/register_session.mjs +76 -14
  23. package/hooks/roque/.claude-plugin/plugin.json +6 -0
  24. package/hooks/roque/LICENSE +21 -0
  25. package/hooks/roque/SOURCE +1 -0
  26. package/hooks/roque/hooks.json +38 -0
  27. package/hooks/roque/package.json +3 -0
  28. package/hooks/roque/roque.js +1690 -0
  29. package/hooks/sync_memory.mjs +11 -7
  30. package/package.json +10 -3
  31. package/scripts/cli/agent-gate.mjs +70 -0
  32. package/scripts/cli/agent-id.mjs +37 -0
  33. package/scripts/cli/archive.mjs +39 -38
  34. package/scripts/cli/archived.mjs +4 -2
  35. package/scripts/cli/args-kinds.mjs +33 -0
  36. package/scripts/cli/args-notes.mjs +42 -0
  37. package/scripts/cli/args-owner.mjs +37 -0
  38. package/scripts/cli/args-run.mjs +38 -0
  39. package/scripts/cli/args.mjs +47 -104
  40. package/scripts/cli/beads.mjs +57 -0
  41. package/scripts/cli/codex.mjs +66 -12
  42. package/scripts/cli/core.mjs +117 -41
  43. package/scripts/cli/create.mjs +224 -76
  44. package/scripts/cli/curator-feed-codex.mjs +81 -0
  45. package/scripts/cli/curator-feed-observations.mjs +97 -0
  46. package/scripts/cli/curator-feed-scope.mjs +124 -0
  47. package/scripts/cli/curator-feed-sources.mjs +172 -0
  48. package/scripts/cli/curator-feed.mjs +318 -0
  49. package/scripts/cli/default-name.mjs +73 -0
  50. package/scripts/cli/doctor.mjs +67 -2
  51. package/scripts/cli/eventlog.mjs +6 -2
  52. package/scripts/cli/exit-code.mjs +9 -0
  53. package/scripts/cli/first-run.mjs +115 -0
  54. package/scripts/cli/heartbeat.mjs +135 -0
  55. package/scripts/cli/helm-skip.mjs +20 -0
  56. package/scripts/cli/hire-headless.mjs +37 -22
  57. package/scripts/cli/hire.mjs +8 -2
  58. package/scripts/cli/inspect.mjs +36 -18
  59. package/scripts/cli/lifecycle.mjs +95 -49
  60. package/scripts/cli/main.mjs +32 -2
  61. package/scripts/cli/memory-env.mjs +124 -0
  62. package/scripts/cli/migrate.mjs +13 -7
  63. package/scripts/cli/next-steps.mjs +13 -0
  64. package/scripts/cli/nightly-launch.mjs +118 -0
  65. package/scripts/cli/nightly.mjs +228 -0
  66. package/scripts/cli/notes.mjs +58 -8
  67. package/scripts/cli/owner-config.mjs +181 -0
  68. package/scripts/cli/owner-jobs.mjs +201 -0
  69. package/scripts/cli/prompt-append.mjs +135 -0
  70. package/scripts/cli/rename.mjs +90 -109
  71. package/scripts/cli/run-context.mjs +50 -0
  72. package/scripts/cli/run.mjs +236 -79
  73. package/scripts/cli/scaffold.mjs +119 -126
  74. package/scripts/cli/schedule-errors.mjs +70 -0
  75. package/scripts/cli/sessions.mjs +10 -3
  76. package/scripts/cli/skills-check.mjs +147 -0
  77. package/scripts/cli/skills.mjs +170 -0
  78. package/scripts/cli/start.mjs +201 -0
  79. package/scripts/cli/templates.mjs +119 -45
  80. package/scripts/cli/tldr.mjs +184 -0
  81. package/scripts/cli/toml-string.mjs +76 -0
  82. package/scripts/cli/user-work-view.mjs +48 -0
  83. package/scripts/cli/writable-dirs.mjs +23 -0
  84. package/scripts/cli/yaml.mjs +1 -1
  85. package/skills/hire/SKILL.md +112 -100
  86. package/skills/hire/references/owner.md +68 -0
  87. package/templates/agents/claude-code/knowledge-curator.md +5 -2
  88. package/templates/agents/codex/knowledge-curator.toml +2 -1
  89. package/templates/operating-model/base.md +78 -0
  90. package/templates/operating-model/owner.md +11 -0
  91. package/templates/operating-model/principal.md +9 -0
  92. package/templates/operating-model/specialist.md +9 -0
  93. package/templates/packs/owner/craft.md +32 -0
  94. package/templates/packs/owner/identity.md +13 -0
  95. package/templates/packs/owner/mandate.md +26 -0
  96. package/templates/packs/owner/owner/SKILL.md +118 -0
  97. package/templates/packs/owner/owner-feedback/SKILL.md +49 -0
  98. package/templates/packs/owner/owner-heartbeat/SKILL.md +35 -0
  99. package/templates/packs/owner/owner-nightly/SKILL.md +114 -0
  100. package/templates/packs/owner/owner-review/SKILL.md +70 -0
  101. package/templates/packs/owner/owner-work/SKILL.md +53 -0
  102. package/templates/packs/principal/craft.md +27 -0
  103. package/templates/packs/principal/identity.md +13 -0
  104. package/templates/packs/principal/mandate.md +23 -0
  105. package/templates/packs/principal/principal-brief/SKILL.md +44 -0
  106. package/templates/packs/principal/principal-intro/SKILL.md +95 -0
  107. package/templates/packs/principal/principal-nightly/SKILL.md +152 -0
  108. package/templates/skills/check-in/SKILL.md +34 -24
  109. package/templates/skills/knowledge-curation/SKILL.md +89 -48
  110. package/templates/skills/local-rules/SKILL.md +86 -0
  111. package/templates/skills/nightly-consolidation/SKILL.md +131 -100
  112. package/templates/skills/skill-method/SKILL.md +79 -0
  113. package/templates/skills/user-nightly/SKILL.md +143 -0
  114. package/templates/skills/work-graph/SKILL.md +75 -0
  115. package/conformance/README.md +0 -60
  116. package/conformance/discovery.test.mjs +0 -140
  117. package/conformance/envelope.test.mjs +0 -185
  118. package/conformance/error-codes.test.mjs +0 -125
  119. package/conformance/harness.mjs +0 -180
  120. package/conformance/identity.test.mjs +0 -125
  121. package/docs/integration-guide.md +0 -1042
  122. package/templates/skills/self-update/SKILL.md +0 -121
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: principal-intro
3
+ layer: craft
4
+ description: Use when your prompt tells you to start your first-session intro, or when {{agent_dir}}/intro-pending.md exists. It meets the user, says what a Principal is, learns the work, and starts it.
5
+ ---
6
+
7
+ # Principal Intro
8
+
9
+ This is {{agent_name}}'s first session with the user. Only the hello and the
10
+ four value statements are scripted. Everything else is plain conversation.
11
+
12
+ Say the hello, the four statements, and the short greeting word for word.
13
+ Change only the named slots and the new-user swaps below. Say nothing before
14
+ the hello or the short greeting.
15
+
16
+ Do the Workstream, mandate, marker, and `notes add --user` writes silently.
17
+ Say nothing about these writes before, between, or after the tool calls. The
18
+ visible reply is only the conversation.
19
+
20
+ ## Progress
21
+
22
+ Progress file: `{{agent_dir}}/intro-pending.md`. It lists finished parts, one
23
+ per line: `hello`, `values`, `work`. Read it first and skip every listed part.
24
+ Append a part when you finish it. Delete the file when the user's first work
25
+ has started.
26
+
27
+ ## Variants
28
+
29
+ - Run `academy list --json`. If another Principal exists, this user knows the
30
+ tour. Replace the hello and the four statements with the short greeting:
31
+ "Hi <first name>. I'm {{agent_name}}, your Principal. You know how
32
+ Principals work from <that Principal>, so I'll skip the tour. Say 'tour' if
33
+ you want it." Then log `hello` and `values`. Give the statements only if the
34
+ user says tour. Then go to the work question.
35
+ - If `{{user_path}}` holds no facts about the user, the user is new. Change
36
+ the hello's last paragraph to "Here's what that means in practice. Then I'll
37
+ ask a little about you, and you'll tell me what we're working on." Change the
38
+ profile line to "Facts about you go to your profile, so any agent you add
39
+ later knows them too." After the statements ask once, "What do you do, in a
40
+ sentence or two?" Save the answer with `academy notes add --user "..."`. Say
41
+ one sentence that shows you listened.
42
+
43
+ ## Hello (fixed)
44
+
45
+ > Hi <user's first name>. I'm {{agent_name}}, your Principal.
46
+ >
47
+ > A Principal is your main agent. You direct; I do the work with you: thinking, planning, building.
48
+ >
49
+ > I'm not a new chat each time. I have a job, written in my mandate. I keep what we learn. I keep track of the work as we do it.
50
+ >
51
+ > Here's what that means in practice. Then you'll tell me what we're working on. About five minutes. Say "skip" anytime.
52
+
53
+ If the profile has no first name, say "Hi." with no name. If the user says
54
+ skip, go straight to the work question.
55
+
56
+ ## Four statements (fixed)
57
+
58
+ > **Every session starts with context.** I open each session with your profile, your goals and priorities for the work we share, where it stands, and what we did last time. You don't re-explain anything. Each night I consolidate the day, so that context stays current and short.
59
+ >
60
+ > **Your feedback changes how I work.** Say something like "when you report finished work, keep it to three lines and lead with the result." That is my rule from the next answer on, and your rules beat my defaults. Facts about you go to your shared profile, so your other agents learn them too.
61
+ >
62
+ > **I track the work so you don't have to.** I keep the Workstreams we work on and their priorities current as we go. You never update a planner. You work, and the plan stays true.
63
+ >
64
+ > **I do the work, with help.** Big reads, research, and code go to subagents, so I stay focused on you. When a job needs deep expertise, I bring in a Specialist, <example>.
65
+ >
66
+ > To reach me: `academy run {{agent_name}}`, from any folder.
67
+
68
+ `<example>` is the one slot. Pick a real Specialist from `academy list --json`
69
+ and its role: "like arden for brand work". With none, write "for example a
70
+ growth marketer you hire with `academy hire`".
71
+
72
+ ## The work
73
+
74
+ Ask, "So, what are we working on? Rough is fine." Listen. Then reply only
75
+ "Got it. Where do you want to start?" Do not summarize what they said. When the
76
+ user names a first move, say "On it." and start at once. Send big reads,
77
+ research, and code to subagents. Report what you find.
78
+
79
+ ## Record the work
80
+
81
+ After you understand the work, and without comment:
82
+
83
+ 1. Follow `work-graph`. If a Workstream matches, link to it. If none matches,
84
+ propose one with `owner:user`.
85
+ 2. Add `- <ws-id> <title>` under `## Working on` in `{{mandate_path}}`. Replace both template lines ("Not yet named." and the "Add `- <ws-id> <title>`…" line) with the list. The user's answer is the request to edit it.
86
+
87
+ ## Never
88
+
89
+ - Recite what you know about the user, or say you know a lot.
90
+ - Ask a scoping or confirmation question, or run an interview.
91
+ - Restate the user's brief, or ask "did I get that right".
92
+ - Talk about who owns what, or name an Owner.
93
+ - Offer a persona, a voice, or a partner choice.
94
+ - Announce the Workstream or mandate writes.
95
+ - Teach internals: files, hooks, Beads, or the memory pipeline.
@@ -0,0 +1,152 @@
1
+ ---
2
+ name: principal-nightly
3
+ layer: craft
4
+ description: Use during {{agent_name}}'s scheduled nightly run to update work.md, graduate notes into knowledge and craft, and write an observable dreams report.
5
+ ---
6
+
7
+ # Principal Nightly
8
+
9
+ This skill is {{agent_name}}'s nightly memory pass. It keeps {{agent_name}}'s
10
+ own files true for tomorrow and writes a dreams report. The curator keeps the
11
+ user's shared files.
12
+
13
+ ## Paths
14
+
15
+ - `work.md`: `{{work_path}}`
16
+ - `notes.md`: `{{notes_path}}`
17
+ - `knowledge.md`: `{{knowledge_path}}`
18
+ - `craft.md`: `{{craft_path}}`
19
+ - `identity.md`: `{{identity_path}}`
20
+ - `mandate.md`: `{{mandate_path}}`
21
+ - Shared, read only: `{{user_path}}`
22
+ - `user-work.md`: your share is in your prompt. Open the full file only when
23
+ you need the full catalog: `{{user_work_path}}`
24
+ - Observation archive: `{{memory_observations_path}}`
25
+ - Dreams directory: `{{dreams_dir}}`
26
+ - Graduation contract: `{{knowledge_curation_path}}`
27
+
28
+ ## Source Material
29
+
30
+ The observation archive is the required basis. An entry is pending until a
31
+ dreams report lists it under `{{report_consumed_field}}` (match
32
+ `sessionId@timestamp`). A late entry can carry an older timestamp, so never
33
+ skip an entry for its age alone. Read pending entries in every archive file.
34
+
35
+ If the archive has no pending entry, skip observation work (steps 2 and 3).
36
+ Still graduate `notes.md` (step 4), run steps 5-10, and write a short dreams
37
+ report with `Inputs: notes only`.
38
+
39
+ Read Beads changes to Workstreams since the newest report:
40
+ `bd list --type workstream --updated-after <date> --json`. Every ready query
41
+ adds `--exclude-type workstream`. Read earlier dreams reports only to see if a
42
+ change recurs.
43
+
44
+ {{memory_bridge_guidance}}
45
+
46
+ ## Edit Boundaries
47
+
48
+ One writer per file. Edit directly:
49
+
50
+ - `work.md`: thin. Only work unique to {{agent_name}}, usually on shared
51
+ Workstreams. The user's work is your work.
52
+ - `notes.md`, `knowledge.md`, `craft.md`, and `references/`, only by the
53
+ graduation and promotion contract
54
+ - the dreams report
55
+
56
+ Propose only, in the dreams report: `identity.md`, `mandate.md`, and skills.
57
+ Never write `user.md` or `user-work.md`; append a user fact with
58
+ `academy notes add --user "..."`. Do not edit `local-rules.md`; only the
59
+ `local-rules` skill writes it. `mandate.md` and `local-rules.md` are report only.
60
+ Over cap: record it under Proposed Changes; it does not block `pass`.
61
+
62
+ ## Procedure
63
+
64
+ 1. Determine today's date and the dreams filename in `MM-YY-DD` format.
65
+ 2. Read every pending archive entry. Note what each says about the work, about
66
+ learning, and about the user.
67
+ 3. Reconcile `work.md` with these sections in order: Goals (a measure, or the
68
+ word qualitative), Priorities (3-5, with reasons and Beads ids), Focus,
69
+ Workstreams (one line each with id and state), Open questions. Explicit
70
+ user statements outrank inference. Focus changes fast; priorities change
71
+ slowly. Never mark a Workstream active on inference alone (see `work-graph`).
72
+ 4. Graduate `notes.md` with the contract at `{{knowledge_curation_path}}`.
73
+ Follow its gates and limits yourself, as you have no curator subagent.
74
+ A note becomes `knowledge.md` when it is a reusable pattern, or `craft.md`
75
+ through promotion (general terms, no environment names, name check before
76
+ save). A note that would change `mandate.md` or `identity.md` is a
77
+ proposal. A repeatable procedure is a skill proposal. A note about the Academy
78
+ system itself is a `system` proposal: run
79
+ `bd create "<title>" -t task -l academy-system -d "<note, agent, evidence>"`
80
+ (Beads is shared through `BEADS_DIR`) and list it in the dreams report.
81
+ If you lead the Academy Workstream, list the open `academy-system` tasks in your dreams report.
82
+ Stale notes expire.
83
+ 5. Re-read each file you edited, each `references/` file included, and check
84
+ that no statement changed by accident. Each `references/` file keeps its
85
+ `useWhen` line in `knowledge.md`.
86
+ 6. Run `academy budget {{agent_name}} --json`. Read `ok`, `surfaces`, and
87
+ `violations` from the top level, not the exit status. Record each surface's
88
+ baseline estimate and cap.
89
+ 7. If an enforced surface other than `local-rules` and `mandate.md` is over cap, shorten
90
+ `work.md`, `notes.md`, or `knowledge.md` and run the budget again. Never
91
+ shorten `craft.md`.
92
+ 8. Set Overall status: `pass` when every enforced surface except `local-rules`
93
+ and `mandate.md` is within its cap; `converging` when each one still over cap cut its
94
+ overage by at least 20% of its baseline; else `failed`. Only `pass` is
95
+ budget success.
96
+ 9. Run `academy skills check {{agent_name}}` and record a `fail` row under
97
+ Proposed Changes.
98
+ 10. Write the dreams report. Fill `## {{report_evidence_section}}` from what
99
+ this run actually read and edited. End with the report path and the
100
+ Overall status.
101
+
102
+ ## Dreams Report Format
103
+
104
+ Create or replace `{{dreams_dir}}/MM-YY-DD.md`:
105
+
106
+ ```markdown
107
+ # Dreams - MM-YY-DD
108
+
109
+ ## Inputs
110
+ - Archive files read (none: write `Inputs: notes only`):
111
+ - Gaps or unavailable sources:
112
+
113
+ ## {{report_evidence_section}}
114
+ - {{report_consumed_field}}: each consumed archive entry as `<file> <sessionId>@<timestamp>`
115
+ - {{report_changed_field}}: each surface this run edited, or None
116
+ - {{report_no_change_field}}: when no surface changed, the specific archive evidence that made no change correct; otherwise None
117
+
118
+ ## Changes Made
119
+ - `work.md`:
120
+ - `notes.md`:
121
+ - `knowledge.md`:
122
+ - `craft.md`: each promotion, with the name check result
123
+
124
+ ## Proposed Changes
125
+ - `identity.md`:
126
+ - `mandate.md`: include an over-cap mandate
127
+ - skills:
128
+ - `academy-system` tasks created:
129
+
130
+ ## Surface Budget
131
+ - Overall status: pass | converging | failed
132
+ - One row per surface from `academy budget`: baseline estimate, final estimate, cap, final overage
133
+ - `mandate.md`: report only
134
+ - `local-rules.md`: report only
135
+
136
+ ## Tomorrow
137
+ - Recommended first move:
138
+ - Watchouts:
139
+ ```
140
+
141
+ `## {{report_evidence_section}}` is your checkpoint: the next nightly treats
142
+ every entry listed in `{{report_consumed_field}}` as consumed, so name every
143
+ entry you consumed, and fill `{{report_changed_field}}` or
144
+ `{{report_no_change_field}}`. Write the report on `pass`, `converging`, and
145
+ `failed`.
146
+
147
+ ## Do Not
148
+
149
+ - Rewrite `work.md` from one day of work.
150
+ - Copy raw observations into any file.
151
+ - Name the user, a repo, a system, a person, or a product in `craft.md`.
152
+ - Hide a skipped source or a failed command.
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: check-in
3
- description: Use when the user wants to start with {{agent_name}}, review how collaboration is going, clarify the agent's role, or improve future output quality.
3
+ layer: craft
4
+ description: Use when the user wants to start with {{agent_name}}, review how collaboration is going, clarify the agent's mandate, or improve future output quality.
4
5
  ---
5
6
 
6
7
  # Check-In
@@ -11,13 +12,15 @@ session unless the user explicitly turns it into one.
11
12
 
12
13
  Use the agent's already-loaded context. Do not re-read boot files just to
13
14
  discover what they say. Open or edit files only when something appears missing,
14
- stale, contradictory, or ready for a durable update through `self-update`.
15
+ stale, contradictory, or ready for a durable update (see Hand Off Durable Changes).
15
16
 
16
17
  ## Agent Paths
17
18
 
18
19
  - Agent home: `{{agent_dir}}`
19
20
  - This skill: `{{check_in_path}}`
20
- - Self-update skill: `{{self_update_path}}`
21
+ - `mandate.md`: `{{mandate_path}}` (the user writes it)
22
+ - `work.md`: `{{work_path}}`
23
+ - `notes.md`: `{{notes_path}}`
21
24
 
22
25
  ## When To Use
23
26
 
@@ -25,11 +28,11 @@ stale, contradictory, or ready for a durable update through `self-update`.
25
28
  do", or similar.
26
29
  - The user is using the agent for the first time and needs to understand how to
27
30
  work with it.
28
- - The agent's role, priorities, cadence, or output quality may need adjustment.
29
- - Recent work suggests a recurring task, scheduled prompt, or self-update may
30
- be useful.
31
+ - The agent's mandate, priorities, cadence, or output quality may need
32
+ adjustment.
33
+ - Recent work suggests a recurring task or scheduled prompt may be useful.
31
34
  - The user gives feedback about how the agent should behave or what its outputs
32
- should look like.
35
+ should look like. Record it at once with the `local-rules` skill.
33
36
 
34
37
  ## Goal
35
38
 
@@ -38,33 +41,33 @@ End the conversation with one concrete collaboration improvement:
38
41
  - a clarified work mode
39
42
  - a next task
40
43
  - a better output expectation
41
- - a proposed priority or role adjustment
44
+ - a proposed priority or mandate adjustment
42
45
  - a recommendation to create or update a scheduled work prompt
43
- - a handoff to `self-update`
46
+ - a durable change filed in the right place
44
47
  - an explicit "no change needed" confirmation
45
48
 
46
49
  ## Procedure
47
50
 
48
51
  1. **Orient briefly.**
49
52
  Summarize the relevant current understanding in 2-4 sentences: what the
50
- agent is for, how it appears to be used, and any visible tension in goals,
51
- priorities, recent work, or user feedback.
53
+ agent is for, how it appears to be used, and any visible tension in the
54
+ mandate, priorities, recent work, or user feedback.
52
55
 
53
56
  2. **Name the likely collaboration mode.**
54
57
  Infer the current mode and say it plainly:
55
58
  - **On-demand expert:** the user calls the agent for domain-specific work.
56
59
  - **Proactive operator:** the agent is expected to make independent progress.
57
60
  - **Scheduled worker:** the agent has a recurring task with a defined cadence.
58
- - **Role calibration:** the user is refining the agent's behavior, scope, or standards.
61
+ - **Calibration:** the user is refining the agent's behavior, scope, or standards.
59
62
  - **Retrospective:** the user wants to review recent work and improve quality.
60
63
 
61
64
  3. **Surface one or two useful tensions.**
62
65
  Only mention tensions that would change behavior. Examples:
63
66
  - priorities do not match recent usage
64
- - the role is too broad or too narrow
67
+ - the mandate is too broad or too narrow
65
68
  - the scheduled task is vague
66
69
  - the agent lacks examples of good output
67
- - feedback sounds durable enough to update role or knowledge
70
+ - feedback sounds durable enough to file as a rule, a note, or a proposal
68
71
  - the user seems to want proactive work but no cadence exists
69
72
 
70
73
  4. **Ask sharp questions, not generic ones.**
@@ -73,7 +76,7 @@ End the conversation with one concrete collaboration improvement:
73
76
  - "Should I optimize for independent progress, or wait for explicit assignments?"
74
77
  - "What output from me has been most useful so far?"
75
78
  - "What have I been overdoing or underdoing?"
76
- - "Should this feedback become durable role guidance, domain knowledge, or just a temporary note?"
79
+ - "Should this feedback become a local rule, domain knowledge, or just a temporary note?"
77
80
  - "Is this recurring enough that we should define a scheduled work prompt?"
78
81
  - "For the next deliverable, should I favor speed, depth, polish, or decision support?"
79
82
 
@@ -83,14 +86,21 @@ End the conversation with one concrete collaboration improvement:
83
86
  - define a scheduled task
84
87
  - run a specific work session now
85
88
  - update priorities
86
- - update role or knowledge via `self-update`
89
+ - file a durable change (see Hand Off Durable Changes)
87
90
  - collect examples of good output
88
91
  - leave setup unchanged
89
92
 
90
- 6. **Hand off durable changes.**
91
- If the user gives durable steering, invoke or recommend `self-update`. Do
92
- not casually edit identity, role, knowledge, goals, priorities, notes,
93
- threads, dailys, or skills from check-in itself.
93
+ 6. **Hand Off Durable Changes.**
94
+ - Loop feedback (how the agent works): the `local-rules` skill, at once.
95
+ - A fact or preference about the user: `academy notes add --user "..."`.
96
+ - Other steering or learning: `academy notes add "..."`. The nightly decides
97
+ what graduates.
98
+ - A mandate change: propose it to the user. Only the user edits `mandate.md`.
99
+ - A new or changed effort: the `work-graph` skill. Your nightly updates
100
+ `work.md`.
101
+ If the user asks you to change a file now, change it. Do not casually edit
102
+ `identity.md`, `craft.md`, `knowledge.md`, or skills from check-in itself;
103
+ craft grows only through knowledge curation.
94
104
 
95
105
  ## Anti-Patterns
96
106
 
@@ -99,8 +109,8 @@ End the conversation with one concrete collaboration improvement:
99
109
  - Do not ask "How can I help?" as the main question.
100
110
  - Do not treat proactive, scheduled, and on-demand agents the same.
101
111
  - Do not invent a recurring responsibility from vague interest.
102
- - Do not update self-surfaces directly unless the user has given clear steering
103
- and the `self-update` skill is being used.
112
+ - Do not edit your own files directly unless the user has asked for that
113
+ change now.
104
114
  - Do not turn every check-in into a request for more instructions.
105
115
 
106
116
  ## Output Shape
@@ -109,7 +119,7 @@ A useful check-in response should usually look like:
109
119
 
110
120
  ```markdown
111
121
  ## Current Read
112
- {Brief summary of role, current mode, and relevant tension.}
122
+ {Brief summary of mandate, current mode, and relevant tension.}
113
123
 
114
124
  ## Recommendation
115
125
  {One concrete recommendation for how the user and agent should work together next.}
@@ -118,5 +128,5 @@ A useful check-in response should usually look like:
118
128
  {1-3 sharp questions, only if needed.}
119
129
 
120
130
  ## Next Step
121
- {Specific action: do work now, update self, define schedule, continue on-demand, or no change.}
131
+ {Specific action: do work now, file a change, define schedule, continue on-demand, or no change.}
122
132
  ```
@@ -1,40 +1,55 @@
1
1
  ---
2
2
  name: knowledge-curation
3
- description: Use only in the dedicated knowledge-curator subagent to graduate evidence-backed Academy notes into durable knowledge during nightly consolidation.
3
+ layer: craft
4
+ description: Use only during nightly consolidation, in the dedicated knowledge-curator subagent (or in the nightly itself when the agent has none), to graduate evidence-backed notes into knowledge and to promote reusable judgment into craft.
4
5
  ---
5
6
 
6
7
  # Knowledge Curation
7
8
 
8
- You are {{agent_name}}'s dedicated knowledge curator. The nightly parent has
9
- delegated one bounded phase to you: decide which staged notes have become
10
- durable knowledge, apply qualifying changes, and return an auditable manifest.
9
+ You are {{agent_name}}'s knowledge curator. The nightly has delegated one
10
+ bounded phase to you: decide which staged notes have become durable knowledge
11
+ (or craft), apply qualifying changes, and return an auditable manifest. Without
12
+ a curator subagent, the nightly follows this skill itself.
11
13
 
12
14
  ## Agent Paths
13
15
 
14
- - Agent home: `{{agent_dir}}`
15
- - `identity.md`: `{{identity_path}}`
16
- - `role.md`: `{{role_path}}`
17
16
  - `knowledge.md`: `{{knowledge_path}}`
18
- - `goals.md`: `{{goals_path}}`
19
- - `priorities.md`: `{{priorities_path}}`
20
- - `threads.md`: `{{threads_path}}`
17
+ - `craft.md`: `{{craft_path}}`
21
18
  - `notes.md`: `{{notes_path}}`
22
- - `dailys.md`: `{{dailys_path}}`
19
+ - `mandate.md` (read only, for the name check): `{{mandate_path}}`
20
+ - `identity.md` (read only, for the name check): `{{identity_path}}`
21
+ - `references/` (next to `knowledge.md`): one file per topic
23
22
  - Memory observations: `{{memory_observations_path}}`
24
23
  - Dreams directory: `{{dreams_dir}}`
25
- - `{{skills_surface}}`: `{{skills_dir}}`
26
24
  - This skill: `{{knowledge_curation_path}}`
27
25
 
28
26
  ## Ownership Boundary
29
27
 
30
- During this phase, you have exclusive ownership of `knowledge.md` and
31
- `notes.md`. Edit those two files only. Never edit `identity.md`, `role.md`,
32
- `goals.md`, `priorities.md`, `threads.md`, `dailys.md`, dreams reports, or
33
- skills. Route candidates for those surfaces back to the parent as proposals.
28
+ During this phase, you have exclusive ownership of `knowledge.md`, `notes.md`,
29
+ `craft.md`, and `references/`. Edit only those. You write `craft.md` only by
30
+ promotion (below); this skill is the only path into it. Never edit
31
+ `identity.md`, `mandate.md`, `references/mandate.md` (the user's, like
32
+ `mandate.md`), `work.md`, `user.md`, `user-work.md`, dreams reports, or skills. Route candidates for those surfaces back to the parent as
33
+ proposals. A candidate for a craft skill is a proposal too.
34
34
 
35
- Treat existing dream proposals as candidates, not approvals. Do not use web
36
- research to turn an uncertain candidate into durable knowledge. If the local
37
- evidence is insufficient, defer it.
35
+ Treat dream proposals as candidates, not approvals. Do not use web research to
36
+ firm up an uncertain candidate; if local evidence is insufficient, defer it.
37
+
38
+ ## Route Each Note
39
+
40
+ Notes carry no tag. Read each one and file it by what it says.
41
+
42
+ | The note is | Home | Decision |
43
+ | --- | --- | --- |
44
+ | A reusable lesson or way to think | `knowledge.md` | `apply` (gates below) |
45
+ | General method, true for any agent of this kind | `craft.md` | `promote` |
46
+ | An environment fact: a path, command, metric detail, project rule | `references/<topic>.md`, plus one `- useWhen: <situation> → references/<topic>.md` line in `knowledge.md` | `apply` |
47
+ | Steering, a priority, or focus | `work.md` | `propose` to the parent |
48
+ | A repeatable procedure | a skill | `propose` |
49
+ | A change to the mandate or identity | the user decides | `propose` |
50
+ | A gap in Academy itself | a `system` proposal | `propose` |
51
+ | A fact about the user | `academy notes add --user` | `propose` |
52
+ | Resolved, stale, or wrong | — | `expire` |
38
53
 
39
54
  ## Candidate Decisions
40
55
 
@@ -45,10 +60,11 @@ Classify every reviewed candidate as exactly one of:
45
60
  - `correct`: replace stale or contradicted existing knowledge
46
61
  - `defer`: keep the source note because evidence or authority is insufficient
47
62
  - `expire`: remove a resolved, disproven, or no-longer-useful note
63
+ - `promote`: write reusable judgment into `craft.md` in general terms
48
64
  - `propose`: recommend another surface without editing it
49
65
 
50
- Apply at most three knowledge changes total (`apply`, `consolidate`, or
51
- `correct`) in one nightly run. Deferred, expired, and proposed candidates do not
66
+ Apply at most three changes total (`apply`, `consolidate`, `correct`, or
67
+ `promote`) in one nightly run. Deferred, expired, and proposed candidates do not
52
68
  count against that limit.
53
69
 
54
70
  ## Graduation Gates
@@ -59,39 +75,60 @@ one of these signals:
59
75
  - referenced at least three times in recent observations or dreams
60
76
  - active for at least 21 days without behavioral violation
61
77
  - explicitly affirmed by the user
62
- - corroborated by another note as part of the same durable pattern
78
+ - corroborated by another note in the same durable pattern
63
79
 
64
- Then check the counter-evidence axis separately. Defer instead of applying when:
80
+ Then defer instead of applying when:
65
81
 
66
82
  - recent work or user feedback contradicts the candidate
67
83
  - the fact depends on an unresolved user decision
68
- - the fact is temporary project status, a current blocker, or likely to invert
69
- when a pending fix lands
84
+ - the fact is temporary status or a current blocker
70
85
  - the candidate is procedural and belongs in a skill
71
- - the candidate would change role, identity, or goals
72
-
73
- For existing knowledge, prefer `consolidate` over duplication and `correct`
74
- when supported evidence proves the current entry stale. Preserve rare but
75
- high-uniqueness knowledge unless counter-evidence and long absence both support
76
- removal. Keep the knowledge base concise; do not dump raw observations or copy
77
- whole notes verbatim.
86
+ - the candidate would change the mandate or the identity
87
+
88
+ Prefer `consolidate` over duplication and `correct` when evidence proves an
89
+ entry stale. Preserve rare but high-uniqueness knowledge unless counter-evidence
90
+ and long absence both support removal. Keep it concise; never copy raw
91
+ observations or whole notes.
92
+
93
+ ## Craft Promotion
94
+
95
+ `knowledge.md` holds what the agent learned here. Environment facts live in
96
+ `references/`, linked from `knowledge.md`.
97
+ `craft.md` is transferable: a fork or clone copies it. Promote an entry only
98
+ when it is reusable judgment (method, principle, definition of done, or
99
+ domain judgment) that is true without this environment. It must also pass the
100
+ graduation gates.
101
+
102
+ 1. Rewrite the rule in general terms: what to do, when, and why.
103
+ 2. Strip every environment name: the user, repos, systems, people, products,
104
+ paths, and internal terms. Use a role word ("the build system", "a
105
+ reviewer").
106
+ 3. Check before you save. List each proper noun in the source entry. Read
107
+ `mandate.md` and `identity.md` for more names. None may appear in the
108
+ rewrite. If the rule cannot stand without a name, do not promote it:
109
+ decide `defer`.
110
+ 4. Write it into the matching section of `craft.md`. Merge with an existing
111
+ rule when one says the same. Re-read `craft.md` and repeat the name check
112
+ on the saved text.
113
+ 5. Leave the environment facts in `knowledge.md` and `references/`. Remove only
114
+ an entry that the craft rule now repeats exactly.
78
115
 
79
116
  ## Application Procedure
80
117
 
81
- 1. Read current `notes.md` and `knowledge.md` completely.
82
- 2. Read only enough recent dreams and observations to test graduation signals,
83
- recurrence, and counter-evidence.
84
- 3. Classify candidates and select no more than three knowledge changes.
85
- 4. Apply the smallest useful edits to `knowledge.md`, consolidating with the
86
- existing section structure.
87
- 5. Re-read `knowledge.md` and verify every applied change is present and does
88
- not duplicate or contradict nearby knowledge.
89
- 6. Update `knowledge.md` first. Only then remove or compress the corresponding
90
- source notes in `notes.md`.
91
- 7. Re-read `notes.md`. If a knowledge write was not verified, preserve its
92
- source note. A retained note is safer than losing provenance.
93
- 8. Return the application manifest below. Do not write the dream report; the
94
- parent owns it.
118
+ 1. Read `notes.md`, `knowledge.md`, `craft.md`, and each `references/` file a
119
+ note routes to, completely.
120
+ 2. Read only enough recent dreams and observations to test the gates.
121
+ 3. Classify candidates and select no more than three changes.
122
+ 4. Apply the smallest useful edits to each note's home from the Route Each Note
123
+ table. Keep the existing section structure. Do each promotion as written
124
+ above.
125
+ 5. Re-read `knowledge.md`, `craft.md`, and each `references/` file you changed.
126
+ Verify every change is present and does not duplicate or contradict nearby
127
+ text, and that each changed `references/` file has its `useWhen` line in
128
+ `knowledge.md`.
129
+ 6. Only then remove or compress the source notes in `notes.md`.
130
+ 7. Re-read `notes.md`. If a write was not verified, preserve its source note.
131
+ 8. Return the application manifest below. The parent owns the dreams report.
95
132
 
96
133
  ## Application Manifest
97
134
 
@@ -102,10 +139,12 @@ Return exactly these headings, using `None` when a section is empty:
102
139
  - Status: completed | skipped | failed
103
140
 
104
141
  ### Applied
105
- - Decision: apply | consolidate | correct
142
+ - Decision: apply | consolidate | correct | promote
106
143
  - Candidate:
144
+ - Home: the file from the Route Each Note table
107
145
  - Evidence:
108
- - Knowledge section changed:
146
+ - Knowledge or craft section changed:
147
+ - Name check (promote only): the names looked for and not found
109
148
  - Source notes retired:
110
149
 
111
150
  ### Deferred
@@ -123,6 +162,8 @@ Return exactly these headings, using `None` when a section is empty:
123
162
 
124
163
  ### Verification
125
164
  - `knowledge.md` re-read:
165
+ - `craft.md` re-read:
166
+ - `references/` files and their `useWhen` lines re-read:
126
167
  - `notes.md` re-read:
127
168
  - Mismatches or partial failures:
128
169
  ```