@joenandez/academy 0.4.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +14 -0
- package/.claude-plugin/plugin.json +6 -0
- package/CHANGELOG.md +46 -0
- package/LICENSE +21 -0
- package/README.md +209 -0
- package/bin/academy +2 -0
- package/conformance/README.md +60 -0
- package/conformance/discovery.test.mjs +140 -0
- package/conformance/envelope.test.mjs +185 -0
- package/conformance/error-codes.test.mjs +125 -0
- package/conformance/harness.mjs +180 -0
- package/conformance/identity.test.mjs +125 -0
- package/docs/integration-guide.md +1026 -0
- package/hooks/hook_runtime.mjs +100 -0
- package/hooks/hooks.json +26 -0
- package/hooks/inject_surface.py +122 -0
- package/hooks/memory_bridge.mjs +120 -0
- package/hooks/memory_store.mjs +66 -0
- package/hooks/register_session.mjs +51 -0
- package/hooks/sync_memory.mjs +27 -0
- package/package.json +41 -0
- package/scripts/agent.mjs +3 -0
- package/scripts/cli/archive.mjs +161 -0
- package/scripts/cli/archived.mjs +82 -0
- package/scripts/cli/args.mjs +282 -0
- package/scripts/cli/codex.mjs +216 -0
- package/scripts/cli/core.mjs +389 -0
- package/scripts/cli/create.mjs +242 -0
- package/scripts/cli/doctor.mjs +203 -0
- package/scripts/cli/eventlog.mjs +129 -0
- package/scripts/cli/events.mjs +80 -0
- package/scripts/cli/hire-headless.mjs +229 -0
- package/scripts/cli/hire-spec.mjs +164 -0
- package/scripts/cli/hire.mjs +92 -0
- package/scripts/cli/inspect.mjs +286 -0
- package/scripts/cli/lifecycle.mjs +296 -0
- package/scripts/cli/main.mjs +102 -0
- package/scripts/cli/migrate.mjs +183 -0
- package/scripts/cli/notes.mjs +104 -0
- package/scripts/cli/rename.mjs +172 -0
- package/scripts/cli/run.mjs +227 -0
- package/scripts/cli/runtime.mjs +47 -0
- package/scripts/cli/scaffold.mjs +332 -0
- package/scripts/cli/sessions.mjs +98 -0
- package/scripts/cli/templates.mjs +104 -0
- package/scripts/cli/yaml.mjs +124 -0
- package/skills/hire/SKILL.md +669 -0
- package/templates/agents/claude-code/knowledge-curator.md +14 -0
- package/templates/agents/codex/knowledge-curator.toml +9 -0
- package/templates/skills/check-in/SKILL.md +122 -0
- package/templates/skills/knowledge-curation/SKILL.md +132 -0
- package/templates/skills/nightly-consolidation/SKILL.md +240 -0
- package/templates/skills/self-update/SKILL.md +121 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
---
|
|
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.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Check-In
|
|
7
|
+
|
|
8
|
+
Check-in is {{agent_name}}'s 1:1 protocol with the user. It is for alignment,
|
|
9
|
+
calibration, and improving collaboration quality. It is not a normal work
|
|
10
|
+
session unless the user explicitly turns it into one.
|
|
11
|
+
|
|
12
|
+
Use the agent's already-loaded context. Do not re-read boot files just to
|
|
13
|
+
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
|
+
|
|
16
|
+
## Agent Paths
|
|
17
|
+
|
|
18
|
+
- Agent home: `{{agent_dir}}`
|
|
19
|
+
- This skill: `{{check_in_path}}`
|
|
20
|
+
- Self-update skill: `{{self_update_path}}`
|
|
21
|
+
|
|
22
|
+
## When To Use
|
|
23
|
+
|
|
24
|
+
- The user says "check in", "start", "how are things going", "what should we
|
|
25
|
+
do", or similar.
|
|
26
|
+
- The user is using the agent for the first time and needs to understand how to
|
|
27
|
+
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 user gives feedback about how the agent should behave or what its outputs
|
|
32
|
+
should look like.
|
|
33
|
+
|
|
34
|
+
## Goal
|
|
35
|
+
|
|
36
|
+
End the conversation with one concrete collaboration improvement:
|
|
37
|
+
|
|
38
|
+
- a clarified work mode
|
|
39
|
+
- a next task
|
|
40
|
+
- a better output expectation
|
|
41
|
+
- a proposed priority or role adjustment
|
|
42
|
+
- a recommendation to create or update a scheduled work prompt
|
|
43
|
+
- a handoff to `self-update`
|
|
44
|
+
- an explicit "no change needed" confirmation
|
|
45
|
+
|
|
46
|
+
## Procedure
|
|
47
|
+
|
|
48
|
+
1. **Orient briefly.**
|
|
49
|
+
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.
|
|
52
|
+
|
|
53
|
+
2. **Name the likely collaboration mode.**
|
|
54
|
+
Infer the current mode and say it plainly:
|
|
55
|
+
- **On-demand expert:** the user calls the agent for domain-specific work.
|
|
56
|
+
- **Proactive operator:** the agent is expected to make independent progress.
|
|
57
|
+
- **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.
|
|
59
|
+
- **Retrospective:** the user wants to review recent work and improve quality.
|
|
60
|
+
|
|
61
|
+
3. **Surface one or two useful tensions.**
|
|
62
|
+
Only mention tensions that would change behavior. Examples:
|
|
63
|
+
- priorities do not match recent usage
|
|
64
|
+
- the role is too broad or too narrow
|
|
65
|
+
- the scheduled task is vague
|
|
66
|
+
- the agent lacks examples of good output
|
|
67
|
+
- feedback sounds durable enough to update role or knowledge
|
|
68
|
+
- the user seems to want proactive work but no cadence exists
|
|
69
|
+
|
|
70
|
+
4. **Ask sharp questions, not generic ones.**
|
|
71
|
+
Ask at most 2-3 questions. Each question must have a clear consequence.
|
|
72
|
+
Good examples:
|
|
73
|
+
- "Should I optimize for independent progress, or wait for explicit assignments?"
|
|
74
|
+
- "What output from me has been most useful so far?"
|
|
75
|
+
- "What have I been overdoing or underdoing?"
|
|
76
|
+
- "Should this feedback become durable role guidance, domain knowledge, or just a temporary note?"
|
|
77
|
+
- "Is this recurring enough that we should define a scheduled work prompt?"
|
|
78
|
+
- "For the next deliverable, should I favor speed, depth, polish, or decision support?"
|
|
79
|
+
|
|
80
|
+
5. **Recommend a concrete next step.**
|
|
81
|
+
Do not end with a vague offer. Recommend one of:
|
|
82
|
+
- continue on-demand
|
|
83
|
+
- define a scheduled task
|
|
84
|
+
- run a specific work session now
|
|
85
|
+
- update priorities
|
|
86
|
+
- update role or knowledge via `self-update`
|
|
87
|
+
- collect examples of good output
|
|
88
|
+
- leave setup unchanged
|
|
89
|
+
|
|
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.
|
|
94
|
+
|
|
95
|
+
## Anti-Patterns
|
|
96
|
+
|
|
97
|
+
- Do not dump all boot context back to the user.
|
|
98
|
+
- Do not perform a full work session unless the user asks.
|
|
99
|
+
- Do not ask "How can I help?" as the main question.
|
|
100
|
+
- Do not treat proactive, scheduled, and on-demand agents the same.
|
|
101
|
+
- 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.
|
|
104
|
+
- Do not turn every check-in into a request for more instructions.
|
|
105
|
+
|
|
106
|
+
## Output Shape
|
|
107
|
+
|
|
108
|
+
A useful check-in response should usually look like:
|
|
109
|
+
|
|
110
|
+
```markdown
|
|
111
|
+
## Current Read
|
|
112
|
+
{Brief summary of role, current mode, and relevant tension.}
|
|
113
|
+
|
|
114
|
+
## Recommendation
|
|
115
|
+
{One concrete recommendation for how the user and agent should work together next.}
|
|
116
|
+
|
|
117
|
+
## Questions
|
|
118
|
+
{1-3 sharp questions, only if needed.}
|
|
119
|
+
|
|
120
|
+
## Next Step
|
|
121
|
+
{Specific action: do work now, update self, define schedule, continue on-demand, or no change.}
|
|
122
|
+
```
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
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.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Knowledge Curation
|
|
7
|
+
|
|
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.
|
|
11
|
+
|
|
12
|
+
## Agent Paths
|
|
13
|
+
|
|
14
|
+
- Agent home: `{{agent_dir}}`
|
|
15
|
+
- `identity.md`: `{{identity_path}}`
|
|
16
|
+
- `role.md`: `{{role_path}}`
|
|
17
|
+
- `knowledge.md`: `{{knowledge_path}}`
|
|
18
|
+
- `goals.md`: `{{goals_path}}`
|
|
19
|
+
- `priorities.md`: `{{priorities_path}}`
|
|
20
|
+
- `threads.md`: `{{threads_path}}`
|
|
21
|
+
- `notes.md`: `{{notes_path}}`
|
|
22
|
+
- `dailys.md`: `{{dailys_path}}`
|
|
23
|
+
- Memory observations: `{{memory_observations_path}}`
|
|
24
|
+
- Dreams directory: `{{dreams_dir}}`
|
|
25
|
+
- `{{skills_surface}}`: `{{skills_dir}}`
|
|
26
|
+
- This skill: `{{knowledge_curation_path}}`
|
|
27
|
+
|
|
28
|
+
## Ownership Boundary
|
|
29
|
+
|
|
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.
|
|
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.
|
|
38
|
+
|
|
39
|
+
## Candidate Decisions
|
|
40
|
+
|
|
41
|
+
Classify every reviewed candidate as exactly one of:
|
|
42
|
+
|
|
43
|
+
- `apply`: add a new durable knowledge item
|
|
44
|
+
- `consolidate`: merge a redundant candidate into existing knowledge
|
|
45
|
+
- `correct`: replace stale or contradicted existing knowledge
|
|
46
|
+
- `defer`: keep the source note because evidence or authority is insufficient
|
|
47
|
+
- `expire`: remove a resolved, disproven, or no-longer-useful note
|
|
48
|
+
- `propose`: recommend another surface without editing it
|
|
49
|
+
|
|
50
|
+
Apply at most three knowledge changes total (`apply`, `consolidate`, or
|
|
51
|
+
`correct`) in one nightly run. Deferred, expired, and proposed candidates do not
|
|
52
|
+
count against that limit.
|
|
53
|
+
|
|
54
|
+
## Graduation Gates
|
|
55
|
+
|
|
56
|
+
A knowledge change must be reusable beyond the current task and have at least
|
|
57
|
+
one of these signals:
|
|
58
|
+
|
|
59
|
+
- referenced at least three times in recent observations or dreams
|
|
60
|
+
- active for at least 21 days without behavioral violation
|
|
61
|
+
- explicitly affirmed by the user
|
|
62
|
+
- corroborated by another note as part of the same durable pattern
|
|
63
|
+
|
|
64
|
+
Then check the counter-evidence axis separately. Defer instead of applying when:
|
|
65
|
+
|
|
66
|
+
- recent work or user feedback contradicts the candidate
|
|
67
|
+
- 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
|
|
70
|
+
- 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.
|
|
78
|
+
|
|
79
|
+
## Application Procedure
|
|
80
|
+
|
|
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.
|
|
95
|
+
|
|
96
|
+
## Application Manifest
|
|
97
|
+
|
|
98
|
+
Return exactly these headings, using `None` when a section is empty:
|
|
99
|
+
|
|
100
|
+
```markdown
|
|
101
|
+
## Curator Result
|
|
102
|
+
- Status: completed | skipped | failed
|
|
103
|
+
|
|
104
|
+
### Applied
|
|
105
|
+
- Decision: apply | consolidate | correct
|
|
106
|
+
- Candidate:
|
|
107
|
+
- Evidence:
|
|
108
|
+
- Knowledge section changed:
|
|
109
|
+
- Source notes retired:
|
|
110
|
+
|
|
111
|
+
### Deferred
|
|
112
|
+
- Candidate:
|
|
113
|
+
- Reason:
|
|
114
|
+
|
|
115
|
+
### Expired Notes
|
|
116
|
+
- Note:
|
|
117
|
+
- Reason:
|
|
118
|
+
|
|
119
|
+
### Proposed For Other Surfaces
|
|
120
|
+
- Destination:
|
|
121
|
+
- Candidate:
|
|
122
|
+
- Reason:
|
|
123
|
+
|
|
124
|
+
### Verification
|
|
125
|
+
- `knowledge.md` re-read:
|
|
126
|
+
- `notes.md` re-read:
|
|
127
|
+
- Mismatches or partial failures:
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
If any edit or verification fails, set status to `failed`, preserve every
|
|
131
|
+
source note whose destination was not verified, and describe the exact partial
|
|
132
|
+
state. Do not hide or repair the failure by editing other surfaces.
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nightly-consolidation
|
|
3
|
+
description: Use during {{agent_name}}'s scheduled nightly memory consolidation to update daily memory surfaces and write an observable dreams report.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Nightly Consolidation
|
|
7
|
+
|
|
8
|
+
This skill runs as {{agent_name}}'s nightly memory pass. It turns recent
|
|
9
|
+
experience with the user into tighter next-day context without rewriting the
|
|
10
|
+
agent's identity or job definition casually.
|
|
11
|
+
|
|
12
|
+
## Agent Paths
|
|
13
|
+
|
|
14
|
+
These files are already loaded into the session context. Open or edit them when
|
|
15
|
+
you need exact current text, need to preserve surrounding context, or need to
|
|
16
|
+
write the nightly result.
|
|
17
|
+
|
|
18
|
+
- Agent home: `{{agent_dir}}`
|
|
19
|
+
- `identity.md`: `{{identity_path}}`
|
|
20
|
+
- `role.md`: `{{role_path}}`
|
|
21
|
+
- `knowledge.md`: `{{knowledge_path}}`
|
|
22
|
+
- `goals.md`: `{{goals_path}}`
|
|
23
|
+
- `priorities.md`: `{{priorities_path}}`
|
|
24
|
+
- `threads.md`: `{{threads_path}}`
|
|
25
|
+
- `notes.md`: `{{notes_path}}`
|
|
26
|
+
- `dailys.md`: `{{dailys_path}}`
|
|
27
|
+
- Memory observations: `{{memory_observations_path}}`
|
|
28
|
+
- Dreams directory: `{{dreams_dir}}`
|
|
29
|
+
- This skill: `{{nightly_consolidation_path}}`
|
|
30
|
+
- Knowledge-curation contract: `{{knowledge_curation_path}}`
|
|
31
|
+
|
|
32
|
+
## Purpose
|
|
33
|
+
|
|
34
|
+
Prepare tomorrow's version of the agent. The expected outputs are:
|
|
35
|
+
|
|
36
|
+
- an updated `dailys.md` with the last 7 working-day summaries
|
|
37
|
+
- conservative updates to `threads.md`, `notes.md`, and `priorities.md`
|
|
38
|
+
- evidence-backed `knowledge.md` graduations applied by the dedicated curator
|
|
39
|
+
- optional proposed changes for `goals.md`, `role.md`, `identity.md`,
|
|
40
|
+
deferred `knowledge.md` candidates, or skills
|
|
41
|
+
- a dreams report at `{{dreams_dir}}/MM-YY-DD.md`
|
|
42
|
+
|
|
43
|
+
## Source Material
|
|
44
|
+
|
|
45
|
+
Use `{{memory_observations_path}}` as the primary source. It contains the
|
|
46
|
+
observations recorded from this Academy agent's own sessions. Then use
|
|
47
|
+
recent session context and gather only enough additional evidence to avoid
|
|
48
|
+
guessing:
|
|
49
|
+
|
|
50
|
+
1. Read today's observation JSONL from `{{memory_observations_path}}` if it
|
|
51
|
+
exists.
|
|
52
|
+
2. Read yesterday's observation JSONL when the nightly job may have run after
|
|
53
|
+
midnight or the prior day was missed.
|
|
54
|
+
3. Search with concrete terms from recent work, the agent name, and active
|
|
55
|
+
thread names when more evidence is needed.
|
|
56
|
+
4. Read previous dreams reports only when checking whether a recommendation is
|
|
57
|
+
recurring or already handled.
|
|
58
|
+
|
|
59
|
+
The agent-local observation archive is the required basis for this workflow.
|
|
60
|
+
It is the only source that can establish eligibility. If the archive is empty,
|
|
61
|
+
stop before editing any memory surface, delegating to the curator, or writing a
|
|
62
|
+
dreams report.
|
|
63
|
+
|
|
64
|
+
{{memory_bridge_guidance}}
|
|
65
|
+
|
|
66
|
+
## Edit Boundaries
|
|
67
|
+
|
|
68
|
+
Autonomous edits are allowed for:
|
|
69
|
+
|
|
70
|
+
- `dailys.md`
|
|
71
|
+
- `threads.md`
|
|
72
|
+
- `notes.md`
|
|
73
|
+
- `priorities.md`
|
|
74
|
+
- the nightly dreams report
|
|
75
|
+
|
|
76
|
+
The nightly parent may add transient notes before delegation. Then the
|
|
77
|
+
foreground `knowledge-curator` subagent receives exclusive ownership of
|
|
78
|
+
`notes.md` and `knowledge.md` for the curation phase. The parent must wait for
|
|
79
|
+
it to finish and must not edit either file during that phase.
|
|
80
|
+
|
|
81
|
+
After the curator returns and manifest verification finishes, the parent may
|
|
82
|
+
reduce `knowledge.md` and `notes.md` only to reduce size. It must never add
|
|
83
|
+
content to either file, and it must never reverse a curator graduation
|
|
84
|
+
decision. The parent may also reduce `priorities.md`, `threads.md`, and
|
|
85
|
+
`dailys.md` during the post-curator budget phase. `identity.md`, `role.md`,
|
|
86
|
+
and `goals.md` remain propose-only.
|
|
87
|
+
|
|
88
|
+
Do not directly rewrite `identity.md`, `role.md`, `goals.md`, or skills from
|
|
89
|
+
this workflow unless the user explicitly requested that specific change.
|
|
90
|
+
Instead, put a proposal in the dreams report.
|
|
91
|
+
|
|
92
|
+
## Procedure
|
|
93
|
+
|
|
94
|
+
1. Determine today's date and the dreams filename using `MM-YY-DD` format.
|
|
95
|
+
2. Review recent evidence: loaded context, the observation archive, current
|
|
96
|
+
surfaces, and recent dreams reports if useful.
|
|
97
|
+
3. Write a concise daily entry for `dailys.md`. Keep only the last 7 working
|
|
98
|
+
days. Each entry should capture work done, decisions, blockers, user
|
|
99
|
+
steering, and the next useful step.
|
|
100
|
+
4. Reconcile `threads.md`:
|
|
101
|
+
- mark completed work done or remove it from active attention
|
|
102
|
+
- demote stale active items to idle or parked
|
|
103
|
+
- add only concrete active pursuits with a next step
|
|
104
|
+
5. Add any new transient steering to `notes.md` before delegation. Do not
|
|
105
|
+
graduate or expire notes in the parent.
|
|
106
|
+
6. Reconcile `priorities.md` when recent evidence clearly changes next focus.
|
|
107
|
+
Keep 3-5 priorities. Do not turn every unfinished task into a priority.
|
|
108
|
+
7. Invoke the foreground `knowledge-curator` subagent in Claude Code or
|
|
109
|
+
`knowledge_curator` in Codex for the bounded knowledge-graduation phase.
|
|
110
|
+
Tell it to use its preloaded `knowledge-curation` skill and confirm the
|
|
111
|
+
contract at `{{knowledge_curation_path}}`; wait for it to finish and retain
|
|
112
|
+
its application manifest.
|
|
113
|
+
8. Re-read `knowledge.md` and `notes.md` after the curator returns. Compare the
|
|
114
|
+
files with its manifest. Do not edit either file during manifest
|
|
115
|
+
verification. After verification, only the reduce-only budget edits in the
|
|
116
|
+
following steps are allowed.
|
|
117
|
+
9. Run `academy budget {{agent_name}} --json`. The reply is the shared response
|
|
118
|
+
envelope: `contract_version`, `ok`, `command`, then the report. Read
|
|
119
|
+
`withinBudget`, `surfaces`, and `violations` from the top level. The command
|
|
120
|
+
exits 0 for any answer it can compute, so read `ok` and `withinBudget`, never
|
|
121
|
+
the exit status. Record the per-surface baseline estimate, cap, overage, and
|
|
122
|
+
enforced/advisory verdict.
|
|
123
|
+
10. If no enforced surface is over cap, set Surface Budget status to `pass`.
|
|
124
|
+
11. If an enforced surface is over cap — `withinBudget` is `false`, or an entry
|
|
125
|
+
in `violations` has `enforced: true` — trim reduce-only surfaces and re-run
|
|
126
|
+
`academy budget {{agent_name}} --json`. The parent may reduce
|
|
127
|
+
`knowledge.md` and `notes.md` only to reduce size, may reduce
|
|
128
|
+
`priorities.md`, `threads.md`, and `dailys.md`, and must keep
|
|
129
|
+
`identity.md`, `role.md`, and `goals.md` as proposals only.
|
|
130
|
+
Repeat the trim and re-check cycle until every enforced surface passes or
|
|
131
|
+
further reduction is not possible without violating the edit boundary.
|
|
132
|
+
12. Set Surface Budget status to `pass` only when all enforced surfaces pass.
|
|
133
|
+
Status converging only when every still-blocking enforced surface has reduced its overage by at least 20% of that surface's baseline overage.
|
|
134
|
+
The 20% value is a minimum progress floor, not a maximum deletion limit.
|
|
135
|
+
Status failed when neither pass nor the 20% convergence floor can be reached. Converging and failed are explicitly not success.
|
|
136
|
+
Both recur on the next nightly run.
|
|
137
|
+
13. Write the dreams report, incorporating the curator manifest and Surface
|
|
138
|
+
Budget results. Always write the dreams report on pass, converging, and
|
|
139
|
+
failed, including curator failure.
|
|
140
|
+
14. End with a concise completion summary and include the dreams report path.
|
|
141
|
+
Name the Surface Budget status. Describe only `pass` as budget success;
|
|
142
|
+
describe `converging` or `failed` as an unmet budget.
|
|
143
|
+
|
|
144
|
+
## Curator Failure Handling
|
|
145
|
+
|
|
146
|
+
If the curator is unavailable, times out, fails, or does not return a valid
|
|
147
|
+
manifest:
|
|
148
|
+
|
|
149
|
+
- leave `knowledge.md` unchanged when the curator did not write it
|
|
150
|
+
- preserve all source notes
|
|
151
|
+
- do not apply the proposed edits yourself
|
|
152
|
+
- finish `dailys.md`, `threads.md`, `priorities.md`, and the dreams report
|
|
153
|
+
- set the dreams report's Knowledge Graduation status to `failed` and record
|
|
154
|
+
the exact reason under Verification
|
|
155
|
+
- run `academy budget {{agent_name}} --json` once, populate every
|
|
156
|
+
`## Surface Budget` row from the `surfaces` list in that envelope, and record
|
|
157
|
+
`pass` when `withinBudget` is `true` or `failed` otherwise
|
|
158
|
+
- mark budget trimming as skipped because the curator manifest was unavailable
|
|
159
|
+
|
|
160
|
+
If the curator partially changed a file before failing, report the detected
|
|
161
|
+
mismatch and preserve any source note whose destination was not verified. Do
|
|
162
|
+
not conceal the partial state with a parent-authored repair.
|
|
163
|
+
|
|
164
|
+
## Dreams Report Format
|
|
165
|
+
|
|
166
|
+
Create or replace `{{dreams_dir}}/MM-YY-DD.md`:
|
|
167
|
+
|
|
168
|
+
```markdown
|
|
169
|
+
# Dreams - MM-YY-DD
|
|
170
|
+
|
|
171
|
+
## Inputs
|
|
172
|
+
- Recent memory sources consulted:
|
|
173
|
+
- Important gaps or unavailable sources:
|
|
174
|
+
|
|
175
|
+
## Changes Made
|
|
176
|
+
- `dailys.md`:
|
|
177
|
+
- `threads.md`:
|
|
178
|
+
- `notes.md`:
|
|
179
|
+
- `priorities.md`:
|
|
180
|
+
|
|
181
|
+
## Knowledge Graduation
|
|
182
|
+
- Status: completed | skipped | failed
|
|
183
|
+
|
|
184
|
+
### Applied
|
|
185
|
+
- Decision: apply | consolidate | correct
|
|
186
|
+
- Candidate:
|
|
187
|
+
- Evidence:
|
|
188
|
+
- Knowledge section changed:
|
|
189
|
+
- Source notes retired:
|
|
190
|
+
|
|
191
|
+
### Deferred
|
|
192
|
+
- Candidate:
|
|
193
|
+
- Reason:
|
|
194
|
+
|
|
195
|
+
### Expired Notes
|
|
196
|
+
- Note:
|
|
197
|
+
- Reason:
|
|
198
|
+
|
|
199
|
+
### Verification
|
|
200
|
+
- `knowledge.md` re-read:
|
|
201
|
+
- `notes.md` re-read:
|
|
202
|
+
- Mismatches or partial failures:
|
|
203
|
+
|
|
204
|
+
## Proposed Changes
|
|
205
|
+
- `goals.md`:
|
|
206
|
+
- `role.md`:
|
|
207
|
+
- `identity.md`:
|
|
208
|
+
- `knowledge.md`: deferred candidates requiring human judgment only
|
|
209
|
+
- skills:
|
|
210
|
+
|
|
211
|
+
## Surface Budget
|
|
212
|
+
- Overall status: pass | converging | failed
|
|
213
|
+
- `identity.md`: baseline estimate, final estimate, cap, final overage, and enforced/advisory verdict
|
|
214
|
+
- `role.md`: baseline estimate, final estimate, cap, final overage, and enforced/advisory verdict
|
|
215
|
+
- `knowledge.md`: baseline estimate, final estimate, cap, final overage, and enforced/advisory verdict
|
|
216
|
+
- `goals.md`: baseline estimate, final estimate, cap, final overage, and enforced/advisory verdict
|
|
217
|
+
- `priorities.md`: baseline estimate, final estimate, cap, final overage, and enforced/advisory verdict
|
|
218
|
+
- `threads.md`: baseline estimate, final estimate, cap, final overage, and enforced/advisory verdict
|
|
219
|
+
- `notes.md`: baseline estimate, final estimate, cap, final overage, and enforced/advisory verdict
|
|
220
|
+
- `dailys.md`: baseline estimate, final estimate, cap, final overage, and enforced/advisory verdict
|
|
221
|
+
|
|
222
|
+
## Tomorrow
|
|
223
|
+
- Recommended first move:
|
|
224
|
+
- Watchouts:
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Use `None` where no changes or proposals were warranted. The dreams report is
|
|
228
|
+
for observability; it should be specific enough that the user can see why the
|
|
229
|
+
agent will behave differently tomorrow.
|
|
230
|
+
|
|
231
|
+
Advisory over-cap `identity.md`, `role.md`, and `goals.md` changes are
|
|
232
|
+
proposals under `## Proposed Changes`, never edits.
|
|
233
|
+
|
|
234
|
+
## Anti-Patterns
|
|
235
|
+
|
|
236
|
+
- Rewriting stable identity, role, or goals from one noisy day.
|
|
237
|
+
- Treating raw observations as permanent knowledge.
|
|
238
|
+
- Making priorities a duplicate task list.
|
|
239
|
+
- Letting `dailys.md` grow beyond 7 entries.
|
|
240
|
+
- Hiding skipped evidence or failed memory commands.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: self-update
|
|
3
|
+
description: Use when maintaining this Academy agent's own context files, routing new steering to the right surface, or deciding whether a durable self-edit is warranted.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Self-Update
|
|
7
|
+
|
|
8
|
+
This skill teaches {{agent_name}} how to maintain itself without treating every
|
|
9
|
+
observation as permanent truth. Use it to route new information to the right
|
|
10
|
+
surface, keep boot context tight, and explain self-edits back to the user.
|
|
11
|
+
|
|
12
|
+
## Agent Paths
|
|
13
|
+
|
|
14
|
+
These files are already loaded into the session context. Do not re-read them
|
|
15
|
+
just to discover what they are. Open or edit them when you need to verify exact
|
|
16
|
+
current text, make a change, or preserve surrounding context.
|
|
17
|
+
|
|
18
|
+
- Agent home: `{{agent_dir}}`
|
|
19
|
+
- `identity.md`: `{{identity_path}}`
|
|
20
|
+
- `role.md`: `{{role_path}}`
|
|
21
|
+
- `knowledge.md`: `{{knowledge_path}}`
|
|
22
|
+
- `goals.md`: `{{goals_path}}`
|
|
23
|
+
- `priorities.md`: `{{priorities_path}}`
|
|
24
|
+
- `threads.md`: `{{threads_path}}`
|
|
25
|
+
- `notes.md`: `{{notes_path}}`
|
|
26
|
+
- `dailys.md`: `{{dailys_path}}`
|
|
27
|
+
- `{{skills_surface}}`: `{{skills_dir}}`
|
|
28
|
+
- This skill: `{{self_update_path}}`
|
|
29
|
+
|
|
30
|
+
## When To Use
|
|
31
|
+
|
|
32
|
+
- The user gives durable steering: "remember this," "work this way," "update
|
|
33
|
+
your role," or "that is not what I meant."
|
|
34
|
+
- A session reveals a reusable domain pattern.
|
|
35
|
+
- A repeated workflow deserves a skill.
|
|
36
|
+
- Priorities, goals, or threads have changed.
|
|
37
|
+
- You notice stale, contradictory, or low-value context.
|
|
38
|
+
- During or after a check-in when the user agrees the agent should adjust.
|
|
39
|
+
|
|
40
|
+
## Core Rule
|
|
41
|
+
|
|
42
|
+
Default to `notes.md` first unless the user explicitly requested the durable
|
|
43
|
+
change. Autonomous graduation happens in the nightly knowledge-curator phase
|
|
44
|
+
when the note proves reusable, not merely because it is recent.
|
|
45
|
+
|
|
46
|
+
## Capturing To notes.md
|
|
47
|
+
|
|
48
|
+
Write transient steering with the CLI, not by hand-editing the file:
|
|
49
|
+
|
|
50
|
+
- Append: `academy notes add "User prefers short status updates before edits"`
|
|
51
|
+
- Review recent: `academy notes list` (last 12) or `academy notes list --last 20`
|
|
52
|
+
|
|
53
|
+
`add` is append-only and never reads the whole file, so it is the cheap, default
|
|
54
|
+
way to jot a note mid-task. Capture proactively — corrections, stakeholder
|
|
55
|
+
facts, caveats, gotchas, and raw learnings — the moment they appear, rather than
|
|
56
|
+
waiting for a check-in. Reserve manual `Edit` of `notes.md` for curation:
|
|
57
|
+
pruning stale bullets, or rewriting before graduating content elsewhere. Keep
|
|
58
|
+
the visible list within the ~8-12 cap; if it is overflowing, graduate or expire,
|
|
59
|
+
do not just keep appending.
|
|
60
|
+
|
|
61
|
+
## File Routing
|
|
62
|
+
|
|
63
|
+
- `identity.md`: rare. Mission, principles, voice, durable persona. Update only
|
|
64
|
+
when the agent's character or operating philosophy changes.
|
|
65
|
+
- `role.md`: responsibilities, autonomy, guardrails, deliverables, quality bar,
|
|
66
|
+
definition of done. Update when the job changes.
|
|
67
|
+
- `knowledge.md`: durable domain knowledge, mental models, frameworks,
|
|
68
|
+
heuristics, canonical references. Update when the agent learned something
|
|
69
|
+
reusable for future work.
|
|
70
|
+
- `goals.md`: strategic objectives. Update sparingly, usually with user
|
|
71
|
+
confirmation.
|
|
72
|
+
- `priorities.md`: current near-term direction. Update often enough to keep the
|
|
73
|
+
agent pointed at useful work.
|
|
74
|
+
- `threads.md`: active work pursuits and their state. Update when starting,
|
|
75
|
+
pausing, resuming, parking, or finishing work.
|
|
76
|
+
- `notes.md`: temporary steering, observations, corrections, raw learnings,
|
|
77
|
+
pending curation. Append with `academy notes add "..."` (see "Capturing To
|
|
78
|
+
notes.md"); hand-edit only to curate or graduate.
|
|
79
|
+
- `dailys.md`: concise session/day summaries. What happened, decisions,
|
|
80
|
+
blockers, next step.
|
|
81
|
+
- `{{skills_surface}}/`: repeatable procedures. Create or edit only when there is a
|
|
82
|
+
clear trigger, procedure, and output shape.
|
|
83
|
+
|
|
84
|
+
## Update Procedure
|
|
85
|
+
|
|
86
|
+
1. Identify the new information.
|
|
87
|
+
2. Decide whether it is transient, durable, procedural, or strategic.
|
|
88
|
+
3. Pick exactly one primary destination.
|
|
89
|
+
4. Make the smallest useful edit.
|
|
90
|
+
5. Preserve existing useful context; do not rewrite whole files casually.
|
|
91
|
+
6. If changing identity, role, goals, or skills, explain why.
|
|
92
|
+
7. Report what changed and what did not change.
|
|
93
|
+
|
|
94
|
+
## Graduation Rules
|
|
95
|
+
|
|
96
|
+
- `notes.md` -> `knowledge.md` through the nightly knowledge-curator when it
|
|
97
|
+
becomes a reusable pattern. Outside nightly consolidation, apply this route
|
|
98
|
+
only for an explicit user request; otherwise keep the note and propose it.
|
|
99
|
+
- `notes.md` -> `role.md` when it changes behavior or responsibility.
|
|
100
|
+
- `notes.md` -> `identity.md` only when it changes durable principles or voice.
|
|
101
|
+
- `knowledge.md` -> skill when "how to do this" becomes a repeatable procedure.
|
|
102
|
+
- Stale notes expire instead of accumulating.
|
|
103
|
+
|
|
104
|
+
## Consent And Autonomy
|
|
105
|
+
|
|
106
|
+
- You may autonomously update `threads.md`, `notes.md`, `dailys.md`, and usually
|
|
107
|
+
`priorities.md`.
|
|
108
|
+
- Outside nightly consolidation, change `knowledge.md` only for an explicit
|
|
109
|
+
user request and summarize the change. Otherwise stage or propose it for the
|
|
110
|
+
nightly knowledge-curator.
|
|
111
|
+
- Ask or clearly propose before changing `identity.md`, `role.md`, `goals.md`,
|
|
112
|
+
or creating/editing skills, unless the user explicitly requested it.
|
|
113
|
+
|
|
114
|
+
## Anti-Patterns
|
|
115
|
+
|
|
116
|
+
- Turning every user preference into identity.
|
|
117
|
+
- Dumping raw research into knowledge.
|
|
118
|
+
- Creating skills for one-off tasks.
|
|
119
|
+
- Letting `notes.md` become permanent storage.
|
|
120
|
+
- Rewriting boot files for style instead of substance.
|
|
121
|
+
- Hiding self-edits from the user.
|