@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.
Files changed (154) hide show
  1. package/.beads/README.md +81 -0
  2. package/.beads/config.yaml +1 -0
  3. package/.beads/issues.jsonl +236 -0
  4. package/.beads/metadata.json +7 -0
  5. package/.claude-plugin/marketplace.json +16 -0
  6. package/.github/workflows/ci.test.ts +217 -0
  7. package/.github/workflows/ci.yml +35 -0
  8. package/.github/workflows/publish.yml +36 -0
  9. package/.junie/guidelines.md +87 -0
  10. package/.junie/mcp/mcp.json +10 -0
  11. package/AGENTS.md +102 -0
  12. package/CHANGELOG.md +705 -0
  13. package/README.md +209 -0
  14. package/agents/README.md +235 -0
  15. package/agents/plan.agent.md +56 -0
  16. package/agents/ralph-plan.agent.md +119 -0
  17. package/agents/ralph.agent.md +305 -0
  18. package/agents/strategy.agent.md +109 -0
  19. package/agents-native/ralph.md +193 -0
  20. package/bin/agent-cortex.mjs +27 -0
  21. package/claude/.claude-plugin/plugin.json +11 -0
  22. package/claude/.mcp.json +18 -0
  23. package/claude/agents/plan.md +56 -0
  24. package/claude/agents/ralph-plan.md +119 -0
  25. package/claude/agents/ralph.md +193 -0
  26. package/claude/agents/strategy.md +109 -0
  27. package/claude/hooks.json +23 -0
  28. package/claude/scripts/statusline-command.sh +124 -0
  29. package/docs/ideas/auto-model-selection.md +75 -0
  30. package/docs/ideas/improve-pi-system-prompt.md +34 -0
  31. package/docs/ideas/model-selector.md +40 -0
  32. package/docs/ideas/pi-task-memory.md +34 -0
  33. package/docs/ideas/qa-extension.md +43 -0
  34. package/docs/inspirations.md +33 -0
  35. package/docs/research/gas-city-research.md +256 -0
  36. package/docs/research/skill-design-research.md +286 -0
  37. package/docs/research/skill-improvements-analysis.md +117 -0
  38. package/docs/research/skill-patterns-research.md +24 -0
  39. package/docs/skills/skill-anatomy.md +149 -0
  40. package/docs/user-preferences.md +17 -0
  41. package/extensions/agent-modes/index.ts +507 -0
  42. package/extensions/auto-name.ts +107 -0
  43. package/extensions/context-loader.md +35 -0
  44. package/extensions/context-loader.ts +65 -0
  45. package/extensions/lib/tiny-model.ts +212 -0
  46. package/extensions/notify/index.ts +293 -0
  47. package/extensions/session-start.ts +44 -0
  48. package/extensions/skill-stats/README.md +74 -0
  49. package/extensions/skill-stats/context-loader.test.ts +107 -0
  50. package/extensions/skill-stats/discover.ts +119 -0
  51. package/extensions/skill-stats/format.ts +13 -0
  52. package/extensions/skill-stats/index.test.ts +452 -0
  53. package/extensions/skill-stats/index.ts +222 -0
  54. package/extensions/skill-stats/package.json +19 -0
  55. package/extensions/skill-stats/pnpm-lock.yaml +329 -0
  56. package/extensions/skill-stats/record.ts +48 -0
  57. package/extensions/skill-stats/store.ts +104 -0
  58. package/extensions/skill-stats/tsconfig.json +12 -0
  59. package/extensions/subagent/README.md +175 -0
  60. package/extensions/subagent/agents/planner.md +37 -0
  61. package/extensions/subagent/agents/reviewer.md +35 -0
  62. package/extensions/subagent/agents/scout.md +50 -0
  63. package/extensions/subagent/agents/worker.md +24 -0
  64. package/extensions/subagent/agents.ts +126 -0
  65. package/extensions/subagent/index.ts +1138 -0
  66. package/extensions/subagent/prompts/implement-and-review.md +10 -0
  67. package/extensions/subagent/prompts/implement.md +10 -0
  68. package/extensions/subagent/prompts/scout-and-plan.md +9 -0
  69. package/hooks.json +10 -0
  70. package/lib/cli.mjs +37 -0
  71. package/package.json +39 -0
  72. package/pi/keybindings.json +3 -0
  73. package/pi/settings.json +29 -0
  74. package/plugin.json +35 -0
  75. package/pnpm-workspace.yaml +7 -0
  76. package/scripts/build-claude-agents.mjs +179 -0
  77. package/scripts/install-instructions.sh +82 -0
  78. package/skills/engineering/design-an-interface/SKILL.md +94 -0
  79. package/skills/engineering/grill-with-docs/SKILL.md +88 -0
  80. package/skills/engineering/improve-codebase-architecture/REFERENCE.md +78 -0
  81. package/skills/engineering/improve-codebase-architecture/SKILL.md +81 -0
  82. package/skills/engineering/tdd/SKILL.md +150 -0
  83. package/skills/engineering/tdd/deep-modules.md +33 -0
  84. package/skills/engineering/tdd/interface-design.md +31 -0
  85. package/skills/engineering/tdd/mocking.md +59 -0
  86. package/skills/engineering/tdd/refactoring.md +10 -0
  87. package/skills/engineering/tdd/tests.md +61 -0
  88. package/skills/engineering/technical-direction/SKILL.md +86 -0
  89. package/skills/planning/classify-bead/SKILL.md +67 -0
  90. package/skills/planning/create-task/SKILL.md +96 -0
  91. package/skills/planning/create-task/pipeline.json +33 -0
  92. package/skills/planning/create-task/scripts/create-chores.ts +112 -0
  93. package/skills/planning/create-task/scripts/package.json +14 -0
  94. package/skills/planning/create-task/scripts/pnpm-lock.yaml +342 -0
  95. package/skills/planning/create-task/scripts/tsconfig.json +12 -0
  96. package/skills/planning/create-task/templates/code.md +40 -0
  97. package/skills/planning/create-task/templates/document.md +40 -0
  98. package/skills/planning/create-task/templates/fix.md +27 -0
  99. package/skills/planning/create-task/templates/review.md +36 -0
  100. package/skills/planning/create-task/templates/verify.md +43 -0
  101. package/skills/planning/prd-to-tasks/SKILL.md +227 -0
  102. package/skills/planning/record-idea/SKILL.md +62 -0
  103. package/skills/planning/record-idea/scripts/new-idea.sh +89 -0
  104. package/skills/planning/request-refactor-plan/SKILL.md +73 -0
  105. package/skills/planning/write-a-prd/SKILL.md +74 -0
  106. package/skills/planning/write-a-ticket/SKILL.md +97 -0
  107. package/skills/productivity/bd-tool/SKILL.md +90 -0
  108. package/skills/productivity/grill-me/SKILL.md +10 -0
  109. package/skills/productivity/handoff/SKILL.md +15 -0
  110. package/skills/productivity/init-beads/SKILL.md +93 -0
  111. package/skills/productivity/teach/GLOSSARY-FORMAT.md +35 -0
  112. package/skills/productivity/teach/LEARNING-RECORD-FORMAT.md +46 -0
  113. package/skills/productivity/teach/MISSION-FORMAT.md +31 -0
  114. package/skills/productivity/teach/RESOURCES-FORMAT.md +32 -0
  115. package/skills/productivity/teach/SKILL.md +109 -0
  116. package/skills/productivity/validate-agent-dir/scripts/package.json +15 -0
  117. package/skills/productivity/validate-agent-dir/scripts/pnpm-lock.yaml +329 -0
  118. package/skills/productivity/validate-agent-dir/scripts/pnpm-workspace.yaml +2 -0
  119. package/skills/productivity/validate-agent-dir/scripts/tsconfig.json +19 -0
  120. package/skills/productivity/validate-agent-dir/scripts/validate-agent-dir.test.ts +317 -0
  121. package/skills/productivity/validate-agent-dir/scripts/validate-agent-dir.ts +127 -0
  122. package/skills/productivity/write-a-skill/SKILL.md +74 -0
  123. package/skills/review/maintain-agent-docs/REFERENCE.md +246 -0
  124. package/skills/review/maintain-agent-docs/SKILL.md +83 -0
  125. package/skills/review/refactor-skill/EXAMPLES.md +20 -0
  126. package/skills/review/refactor-skill/SKILL.md +148 -0
  127. package/skills/review/review-security/SKILL.md +107 -0
  128. package/skills/review/review-security/scripts/install-gitleaks.sh +43 -0
  129. package/skills/style/style-code/REFERENCE.md +38 -0
  130. package/skills/style/style-code/SKILL.md +113 -0
  131. package/skills/style/style-comms/SKILL.md +93 -0
  132. package/skills/style/style-documentation/SKILL.md +112 -0
  133. package/skills/style/style-tests/SKILL.md +97 -0
  134. package/skills/workflow/git-workflow/SKILL.md +85 -0
  135. package/skills/workflow/hitl-collab/SKILL.md +29 -0
  136. package/skills/workflow/plan/SKILL.md +272 -0
  137. package/skills/workflow/ralph/REFERENCE.md +202 -0
  138. package/skills/workflow/ralph/SKILL.md +105 -0
  139. package/skills/workflow/run-pipeline-stage/SKILL.md +151 -0
  140. package/skills/workflow/run-pipeline-stage/playbooks/code.md +17 -0
  141. package/skills/workflow/run-pipeline-stage/playbooks/document.md +18 -0
  142. package/skills/workflow/run-pipeline-stage/playbooks/fix.md +17 -0
  143. package/skills/workflow/run-pipeline-stage/playbooks/review.md +19 -0
  144. package/skills/workflow/run-pipeline-stage/playbooks/verify.md +14 -0
  145. package/skills/workflow/run-pipeline-stage/prompts/stage-runner.md +20 -0
  146. package/skills/workflow/run-pipeline-stage/scripts/generate-progress.test.ts +783 -0
  147. package/skills/workflow/run-pipeline-stage/scripts/generate-progress.ts +586 -0
  148. package/skills/workflow/run-pipeline-stage/scripts/package.json +15 -0
  149. package/skills/workflow/run-pipeline-stage/scripts/pnpm-lock.yaml +342 -0
  150. package/skills/workflow/run-pipeline-stage/scripts/pnpm-workspace.yaml +2 -0
  151. package/skills/workflow/run-pipeline-stage/scripts/tsconfig.json +12 -0
  152. package/skills/workflow/using-agent-skills/SKILL.md +109 -0
  153. package/skills/workflow/using-agent-skills/scripts/validate-skill-structure.test.ts +73 -0
  154. package/test/cli.test.mjs +149 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "database": "dolt",
