@jaybeeuu/agent-cortex 1.20.0
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/.beads/README.md +81 -0
- package/.beads/config.yaml +1 -0
- package/.beads/issues.jsonl +236 -0
- package/.beads/metadata.json +7 -0
- package/.claude-plugin/marketplace.json +16 -0
- package/.github/workflows/ci.test.ts +217 -0
- package/.github/workflows/ci.yml +35 -0
- package/.github/workflows/publish.yml +36 -0
- package/.junie/guidelines.md +87 -0
- package/.junie/mcp/mcp.json +10 -0
- package/AGENTS.md +102 -0
- package/CHANGELOG.md +705 -0
- package/README.md +209 -0
- package/agents/README.md +235 -0
- package/agents/plan.agent.md +56 -0
- package/agents/ralph-plan.agent.md +119 -0
- package/agents/ralph.agent.md +305 -0
- package/agents/strategy.agent.md +109 -0
- package/agents-native/ralph.md +193 -0
- package/bin/agent-cortex.mjs +27 -0
- package/claude/.claude-plugin/plugin.json +11 -0
- package/claude/.mcp.json +18 -0
- package/claude/agents/plan.md +56 -0
- package/claude/agents/ralph-plan.md +119 -0
- package/claude/agents/ralph.md +193 -0
- package/claude/agents/strategy.md +109 -0
- package/claude/hooks.json +23 -0
- package/claude/scripts/statusline-command.sh +124 -0
- package/docs/ideas/auto-model-selection.md +75 -0
- package/docs/ideas/improve-pi-system-prompt.md +34 -0
- package/docs/ideas/model-selector.md +40 -0
- package/docs/ideas/pi-task-memory.md +34 -0
- package/docs/ideas/qa-extension.md +43 -0
- package/docs/inspirations.md +33 -0
- package/docs/research/gas-city-research.md +256 -0
- package/docs/research/skill-design-research.md +286 -0
- package/docs/research/skill-improvements-analysis.md +117 -0
- package/docs/research/skill-patterns-research.md +24 -0
- package/docs/skills/skill-anatomy.md +149 -0
- package/docs/user-preferences.md +17 -0
- package/extensions/agent-modes/index.ts +507 -0
- package/extensions/auto-name.ts +107 -0
- package/extensions/context-loader.md +35 -0
- package/extensions/context-loader.ts +65 -0
- package/extensions/lib/tiny-model.ts +212 -0
- package/extensions/notify/index.ts +293 -0
- package/extensions/session-start.ts +44 -0
- package/extensions/skill-stats/README.md +74 -0
- package/extensions/skill-stats/context-loader.test.ts +107 -0
- package/extensions/skill-stats/discover.ts +119 -0
- package/extensions/skill-stats/format.ts +13 -0
- package/extensions/skill-stats/index.test.ts +452 -0
- package/extensions/skill-stats/index.ts +222 -0
- package/extensions/skill-stats/package.json +19 -0
- package/extensions/skill-stats/pnpm-lock.yaml +329 -0
- package/extensions/skill-stats/record.ts +48 -0
- package/extensions/skill-stats/store.ts +104 -0
- package/extensions/skill-stats/tsconfig.json +12 -0
- package/extensions/subagent/README.md +175 -0
- package/extensions/subagent/agents/planner.md +37 -0
- package/extensions/subagent/agents/reviewer.md +35 -0
- package/extensions/subagent/agents/scout.md +50 -0
- package/extensions/subagent/agents/worker.md +24 -0
- package/extensions/subagent/agents.ts +126 -0
- package/extensions/subagent/index.ts +1138 -0
- package/extensions/subagent/prompts/implement-and-review.md +10 -0
- package/extensions/subagent/prompts/implement.md +10 -0
- package/extensions/subagent/prompts/scout-and-plan.md +9 -0
- package/hooks.json +10 -0
- package/lib/cli.mjs +37 -0
- package/package.json +39 -0
- package/pi/keybindings.json +3 -0
- package/pi/settings.json +29 -0
- package/plugin.json +35 -0
- package/pnpm-workspace.yaml +7 -0
- package/scripts/build-claude-agents.mjs +179 -0
- package/scripts/install-instructions.sh +82 -0
- package/skills/engineering/design-an-interface/SKILL.md +94 -0
- package/skills/engineering/grill-with-docs/SKILL.md +88 -0
- package/skills/engineering/improve-codebase-architecture/REFERENCE.md +78 -0
- package/skills/engineering/improve-codebase-architecture/SKILL.md +81 -0
- package/skills/engineering/tdd/SKILL.md +150 -0
- package/skills/engineering/tdd/deep-modules.md +33 -0
- package/skills/engineering/tdd/interface-design.md +31 -0
- package/skills/engineering/tdd/mocking.md +59 -0
- package/skills/engineering/tdd/refactoring.md +10 -0
- package/skills/engineering/tdd/tests.md +61 -0
- package/skills/engineering/technical-direction/SKILL.md +86 -0
- package/skills/planning/classify-bead/SKILL.md +67 -0
- package/skills/planning/create-task/SKILL.md +96 -0
- package/skills/planning/create-task/pipeline.json +33 -0
- package/skills/planning/create-task/scripts/create-chores.ts +112 -0
- package/skills/planning/create-task/scripts/package.json +14 -0
- package/skills/planning/create-task/scripts/pnpm-lock.yaml +342 -0
- package/skills/planning/create-task/scripts/tsconfig.json +12 -0
- package/skills/planning/create-task/templates/code.md +40 -0
- package/skills/planning/create-task/templates/document.md +40 -0
- package/skills/planning/create-task/templates/fix.md +27 -0
- package/skills/planning/create-task/templates/review.md +36 -0
- package/skills/planning/create-task/templates/verify.md +43 -0
- package/skills/planning/prd-to-tasks/SKILL.md +227 -0
- package/skills/planning/record-idea/SKILL.md +62 -0
- package/skills/planning/record-idea/scripts/new-idea.sh +89 -0
- package/skills/planning/request-refactor-plan/SKILL.md +73 -0
- package/skills/planning/write-a-prd/SKILL.md +74 -0
- package/skills/planning/write-a-ticket/SKILL.md +97 -0
- package/skills/productivity/bd-tool/SKILL.md +90 -0
- package/skills/productivity/grill-me/SKILL.md +10 -0
- package/skills/productivity/handoff/SKILL.md +15 -0
- package/skills/productivity/init-beads/SKILL.md +93 -0
- package/skills/productivity/teach/GLOSSARY-FORMAT.md +35 -0
- package/skills/productivity/teach/LEARNING-RECORD-FORMAT.md +46 -0
- package/skills/productivity/teach/MISSION-FORMAT.md +31 -0
- package/skills/productivity/teach/RESOURCES-FORMAT.md +32 -0
- package/skills/productivity/teach/SKILL.md +109 -0
- package/skills/productivity/validate-agent-dir/scripts/package.json +15 -0
- package/skills/productivity/validate-agent-dir/scripts/pnpm-lock.yaml +329 -0
- package/skills/productivity/validate-agent-dir/scripts/pnpm-workspace.yaml +2 -0
- package/skills/productivity/validate-agent-dir/scripts/tsconfig.json +19 -0
- package/skills/productivity/validate-agent-dir/scripts/validate-agent-dir.test.ts +317 -0
- package/skills/productivity/validate-agent-dir/scripts/validate-agent-dir.ts +127 -0
- package/skills/productivity/write-a-skill/SKILL.md +74 -0
- package/skills/review/maintain-agent-docs/REFERENCE.md +246 -0
- package/skills/review/maintain-agent-docs/SKILL.md +83 -0
- package/skills/review/refactor-skill/EXAMPLES.md +20 -0
- package/skills/review/refactor-skill/SKILL.md +148 -0
- package/skills/review/review-security/SKILL.md +107 -0
- package/skills/review/review-security/scripts/install-gitleaks.sh +43 -0
- package/skills/style/style-code/REFERENCE.md +38 -0
- package/skills/style/style-code/SKILL.md +113 -0
- package/skills/style/style-comms/SKILL.md +93 -0
- package/skills/style/style-documentation/SKILL.md +112 -0
- package/skills/style/style-tests/SKILL.md +97 -0
- package/skills/workflow/git-workflow/SKILL.md +85 -0
- package/skills/workflow/hitl-collab/SKILL.md +29 -0
- package/skills/workflow/plan/SKILL.md +272 -0
- package/skills/workflow/ralph/REFERENCE.md +202 -0
- package/skills/workflow/ralph/SKILL.md +105 -0
- package/skills/workflow/run-pipeline-stage/SKILL.md +151 -0
- package/skills/workflow/run-pipeline-stage/playbooks/code.md +17 -0
- package/skills/workflow/run-pipeline-stage/playbooks/document.md +18 -0
- package/skills/workflow/run-pipeline-stage/playbooks/fix.md +17 -0
- package/skills/workflow/run-pipeline-stage/playbooks/review.md +19 -0
- package/skills/workflow/run-pipeline-stage/playbooks/verify.md +14 -0
- package/skills/workflow/run-pipeline-stage/prompts/stage-runner.md +20 -0
- package/skills/workflow/run-pipeline-stage/scripts/generate-progress.test.ts +783 -0
- package/skills/workflow/run-pipeline-stage/scripts/generate-progress.ts +586 -0
- package/skills/workflow/run-pipeline-stage/scripts/package.json +15 -0
- package/skills/workflow/run-pipeline-stage/scripts/pnpm-lock.yaml +342 -0
- package/skills/workflow/run-pipeline-stage/scripts/pnpm-workspace.yaml +2 -0
- package/skills/workflow/run-pipeline-stage/scripts/tsconfig.json +12 -0
- package/skills/workflow/using-agent-skills/SKILL.md +109 -0
- package/skills/workflow/using-agent-skills/scripts/validate-skill-structure.test.ts +73 -0
- package/test/cli.test.mjs +149 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: write-a-ticket
|
|
3
|
+
description: Write a well-structured ticket for an external issue tracker (e.g. Jira). Use when writing tickets intended for a human engineering audience — not for creating implementation tasks in a ralph/bd loop.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Write a Ticket
|
|
7
|
+
|
|
8
|
+
Tickets are for skilled engineers. They should be able to pick one up, understand the context immediately, know where to start, and deliver the right outcome — without having to ask questions or wade through noise.
|
|
9
|
+
|
|
10
|
+
**Write for clarity, not coverage.** A ticket is not a specification. Prefer one well-chosen sentence over three that say the same thing.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Process
|
|
15
|
+
|
|
16
|
+
### 1. Gather context
|
|
17
|
+
|
|
18
|
+
Before drafting, confirm you have:
|
|
19
|
+
- The goal of the work
|
|
20
|
+
- Which epic, RFC, or initiative this belongs to (if any)
|
|
21
|
+
- Any known constraints or decisions already made
|
|
22
|
+
- Relevant code locations, schemas, or prior art
|
|
23
|
+
|
|
24
|
+
If anything is unclear, ask before writing.
|
|
25
|
+
|
|
26
|
+
### 2. Draft the ticket
|
|
27
|
+
|
|
28
|
+
Use the template below. Every section has a purpose — do not pad it, and do not omit a required section without good reason.
|
|
29
|
+
|
|
30
|
+
### 3. Review against the checklist
|
|
31
|
+
|
|
32
|
+
Before finalising, check:
|
|
33
|
+
- [ ] Could a skilled engineer start this immediately with no follow-up questions?
|
|
34
|
+
- [ ] Is every sentence earning its place? Remove anything that doesn't add information.
|
|
35
|
+
- [ ] Are acceptance criteria verifiable, not vague?
|
|
36
|
+
- [ ] Do technical notes point at the right things without over-prescribing the solution?
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Template
|
|
41
|
+
|
|
42
|
+
```markdown
|
|
43
|
+
## Context
|
|
44
|
+
|
|
45
|
+
<1–3 sentences. Set the scene: why does this work exist, what larger initiative is it part of?
|
|
46
|
+
Link to the relevant epic, RFC, ADR, or prior ticket — don't duplicate their content here.>
|
|
47
|
+
|
|
48
|
+
## Description
|
|
49
|
+
|
|
50
|
+
<What needs to be built or changed. Describe the outcome, not the implementation steps.
|
|
51
|
+
Be specific about scope — what is in and what is explicitly out.>
|
|
52
|
+
|
|
53
|
+
## Acceptance criteria
|
|
54
|
+
|
|
55
|
+
- [ ] <Specific, verifiable criterion>
|
|
56
|
+
- [ ] <Specific, verifiable criterion>
|
|
57
|
+
- [ ] <Specific, verifiable criterion>
|
|
58
|
+
|
|
59
|
+
## Technical notes
|
|
60
|
+
|
|
61
|
+
<Links to relevant code, suggested request/response/document schemas, architectural decisions,
|
|
62
|
+
or guidance the implementer should know. This is a pointer, not a design document —
|
|
63
|
+
if a decision needs more space, it belongs in an ADR or RFC.>
|
|
64
|
+
|
|
65
|
+
## Testing strategy
|
|
66
|
+
|
|
67
|
+
<Optional. Agreed testing levels for this change: e.g. unit, integration, contract, E2E.
|
|
68
|
+
Only include if there is something non-obvious to say.>
|
|
69
|
+
|
|
70
|
+
## Monitoring strategy
|
|
71
|
+
|
|
72
|
+
<Optional. How will this change be observed in production? e.g. new metrics, alerts, log events,
|
|
73
|
+
dashboards, or feature flag rollout stages. Only include if the change has non-obvious observability
|
|
74
|
+
requirements or a specific rollout approach was agreed.>
|
|
75
|
+
|
|
76
|
+
## Notes
|
|
77
|
+
|
|
78
|
+
<Optional. Anything else that is genuinely useful and doesn't fit above.>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Guidance per section
|
|
84
|
+
|
|
85
|
+
**Context** — one job: explain *why*. A reader should understand the motivation without opening another tab. Link freely; copy-paste never.
|
|
86
|
+
|
|
87
|
+
**Description** — describes *what*, not *how*. Avoid implementation steps. If scope boundaries matter, state them explicitly ("this ticket does not include X").
|
|
88
|
+
|
|
89
|
+
**Acceptance criteria** — must be independently verifiable. Avoid "works correctly" or "is tested". Prefer "given X, the API returns Y" or "the migration runs without errors on staging".
|
|
90
|
+
|
|
91
|
+
**Technical notes** — share what the implementer needs to know, not everything you know. Good candidates: a tricky code location, a schema that has already been agreed, a constraint from an upstream system. Bad candidates: a tutorial on the technology, decisions that haven't been made yet.
|
|
92
|
+
|
|
93
|
+
**Testing strategy** — omit if the team's default testing conventions apply. Include only when this ticket has unusual testing requirements or a specific agreement was reached.
|
|
94
|
+
|
|
95
|
+
**Monitoring strategy** — omit if the change has no meaningful observability footprint. Include when the ticket introduces new metrics, requires new alerts, involves a phased rollout, or has an agreed approach to validating success in production.
|
|
96
|
+
|
|
97
|
+
**Notes** — a catch-all for genuinely relevant information that has no other home. If you're reaching for it often, the ticket probably needs restructuring.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bd-tool
|
|
3
|
+
description: Load project context and task state using the beads (bd) task tracker. Use when asked to work on a bead, pick up a task, or check what is available — or when the user mentions "beads", "bd", "bead", or "prime".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# bd-tool
|
|
7
|
+
|
|
8
|
+
This project uses **bd (beads)** for task tracking. This doc covers how we use it.
|
|
9
|
+
|
|
10
|
+
## First thing: `bd prime`
|
|
11
|
+
|
|
12
|
+
Always run this at the start of a session — it loads project context, conventions, and open tasks.
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
bd prime
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Hold the full output for your own context. Subagents can run `bd prime` themselves if they need project context.
|
|
19
|
+
|
|
20
|
+
## Finding and claiming work
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
bd ready # list unblocked tasks
|
|
24
|
+
bd show <id> # view full description, labels, dependencies
|
|
25
|
+
bd update <id> --claim
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Labels
|
|
29
|
+
|
|
30
|
+
We use labels to track state. Key patterns:
|
|
31
|
+
|
|
32
|
+
| Label | Purpose | Example |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| `stage:<id>` | Pipeline stage for chore beads | `stage:code`, `stage:verify` |
|
|
35
|
+
| `implementation-type:<type>` | Who works it | `afk`, `hitl` |
|
|
36
|
+
| `lifecycle:<phase>` | Lifecycle gate | `feature-pr` |
|
|
37
|
+
| `epic:<id>` | Parent epic link | `epic:abc-123` |
|
|
38
|
+
| `priority:<level>` | Priority (0-3) | `priority:1` |
|
|
39
|
+
|
|
40
|
+
## Creating work
|
|
41
|
+
|
|
42
|
+
For new tasks with pipeline expansion:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# use the create-task skill, or manually:
|
|
46
|
+
bd create "<title>" -d "<description>" -p <0-3>
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
For parent-child relationships (create with `--parent`):
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
bd create "<title>" --parent <parent-id>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
For blocking dependencies between beads:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
bd dep add <id> <blocked-by-id> --type blocks
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Completing work
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
bd close <id> --reason="Description of what was done"
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Always add a reason (e.g. PR link).
|
|
68
|
+
|
|
69
|
+
## Syncing
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
bd dolt push
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Optional — beads work locally. Sync at session end when it's convenient.
|
|
76
|
+
|
|
77
|
+
## Key conventions
|
|
78
|
+
|
|
79
|
+
- **Priority**: 0 = critical, 1 = high, 2 = medium, 3 = low, 4 = backlog. Aliased as P0-P4.
|
|
80
|
+
- **HITL beads**: require human action — do not claim or implement them. Inform the user.
|
|
81
|
+
- **Chore beads** (`--type chore`): auto-created pipeline stages. Do not create them manually — use `create-task`. Not ephemeral — they must stay visible to plain `bd ready` for ralph to discover them.
|
|
82
|
+
|
|
83
|
+
## Cross-skill references
|
|
84
|
+
|
|
85
|
+
| When you need… | Use this skill |
|
|
86
|
+
|---|---|
|
|
87
|
+
| Creating a new task with pipeline expansion | `create-task` |
|
|
88
|
+
| Executing a single pipeline stage | `run-pipeline-stage` |
|
|
89
|
+
| Running the full end-to-end pipeline | `ralph` |
|
|
90
|
+
| Classifying a bead's implementation type | `classify-bead` |
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grill-me
|
|
3
|
+
description: Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
|
|
7
|
+
|
|
8
|
+
Ask the questions one at a time.
|
|
9
|
+
|
|
10
|
+
If a question can be answered by exploring the codebase, explore the codebase instead.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: handoff
|
|
3
|
+
description: Compact the current conversation into a handoff document for another agent to pick up.
|
|
4
|
+
argument-hint: "What will the next session be used for?"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save to the temporary directory of the user's OS - not the current workspace.
|
|
8
|
+
|
|
9
|
+
Include a "suggested skills" section in the document, which suggests skills that the agent should invoke.
|
|
10
|
+
|
|
11
|
+
Do not duplicate content already captured in other artifacts (PRDs, plans, ADRs, issues, commits, diffs). Reference them by path or URL instead.
|
|
12
|
+
|
|
13
|
+
Redact any sensitive information, such as API keys, passwords, or personally identifiable information.
|
|
14
|
+
|
|
15
|
+
If the user passed arguments, treat them as a description of what the next session will focus on and tailor the doc accordingly.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: init-beads
|
|
3
|
+
description: Install and initialise the beads (bd) task-tracker in the current project using stealth mode. Use when the user wants to set up beads, install bd, initialise beads, or mentions "bd init".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Init Beads
|
|
7
|
+
|
|
8
|
+
Install and initialise the `bd` CLI task tracker in the current project. Prefer stealth mode — minimise commits to the main repo and questions to the user.
|
|
9
|
+
|
|
10
|
+
## Quick start
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# Install bd if missing
|
|
14
|
+
brew install beads # macOS/Linux (preferred)
|
|
15
|
+
npm install -g @beads/bd # fallback
|
|
16
|
+
|
|
17
|
+
# Initialise in the project (stealth)
|
|
18
|
+
bd init --quiet --stealth
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Workflow
|
|
22
|
+
|
|
23
|
+
### 1. Check if `bd` is installed
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
which bd || bd version
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
If missing, install silently:
|
|
30
|
+
|
|
31
|
+
| Platform | Command |
|
|
32
|
+
|----------|---------|
|
|
33
|
+
| macOS / Linux (Homebrew) | `brew install beads` |
|
|
34
|
+
| npm available | `npm install -g @beads/bd` |
|
|
35
|
+
| Go available | `go install github.com/steveyegge/beads/cmd/bd@latest` |
|
|
36
|
+
| Any (script) | `curl -fsSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh \| bash` |
|
|
37
|
+
|
|
38
|
+
Prefer Homebrew → npm → script. Do NOT ask the user which method to use — detect and decide.
|
|
39
|
+
|
|
40
|
+
### 2. Check if beads is already initialised
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
bd version 2>/dev/null && ls .beads/ 2>/dev/null
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
If `.beads/` already exists, skip `bd init` and tell the user.
|
|
47
|
+
|
|
48
|
+
### 3. Initialise beads
|
|
49
|
+
|
|
50
|
+
Always use `--quiet --stealth`:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
bd init --quiet --stealth
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`--stealth` keeps everything local — no git hooks, no commits to the main repo.
|
|
57
|
+
`--quiet` suppresses the interactive wizard.
|
|
58
|
+
|
|
59
|
+
### 4. Update AGENTS.md
|
|
60
|
+
|
|
61
|
+
If `AGENTS.md` exists, append the beads quick-reference block if it isn't already there.
|
|
62
|
+
If it doesn't exist, create it.
|
|
63
|
+
|
|
64
|
+
```markdown
|
|
65
|
+
## Task tracking
|
|
66
|
+
|
|
67
|
+
This project uses **bd (beads)** for task tracking.
|
|
68
|
+
|
|
69
|
+
Run `bd prime` at the start of each session for context.
|
|
70
|
+
|
|
71
|
+
Quick reference:
|
|
72
|
+
- `bd ready` — list unblocked work
|
|
73
|
+
- `bd create "Title" -p <0-3>` — create a task (P0 = critical)
|
|
74
|
+
- `bd update <id> --claim` — claim a task
|
|
75
|
+
- `bd close <id>` — complete a task
|
|
76
|
+
- `bd dolt push` — sync to remote at session end
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### 5. Report
|
|
80
|
+
|
|
81
|
+
Print a brief summary:
|
|
82
|
+
- Whether `bd` was installed or already present
|
|
83
|
+
- Whether beads was initialised or already set up
|
|
84
|
+
- Whether AGENTS.md was created or updated
|
|
85
|
+
|
|
86
|
+
Do NOT ask the user to confirm before any of these steps. Just do it.
|
|
87
|
+
|
|
88
|
+
## Stealth mode rules
|
|
89
|
+
|
|
90
|
+
- Always pass `--stealth` and `--quiet` to `bd init`
|
|
91
|
+
- Never install git hooks unless the user explicitly asks
|
|
92
|
+
- Never commit `.beads/` to the repo (it's local-only in stealth mode)
|
|
93
|
+
- Prefer non-interactive install methods at every step
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# GLOSSARY.md Format
|
|
2
|
+
|
|
3
|
+
`GLOSSARY.md` is the canonical language for this teaching workspace. All explainers, exercises, and learning records should adhere to its terminology. Building it is itself part of learning: compressing a concept into a tight definition is evidence the user understands it.
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
```md
|
|
8
|
+
# {Topic} Glossary
|
|
9
|
+
|
|
10
|
+
{One or two sentence description of the topic this glossary covers.}
|
|
11
|
+
|
|
12
|
+
## Terms
|
|
13
|
+
|
|
14
|
+
**Hypertrophy**:
|
|
15
|
+
Muscle growth driven by mechanical tension and metabolic stress over repeated training sessions.
|
|
16
|
+
_Avoid_: Bulking, getting big
|
|
17
|
+
|
|
18
|
+
**Progressive overload**:
|
|
19
|
+
Systematically increasing the demand on a muscle over time — via load, volume, or intensity.
|
|
20
|
+
_Avoid_: Pushing harder, levelling up
|
|
21
|
+
|
|
22
|
+
**RPE (Rate of Perceived Exertion)**:
|
|
23
|
+
A 1–10 self-rating of how hard a set felt, where 10 is failure and 8 means two reps left in the tank.
|
|
24
|
+
_Avoid_: Effort score, intensity rating
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Rules
|
|
28
|
+
|
|
29
|
+
- **Add a term only when the user understands it.** The glossary is a record of compressed knowledge, not a dictionary the user reads to learn. If the user has just been introduced to a concept, wait until they can use it correctly before promoting it here.
|
|
30
|
+
- **Be opinionated.** When several words exist for the same concept, pick the best one and list the rest as aliases to avoid. This is how language compresses.
|
|
31
|
+
- **Keep definitions tight.** One or two sentences. Define what the term IS, not what it does or how to do it.
|
|
32
|
+
- **Use the glossary's own terms inside definitions.** Once a term is in the glossary, prefer it everywhere — including inside other definitions. This is what makes complex terms easier to grasp later.
|
|
33
|
+
- **Group under subheadings** when natural clusters emerge (e.g. `## Anatomy`, `## Programming`). A flat list is fine when terms cohere.
|
|
34
|
+
- **Flag ambiguities explicitly.** If a term is used loosely in the wider field, note the resolution: "In this workspace, 'set' always means a working set — warm-ups are tracked separately."
|
|
35
|
+
- **Revise as understanding deepens.** A definition the user wrote in week one may be wrong by week six. Update in place; do not leave stale entries.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Learning Record Format
|
|
2
|
+
|
|
3
|
+
Learning records live in `./learning-records/` and use sequential numbering: `0001-slug.md`, `0002-slug.md`, etc. Create the directory lazily — only when the first record is written.
|
|
4
|
+
|
|
5
|
+
They are the teaching equivalent of ADRs: they capture non-obvious lessons, key insights, and stated prior knowledge that will steer future sessions. They are used to calculate the zone of proximal development.
|
|
6
|
+
|
|
7
|
+
## Template
|
|
8
|
+
|
|
9
|
+
```md
|
|
10
|
+
# {Short title of what was learned or established}
|
|
11
|
+
|
|
12
|
+
{1-3 sentences: what was learned (or what prior knowledge was established), and why it matters for future sessions.}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
That is the whole format. A learning record can be a single paragraph. The value is recording _that_ this is now known and _why_ it changes what to teach next — not in filling out sections.
|
|
16
|
+
|
|
17
|
+
## Optional sections
|
|
18
|
+
|
|
19
|
+
Only include these when they add genuine value. Most records won't need them.
|
|
20
|
+
|
|
21
|
+
- **Status** frontmatter (`active | superseded by LR-NNNN`) — useful when an earlier understanding turns out to be wrong and is replaced.
|
|
22
|
+
- **Evidence** — how the user demonstrated the understanding (a question answered, an exercise completed, prior experience cited). Useful when the claim might be revisited.
|
|
23
|
+
- **Implications** — what this unlocks or rules out for future sessions. Worth recording when non-obvious.
|
|
24
|
+
|
|
25
|
+
## Numbering
|
|
26
|
+
|
|
27
|
+
Scan `./learning-records/` for the highest existing number and increment by one.
|
|
28
|
+
|
|
29
|
+
## When to write a learning record
|
|
30
|
+
|
|
31
|
+
Write one when any of these is true:
|
|
32
|
+
|
|
33
|
+
1. **The user demonstrated genuine understanding of something non-trivial** — not just exposure, but evidence they can use the concept correctly. This sets a new floor for what to teach next.
|
|
34
|
+
2. **The user disclosed prior knowledge** — "I already know X." Record it so future sessions don't re-teach it. Also record the _depth_ claimed.
|
|
35
|
+
3. **A misconception was corrected** — the user previously believed something wrong and now sees why. These are high-value: they predict future stumbling blocks for related topics.
|
|
36
|
+
4. **The mission shifted in response to learning** — the user discovered they cared about something different than they thought. Cross-link to [[MISSION.md]] and update it.
|
|
37
|
+
|
|
38
|
+
### What does _not_ qualify
|
|
39
|
+
|
|
40
|
+
- Material that was merely covered. Coverage is not learning. Wait for evidence.
|
|
41
|
+
- Anything already captured tersely in [[GLOSSARY.md]] as a term definition. Don't duplicate.
|
|
42
|
+
- Session-by-session activity logs. Learning records are not a journal — they are decision-grade insights.
|
|
43
|
+
|
|
44
|
+
## Supersession
|
|
45
|
+
|
|
46
|
+
When a later record contradicts an earlier one (the user's understanding deepened or corrected), mark the old record `Status: superseded by LR-NNNN` rather than deleting it. The history of how understanding evolved is itself useful signal.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# MISSION.md Format
|
|
2
|
+
|
|
3
|
+
`MISSION.md` lives at the workspace root. It captures the _reason_ the user is learning this topic. Every teaching decision — what to teach next, which resources to surface, which exercises to design — should trace back to this document.
|
|
4
|
+
|
|
5
|
+
## Template
|
|
6
|
+
|
|
7
|
+
```md
|
|
8
|
+
# Mission: {Topic}
|
|
9
|
+
|
|
10
|
+
## Why
|
|
11
|
+
{1-3 sentences. The concrete real-world goal the user is chasing. What changes in their life or work when they have this skill? Avoid abstract framings like "to understand X" — push for the underlying outcome.}
|
|
12
|
+
|
|
13
|
+
## Success looks like
|
|
14
|
+
- {A specific, observable thing the user will be able to do}
|
|
15
|
+
- {Another specific thing}
|
|
16
|
+
- {…}
|
|
17
|
+
|
|
18
|
+
## Constraints
|
|
19
|
+
- {Time, budget, prior commitments, learning preferences, anything that bounds the approach}
|
|
20
|
+
|
|
21
|
+
## Out of scope
|
|
22
|
+
- {Adjacent topics the user explicitly does not want to chase right now — protects the zone of proximal development}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **One mission per workspace.** If the user wants to learn two unrelated things, that is two workspaces.
|
|
28
|
+
- **Concrete over abstract.** "Run a half marathon by October" beats "get fitter." "Ship a Rust CLI to my team" beats "learn Rust."
|
|
29
|
+
- **Push back on vagueness.** If the user cannot articulate why, interview them before writing anything. A bad mission is worse than no mission.
|
|
30
|
+
- **Revise when reality shifts.** Missions change. When the user's goal moves, update this file — don't leave a stale mission steering future sessions.
|
|
31
|
+
- **Keep it short.** If `MISSION.md` runs past a screen, it has stopped being a compass and started being a plan.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# RESOURCES.md Format
|
|
2
|
+
|
|
3
|
+
`RESOURCES.md` is the curated set of trusted sources for this topic. Knowledge for explainers should be drawn from here, not from parametric guesses. Wisdom comes from the communities listed here.
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
```md
|
|
8
|
+
# {Topic} Resources
|
|
9
|
+
|
|
10
|
+
## Knowledge
|
|
11
|
+
|
|
12
|
+
- [Book: _The Science and Practice of Strength Training_ — Zatsiorsky & Kraemer](https://example.com)
|
|
13
|
+
Foundational text on programming and adaptation. Use for: anything to do with periodisation, recovery, intensity zones.
|
|
14
|
+
- [Article: "How Much Should I Train?" — Greg Nuckols (Stronger By Science)](https://example.com)
|
|
15
|
+
Evidence-based review of volume landmarks. Use for: weekly set targets per muscle group.
|
|
16
|
+
|
|
17
|
+
## Wisdom (Communities)
|
|
18
|
+
|
|
19
|
+
- [r/weightroom](https://reddit.com/r/weightroom)
|
|
20
|
+
High-signal subreddit, moderated against bro-science. Use for: programme critique, plateau troubleshooting.
|
|
21
|
+
- Local: Tuesday strength class at {gym name}
|
|
22
|
+
Use for: real-time coaching feedback on lifts.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **High-trust only.** Prefer primary sources, recognised experts, peer-reviewed work, and communities with strong moderation. If a resource is marketing dressed as education, leave it out.
|
|
28
|
+
- **Annotate every entry.** A bare link is useless in three months. Add one line: what it covers and when to reach for it.
|
|
29
|
+
- **Group by Knowledge / Wisdom.** Mirrors the philosophy in [SKILL.md](./SKILL.md). It is fine for a resource to appear in only one group.
|
|
30
|
+
- **Surface gaps explicitly.** If no good resource exists for an area the mission needs, write a `## Gaps` section listing what is missing. This drives future search.
|
|
31
|
+
- **Prune ruthlessly.** A resource that turned out to be wrong, shallow, or off-mission should be removed, not buried. Better five sharp sources than thirty mediocre ones.
|
|
32
|
+
- **Record community preferences.** If the user has opted out of joining communities, note it here so future sessions don't keep proposing them.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: teach
|
|
3
|
+
description: Teach the user a new skill or concept, within this workspace.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
argument-hint: "What would you like to learn about?"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
The user has asked you to teach them something. This is a stateful request - they intend to learn the topic over multiple sessions.
|
|
9
|
+
|
|
10
|
+
## Teaching Workspace
|
|
11
|
+
|
|
12
|
+
Treat the current directory as a teaching workspace. The state of their learning is captured in this directory in several files:
|
|
13
|
+
|
|
14
|
+
- `MISSION.md`: A document capturing the _reason_ the user is interested in the topic. This should be used to ground all teaching. Use the format in [MISSION-FORMAT.md](./MISSION-FORMAT.md).
|
|
15
|
+
- `./reference/*.html`: A directory of reference materials. These are the compressed learnings from the lessons - cheat sheets, reference algorithms, syntax, yoga poses, glossaries. They are the raw units of learning. They should be beautiful documents which print out well, and are designed for quick reference.
|
|
16
|
+
- `RESOURCES.md`: A list of resources which can be explored to ground your teaching in contextual knowledge, or to acquire knowledge and wisdom. Use the format in [RESOURCES-FORMAT.md](./RESOURCES-FORMAT.md).
|
|
17
|
+
- `./learning-records/*.md`: A directory of learning records, which capture what the user has learned. These are loosely equivalent to architectural decision records in software development - they capture non-obvious lessons and key insights that may need to be revised later, or drive future sessions. These should be used to calculate the zone of proximal development. They are titled `0001-<dash-case-name>.md`, where the number increments each time. Use the format in [LEARNING-RECORD-FORMAT.md](./LEARNING-RECORD-FORMAT.md).
|
|
18
|
+
- `./lessons/*.html`: A directory of lessons. A **lesson** is a single, self-contained HTML output that teaches one tightly-scoped thing tied to the mission. This is the primary unit of teaching in this workspace.
|
|
19
|
+
- `NOTES.md`: A scratchpad for you to jot down user preferences, or working notes.
|
|
20
|
+
|
|
21
|
+
## Philosophy
|
|
22
|
+
|
|
23
|
+
To learn at a deep level, the user needs three things:
|
|
24
|
+
|
|
25
|
+
- **Knowledge**, captured from high-quality, high-trust resources
|
|
26
|
+
- **Skills**, acquired through highly-relevant interactive lessons devised by you, based on the knowledge
|
|
27
|
+
- **Wisdom**, which comes from interacting with other learners and practitioners
|
|
28
|
+
|
|
29
|
+
Before the `RESOURCES.md` is well-populated, your focus should be to find high-quality resources which will help the user acquire knowledge. Never trust your parametric knowledge.
|
|
30
|
+
|
|
31
|
+
Some topics may require more skills than knowledge. Learning more about theoretical physics might be more knowledge-based. For yoga, more skills-based.
|
|
32
|
+
|
|
33
|
+
## Lessons
|
|
34
|
+
|
|
35
|
+
A lesson is the main thing you produce — the unit in which knowledge and skills reach the user. Each lesson is one self-contained HTML file, saved to `./lessons/` and titled `0001-<dash-case-name>.html` where the number increments each time.
|
|
36
|
+
|
|
37
|
+
A lesson should be **beautiful** — clean, readable typography and layout — since the user will return to these later to review.
|
|
38
|
+
|
|
39
|
+
The lesson should teach ONE THING only. It should be completable very quickly - but give the user a tangible win that they can build on. It should be directly tied to the mission, and should be in the user's zone of proximal development.
|
|
40
|
+
|
|
41
|
+
Make opening a lesson as easy as possible — ideally a single CLI command the user can run to open the HTML file in their browser.
|
|
42
|
+
|
|
43
|
+
## The Mission
|
|
44
|
+
|
|
45
|
+
Every lesson should be tied into the mission - the reason that the user is interested in learning about the topic.
|
|
46
|
+
|
|
47
|
+
If the user is unclear about the mission, or the `MISSION.md` is not populated, your first job should be to question the user on why they want to learn this.
|
|
48
|
+
|
|
49
|
+
Failing to understand the mission will mean knowledge acquisition is not grounded in real-world goals. Lessons will feel too abstract. You will have no way of judging what the user should do next.
|
|
50
|
+
|
|
51
|
+
## Zone Of Proximal Development
|
|
52
|
+
|
|
53
|
+
Each lesson, the learner should always feel as if they are being challenged 'just enough'.
|
|
54
|
+
|
|
55
|
+
The user may specify an exact thing they want to learn. If they don't, figure out their zone of proximal development by:
|
|
56
|
+
|
|
57
|
+
- Reading their `learning-records`
|
|
58
|
+
- Figuring out the right thing to teach them based on their mission
|
|
59
|
+
- Teach the most relevant thing that fits in their zone of proximal development
|
|
60
|
+
|
|
61
|
+
A user may tell you that they already know about that topic. If so, record it in their `learning-records`.
|
|
62
|
+
|
|
63
|
+
## Acquiring Knowledge & Skills
|
|
64
|
+
|
|
65
|
+
Lessons should be designed around a skill the user is going to learn. The knowledge in the lesson should be only what's required to acquire that skill. You teach the knowledge first, then get the user to practice the skills via an interactive feedback loop.
|
|
66
|
+
|
|
67
|
+
Knowledge should first be gathered from trusted resources. Use `RESOURCES.md` to keep track of them. Lessons should be littered with citations - links to external resources to back up any claim made. This increases the trustworthiness of the lesson, and gives the user a path to acquire more knowledge if they want to go deeper.
|
|
68
|
+
|
|
69
|
+
Each lesson should contain a reminder to ask followup questions to the agent. The agent is their teacher, and can assist with anything that's unclear.
|
|
70
|
+
|
|
71
|
+
### Skills
|
|
72
|
+
|
|
73
|
+
Skills should be taught through interactive lessons. There are several tools at your disposal:
|
|
74
|
+
|
|
75
|
+
- Interactive lessons, using quizzes and light in-browser tasks
|
|
76
|
+
- Lessons which guide the user through a list of real-world steps to take (for instance, yoga poses)
|
|
77
|
+
- In-agent quizzes, where you ask the user scenario-based questions about what they've learned
|
|
78
|
+
|
|
79
|
+
Each of these should be based on a **feedback loop**, where the user receives feedback on their performance. This feedback loop should be as tight as possible, giving feedback immediately - and ideally automatically.
|
|
80
|
+
|
|
81
|
+
## Acquiring Wisdom
|
|
82
|
+
|
|
83
|
+
Wisdom comes from true real-world interaction - testing your skills outside the learning environment.
|
|
84
|
+
|
|
85
|
+
When the user asks a question that appears to require wisdom, your default posture should be to attempt to answer - but to ultimately delegate to a **community**.
|
|
86
|
+
|
|
87
|
+
A community is a place (online or offline) where the user can test their skills in the real world. This might be a forum, a subreddit, a real-world class (budget permitting) or a local interest group.
|
|
88
|
+
|
|
89
|
+
You should attempt to find high-reputation communities the user can join. If the user expresses a preference that they don't want to join a community, respect it.
|
|
90
|
+
|
|
91
|
+
## Reference Documents
|
|
92
|
+
|
|
93
|
+
While creating lessons, you should also create reference documents. Lessons can reference these documents - they are useful for tracking raw units of knowledge useful across lessons.
|
|
94
|
+
|
|
95
|
+
Lessons will rarely be revisited later - reference documents will be. They should be the compressed essence of the lesson, in a format designed for quick reference.
|
|
96
|
+
|
|
97
|
+
Some learning topics lend themselves to reference:
|
|
98
|
+
|
|
99
|
+
- Syntax and code snippets for programming
|
|
100
|
+
- Algorithms and flowcharts for processes
|
|
101
|
+
- Yoga poses and sequences for yoga
|
|
102
|
+
- Exercises and routines for fitness
|
|
103
|
+
- Glossaries for any topic with its own nomenclature
|
|
104
|
+
|
|
105
|
+
Glossaries, in particular, are an essential reference. Once one is created, it should be adhered to in every lesson.
|
|
106
|
+
|
|
107
|
+
## `NOTES.md`
|
|
108
|
+
|
|
109
|
+
The user will sometimes express preferences of how they want to be taught, or things you should keep in mind. This is the place to record those preferences, so you can refer back to them when designing lessons or working with the user.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agent-cortex/validate-agent-dir",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "node --test --import tsx/esm validate-agent-dir.test.ts",
|
|
8
|
+
"typecheck": "tsc --noEmit"
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"@types/node": "^22.20.1",
|
|
12
|
+
"tsx": "^4.23.0",
|
|
13
|
+
"typescript": "^5.0.0"
|
|
14
|
+
}
|
|
15
|
+
}
|