@theronap/cortex-mcp 0.9.98 → 0.9.99
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/lib/skills.mjs
CHANGED
|
@@ -131,6 +131,52 @@ function installInto(skillsRoot, skills, { removeNames = [] } = {}) {
|
|
|
131
131
|
* @param {{ quiet?: boolean }} opts quiet → only emit on actual change (for the SessionStart hook)
|
|
132
132
|
* @returns {{ installed: string[], repaired: string[], unchanged: string[], targets: string[] }}
|
|
133
133
|
*/
|
|
134
|
+
// Skills renamed in C3 (ADR-0033). The old name keeps working for one release via a forwarding
|
|
135
|
+
// stub, then both the map and the stubs are deleted.
|
|
136
|
+
//
|
|
137
|
+
// The stub is a REAL skill that delegates, not a message that the command moved. A stub which only
|
|
138
|
+
// announces the rename breaks every caller that invokes the old name from automation — and this repo
|
|
139
|
+
// has a rule about surfaces that report something other than what happened. The model reads the stub,
|
|
140
|
+
// follows the pointer, and does the actual work, so `/cortex-log` behaves exactly as it always did.
|
|
141
|
+
export const RENAMED_SKILLS = {
|
|
142
|
+
'cortex-log': 'agnoclast-log',
|
|
143
|
+
'cortex-context': 'agnoclast-context',
|
|
144
|
+
'cortex-author-docs': 'agnoclast-author-docs',
|
|
145
|
+
'cortex-walkthrough': 'agnoclast-walkthrough',
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** PURE. The forwarding stub's SKILL.md body. */
|
|
149
|
+
export function forwardingStub(oldName, newName) {
|
|
150
|
+
return `---
|
|
151
|
+
name: ${oldName}
|
|
152
|
+
description: Renamed to /${newName}. This forwarding stub keeps the old command working and will be removed in a later release.
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
This skill is now **${newName}**.
|
|
156
|
+
|
|
157
|
+
Read \`~/.claude/skills/${newName}/SKILL.md\` and follow it in full. Everything it says applies
|
|
158
|
+
here unchanged — this file exists only so \`/${oldName}\` keeps working for automation and habit
|
|
159
|
+
that still names the old command. Do the work the real skill describes; do not stop at this notice.
|
|
160
|
+
`
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/** Write a forwarding stub for every renamed skill whose new form is present. Best-effort: a stub
|
|
164
|
+
* that cannot be written is a lost alias, never a failed install. */
|
|
165
|
+
function installForwardingStubs(skillsRoot, log) {
|
|
166
|
+
for (const [oldName, newName] of Object.entries(RENAMED_SKILLS)) {
|
|
167
|
+
try {
|
|
168
|
+
if (!existsSync(join(skillsRoot, newName, 'SKILL.md'))) continue
|
|
169
|
+
const dir = join(skillsRoot, oldName)
|
|
170
|
+
const file = join(dir, 'SKILL.md')
|
|
171
|
+
const body = forwardingStub(oldName, newName)
|
|
172
|
+
if (existsSync(file) && readFileSync(file, 'utf8') === body) continue
|
|
173
|
+
ensureDir(file)
|
|
174
|
+
writeFileSync(file, body)
|
|
175
|
+
log(` ✓ ${oldName} → forwards to ${newName}`)
|
|
176
|
+
} catch { /* an alias is a convenience, never a reason to fail the install */ }
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
134
180
|
export function installSkills(opts = {}) {
|
|
135
181
|
const quiet = !!opts.quiet
|
|
136
182
|
const log = (m) => { if (!quiet) process.stdout.write(m + '\n') }
|
|
@@ -151,6 +197,7 @@ export function installSkills(opts = {}) {
|
|
|
151
197
|
summary.unchanged.push(...r.unchanged)
|
|
152
198
|
const changed = [...r.installed, ...r.repaired]
|
|
153
199
|
if (changed.length) log(` ✓ ${cli.id}: ${changed.join(', ')} → ${skillsRoot}`)
|
|
200
|
+
installForwardingStubs(skillsRoot, log)
|
|
154
201
|
}
|
|
155
202
|
|
|
156
203
|
if (quiet && (summary.installed.length || summary.repaired.length)) {
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: agnoclast-author-docs
|
|
3
3
|
description: Push new/changed documentation (specs, plans, design docs) from disk into Agnoclast as authored wiki pages. Run after writing a spec/plan/design doc, when the user asks to sync docs to Agnoclast, or as part of session close-out.
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -17,7 +17,7 @@ the doc and author a synthesis. Never dump raw markdown into a page.
|
|
|
17
17
|
|
|
18
18
|
- Right after you write or substantially update a spec/plan/design/runbook doc on disk.
|
|
19
19
|
- When the user asks to push/sync docs to Agnoclast.
|
|
20
|
-
- During session close-out (`/
|
|
20
|
+
- During session close-out (`/agnoclast-log` runs this as a sweep step).
|
|
21
21
|
|
|
22
22
|
## Steps
|
|
23
23
|
|
package/skills/context/SKILL.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: agnoclast-context
|
|
3
3
|
description: Automatically hydrate Agnoclast context at the start of a substantive session. Use when Agnoclast MCP is available and the user has made a real request, so the first answer is grounded in query-centered org context instead of the static baseline alone.
|
|
4
4
|
---
|
|
5
5
|
|
package/skills/log/SKILL.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: agnoclast-log
|
|
3
3
|
description: Close out a work session into Agnoclast — summarize what happened, confirm it reached the org, and surface anything teammates should know. Run at or near the end of any working session.
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -62,7 +62,7 @@ No arguments. Read the conversation context.
|
|
|
62
62
|
already authored a node mid-session and nothing changed since, `author` will report "no change" —
|
|
63
63
|
that's fine.
|
|
64
64
|
6. **Sweep pending documentation** — run `npx -y @theronap/cortex-mcp docs-scan --json`; if any
|
|
65
|
-
docs are pending, follow the `
|
|
65
|
+
docs are pending, follow the `agnoclast-author-docs` skill (author each into its page, then
|
|
66
66
|
`docs-scan --mark`). Specs/plans written to disk this session must not die on disk — a spec IS
|
|
67
67
|
a page. If no roots are registered or nothing is pending, skip silently.
|
|
68
68
|
7. **Reconcile the sweep (don't trust it).** Step 5 relies on your in-the-moment judgment of "what
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
2
|
+
name: agnoclast-walkthrough
|
|
3
3
|
description: Run the guided Agnoclast walkthrough for someone new. Use when the person asks for the walkthrough, a tutorial, or getting started — "give me the walkthrough", "walk me through this", "how do I use this", "show me around", "what can this do", "remind me how this works" — or when a brand-new user needs orienting for the first time.
|
|
4
4
|
---
|
|
5
5
|
|