3
+ "backend": "dolt",
4
+ "dolt_mode": "embedded",
5
+ "dolt_database": "agent_nexus",
6
+ "project_id": "93f3bc0f-49ea-4b82-b8a8-c65875fdfdf7"
7
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "jaybeeuu",
3
+ "owner": {
4
+ "name": "jaybeeuu"
5
+ },
6
+ "metadata": {
7
+ "description": "jaybeeuu's personal Claude Code plugins."
8
+ },
9
+ "plugins": [
10
+ {
11
+ "name": "agent-cortex",
12
+ "source": "./claude",
13
+ "description": "Personal Claude Code plugin with custom agents and skills"
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,217 @@
1
+ import { describe, it } from "node:test";
2
+ import assert from "node:assert/strict";
3
+ import { readFileSync, existsSync } from "node:fs";
4
+ import { join } from "node:path";
5
+ import { parse as parseYaml } from "yaml";
6
+
7
+ const ROOT = join(import.meta.dirname, "..", "..");
8
+
9
+ function loadYaml(relPath: string): Record<string, unknown> {
10
+ const fullPath = join(ROOT, relPath);
11
+ assert.ok(existsSync(fullPath), `${relPath} does not exist`);
12
+ const content = readFileSync(fullPath, "utf-8");
13
+ return parseYaml(content) as Record<string, unknown>;
14
+ }
15
+
16
+ function loadJson(relPath: string): Record<string, unknown> {
17
+ const fullPath = join(ROOT, relPath);
18
+ assert.ok(existsSync(fullPath), `${relPath} does not exist`);
19
+ const content = readFileSync(fullPath, "utf-8");
20
+ return JSON.parse(content) as Record<string, unknown>;
21
+ }
22
+
23
+ // ─── CI Workflow ─────────────────────────────────────────────────────────────
24
+
25
+ describe("CI workflow", () => {
26
+ const ci = loadYaml(".github/workflows/ci.yml") as Record<string, unknown>;
27
+
28
+ it("triggers on push to main and pull requests", () => {
29
+ const on = ci.on as Record<string, unknown>;
30
+ assert.ok(on.push, "has push trigger");
31
+ assert.ok("pull_request" in on, "has pull_request trigger");
32
+
33
+ const push = on.push as Record<string, unknown>;
34
+ assert.deepStrictEqual(push.branches, ["main"]);
35
+ });
36
+
37
+ it("has a job that runs on ubuntu-latest", () => {
38
+ const jobs = ci.jobs as Record<string, unknown>;
39
+ const jobNames = Object.keys(jobs);
40
+ assert.ok(jobNames.length > 0, "has at least one job");
41
+
42
+ const firstJob = jobs[jobNames[0]] as Record<string, unknown>;
43
+ assert.equal(firstJob["runs-on"], "ubuntu-latest");
44
+ });
45
+
46
+ it("checks out code", () => {
47
+ const steps = getSteps(ci);
48
+ const checkout = steps.find(
49
+ (s: Record<string, unknown>) => s.name === "Checkout"
50
+ );
51
+ assert.ok(checkout, "has Checkout step");
52
+ const uses = (checkout as Record<string, unknown>).uses as string;
53
+ assert.ok(uses.startsWith("actions/checkout@"), "uses actions/checkout");
54
+ });
55
+
56
+ it("sets up Node.js", () => {
57
+ const steps = getSteps(ci);
58
+ const setupNode = steps.find(
59
+ (s: Record<string, unknown>) => s.name === "Setup Node"
60
+ );
61
+ assert.ok(setupNode, "has Setup Node step");
62
+ });
63
+
64
+ it("sets up pnpm", () => {
65
+ const steps = getSteps(ci);
66
+ const setupPnpm = steps.find(
67
+ (s: Record<string, unknown>) => s.name === "Setup pnpm"
68
+ );
69
+ assert.ok(setupPnpm, "has Setup pnpm step");
70
+ const uses = (setupPnpm as Record<string, unknown>).uses as string;
71
+ assert.ok(uses.startsWith("pnpm/action-setup@"), "uses pnpm/action-setup");
72
+ });
73
+
74
+ it("installs dependencies", () => {
75
+ const steps = getSteps(ci);
76
+ const install = steps.find(
77
+ (s: Record<string, unknown>) => s.name === "Install dependencies"
78
+ );
79
+ assert.ok(install, "has Install dependencies step");
80
+ });
81
+
82
+ it("runs lint", () => {
83
+ const steps = getSteps(ci);
84
+ const lint = steps.find(
85
+ (s: Record<string, unknown>) => s.name === "Lint"
86
+ );
87
+ assert.ok(lint, "has Lint step");
88
+ });
89
+
90
+ it("runs tests", () => {
91
+ const steps = getSteps(ci);
92
+ const test = steps.find(
93
+ (s: Record<string, unknown>) => s.name === "Test"
94
+ );
95
+ assert.ok(test, "has Test step");
96
+ });
97
+
98
+ it("runs build", () => {
99
+ const steps = getSteps(ci);
100
+ const build = steps.find(
101
+ (s: Record<string, unknown>) => s.name === "Build"
102
+ );
103
+ assert.ok(build, "has Build step");
104
+ });
105
+ });
106
+
107
+ // ─── Publish Workflow ────────────────────────────────────────────────────────
108
+
109
+ describe("Publish workflow", () => {
110
+ const publish = loadYaml(
111
+ ".github/workflows/publish.yml"
112
+ ) as Record<string, unknown>;
113
+
114
+ it("triggers on release published", () => {
115
+ const on = publish.on as Record<string, unknown>;
116
+ assert.ok(on.release, "has release trigger");
117
+ const release = on.release as Record<string, unknown>;
118
+ assert.deepStrictEqual(release.types, ["published"]);
119
+ });
120
+
121
+ it("has a job that runs on ubuntu-latest", () => {
122
+ const jobs = publish.jobs as Record<string, unknown>;
123
+ const jobNames = Object.keys(jobs);
124
+ assert.ok(jobNames.length > 0, "has at least one job");
125
+
126
+ const firstJob = jobs[jobNames[0]] as Record<string, unknown>;
127
+ assert.equal(firstJob["runs-on"], "ubuntu-latest");
128
+ });
129
+
130
+ it("sets up Node 24 with setup-node v6 for OIDC", () => {
131
+ const steps = getSteps(publish);
132
+ const setupNode = steps.find(
133
+ (s: Record<string, unknown>) => s.name === "Setup Node"
134
+ );
135
+ assert.ok(setupNode, "has Setup Node step");
136
+ const uses = (setupNode as Record<string, unknown>).uses as string;
137
+ assert.ok(uses.startsWith("actions/setup-node@v6"), "uses setup-node v6");
138
+ const with_ = (setupNode as Record<string, unknown>).with as Record<
139
+ string,
140
+ unknown
141
+ >;
142
+ assert.equal(with_["node-version"], 24);
143
+ assert.equal(
144
+ with_["registry-url"],
145
+ undefined,
146
+ "no registry-url — OIDC auth needs no registry config"
147
+ );
148
+ });
149
+
150
+ it("packs the tarball then publishes with npm", () => {
151
+ const steps = getSteps(publish);
152
+ const publishStep = steps.find(
153
+ (s: Record<string, unknown>) => s.name === "Publish to npm"
154
+ );
155
+ assert.ok(publishStep, "has Publish to npm step");
156
+ const run = (publishStep as Record<string, unknown>).run as string;
157
+ assert.ok(run.includes("pnpm pack"), "packs with pnpm");
158
+ assert.ok(run.includes("npm publish"), "publishes with npm");
159
+ assert.ok(!run.includes("pnpm publish"), "does not publish via pnpm");
160
+ });
161
+
162
+ it("grants contents: read and id-token: write permissions for OIDC", () => {
163
+ const jobs = publish.jobs as Record<string, unknown>;
164
+ const jobNames = Object.keys(jobs);
165
+ const job = jobs[jobNames[0]] as Record<string, unknown>;
166
+ const permissions = job.permissions as Record<string, unknown>;
167
+ assert.equal(permissions["contents"], "read");
168
+ assert.equal(permissions["id-token"], "write");
169
+ });
170
+
171
+ it("has no NPM_TOKEN secret or NODE_AUTH_TOKEN auth", () => {
172
+ const content = readFileSync(
173
+ join(ROOT, ".github/workflows/publish.yml"),
174
+ "utf-8"
175
+ );
176
+ assert.ok(!content.includes("NPM_TOKEN"), "no NPM_TOKEN secret reference");
177
+ assert.ok(
178
+ !content.includes("NODE_AUTH_TOKEN"),
179
+ "no NODE_AUTH_TOKEN auth env"
180
+ );
181
+ });
182
+ });
183
+
184
+ // ─── Package.json ────────────────────────────────────────────────────────────
185
+
186
+ describe("package.json", () => {
187
+ const pkg = loadJson("package.json") as Record<string, unknown>;
188
+
189
+ it("is not private (publishable to npm)", () => {
190
+ assert.equal(pkg.private, undefined, "package is not private");
191
+ });
192
+
193
+ it("has a build script", () => {
194
+ const scripts = pkg.scripts as Record<string, unknown>;
195
+ assert.ok(scripts.build, "has build script");
196
+ });
197
+
198
+ it("has a lint script", () => {
199
+ const scripts = pkg.scripts as Record<string, unknown>;
200
+ assert.ok(scripts.lint, "has lint script");
201
+ });
202
+
203
+ it("has publishConfig with public access", () => {
204
+ const publishConfig = pkg.publishConfig as Record<string, unknown>;
205
+ assert.ok(publishConfig, "has publishConfig");
206
+ assert.equal(publishConfig.access, "public");
207
+ });
208
+ });
209
+
210
+ // ─── Helpers ─────────────────────────────────────────────────────────────────
211
+
212
+ function getSteps(workflow: Record<string, unknown>): Record<string, unknown>[] {
213
+ const jobs = workflow.jobs as Record<string, unknown>;
214
+ const jobNames = Object.keys(jobs);
215
+ const firstJob = jobs[jobNames[0]] as Record<string, unknown>;
216
+ return firstJob.steps as Record<string, unknown>[];
217
+ }
@@ -0,0 +1,35 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ jobs:
10
+ checks:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - name: Checkout
14
+ uses: actions/checkout@v4
15
+ - name: Setup Node
16
+ uses: actions/setup-node@v4
17
+ with:
18
+ node-version: 20
19
+ - name: Setup pnpm
20
+ uses: pnpm/action-setup@v4
21
+ with:
22
+ version: 10
23
+ run_install: false
24
+ - name: Install dependencies
25
+ run: pnpm install --frozen-lockfile
26
+ - name: Lint
27
+ run: pnpm lint
28
+ - name: Test
29
+ run: pnpm test
30
+ - name: Build
31
+ run: pnpm build
32
+ - name: Check generated Claude plugin is up to date
33
+ run: |
34
+ pnpm build:claude
35
+ git diff --exit-code claude/agents/ claude/skills/
@@ -0,0 +1,36 @@
1
+ name: Publish to npm
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ contents: read
12
+ id-token: write
13
+ steps:
14
+ - name: Checkout
15
+ uses: actions/checkout@v4
16
+ - name: Setup Node
17
+ uses: actions/setup-node@v6
18
+ with:
19
+ node-version: 24
20
+ - name: Setup pnpm
21
+ uses: pnpm/action-setup@v4
22
+ with:
23
+ version: 10
24
+ run_install: false
25
+ - name: Install dependencies
26
+ run: pnpm install --frozen-lockfile
27
+ - name: Lint
28
+ run: pnpm lint
29
+ - name: Test
30
+ run: pnpm test
31
+ - name: Build
32
+ run: pnpm build
33
+ - name: Publish to npm
34
+ run: |
35
+ TARBALL=$(pnpm pack | tail -n 1)
36
+ npm publish "$TARBALL"
@@ -0,0 +1,87 @@
1
+ # Beads Issue Tracking Instructions
2
+
3
+ This project uses **Beads (bd)** for issue tracking. Use the bd CLI or MCP tools for all task management.
4
+
5
+ ## Core Workflow Rules
6
+
7
+ 1. **Track ALL work in bd** - Never use markdown TODOs or comment-based task lists
8
+ 2. **Check ready work first** - Run `bd ready` to find unblocked issues
9
+ 3. **Always include descriptions** - Provide meaningful context when creating issues
10
+ 4. **Link discovered work** - Use `discovered-from` dependencies for issues found during work
11
+ 5. **Sync at session end** - Run `bd dolt push` before ending your session
12
+
13
+ ## Quick Command Reference
14
+
15
+ ### Finding Work
16
+ ```bash
17
+ bd ready # Show unblocked issues ready for work
18
+ bd list --status open # List all open issues
19
+ bd show <id> # View issue details
20
+ bd blocked # Show blocked issues and their blockers
21
+ ```
22
+
23
+ ### Creating Issues
24
+ ```bash
25
+ bd create "Title" --description="Details" -t bug|feature|task -p 0-4 --json
26
+ bd create "Found bug" --description="Details" --deps discovered-from:bd-42 --json
27
+ ```
28
+
29
+ ### Working on Issues
30
+ ```bash
31
+ bd update <id> --claim # Claim work atomically
32
+ bd update <id> --priority 1 # Change priority
33
+ bd close <id> --reason "Completed" # Mark complete
34
+ ```
35
+
36
+ ### Dependencies
37
+ ```bash
38
+ bd dep add <issue> <depends-on> # Add dependency (issue depends on depends-on)
39
+ bd dep add <issue> <depends-on> --type=related # Soft link
40
+ ```
41
+
42
+ ### Syncing
43
+ ```bash
44
+ bd dolt push # ALWAYS run at session end - commits and pushes changes
45
+ ```
46
+
47
+ ## Issue Types
48
+
49
+ - `bug` - Something broken that needs fixing
50
+ - `feature` - New functionality
51
+ - `task` - Work item (tests, docs, refactoring)
52
+ - `epic` - Large feature composed of multiple issues
53
+ - `chore` - Maintenance work (dependencies, tooling)
54
+
55
+ ## Priorities
56
+
57
+ - `0` - Critical (security, data loss, broken builds)
58
+ - `1` - High (major features, important bugs)
59
+ - `2` - Medium (default, nice-to-have)
60
+ - `3` - Low (polish, optimization)
61
+ - `4` - Backlog (future ideas)
62
+
63
+ ## MCP Tools Available
64
+
65
+ If the MCP server is configured, you can use these tools directly:
66
+ - `mcp_beads_ready` - Find ready tasks
67
+ - `mcp_beads_list` - List issues with filters
68
+ - `mcp_beads_show` - Show issue details
69
+ - `mcp_beads_create` - Create new issues
70
+ - `mcp_beads_update` - Update issue status/priority
71
+ - `mcp_beads_close` - Close completed issues
72
+ - `mcp_beads_dep` - Manage dependencies
73
+ - `mcp_beads_blocked` - Show blocked issues
74
+ - `mcp_beads_stats` - Get issue statistics
75
+
76
+ ## Important Rules
77
+
78
+ - ✅ Use bd for ALL task tracking
79
+ - ✅ Always use `--json` flag for programmatic use
80
+ - ✅ Link discovered work with `discovered-from` dependencies
81
+ - ✅ Check `bd ready` before asking "what should I work on?"
82
+ - ✅ Run `bd dolt push` at end of session
83
+ - ❌ Do NOT create markdown TODO lists
84
+ - ❌ Do NOT use external issue trackers
85
+ - ❌ Do NOT duplicate tracking systems
86
+
87
+ For more details, run `bd --help` or see the project's AGENTS.md file.
@@ -0,0 +1,10 @@
1
+ {
2
+ "mcpServers": {
3
+ "beads": {
4
+ "args": [
5
+ "mcp"
6
+ ],
7
+ "command": "bd"
8
+ }
9
+ }
10
+ }
package/AGENTS.md ADDED
@@ -0,0 +1,102 @@
1
+ # AGENTS.md
2
+
3
+ Instructions for agents working on this repository.
4
+
5
+ ## What This Repo Is
6
+
7
+ A personal Copilot CLI plugin containing custom agents and skills, plus PI extensions for
8
+ enhancing the coding agent runtime. Changes here affect the behaviour of every agent, skill,
9
+ and PI extension available in the author's coding sessions.
10
+
11
+ ## Structure
12
+
13
+ ```
14
+ agent-cortex/
15
+ ├── package.json # PI package manifest (pi: { extensions, skills })
16
+ ├── plugin.json # GitHub Copilot plugin manifest — agents, skills, MCP servers
17
+ ├── agents/ # Custom agents (*.agent.md)
18
+ │ └── ralph.agent.md
19
+ ├── skills/ # Grouped by domain, discovered recursively
20
+ │ ├── planning/ # Scope, spec, decompose
21
+ │ ├── engineering/ # The coding loop
22
+ │ ├── productivity/ # Workflow tooling
23
+ │ ├── style/ # Conventions and standards
24
+ │ ├── workflow/ # Orchestration and pipeline
25
+ │ └── review/ # Auditing and maintenance
26
+ ├── extensions/ # PI extensions (one directory per extension, each with index.ts)
27
+ │ └── skill-stats/
28
+ │ ├── README.md # Installation & usage
29
+ │ └── index.ts # Extension entrypoint
30
+ └── package.json # PI package manifest (pi: { extensions, skills })
31
+ ```
32
+
33
+ ## Versioning
34
+
35
+ **Always bump `plugin.json` version** when making any change to agents or skills. Follow
36
+ semantic versioning:
37
+
38
+ | Change type | Bump |
39
+ |---|---|
40
+ | New skill or agent added | `minor` |
41
+ | Existing skill or agent meaningfully changed (new behaviour, new steps, restructured workflow) | `minor` |
42
+ | Bug fix or clarification with no behaviour change | `patch` |
43
+ | Breaking change (removed skill, renamed agent, incompatible workflow change) | `major` |
44
+
45
+ The version bump must be included in the same commit as the change — do not leave it for a
46
+ follow-up commit.
47
+
48
+ ## Changelog
49
+
50
+ - Keep a root `CHANGELOG.md` for repository changes.
51
+ - When making any repo change (agents, skills, docs, scripts, or workflow rules), update
52
+ `CHANGELOG.md` in the same commit.
53
+ - Write entries under a version header that matches the bumped `plugin.json` version
54
+ (e.g. `## 0.40.0`). Add a new version section on every change.
55
+ - Keep entries user-facing and outcome-focused (what changed and why it matters).
56
+
57
+ ## Skill Conventions
58
+
59
+ - `SKILL.md` must include a YAML front-matter block with `name` and `description`.
60
+ - `description` must be ≤ 1024 characters. First sentence: what it does. Second: "Use when…".
61
+ - Keep `SKILL.md` under ~100 lines. Overflow into `REFERENCE.md` for rarely-needed detail.
62
+ - Add utility scripts to `scripts/` when an operation is deterministic and would otherwise be
63
+ regenerated each time (e.g. install scripts, scanners).
64
+ - Skill names use kebab-case and are grouped by prefix where related (e.g. `review-security`,
65
+ `review-code`; `style-code`, `style-comms`, `style-documentation`).
66
+
67
+ ## Agent Conventions
68
+
69
+ - Agent files are named `<name>.agent.md` and live in `agents/`.
70
+ - Keep orchestration logic in the agent file; extract shared per-task workflow into a skill
71
+ so it can be reused (e.g. ralph delegates per-task stage execution to `run-pipeline-stage`).
72
+
73
+ ## PI Extension Conventions
74
+
75
+ - PI extensions live in `extensions/`, one subdirectory per extension.
76
+ - Each extension directory contains `index.ts` (entrypoint) and `README.md` (usage).
77
+ - Extensions are auto-discovered when the repo is installed as a PI package via `pi install`.
78
+ - Keep extensions lightweight: no internal LLM calls. Extensions observe events and provide
79
+ commands — they should not add token overhead.
80
+ - Extensions that persist data should write to `~/.pi/agent-cortex/` (global, cross-project)
81
+ and tag records with the project path for per-project slicing.
82
+
83
+ ## User preferences
84
+
85
+ Before making tooling or workflow decisions, read `docs/user-preferences.md` for the
86
+ user's personal development preferences (e.g. preferred package manager, tooling
87
+ choices). These preferences apply across all projects where this plugin is active.
88
+
89
+ ## Task tracking
90
+
91
+ This project uses **bd (beads)** for task tracking.
92
+
93
+ Run `bd prime` at the start of each session for context.
94
+
95
+ Quick reference:
96
+ - `bd ready` — list unblocked work
97
+ - `bd create "Title" -p <0-3>` — create a task (P0 = critical)
98
+ - `bd update <id> --claim` — claim a task
99
+ - `bd close <id>` — complete a task
100
+ - `bd dep add <A> <B>` — **"A depends on B"** (B blocks A). First arg waits, second arg
101
+ is waited-for. To express "X blocks Y", write `bd dep add Y X`.
102
+ - `bd dolt push` — sync to remote at session end