@jaybeeuu/agent-cortex 1.20.0 → 1.38.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/.agents/skills/style-versioning/SKILL.md +102 -0
- package/.changeset/README.md +8 -0
- package/.changeset/config.json +11 -0
- package/.github/workflows/ci.yml +227 -6
- package/AGENTS.md +29 -24
- package/CHANGELOG.md +119 -5
- package/README.md +132 -33
- package/agents/README.md +47 -13
- package/agents/plan/agent.md +51 -0
- package/agents/plan/claude/frontmatter.json +6 -0
- package/agents/plan/copilot/frontmatter.json +6 -0
- package/agents/plan/pi/frontmatter.json +6 -0
- package/agents/plan.agent.md +3 -0
- package/agents/ralph/agent.md +262 -0
- package/agents/ralph/claude/frontmatter.json +6 -0
- package/agents/ralph/claude/polling.md +31 -0
- package/agents/ralph/copilot/frontmatter.json +6 -0
- package/agents/ralph/copilot/polling.md +62 -0
- package/agents/ralph/pi/frontmatter.json +6 -0
- package/agents/ralph/pi/polling.md +74 -0
- package/agents/ralph-plan/agent.md +114 -0
- package/agents/ralph-plan/claude/frontmatter.json +6 -0
- package/agents/ralph-plan/copilot/frontmatter.json +6 -0
- package/agents/ralph-plan/pi/frontmatter.json +6 -0
- package/agents/ralph-plan.agent.md +5 -2
- package/agents/ralph.agent.md +83 -57
- package/agents/strategy/agent.md +104 -0
- package/agents/strategy/claude/frontmatter.json +6 -0
- package/agents/strategy/copilot/frontmatter.json +6 -0
- package/agents/strategy/pi/frontmatter.json +6 -0
- package/agents/strategy.agent.md +3 -0
- package/bin/agent-cortex.mjs +68 -1
- package/bin/installers/claude.mjs +262 -0
- package/bin/installers/copilot.mjs +129 -0
- package/bin/installers/pi.mjs +197 -0
- package/claude/.claude-plugin/plugin.json +1 -1
- package/claude/agents/plan.md +3 -1
- package/claude/agents/ralph-plan.md +5 -3
- package/claude/agents/strategy.md +3 -1
- package/claude/hooks/scripts/notify.mjs +54 -0
- package/claude/hooks.json +15 -0
- package/docs/claude-hooks.md +115 -0
- package/docs/ideas/unified-ci-pipeline.md +28 -0
- package/docs/skills/skill-anatomy.md +9 -0
- package/extensions/agent-modes/README.md +54 -0
- package/extensions/agent-modes/discover.test.ts +241 -0
- package/extensions/agent-modes/discover.ts +458 -0
- package/extensions/agent-modes/index.ts +13 -224
- package/extensions/agent-modes/node_modules/.bin/pi +21 -0
- package/extensions/agent-modes/node_modules/.bin/tsc +21 -0
- package/extensions/agent-modes/node_modules/.bin/tsserver +21 -0
- package/extensions/agent-modes/node_modules/.bin/tsx +21 -0
- package/extensions/agent-modes/package.json +20 -0
- package/extensions/agent-modes/tsconfig.json +12 -0
- package/extensions/session-start.ts +1 -1
- package/extensions/skill-stats/context-loader.test.ts +1 -1
- package/extensions/skill-stats/node_modules/.bin/pi +21 -0
- package/extensions/skill-stats/node_modules/.bin/tsc +21 -0
- package/extensions/skill-stats/node_modules/.bin/tsserver +21 -0
- package/extensions/skill-stats/node_modules/.bin/tsx +21 -0
- package/extensions/subagent/README.md +19 -0
- package/extensions/subagent/index.ts +131 -45
- package/extensions/subagent/node_modules/.bin/pi +21 -0
- package/extensions/subagent/node_modules/.bin/pi-ai +21 -0
- package/extensions/subagent/node_modules/.bin/tsc +21 -0
- package/extensions/subagent/node_modules/.bin/tsserver +21 -0
- package/extensions/subagent/node_modules/.bin/tsx +21 -0
- package/extensions/subagent/package.json +23 -0
- package/extensions/subagent/tsconfig.json +12 -0
- package/extensions/subagent/wait.test.ts +202 -0
- package/extensions/subagent/wait.ts +118 -0
- package/hooks/claude/hooks.json +38 -0
- package/hooks/claude/scripts/notify.mjs +54 -0
- package/lib/cli.mjs +62 -3
- package/package.json +10 -7
- package/plugin.json +1 -1
- package/pnpm-workspace.yaml +1 -0
- package/scripts/build-copilot-agents.mjs +30 -0
- package/scripts/lib/compose-agent.mjs +241 -0
- package/scripts/sync-plugin-version.sh +17 -0
- package/skills/engineering/design-an-interface/SKILL.md +1 -1
- package/skills/engineering/improve-codebase-architecture/SKILL.md +1 -1
- package/skills/workflow/ralph/REFERENCE.md +2 -2
- package/skills/workflow/ralph/SKILL.md +6 -6
- package/skills/workflow/run-pipeline-stage/scripts/generate-progress.ts +4 -2
- package/skills/workflow/using-agent-skills/SKILL.md +15 -2
- package/test/cli.test.mjs +115 -2
- package/test/copilot-installer.test.mjs +298 -0
- package/test/installer.test.mjs +179 -0
- package/test/notify-hook.test.mjs +63 -0
- package/test/pi-installer.test.mjs +371 -0
- package/token-map.README.md +128 -0
- package/token-map.json +106 -0
- package/.beads/README.md +0 -81
- package/.beads/config.yaml +0 -1
- package/.beads/issues.jsonl +0 -236
- package/.beads/metadata.json +0 -7
- package/.github/workflows/ci.test.ts +0 -217
- package/.github/workflows/publish.yml +0 -36
- package/scripts/build-claude-agents.mjs +0 -179
- package/skills/workflow/using-agent-skills/scripts/validate-skill-structure.test.ts +0 -73
- /package/extensions/{context-loader.md → lib/context-loader.md} +0 -0
- /package/extensions/{context-loader.ts → lib/context-loader.ts} +0 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: style-versioning
|
|
3
|
+
description: Automated release workflow using changesets. Use when completing work that needs a release, asking "how do I version this?", or when any change needs to be shipped to npm.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# style-versioning
|
|
7
|
+
|
|
8
|
+
This repo uses **changesets** for fully automated versioning and publishing. No manual version bumps, no manual releases.
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
Trigger this skill when:
|
|
13
|
+
- Completing work that needs a release
|
|
14
|
+
- Asking "how do I version this change?"
|
|
15
|
+
- Creating a PR that changes shipped behaviour
|
|
16
|
+
|
|
17
|
+
## Creating a changeset (agent instructions)
|
|
18
|
+
|
|
19
|
+
**Do NOT run `pnpm changeset`** — it is interactive and will waste tokens on prompts and ANSI codes. Instead, write the changeset file directly.
|
|
20
|
+
|
|
21
|
+
### File format
|
|
22
|
+
|
|
23
|
+
A changeset is a markdown file in `.changeset/` with YAML frontmatter:
|
|
24
|
+
|
|
25
|
+
```markdown
|
|
26
|
+
---
|
|
27
|
+
"@jaybeeuu/agent-cortex": <bump>
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
<Short description of the change>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Where `<bump>` is one of: `patch`, `minor`, or `major`.
|
|
34
|
+
|
|
35
|
+
### How to create one
|
|
36
|
+
|
|
37
|
+
1. Choose a descriptive kebab-case filename (e.g., `fix-status-bug.md`, `add-webhook-skill.md`)
|
|
38
|
+
2. Choose the bump type:
|
|
39
|
+
- `patch` — bug fix, clarification, no behaviour change
|
|
40
|
+
- `minor` — new skill, agent, feature, or meaningful behaviour change
|
|
41
|
+
- `major` — breaking change (removed skill, renamed agent, incompatible workflow)
|
|
42
|
+
3. Write the file directly using the `write` tool:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
write(".changeset/fix-status-bug.md", `---
|
|
46
|
+
"@jaybeeuu/agent-cortex": patch
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
Fix status bead showing wrong priority after update
|
|
50
|
+
`)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
4. Commit the changeset file along with the code changes
|
|
54
|
+
|
|
55
|
+
### Rules
|
|
56
|
+
|
|
57
|
+
- The frontmatter package name must match exactly: `"@jaybeeuu/agent-cortex"`
|
|
58
|
+
- The description should be one or two sentences, user-facing (it goes into CHANGELOG.md)
|
|
59
|
+
- One changeset per PR. If a PR has multiple unrelated changes, use multiple changeset files.
|
|
60
|
+
- The filename doesn't matter to changesets — only the frontmatter and description do.
|
|
61
|
+
|
|
62
|
+
## After merge to main
|
|
63
|
+
|
|
64
|
+
The `release` job in `.github/workflows/ci.yml` handles everything automatically:
|
|
65
|
+
|
|
66
|
+
1. **Detects new changesets** on main
|
|
67
|
+
2. **Creates a "Version Packages" PR** — the `version` step runs `pnpm version-packages`, which bumps `package.json`, syncs `plugin.json` (via `scripts/sync-plugin-version.sh`), updates `CHANGELOG.md`, and regenerates the committed generated output (`pnpm build:claude`, `pnpm build:copilot`) so the drift gates never fail on a version bump
|
|
68
|
+
3. **When "Version Packages" is merged**:
|
|
69
|
+
- Creates a git tag
|
|
70
|
+
- Publishes to npm — `pnpm publish-package` packs with `pnpm pack` and publishes with `npm publish --provenance --access public`. Authenticates via npm Trusted Publishing (OIDC): the release job's `id-token` permission lets npm exchange a GitHub OIDC token for a short-lived npm token at publish time, so no `NPM_TOKEN` secret or `.npmrc` auth config is required — only the one-time npm-side Trusted Publishing setup on npmjs.com (package → Access → Trusted Publishing → GitHub repo `jaybeeuu/agent-cortex` + workflow `.github/workflows/ci.yml`)
|
|
71
|
+
- Creates a GitHub release automatically
|
|
72
|
+
|
|
73
|
+
`changesets/action` execs the `version`/`publish` inputs without a shell, so each
|
|
74
|
+
must be a single unquoted command token — keep release logic in pnpm scripts
|
|
75
|
+
(`version-packages`, `publish-package`), never inline shell strings.
|
|
76
|
+
|
|
77
|
+
### Version lockstep
|
|
78
|
+
|
|
79
|
+
All version numbers stay in lockstep automatically:
|
|
80
|
+
|
|
81
|
+
1. `package.json` → bumped by changesets
|
|
82
|
+
2. `plugin.json` → synced by `scripts/sync-plugin-version.sh`
|
|
83
|
+
3. `CHANGELOG.md` → generated by changesets
|
|
84
|
+
|
|
85
|
+
**Never bump versions manually.** Always create a changeset file.
|
|
86
|
+
|
|
87
|
+
## Common mistakes
|
|
88
|
+
|
|
89
|
+
- **Running `pnpm changeset`**: Interactive, wastes tokens. Write the file directly.
|
|
90
|
+
- **Bumping versions manually**: Don't touch `"version"` in `package.json` or `plugin.json`. Create a changeset.
|
|
91
|
+
- **Skipping the changeset**: A PR without a changeset won't trigger a release. The changesets bot will remind you.
|
|
92
|
+
- **Wrong bump type**: `patch` for fixes, `minor` for additions, `major` for breakage. When in doubt, ask the user.
|
|
93
|
+
- **Wrong package name in frontmatter**: Must be `"@jaybeeuu/agent-cortex"` exactly.
|
|
94
|
+
|
|
95
|
+
## What changed from the old workflow
|
|
96
|
+
|
|
97
|
+
| Before (manual) | After (changesets) |
|
|
98
|
+
|---|---|
|
|
99
|
+
| Agent bumps versions locally | Agent writes a changeset file |
|
|
100
|
+
| Manual GitHub release creation | Automated by the `release` job in `ci.yml` |
|
|
101
|
+
| `publish.yml` triggered by release | `ci.yml` release job on push to main |
|
|
102
|
+
| Version sync was manual | `sync-plugin-version.sh` runs automatically |
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Changesets
|
|
2
|
+
|
|
3
|
+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
|
4
|
+
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
|
5
|
+
find the full documentation for it [in our repository](https://github.com/changesets/changesets).
|
|
6
|
+
|
|
7
|
+
We have a quick list of common questions to get you started engaging with this project in
|
|
8
|
+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md).
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://unpkg.com/@changesets/config@3.1.4/schema.json",
|
|
3
|
+
"changelog": "@changesets/cli/changelog",
|
|
4
|
+
"commit": false,
|
|
5
|
+
"fixed": [],
|
|
6
|
+
"linked": [],
|
|
7
|
+
"access": "public",
|
|
8
|
+
"baseBranch": "main",
|
|
9
|
+
"updateInternalDependencies": "patch",
|
|
10
|
+
"ignore": []
|
|
11
|
+
}
|
package/.github/workflows/ci.yml
CHANGED
|
@@ -7,29 +7,250 @@ on:
|
|
|
7
7
|
pull_request:
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
|
-
|
|
10
|
+
setup:
|
|
11
|
+
name: Setup
|
|
11
12
|
runs-on: ubuntu-latest
|
|
12
13
|
steps:
|
|
13
14
|
- name: Checkout
|
|
14
15
|
uses: actions/checkout@v4
|
|
16
|
+
|
|
15
17
|
- name: Setup Node
|
|
16
|
-
uses: actions/setup-node@
|
|
18
|
+
uses: actions/setup-node@v6
|
|
17
19
|
with:
|
|
18
|
-
node-version:
|
|
20
|
+
node-version: 24
|
|
21
|
+
|
|
19
22
|
- name: Setup pnpm
|
|
20
23
|
uses: pnpm/action-setup@v4
|
|
21
24
|
with:
|
|
22
25
|
version: 10
|
|
23
26
|
run_install: false
|
|
27
|
+
|
|
28
|
+
- name: Cache pnpm store
|
|
29
|
+
uses: actions/cache@v4
|
|
30
|
+
with:
|
|
31
|
+
path: ~/.pnpm-store
|
|
32
|
+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
33
|
+
restore-keys: |
|
|
34
|
+
${{ runner.os }}-pnpm-
|
|
35
|
+
|
|
24
36
|
- name: Install dependencies
|
|
25
37
|
run: pnpm install --frozen-lockfile
|
|
38
|
+
|
|
39
|
+
- name: Build
|
|
40
|
+
run: pnpm build
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
changeset-check:
|
|
44
|
+
name: Changeset check
|
|
45
|
+
if: github.event_name == 'pull_request'
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
steps:
|
|
48
|
+
- name: Checkout
|
|
49
|
+
uses: actions/checkout@v4
|
|
50
|
+
with:
|
|
51
|
+
fetch-depth: 0
|
|
52
|
+
- name: Check for changeset
|
|
53
|
+
env:
|
|
54
|
+
BASE_REF: ${{ github.event.pull_request.base.ref }}
|
|
55
|
+
run: |
|
|
56
|
+
# Paths that require a changeset when modified
|
|
57
|
+
VERSIONED_PATHS='extensions/|skills/|agents/|package\.json|plugin\.json'
|
|
58
|
+
|
|
59
|
+
changed=$(git diff --name-only "origin/${BASE_REF}...HEAD")
|
|
60
|
+
echo "Changed files:"
|
|
61
|
+
echo "$changed"
|
|
62
|
+
|
|
63
|
+
versioned=$(echo "$changed" | grep -E "$VERSIONED_PATHS" || true)
|
|
64
|
+
if [ -z "$versioned" ]; then
|
|
65
|
+
echo "No versioned paths changed — skipping changeset check."
|
|
66
|
+
exit 0
|
|
67
|
+
fi
|
|
68
|
+
|
|
69
|
+
changesets=$(echo "$changed" | grep -E '^\.changeset/.*\.md$' | grep -v 'README.md' || true)
|
|
70
|
+
if [ -z "$changesets" ]; then
|
|
71
|
+
echo ""
|
|
72
|
+
echo "::error::This PR modifies versioned paths but does not include a changeset."
|
|
73
|
+
echo "Run 'pnpm changeset' to add one. See: style-versioning skill."
|
|
74
|
+
echo ""
|
|
75
|
+
echo "Versioned paths changed:"
|
|
76
|
+
echo "$versioned"
|
|
77
|
+
exit 1
|
|
78
|
+
fi
|
|
79
|
+
|
|
80
|
+
echo "Changeset found: $changesets"
|
|
81
|
+
|
|
82
|
+
lint:
|
|
83
|
+
name: Lint
|
|
84
|
+
needs: setup
|
|
85
|
+
runs-on: ubuntu-latest
|
|
86
|
+
steps:
|
|
87
|
+
- name: Checkout
|
|
88
|
+
uses: actions/checkout@v4
|
|
89
|
+
|
|
90
|
+
- name: Setup Node
|
|
91
|
+
uses: actions/setup-node@v6
|
|
92
|
+
with:
|
|
93
|
+
node-version: 24
|
|
94
|
+
|
|
95
|
+
- name: Cache pnpm store
|
|
96
|
+
uses: actions/cache@v4
|
|
97
|
+
with:
|
|
98
|
+
path: ~/.pnpm-store
|
|
99
|
+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
100
|
+
restore-keys: |
|
|
101
|
+
${{ runner.os }}-pnpm-
|
|
102
|
+
|
|
103
|
+
- name: Setup pnpm
|
|
104
|
+
uses: pnpm/action-setup@v4
|
|
105
|
+
with:
|
|
106
|
+
version: 10
|
|
107
|
+
run_install: false
|
|
108
|
+
|
|
109
|
+
- name: Install dependencies
|
|
110
|
+
run: pnpm install --frozen-lockfile
|
|
111
|
+
|
|
26
112
|
- name: Lint
|
|
27
113
|
run: pnpm lint
|
|
114
|
+
|
|
115
|
+
test:
|
|
116
|
+
name: Test
|
|
117
|
+
needs: setup
|
|
118
|
+
runs-on: ubuntu-latest
|
|
119
|
+
steps:
|
|
120
|
+
- name: Checkout
|
|
121
|
+
uses: actions/checkout@v4
|
|
122
|
+
|
|
123
|
+
- name: Setup Node
|
|
124
|
+
uses: actions/setup-node@v6
|
|
125
|
+
with:
|
|
126
|
+
node-version: 24
|
|
127
|
+
|
|
128
|
+
- name: Cache pnpm store
|
|
129
|
+
uses: actions/cache@v4
|
|
130
|
+
with:
|
|
131
|
+
path: ~/.pnpm-store
|
|
132
|
+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
133
|
+
restore-keys: |
|
|
134
|
+
${{ runner.os }}-pnpm-
|
|
135
|
+
|
|
136
|
+
- name: Setup pnpm
|
|
137
|
+
uses: pnpm/action-setup@v4
|
|
138
|
+
with:
|
|
139
|
+
version: 10
|
|
140
|
+
run_install: false
|
|
141
|
+
|
|
142
|
+
- name: Install dependencies
|
|
143
|
+
run: pnpm install --frozen-lockfile
|
|
144
|
+
|
|
28
145
|
- name: Test
|
|
29
146
|
run: pnpm test
|
|
30
|
-
|
|
31
|
-
|
|
147
|
+
|
|
148
|
+
claude-plugin-check:
|
|
149
|
+
name: Claude plugin check
|
|
150
|
+
needs: setup
|
|
151
|
+
runs-on: ubuntu-latest
|
|
152
|
+
steps:
|
|
153
|
+
- name: Checkout
|
|
154
|
+
uses: actions/checkout@v4
|
|
155
|
+
|
|
156
|
+
- name: Setup Node
|
|
157
|
+
uses: actions/setup-node@v6
|
|
158
|
+
with:
|
|
159
|
+
node-version: 24
|
|
160
|
+
|
|
161
|
+
- name: Cache pnpm store
|
|
162
|
+
uses: actions/cache@v4
|
|
163
|
+
with:
|
|
164
|
+
path: ~/.pnpm-store
|
|
165
|
+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
166
|
+
restore-keys: |
|
|
167
|
+
${{ runner.os }}-pnpm-
|
|
168
|
+
|
|
169
|
+
- name: Setup pnpm
|
|
170
|
+
uses: pnpm/action-setup@v4
|
|
171
|
+
with:
|
|
172
|
+
version: 10
|
|
173
|
+
run_install: false
|
|
174
|
+
|
|
175
|
+
- name: Install dependencies
|
|
176
|
+
run: pnpm install --frozen-lockfile
|
|
177
|
+
|
|
178
|
+
# `pnpm build:claude` is an alias of `agent-cortex install claude` (both run
|
|
179
|
+
# bin/installers/claude.mjs), so this drift check proves the committed subtree
|
|
180
|
+
# equals the installer's output — stale output or hand-edits to generated
|
|
181
|
+
# files fail the build. The subtree stays committed because the marketplace
|
|
182
|
+
# install flow reads it straight from the working tree (fresh clone installs
|
|
183
|
+
# as-is).
|
|
32
184
|
- name: Check generated Claude plugin is up to date
|
|
33
185
|
run: |
|
|
34
186
|
pnpm build:claude
|
|
35
|
-
git diff --exit-code claude/agents/ claude/skills/
|
|
187
|
+
git diff --exit-code claude/agents/ claude/skills/ claude/.claude-plugin/plugin.json claude/hooks.json claude/hooks/
|
|
188
|
+
|
|
189
|
+
- name: Check generated Copilot agent files are up to date
|
|
190
|
+
run: |
|
|
191
|
+
pnpm build:copilot
|
|
192
|
+
git diff --exit-code -- 'agents/*.agent.md'
|
|
193
|
+
|
|
194
|
+
release:
|
|
195
|
+
name: Release
|
|
196
|
+
needs: [lint, test, claude-plugin-check]
|
|
197
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
198
|
+
runs-on: ubuntu-latest
|
|
199
|
+
permissions:
|
|
200
|
+
contents: write
|
|
201
|
+
pull-requests: write
|
|
202
|
+
# npm Trusted Publishing (OIDC): npm exchanges this id-token for a
|
|
203
|
+
# short-lived npm token at publish time — no token config or secret.
|
|
204
|
+
id-token: write
|
|
205
|
+
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
206
|
+
steps:
|
|
207
|
+
- name: Checkout
|
|
208
|
+
uses: actions/checkout@v4
|
|
209
|
+
with:
|
|
210
|
+
fetch-depth: 0
|
|
211
|
+
|
|
212
|
+
- name: Setup Node
|
|
213
|
+
uses: actions/setup-node@v6
|
|
214
|
+
with:
|
|
215
|
+
node-version: 24
|
|
216
|
+
|
|
217
|
+
- name: Cache pnpm store
|
|
218
|
+
uses: actions/cache@v4
|
|
219
|
+
with:
|
|
220
|
+
path: ~/.pnpm-store
|
|
221
|
+
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
222
|
+
restore-keys: |
|
|
223
|
+
${{ runner.os }}-pnpm-
|
|
224
|
+
|
|
225
|
+
- name: Setup pnpm
|
|
226
|
+
uses: pnpm/action-setup@v4
|
|
227
|
+
with:
|
|
228
|
+
version: 10
|
|
229
|
+
run_install: false
|
|
230
|
+
|
|
231
|
+
- name: Install dependencies
|
|
232
|
+
run: pnpm install --frozen-lockfile
|
|
233
|
+
|
|
234
|
+
- name: Create Release Pull Request or Publish
|
|
235
|
+
id: changesets
|
|
236
|
+
uses: changesets/action@v1
|
|
237
|
+
with:
|
|
238
|
+
# changesets/action execs these inputs via @actions/exec with NO shell:
|
|
239
|
+
# the string is split by argStringToArray on whitespace (single quotes
|
|
240
|
+
# survive literally), so each must be a single unquoted command token
|
|
241
|
+
# that runs a pnpm script. version-packages bumps versions, syncs
|
|
242
|
+
# plugin.json, THEN regenerates the committed generated output
|
|
243
|
+
# (build:claude writes claude/.claude-plugin/plugin.json with the NEW
|
|
244
|
+
# version, build:copilot re-derives agents/*.agent.md) before the action
|
|
245
|
+
# commits, so the Version Packages PR always passes the drift gates.
|
|
246
|
+
version: pnpm version-packages
|
|
247
|
+
publish: pnpm publish-package
|
|
248
|
+
commit: "chore: version packages"
|
|
249
|
+
title: "chore: version packages"
|
|
250
|
+
env:
|
|
251
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
252
|
+
# Publish authenticates via npm Trusted Publishing (OIDC token
|
|
253
|
+
# exchange at publish time) — no NPM_TOKEN secret, no token config.
|
|
254
|
+
# Requires the one-time npm-side setup: npmjs.com → @jaybeeuu/
|
|
255
|
+
# agent-cortex → Access → Trusted Publishing, tied to GitHub repo
|
|
256
|
+
# jaybeeuu/agent-cortex + workflow .github/workflows/ci.yml.
|
package/AGENTS.md
CHANGED
|
@@ -4,9 +4,10 @@ Instructions for agents working on this repository.
|
|
|
4
4
|
|
|
5
5
|
## What This Repo Is
|
|
6
6
|
|
|
7
|
-
A personal Copilot CLI plugin containing custom agents and skills,
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
A personal Copilot CLI plugin containing custom agents and skills, shipped to Copilot, pi,
|
|
8
|
+
and Claude Code, plus PI extensions and Claude hooks for enhancing the coding agent
|
|
9
|
+
runtime. Changes here affect the behaviour of every agent, skill, and PI extension
|
|
10
|
+
available in the author's coding sessions.
|
|
10
11
|
|
|
11
12
|
## Structure
|
|
12
13
|
|
|
@@ -14,8 +15,12 @@ and PI extension available in the author's coding sessions.
|
|
|
14
15
|
agent-cortex/
|
|
15
16
|
├── package.json # PI package manifest (pi: { extensions, skills })
|
|
16
17
|
├── plugin.json # GitHub Copilot plugin manifest — agents, skills, MCP servers
|
|
17
|
-
├── agents/ # Custom agents
|
|
18
|
-
│
|
|
18
|
+
├── agents/ # Custom agents — canonical composable <name>/ dirs
|
|
19
|
+
│ ├── *.agent.md # generated from <name>/ by scripts/build-copilot-agents.mjs
|
|
20
|
+
│ ├── ralph/ # composable format — see agents/README.md
|
|
21
|
+
│ ├── plan/ # "
|
|
22
|
+
│ ├── ralph-plan/ # "
|
|
23
|
+
│ └── strategy/ # "
|
|
19
24
|
├── skills/ # Grouped by domain, discovered recursively
|
|
20
25
|
│ ├── planning/ # Scope, spec, decompose
|
|
21
26
|
│ ├── engineering/ # The coding loop
|
|
@@ -27,32 +32,20 @@ agent-cortex/
|
|
|
27
32
|
│ └── skill-stats/
|
|
28
33
|
│ ├── README.md # Installation & usage
|
|
29
34
|
│ └── index.ts # Extension entrypoint
|
|
35
|
+
├── hooks/ # Canonical Claude Code hooks (hooks.json + scripts — see docs/claude-hooks.md)
|
|
36
|
+
│ └── claude/ # generated into claude/hooks.json + claude/hooks/ by bin/installers/claude.mjs
|
|
30
37
|
└── package.json # PI package manifest (pi: { extensions, skills })
|
|
31
38
|
```
|
|
32
39
|
|
|
33
40
|
## Versioning
|
|
34
41
|
|
|
35
|
-
|
|
36
|
-
|
|
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.
|
|
42
|
+
Use `pnpm changeset` for all version bumps. Never edit versions manually.
|
|
43
|
+
`package.json`, `plugin.json`, and `CHANGELOG.md` stay in lockstep automatically.
|
|
44
|
+
See the `style-versioning` skill for the full workflow.
|
|
47
45
|
|
|
48
46
|
## Changelog
|
|
49
47
|
|
|
50
|
-
|
|
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).
|
|
48
|
+
Generated automatically by changesets. Do not edit `CHANGELOG.md` manually.
|
|
56
49
|
|
|
57
50
|
## Skill Conventions
|
|
58
51
|
|
|
@@ -66,7 +59,17 @@ follow-up commit.
|
|
|
66
59
|
|
|
67
60
|
## Agent Conventions
|
|
68
61
|
|
|
69
|
-
-
|
|
62
|
+
- Agents live in composable `<name>/` directories under `agents/`: a shared `agent.md` body plus
|
|
63
|
+
per-harness subdirectories `pi/`, `copilot/`, `claude/` (frontmatter.json and optional section
|
|
64
|
+
files) per the spec in `agents/README.md`. `ralph`, `plan`, `ralph-plan`, and `strategy` all use
|
|
65
|
+
the composable layout. The flat `agents/*.agent.md` files are **generated output** — composed
|
|
66
|
+
from the canonical directories by the shared `bin/installers/copilot.mjs` code path behind both
|
|
67
|
+
`agent-cortex install copilot` and `scripts/build-copilot-agents.mjs` (thin wrapper), and
|
|
68
|
+
committed for Copilot CLI (plugin.json `agents: "agents/"` scans for `*.agent.md`); never edit
|
|
69
|
+
them by hand. The `claude/` subtree is generated by the install-time generator
|
|
70
|
+
`bin/installers/claude.mjs` (`pnpm build:claude` aliases `agent-cortex install claude`; `ralph`
|
|
71
|
+
is authored natively in `agents-native/` and copied verbatim; the other agents compose from their
|
|
72
|
+
`claude/` harness dirs).
|
|
70
73
|
- Keep orchestration logic in the agent file; extract shared per-task workflow into a skill
|
|
71
74
|
so it can be reused (e.g. ralph delegates per-task stage execution to `run-pipeline-stage`).
|
|
72
75
|
|
|
@@ -79,6 +82,8 @@ follow-up commit.
|
|
|
79
82
|
commands — they should not add token overhead.
|
|
80
83
|
- Extensions that persist data should write to `~/.pi/agent-cortex/` (global, cross-project)
|
|
81
84
|
and tag records with the project path for per-project slicing.
|
|
85
|
+
- PI extensions with Claude Code equivalents are ported to `hooks/claude/`; the port/reject
|
|
86
|
+
audit with rationale lives in `docs/claude-hooks.md`.
|
|
82
87
|
|
|
83
88
|
## User preferences
|
|
84
89
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,121 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.38.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5def727: Fix generate-progress parser for current bd list format
|
|
8
|
+
- 735f083: Fix Release CI npm publish (ENEEDAUTH): the release job now publishes via npm Trusted Publishing (OIDC) — no `NPM_TOKEN` secret or `.npmrc` auth config. The `release` job's `id-token: write` permission is the only workflow-side requirement; npm exchanges the GitHub OIDC token for a short-lived npm token at publish time.
|
|
9
|
+
|
|
10
|
+
**One-time npm-side setup required** (no GitHub secret): on npmjs.com, open the package `@jaybeeuu/agent-cortex` → Access → Trusted Publishing → Add new publisher → GitHub, select the `jaybeeuu/agent-cortex` repository and the `.github/workflows/ci.yml` workflow. Publishing then needs no token configuration.
|
|
11
|
+
|
|
12
|
+
## 1.38.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- fbc6fa5: Add the Copilot CLI harness installer (`agent-cortex install copilot`), sharing the generator with `pnpm build:copilot`. It regenerates the flat `agents/*.agent.md` files the Copilot plugin loads (plugin.json `agents: "agents/"`), with the same `--dry-run` / `--output` contract as the claude and pi installers.
|
|
17
|
+
- 42d3a33: Add central token-map.json mapping tool names, paths, and agent naming across the copilot, claude, and pi harnesses, with the token substitution contract for the install-time generation system. Use {{TOOL:...}} / {{PATH:...}} tokens in canonical sources; installers substitute per-harness names from the map.
|
|
18
|
+
- 3a7e896: Add using-agent-skills meta-skill with 8 core operating behaviors and skill routing tree. Routes incoming work to the right skill, enforces scope discipline, and flags persistent failures to the user instead of working around them.
|
|
19
|
+
- 4f5b134: Add a `wait_for_agents` tool to the subagent extension: it blocks until at least one background sub-agent (spawned with `task`) completes and returns its result, with `read_agent` kept as a fallback. Ralph's PI completion detection now waits on `wait_for_agents` instead of a `sleep 120` poll loop.
|
|
20
|
+
- e1180d5: Update the agent-modes extension to discover agents from the composable directory format (`agents/<name>/` + per-harness `pi/frontmatter.json`). The PI system prompt is composed from `agent.md`, resolving `{{SECTION:...}}` includes from the agent's `pi/` directory and substituting `{{TOOL:...}}` / `{{PATH:...}}` tokens via token-map.json, so tool restrictions now translate to real PI tool names (e.g. `view` → `read`, `web_fetch` → `fetch_content`, null-mapped tools dropped). Flat `*.agent.md` files remain supported as a fallback for agents that have not been migrated to composable directories yet.
|
|
21
|
+
- 603679a: Make the composable agent directories (`agents/<name>/`) canonical: the hand-authored flat `agents/*.agent.md` sources are removed and the flat Copilot/pi agent files are now generated output, composed from the canonical dirs by `scripts/build-copilot-agents.mjs` (`pnpm build:copilot`). `claude/agents/*.md` is composed from the same dirs' `claude/` harness by `scripts/build-claude-agents.mjs` (ralph stays native via `agents-native/ralph.md`). Agent names, descriptions, and tool sets are unchanged; agent bodies now carry the composable (tokenized) content. CI verifies both generated outputs never drift.
|
|
22
|
+
- 60d498f: Port the pi extensions with Claude equivalents to the Claude Code plugin's hooks:
|
|
23
|
+
SessionStart now also injects the using-agent-skills / bd-tool / git-workflow skill
|
|
24
|
+
policy, and a Notification hook matched on documented notification types
|
|
25
|
+
(`agent_completed|agent_needs_input|permission_prompt`) raises desktop notifications
|
|
26
|
+
via the bundled `hooks/scripts/notify.mjs`. Hook support scripts are now bundled
|
|
27
|
+
into `claude/hooks/` by the shared installer, and the audit (auto-name, skill-stats,
|
|
28
|
+
subagent, agent-modes rejected with rationale) is recorded in `docs/claude-hooks.md`.
|
|
29
|
+
- 6863b0e: Add `agent-cortex install claude` — install-time generator for the Claude Code plugin
|
|
30
|
+
subtree, sharing one code path with `pnpm build:claude` so the outputs can never diverge.
|
|
31
|
+
`claude/.claude-plugin/plugin.json` (version now tracked from `package.json`) and
|
|
32
|
+
`claude/hooks.json` (from the new canonical `hooks/claude/` source) are generated rather
|
|
33
|
+
than hand-maintained, and the committed `claude/skills/` gains the previously-missing
|
|
34
|
+
`using-agent-skills` symlink. Root tests (`test/`) are now included in `pnpm test`.
|
|
35
|
+
- f2b441e: Add the pi harness installer (`agent-cortex install pi`): composes agents from the canonical composable directories plus `pi/` sections, substitutes `{{TOOL:...}}` / `{{PATH:...}}` tokens against token-map.json's pi column (null-mapped tools dropped with warnings, paths resolved against the plugin root), and writes `<output>/agents/<name>.agent.md` plus token-substituted skill copies to `<output>/skills` (default `~/.pi/agent`). Supports `--dry-run`, `--output <dir>`, and an optional `--plugin-root <dir>` override. The shared composer gains pi-friendly options (`dropNullTools`, `pluginRoot`, `resolveRelativePaths`, `warn`) with the copilot/claude build defaults unchanged, and the root test suite is now wired into `pnpm test`.
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- 99fcc9a: Complete the move to install-time Claude code generation: the standalone `scripts/build-claude-agents.mjs` build script is removed and `pnpm build:claude` is now a pure alias of `agent-cortex install claude` — both invoke the shared `bin/installers/claude.mjs` generator, so there is a single code path for the committed `claude/` plugin subtree and install-time vs regenerated output can never diverge. Generated agents carry installer provenance headers, and CI's drift check (regenerate + `git diff --exit-code`) validates the committed subtree byte-for-byte against installer output. `agents-native/` remains the canonical source for Claude-native agents (`ralph`), copied verbatim by the installer.
|
|
40
|
+
- 9b0c4fc: Fix the release pipeline so Version Packages PRs regenerate generated output. `changesets/action` execs the `version`/`publish` inputs without a shell, so quoted multi-command strings crash (`bash -c '...'` split on whitespace → unterminated quote, exit 2). The chain now lives in exec-safe single-command pnpm scripts: `pnpm version-packages` bumps versions, syncs `plugin.json`, then regenerates the committed Claude/Copilot agent output so the drift gates never fail on the bumped version; `pnpm publish-package` performs the pack + provenance publish.
|
|
41
|
+
- f1b8a25: Add composable agent directory structures for the plan, ralph-plan, and strategy agents (`agents/plan/`, `agents/ralph-plan/`, `agents/strategy/` with per-harness `pi/`, `copilot/`, and `claude/` frontmatter). The existing flat `*.agent.md` files are retained until the composer/installer migration lands, so no shipped behaviour changes yet.
|
|
42
|
+
- d83a7cf: Add composable agent directory structure for the ralph agent (`agents/ralph/` with per-harness `pi/`, `copilot/`, and `claude/` frontmatter and polling sections). The existing flat `agents/ralph.agent.md` is retained until the composer/installer migration lands, so no shipped behaviour changes yet.
|
|
43
|
+
- c4728c5: Migrate hardcoded tool names in skill files to `{{TOOL:name}}` tokens (task, read_agent, bash, view, rg, glob) so installers can substitute per-harness names.
|
|
44
|
+
|
|
45
|
+
## 1.37.1
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- 62bfbfe: Fix OIDC publishing by using custom publish script instead of changeset publish
|
|
50
|
+
|
|
51
|
+
Changesets doesn't natively support OIDC trusted publishing - it tries to use
|
|
52
|
+
`changeset publish` which requires an NPM_TOKEN. Replace with a custom script
|
|
53
|
+
that uses `pnpm pack` + `npm publish` directly, which properly picks up OIDC
|
|
54
|
+
tokens in GitHub Actions.
|
|
55
|
+
|
|
56
|
+
## 1.37.0
|
|
57
|
+
|
|
58
|
+
### Minor Changes
|
|
59
|
+
|
|
60
|
+
- 75e2111: Switch to changesets for automated releases
|
|
61
|
+
|
|
62
|
+
Replace manual version bumping and GitHub release creation with changesets automation:
|
|
63
|
+
|
|
64
|
+
- Added `@changesets/cli` for intent-based versioning
|
|
65
|
+
- Added `release.yml` workflow that creates "Version Packages" PRs and auto-publishes via OIDC
|
|
66
|
+
- Added `scripts/sync-plugin-version.sh` to keep `plugin.json` in lockstep with `package.json`
|
|
67
|
+
- Updated `style-versioning` skill to document the new workflow
|
|
68
|
+
- Removed old `publish.yml` (release-triggered) workflow
|
|
69
|
+
|
|
70
|
+
Going forward: run `pnpm changeset` to describe changes, merge to main, and the rest is automatic.
|
|
71
|
+
|
|
72
|
+
### Patch Changes
|
|
73
|
+
|
|
74
|
+
- ad7ac8d: **Enforce changeset requirement in CI** — PRs that modify `extensions/`, `skills/`, `agents/`, `package.json`, or `plugin.json` now fail CI unless they include a `.changeset/*.md` file. Prevents merges that the release pipeline can't pick up.
|
|
75
|
+
- 1ad1920: Fix changesets workflow by adding root package to workspace
|
|
76
|
+
|
|
77
|
+
Changesets couldn't find @jaybeeuu/agent-cortex because pnpm-workspace.yaml
|
|
78
|
+
only listed skills/_/scripts and extensions/_. Adding "." makes the root
|
|
79
|
+
a workspace member so changesets can version it.
|
|
80
|
+
|
|
81
|
+
- 75e2111: Trim AGENTS.md versioning section to reference style-versioning skill instead of duplicating detail
|
|
82
|
+
|
|
3
83
|
All notable changes to this repository are documented in this file.
|
|
4
84
|
|
|
85
|
+
## 1.37.0
|
|
86
|
+
|
|
87
|
+
### Added
|
|
88
|
+
|
|
89
|
+
- **Changesets for automated releases** — replaced manual version bumping and GitHub
|
|
90
|
+
release creation with `@changesets/cli` and `release.yml` workflow. PRs include
|
|
91
|
+
changeset files, merging to main triggers automatic "Version Packages" PRs, and
|
|
92
|
+
publishing to npm via OIDC happens automatically. `plugin.json` stays in lockstep
|
|
93
|
+
via `scripts/sync-plugin-version.sh`.
|
|
94
|
+
|
|
95
|
+
### Removed
|
|
96
|
+
|
|
97
|
+
- **`publish.yml`** — old release-triggered publish workflow. Replaced by `release.yml`.
|
|
98
|
+
|
|
99
|
+
## 1.36.1
|
|
100
|
+
|
|
101
|
+
### Added
|
|
102
|
+
|
|
103
|
+
- **`.agents/skills/style-versioning/`** — new repo-local skill enforcing
|
|
104
|
+
version lockstep across `package.json`, `plugin.json`, and `CHANGELOG.md`.
|
|
105
|
+
Discovered by pi, Copilot CLI, and Claude Code when working in this repo;
|
|
106
|
+
not distributed with the plugin.
|
|
107
|
+
|
|
108
|
+
### Changed
|
|
109
|
+
|
|
110
|
+
- **Version alignment** — `package.json` version aligned to match `plugin.json`
|
|
111
|
+
(both now `1.36.1`). Going forward, all versions (`package.json`, `plugin.json`,
|
|
112
|
+
and `CHANGELOG.md` top header) must stay in lockstep. See AGENTS.md versioning
|
|
113
|
+
section for rules.
|
|
114
|
+
- **AGENTS.md** — versioning section updated to require lockstep across all
|
|
115
|
+
three version files (package.json, plugin.json, CHANGELOG.md).
|
|
116
|
+
- **First npm release via Trusted Publishing** — this is the first version
|
|
117
|
+
published to npm using OIDC (no `NPM_TOKEN` secret).
|
|
118
|
+
|
|
5
119
|
## 1.36.0
|
|
6
120
|
|
|
7
121
|
### Added
|
|
@@ -21,11 +135,11 @@ All notable changes to this repository are documented in this file.
|
|
|
21
135
|
|
|
22
136
|
- **`.github/workflows/publish.yml`** — replaced `NPM_TOKEN` secret auth with
|
|
23
137
|
npm Trusted Publishing (OIDC). The publish job now grants `contents: read`
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
138
|
+
- `id-token: write` permissions and runs Node 24 / setup-node v6
|
|
139
|
+
(npm >= 11.5.1, required for OIDC). The publish step packs with
|
|
140
|
+
`pnpm pack` and uploads the tarball with `npm publish` (pnpm 11's OIDC
|
|
141
|
+
publish path is broken — pnpm#11513). Publishing no longer needs a
|
|
142
|
+
long-lived npm token in repository secrets.
|
|
29
143
|
- **`.github/workflows/ci.test.ts`** — updated publish-workflow assertions to
|
|
30
144
|
expect the OIDC shape: `contents: read` + `id-token: write` permissions,
|
|
31
145
|
`pnpm pack` + `npm publish`, and no `NPM_TOKEN` / `NODE_AUTH_TOKEN`
|