specpipe 1.0.3 → 1.0.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specpipe",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Spec-first development toolkit for agentic AI coding agents — installs skills + guardrails for Claude Code, Codex, Cursor, Antigravity, and more.",
5
5
  "bin": {
6
6
  "specpipe": "./bin/devkit.js",
@@ -15,6 +15,14 @@ import { hookScriptsFor } from '../lib/hooks.js';
15
15
 
16
16
  const GLOBAL_MANIFEST = join(homedir(), '.claude', '.devkit-manifest.json');
17
17
 
18
+ /** Which agent a home-relative global key belongs to, by its skill-root prefix. */
19
+ function ownerFromGlobalKey(key) {
20
+ for (const [id, a] of Object.entries(AGENTS)) {
21
+ if (a.globalSkillRoot && key.startsWith(a.globalSkillRoot + '/')) return id;
22
+ }
23
+ return null;
24
+ }
25
+
18
26
  export async function readGlobalManifest() {
19
27
  try {
20
28
  return JSON.parse(await readFile(GLOBAL_MANIFEST, 'utf-8'));
@@ -81,7 +89,10 @@ export async function initGlobal({ agents = ['claude'], skills = null, hookSelec
81
89
  for (const [key, entry] of Object.entries(globalFiles)) {
82
90
  if (installedKeys.has(key)) continue;
83
91
  const isHook = key.startsWith('.claude/hooks/');
84
- const owner = entry.agent || (isHook ? 'claude' : null);
92
+ // Legacy claude-devkit / agentpipe manifests recorded skills with NO `agent` field;
93
+ // derive the owner from the key's global-skill-root prefix (e.g. .claude/skills/ →
94
+ // claude) so those predecessor mf-*/ap-* skills get pruned, not silently skipped.
95
+ const owner = entry.agent || (isHook ? 'claude' : ownerFromGlobalKey(key));
85
96
  const inScope = isHook ? wantHooks : (owner && agents.includes(owner));
86
97
  if (!inScope) continue;
87
98
  const abs = join(homedir(), ...key.split('/'));