@rasensio/aidlc 1.8.1 → 1.9.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 (75) hide show
  1. package/dist/cli.js +2 -0
  2. package/dist/cli.js.map +1 -1
  3. package/dist/commands/add-action.d.ts.map +1 -1
  4. package/dist/commands/add-action.js +2 -3
  5. package/dist/commands/add-action.js.map +1 -1
  6. package/dist/commands/add-skill.d.ts +28 -0
  7. package/dist/commands/add-skill.d.ts.map +1 -0
  8. package/dist/commands/add-skill.js +315 -0
  9. package/dist/commands/add-skill.js.map +1 -0
  10. package/dist/commands/add.d.ts +25 -0
  11. package/dist/commands/add.d.ts.map +1 -0
  12. package/dist/commands/add.js +29 -0
  13. package/dist/commands/add.js.map +1 -0
  14. package/dist/commands/init.d.ts.map +1 -1
  15. package/dist/commands/init.js +1 -10
  16. package/dist/commands/init.js.map +1 -1
  17. package/dist/commands/update.d.ts.map +1 -1
  18. package/dist/commands/update.js +1 -9
  19. package/dist/commands/update.js.map +1 -1
  20. package/dist/compile/adapters/claude-code.d.ts.map +1 -1
  21. package/dist/compile/adapters/claude-code.js +3 -24
  22. package/dist/compile/adapters/claude-code.js.map +1 -1
  23. package/dist/compile/adapters/codex.d.ts.map +1 -1
  24. package/dist/compile/adapters/codex.js +3 -2
  25. package/dist/compile/adapters/codex.js.map +1 -1
  26. package/dist/compile/adapters/cursor.d.ts.map +1 -1
  27. package/dist/compile/adapters/cursor.js +4 -2
  28. package/dist/compile/adapters/cursor.js.map +1 -1
  29. package/dist/compile/adapters/kiro.d.ts.map +1 -1
  30. package/dist/compile/adapters/kiro.js +6 -10
  31. package/dist/compile/adapters/kiro.js.map +1 -1
  32. package/dist/compile/adapters/windsurf.d.ts.map +1 -1
  33. package/dist/compile/adapters/windsurf.js +9 -11
  34. package/dist/compile/adapters/windsurf.js.map +1 -1
  35. package/dist/compile/content-root.d.ts +22 -0
  36. package/dist/compile/content-root.d.ts.map +1 -0
  37. package/dist/compile/content-root.js +28 -0
  38. package/dist/compile/content-root.js.map +1 -0
  39. package/dist/compile/limits.d.ts +20 -0
  40. package/dist/compile/limits.d.ts.map +1 -0
  41. package/dist/compile/limits.js +20 -0
  42. package/dist/compile/limits.js.map +1 -0
  43. package/dist/compile/naming.d.ts +92 -0
  44. package/dist/compile/naming.d.ts.map +1 -0
  45. package/dist/compile/naming.js +105 -0
  46. package/dist/compile/naming.js.map +1 -0
  47. package/dist/operational/discover.d.ts +89 -0
  48. package/dist/operational/discover.d.ts.map +1 -0
  49. package/dist/operational/discover.js +132 -0
  50. package/dist/operational/discover.js.map +1 -0
  51. package/dist/operational/emit.d.ts +93 -0
  52. package/dist/operational/emit.d.ts.map +1 -0
  53. package/dist/operational/emit.js +227 -0
  54. package/dist/operational/emit.js.map +1 -0
  55. package/dist/operational/knowledge.d.ts +64 -0
  56. package/dist/operational/knowledge.d.ts.map +1 -0
  57. package/dist/operational/knowledge.js +144 -0
  58. package/dist/operational/knowledge.js.map +1 -0
  59. package/dist/operational/packagers.d.ts +67 -0
  60. package/dist/operational/packagers.d.ts.map +1 -0
  61. package/dist/operational/packagers.js +252 -0
  62. package/dist/operational/packagers.js.map +1 -0
  63. package/dist/operational/redact.d.ts +49 -0
  64. package/dist/operational/redact.d.ts.map +1 -0
  65. package/dist/operational/redact.js +135 -0
  66. package/dist/operational/redact.js.map +1 -0
  67. package/dist/operational/schema.d.ts +80 -0
  68. package/dist/operational/schema.d.ts.map +1 -0
  69. package/dist/operational/schema.js +205 -0
  70. package/dist/operational/schema.js.map +1 -0
  71. package/dist/operational/verify.d.ts +100 -0
  72. package/dist/operational/verify.d.ts.map +1 -0
  73. package/dist/operational/verify.js +175 -0
  74. package/dist/operational/verify.js.map +1 -0
  75. package/package.json +2 -2
@@ -0,0 +1,227 @@
1
+ /**
2
+ * Operational-skill emission: plan building and staged, all-or-nothing execution.
3
+ *
4
+ * Reuses `InstallPlan`/`FileOp` — the same types the framework adapters produce —
5
+ * which buys skip-if-identical idempotence (NFR-7), dry-run equivalence, and
6
+ * `mergeBlock` support for codex without touching `SkillMeta` (AC-33).
7
+ *
8
+ * `executePlan` writes op-by-op, so a mid-plan failure leaves a partial tree. That
9
+ * is unacceptable under AC-45 and unrepairable under AC-10's collision refusal, so
10
+ * emission uses `executePlanStaged` instead: resolve and validate everything,
11
+ * stage every byte into one scratch directory, then commit by rename.
12
+ *
13
+ * Requirements: AC-15, AC-17, AC-45, AC-47, NFR-7
14
+ *
15
+ * @module
16
+ */
17
+ import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync, } from 'node:fs';
18
+ import { dirname, join, relative, sep } from 'node:path';
19
+ import { adapters } from '../compile/adapters/index.js';
20
+ import { mergeBlock } from '../compile/merger.js';
21
+ import { canonicalBodyPath, packagerFor } from './packagers.js';
22
+ import { serializeOperationalSkill } from './schema.js';
23
+ /** Thrown when staging or committing fails. */
24
+ export class EmitError extends Error {
25
+ committed;
26
+ constructor(reason,
27
+ /** Ops whose rename already completed, when a commit fails part-way. */
28
+ committed = []) {
29
+ super(reason);
30
+ this.committed = committed;
31
+ this.name = 'EmitError';
32
+ }
33
+ }
34
+ // ---------------------------------------------------------------------------
35
+ // Planning
36
+ // ---------------------------------------------------------------------------
37
+ /**
38
+ * Build the InstallPlan for one operational skill.
39
+ *
40
+ * Every packager is resolved **before** any op is produced, so a mixed
41
+ * supported/unsupported `platforms:` list throws during planning with nothing
42
+ * staged — AC-47's all-or-nothing guarantee.
43
+ *
44
+ * @param req - The emission request.
45
+ * @returns A plan whose ops cover the canonical body plus every platform artifact.
46
+ * @throws {UnsupportedPlatformError} When any configured platform lacks packaging.
47
+ */
48
+ export function planEmit(req) {
49
+ // Resolve first — this is the AC-47 gate.
50
+ const packagers = req.platforms.map((p) => packagerFor(p));
51
+ const ops = [];
52
+ const warnings = [];
53
+ // 1. Canonical body — the single source of full instructions (AC-13).
54
+ ops.push({
55
+ kind: 'create',
56
+ path: canonicalBodyPath(req.skill.meta.name),
57
+ content: serializeOperationalSkill(req.skill),
58
+ });
59
+ // 2. Per-skill platform artifacts.
60
+ for (const packager of packagers) {
61
+ ops.push(...packager.plan(req.skill));
62
+ }
63
+ // 3. Index artifacts, one per index-shaped platform.
64
+ for (const packager of packagers) {
65
+ if (!packager.planIndex)
66
+ continue;
67
+ const op = packager.planIndex(req.allSkills);
68
+ if (op)
69
+ ops.push(op);
70
+ }
71
+ // 4. Platform validators, where the platform defines one. This is how the
72
+ // ownership-marker placement stays honest: a first-line comment before
73
+ // frontmatter fails claude-code's and cursor's own checks.
74
+ for (const op of ops) {
75
+ for (const platform of req.platforms) {
76
+ const adapter = adapters.get(platform);
77
+ if (!adapter)
78
+ continue;
79
+ const result = adapter.validate(op);
80
+ warnings.push(...result.warnings);
81
+ if (!result.valid) {
82
+ throw new EmitError(`emitted file ${op.path} fails ${platform} validation: ${result.errors.join('; ')}`);
83
+ }
84
+ }
85
+ }
86
+ return { ops, warnings };
87
+ }
88
+ // ---------------------------------------------------------------------------
89
+ // Content resolution
90
+ // ---------------------------------------------------------------------------
91
+ /** Final on-disk content for one op, including merge-block composition. */
92
+ function resolveContent(op, rootDir) {
93
+ if (op.kind === 'merge-block') {
94
+ const abs = join(rootDir, op.path);
95
+ const existing = existsSync(abs) ? readFileSync(abs, 'utf8') : '';
96
+ return mergeBlock(existing, op.blockId, op.content);
97
+ }
98
+ return op.content;
99
+ }
100
+ /** Reject any op path that escapes the project root. */
101
+ function assertInsideRoot(rootDir, opPath) {
102
+ const abs = join(rootDir, opPath);
103
+ const rel = relative(rootDir, abs);
104
+ if (rel.startsWith('..') || rel.startsWith(`..${sep}`)) {
105
+ throw new EmitError(`refusing to write outside the project root: ${opPath}`);
106
+ }
107
+ }
108
+ // ---------------------------------------------------------------------------
109
+ // Staged execution (AC-45)
110
+ // ---------------------------------------------------------------------------
111
+ /**
112
+ * Apply a plan atomically-as-possible.
113
+ *
114
+ * Three phases:
115
+ * 1. **Resolve and validate** — compute final content for every op. Pure. Every
116
+ * predictable failure lands here, before a single byte is written.
117
+ * 2. **Stage** — write each op into one scratch directory outside every path the
118
+ * project enumerates. On failure, remove the scratch dir and abort; the tree is
119
+ * exactly as it was.
120
+ * 3. **Commit** — create parent directories, then rename each staged file onto its
121
+ * target.
122
+ *
123
+ * Honest bound: phase 3 is a rename sequence, not one transaction. A failure there
124
+ * reports which renames completed, and the residual state is repaired by
125
+ * `--re-emit`, which is idempotent. Directories this run created are removed on a
126
+ * phase-3 failure only when still empty.
127
+ *
128
+ * Skip-if-identical is preserved, so re-emitting unchanged input writes nothing
129
+ * (NFR-7, AC-17).
130
+ *
131
+ * @param plan - The plan to apply.
132
+ * @param rootDir - Absolute project root.
133
+ * @returns What was written and skipped.
134
+ */
135
+ export function executePlanStaged(plan, rootDir) {
136
+ // --- Phase 1: resolve + validate ---------------------------------------
137
+ const resolved = [];
138
+ for (const op of plan.ops) {
139
+ assertInsideRoot(rootDir, op.path);
140
+ resolved.push({
141
+ op,
142
+ content: resolveContent(op, rootDir),
143
+ abs: join(rootDir, op.path),
144
+ });
145
+ }
146
+ const toWrite = resolved.filter((r) => !(existsSync(r.abs) && readFileSync(r.abs, 'utf8') === r.content));
147
+ const filesSkipped = resolved
148
+ .filter((r) => !toWrite.includes(r))
149
+ .map((r) => r.op.path);
150
+ if (toWrite.length === 0) {
151
+ return { filesWritten: [], filesSkipped, warnings: [...plan.warnings] };
152
+ }
153
+ // --- Phase 2: stage ----------------------------------------------------
154
+ const scratch = join(rootDir, '.aidlc', `.tmp-emit-${process.pid}`);
155
+ const staged = [];
156
+ try {
157
+ mkdirSync(scratch, { recursive: true });
158
+ for (let i = 0; i < toWrite.length; i++) {
159
+ const { op, content, abs } = toWrite[i];
160
+ // Flat, index-keyed names: no nesting to recreate, and no chance of a
161
+ // staged file colliding with another op's directory.
162
+ const tmp = join(scratch, `${i}.staged`);
163
+ writeFileSync(tmp, content, 'utf8');
164
+ staged.push({ tmp, abs, path: op.path });
165
+ }
166
+ }
167
+ catch (err) {
168
+ rmSync(scratch, { recursive: true, force: true });
169
+ throw new EmitError(`staging failed, nothing was written: ${err.message}`);
170
+ }
171
+ // --- Phase 3: commit ---------------------------------------------------
172
+ const filesWritten = [];
173
+ const createdDirs = [];
174
+ try {
175
+ for (const { tmp, abs, path } of staged) {
176
+ const dir = dirname(abs);
177
+ if (!existsSync(dir)) {
178
+ mkdirSync(dir, { recursive: true });
179
+ createdDirs.push(dir);
180
+ }
181
+ renameSync(tmp, abs);
182
+ filesWritten.push(path);
183
+ }
184
+ }
185
+ catch (err) {
186
+ // Remove directories we created that are still empty, so a failed commit
187
+ // does not leave scaffolding behind.
188
+ for (const dir of createdDirs.reverse()) {
189
+ try {
190
+ rmSync(dir, { recursive: false });
191
+ }
192
+ catch {
193
+ // Non-empty (a rename landed inside it) — leave it.
194
+ }
195
+ }
196
+ rmSync(scratch, { recursive: true, force: true });
197
+ throw new EmitError(`commit failed after writing ${filesWritten.length}/${staged.length} files: ` +
198
+ `${err.message}. Repair with: aidlc add skill --re-emit`, filesWritten);
199
+ }
200
+ rmSync(scratch, { recursive: true, force: true });
201
+ return { filesWritten, filesSkipped, warnings: [...plan.warnings] };
202
+ }
203
+ /**
204
+ * Simulate `executePlanStaged` without touching the filesystem.
205
+ *
206
+ * Uses the same resolution, so `--dry-run` is provably equivalent to a real run.
207
+ *
208
+ * @param plan - The plan to simulate.
209
+ * @param rootDir - Absolute project root.
210
+ */
211
+ export function dryRunPlanStaged(plan, rootDir) {
212
+ const filesWritten = [];
213
+ const filesSkipped = [];
214
+ for (const op of plan.ops) {
215
+ assertInsideRoot(rootDir, op.path);
216
+ const abs = join(rootDir, op.path);
217
+ const content = resolveContent(op, rootDir);
218
+ if (existsSync(abs) && readFileSync(abs, 'utf8') === content) {
219
+ filesSkipped.push(op.path);
220
+ }
221
+ else {
222
+ filesWritten.push(op.path);
223
+ }
224
+ }
225
+ return { filesWritten, filesSkipped, warnings: [...plan.warnings] };
226
+ }
227
+ //# sourceMappingURL=emit.js.map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7B,CAAC;IACH,CAAC;IAED,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;AACtE,CAAC"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Knowledge-graph registration for operational skills.
3
+ *
4
+ * Registers each generated skill so `aidlc knowledge query <name>` finds it and a
5
+ * developer returning months later does not write a second skill for the same job
6
+ * (US-6, AC-28…AC-30, AC-49).
7
+ *
8
+ * Two properties are load-bearing and neither is free:
9
+ *
10
+ * - **The entity type is not gate-counted.** `custom:operational-skill` rather than
11
+ * `module`, because the ideation seeding gate counts `module`, `convention`, and
12
+ * `depends-on` (`knowledge/gate-criterion.ts`). Registering skills as modules
13
+ * would let generated files satisfy a lifecycle gate meant to measure real
14
+ * architecture.
15
+ * - **The id is namespaced and collisions are refused.** `addEntity` merges into any
16
+ * pre-existing entity with the same id, and `mergeEntities` never overrides
17
+ * `type` — so an unnamespaced id colliding with an existing `module` would stay
18
+ * gate-counted *and* clobber an architecture fact. Registration therefore checks
19
+ * the resolved type first and refuses rather than merging.
20
+ *
21
+ * Registration is best-effort: failure warns and generation still succeeds (AC-30).
22
+ *
23
+ * Requirements: AC-28, AC-29, AC-30, AC-49
24
+ *
25
+ * @module
26
+ */
27
+ import type { OperationalSkill } from './schema.js';
28
+ /** Entity type for operational skills — deliberately not gate-counted (AC-28). */
29
+ export declare const OPERATIONAL_ENTITY_TYPE = "custom:operational-skill";
30
+ /** Id prefix keeping operational entities out of the general id namespace. */
31
+ export declare const OPERATIONAL_ID_PREFIX = "operational-skill-";
32
+ /** Outcome of a registration attempt. */
33
+ export interface RegistrationResult {
34
+ /** True when the entity now exists with the operational type. */
35
+ registered: boolean;
36
+ /** Non-fatal explanation when `registered` is false, or a merge note. */
37
+ warning?: string;
38
+ /** The entity id used. */
39
+ id: string;
40
+ }
41
+ /** Namespaced entity id for a skill name. */
42
+ export declare function operationalEntityId(name: string): string;
43
+ /**
44
+ * Register (or repair) an operational skill in the knowledge graph.
45
+ *
46
+ * Never throws: a graph problem must not lose a skill the user already confirmed
47
+ * (AC-30). Re-running for a skill whose files exist but whose entity is missing
48
+ * recreates it, which is the AC-49 repair path.
49
+ *
50
+ * @param projectRoot - Absolute project root.
51
+ * @param skill - The skill to register.
52
+ * @returns Whether the entity is now present, plus any warning to surface.
53
+ */
54
+ export declare function registerOperationalSkill(projectRoot: string, skill: OperationalSkill): RegistrationResult;
55
+ /**
56
+ * Is this skill already registered with the operational type?
57
+ *
58
+ * Used to decide whether a re-run needs to repair registration (AC-49).
59
+ *
60
+ * @param projectRoot - Absolute project root.
61
+ * @param name - Skill name.
62
+ */
63
+ export declare function isOperationalSkillRegistered(projectRoot: string, name: string): boolean;
64
+ //# sourceMappingURL=knowledge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"knowledge.d.ts","sourceRoot":"","sources":["../../src/operational/knowledge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,kFAAkF;AAClF,eAAO,MAAM,uBAAuB,6BAA6B,CAAC;AAElE,8EAA8E;AAC9E,eAAO,MAAM,qBAAqB,uBAAuB,CAAC;AAE1D,yCAAyC;AACzC,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,UAAU,EAAE,OAAO,CAAC;IACpB,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0BAA0B;IAC1B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,6CAA6C;AAC7C,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,gBAAgB,GACtB,kBAAkB,CAiEpB;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAoBvF"}
@@ -0,0 +1,144 @@
1
+ /**
2
+ * Knowledge-graph registration for operational skills.
3
+ *
4
+ * Registers each generated skill so `aidlc knowledge query <name>` finds it and a
5
+ * developer returning months later does not write a second skill for the same job
6
+ * (US-6, AC-28…AC-30, AC-49).
7
+ *
8
+ * Two properties are load-bearing and neither is free:
9
+ *
10
+ * - **The entity type is not gate-counted.** `custom:operational-skill` rather than
11
+ * `module`, because the ideation seeding gate counts `module`, `convention`, and
12
+ * `depends-on` (`knowledge/gate-criterion.ts`). Registering skills as modules
13
+ * would let generated files satisfy a lifecycle gate meant to measure real
14
+ * architecture.
15
+ * - **The id is namespaced and collisions are refused.** `addEntity` merges into any
16
+ * pre-existing entity with the same id, and `mergeEntities` never overrides
17
+ * `type` — so an unnamespaced id colliding with an existing `module` would stay
18
+ * gate-counted *and* clobber an architecture fact. Registration therefore checks
19
+ * the resolved type first and refuses rather than merging.
20
+ *
21
+ * Registration is best-effort: failure warns and generation still succeeds (AC-30).
22
+ *
23
+ * Requirements: AC-28, AC-29, AC-30, AC-49
24
+ *
25
+ * @module
26
+ */
27
+ import { knowledgeExists, openKnowledge } from '../knowledge/engine.js';
28
+ /** Entity type for operational skills — deliberately not gate-counted (AC-28). */
29
+ export const OPERATIONAL_ENTITY_TYPE = 'custom:operational-skill';
30
+ /** Id prefix keeping operational entities out of the general id namespace. */
31
+ export const OPERATIONAL_ID_PREFIX = 'operational-skill-';
32
+ /** Namespaced entity id for a skill name. */
33
+ export function operationalEntityId(name) {
34
+ return `${OPERATIONAL_ID_PREFIX}${name}`;
35
+ }
36
+ /**
37
+ * Register (or repair) an operational skill in the knowledge graph.
38
+ *
39
+ * Never throws: a graph problem must not lose a skill the user already confirmed
40
+ * (AC-30). Re-running for a skill whose files exist but whose entity is missing
41
+ * recreates it, which is the AC-49 repair path.
42
+ *
43
+ * @param projectRoot - Absolute project root.
44
+ * @param skill - The skill to register.
45
+ * @returns Whether the entity is now present, plus any warning to surface.
46
+ */
47
+ export function registerOperationalSkill(projectRoot, skill) {
48
+ const id = operationalEntityId(skill.meta.name);
49
+ // Projects that never adopted the knowledge graph are not forced into it.
50
+ if (!knowledgeExists(projectRoot)) {
51
+ return {
52
+ registered: false,
53
+ id,
54
+ warning: 'knowledge graph not initialized; skipped registration (run `aidlc knowledge add` later if wanted)',
55
+ };
56
+ }
57
+ let engine;
58
+ try {
59
+ engine = openKnowledge(projectRoot);
60
+ }
61
+ catch (err) {
62
+ return {
63
+ registered: false,
64
+ id,
65
+ warning: `could not open knowledge graph: ${err.message}`,
66
+ };
67
+ }
68
+ try {
69
+ // Refuse to merge across types. mergeEntities preserves the existing `type`,
70
+ // so merging here would silently rewrite someone else's record.
71
+ const existing = engine.index.getEntity(id);
72
+ if (existing && existing.type !== OPERATIONAL_ENTITY_TYPE) {
73
+ return {
74
+ registered: false,
75
+ id,
76
+ warning: `knowledge entity '${id}' already exists with type '${existing.type}'; ` +
77
+ 'refusing to overwrite it — the skill was written but not registered',
78
+ };
79
+ }
80
+ const result = engine.writer.addEntity({
81
+ id,
82
+ type: OPERATIONAL_ENTITY_TYPE,
83
+ name: skill.meta.name,
84
+ description: `Operational skill: ${skill.meta.description}`,
85
+ source: `.aidlc/operational-skills/${skill.meta.name}.md`,
86
+ tags: ['operational-skill', 'app-owned'],
87
+ });
88
+ return {
89
+ registered: true,
90
+ id,
91
+ ...(result.warnings.length > 0 ? { warning: result.warnings.join('; ') } : {}),
92
+ };
93
+ }
94
+ catch (err) {
95
+ return {
96
+ registered: false,
97
+ id,
98
+ warning: `registration failed: ${err.message}`,
99
+ };
100
+ }
101
+ finally {
102
+ try {
103
+ engine.close();
104
+ }
105
+ catch {
106
+ // Closing is best-effort; a close failure must not mask the result.
107
+ }
108
+ }
109
+ }
110
+ /**
111
+ * Is this skill already registered with the operational type?
112
+ *
113
+ * Used to decide whether a re-run needs to repair registration (AC-49).
114
+ *
115
+ * @param projectRoot - Absolute project root.
116
+ * @param name - Skill name.
117
+ */
118
+ export function isOperationalSkillRegistered(projectRoot, name) {
119
+ if (!knowledgeExists(projectRoot))
120
+ return false;
121
+ let engine;
122
+ try {
123
+ engine = openKnowledge(projectRoot);
124
+ }
125
+ catch {
126
+ return false;
127
+ }
128
+ try {
129
+ const entity = engine.index.getEntity(operationalEntityId(name));
130
+ return entity?.type === OPERATIONAL_ENTITY_TYPE;
131
+ }
132
+ catch {
133
+ return false;
134
+ }
135
+ finally {
136
+ try {
137
+ engine.close();
138
+ }
139
+ catch {
140
+ // ignore
141
+ }
142
+ }
143
+ }
144
+ //# sourceMappingURL=knowledge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"knowledge.js","sourceRoot":"","sources":["../../src/operational/knowledge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAGxE,kFAAkF;AAClF,MAAM,CAAC,MAAM,uBAAuB,GAAG,0BAA0B,CAAC;AAElE,8EAA8E;AAC9E,MAAM,CAAC,MAAM,qBAAqB,GAAG,oBAAoB,CAAC;AAY1D,6CAA6C;AAC7C,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,OAAO,GAAG,qBAAqB,GAAG,IAAI,EAAE,CAAC;AAC3C,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,wBAAwB,CACtC,WAAmB,EACnB,KAAuB;IAEvB,MAAM,EAAE,GAAG,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEhD,0EAA0E;IAC1E,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,CAAC;QAClC,OAAO;YACL,UAAU,EAAE,KAAK;YACjB,EAAE;YACF,OAAO,EACL,mGAAmG;SACtG,CAAC;IACJ,CAAC;IAED,IAAI,MAAM,CAAC;IACX,IAAI,CA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E;YACF,OAAO,EAAE,wBAAyB,GAAa,CAAC,OAAO,EAAE;SAC1D,CAAC;IACJ,CAAC;YAAS,CAAC;QACT,IAAI,CAAC;YACH,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;QAAC,MAAM,CAAC;YACP,oEAAoE;QACtE,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,4BAA4B,CAAC,WAAmB,EAAE,IAAY;IAC5E,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC;QAAE,OAAO,KAAK,CAAC;IAChD,IAAI,MAAM,CAAC;IACX,IAAI,CAAC;QACH,MAAM,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC;QACjE,OAAO,MAAM,EAAE,IAAI,KAAK,uBAAuB,CAAC;IAClD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;YAAS,CAAC;QACT,IAAI,CAAC;YACH,MAAM,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Per-platform packaging for operational skills.
3
+ *
4
+ * Mirrors the framework adapter seam — one canonical body, N platform-native
5
+ * files — but never passes through `loadSkills`/`parseSkillFile`, which require a
6
+ * lifecycle `phase` an operational skill does not have (D-1, AC-33).
7
+ *
8
+ * Two shapes, because two platforms have no natural one-skill-one-file form:
9
+ *
10
+ * - **Per-skill** (claude-code, kiro, cursor): one pointer file per skill.
11
+ * - **Index** (codex, windsurf): one artifact listing every operational skill.
12
+ * Codex reads only `AGENTS.md`; windsurf has a per-file character budget that
13
+ * O(n) rule files would exhaust.
14
+ *
15
+ * Every platform artifact is a **pointer** to the canonical body — the full
16
+ * instructions and the verification text live in
17
+ * `.aidlc/operational-skills/<name>.md` only. That scoping is what makes
18
+ * AC-35/AC-37/AC-38 well-defined.
19
+ *
20
+ * Requirements: AC-13, AC-14, AC-15, AC-16, AC-20, AC-47, AC-48
21
+ *
22
+ * @module
23
+ */
24
+ import type { FileOp, PlatformId } from '../core/types.js';
25
+ import type { OperationalSkill } from './schema.js';
26
+ /** Directory holding canonical operational-skill bodies (AC-13, D-2). */
27
+ export declare const OPERATIONAL_DIR = ".aidlc/operational-skills";
28
+ /** Merge-block id for operational skills. Distinct from every framework id. */
29
+ export declare const OPERATIONAL_BLOCK_ID = "aidlc-operational-skills";
30
+ /** Windsurf index rule path — unprefixed, so it cannot collide with framework rules. */
31
+ export declare const WINDSURF_INDEX_PATH = ".windsurf/rules/operational-skills.md";
32
+ /**
33
+ * Build the app-owned marker comment.
34
+ *
35
+ * Placement differs per target because two adapters validate that their files
36
+ * *begin* with frontmatter (`claude-code.ts`, `cursor.ts`), so a first-line
37
+ * comment would fail their own validators.
38
+ */
39
+ export declare function ownershipMarker(name: string): string;
40
+ /** Packaging strategy for one platform. */
41
+ export interface OperationalPackager {
42
+ readonly platform: PlatformId;
43
+ /** Per-skill file ops. Empty for index-shaped platforms. */
44
+ plan(skill: OperationalSkill): FileOp[];
45
+ /** One op covering all operational skills. Absent for per-skill platforms. */
46
+ planIndex?(skills: OperationalSkill[]): FileOp | null;
47
+ }
48
+ /** Thrown when a configured platform has no operational packaging (AC-16). */
49
+ export declare class UnsupportedPlatformError extends Error {
50
+ readonly platform: string;
51
+ constructor(platform: string, supported: readonly string[]);
52
+ }
53
+ /** Relative path of a skill's canonical body. */
54
+ export declare function canonicalBodyPath(name: string): string;
55
+ /** Platforms with operational packaging, sorted for stable error messages. */
56
+ export declare const supportedOperationalPlatforms: PlatformId[];
57
+ /**
58
+ * Look up the packager for a platform.
59
+ *
60
+ * @param platform - Platform identifier from `.aidlc/config.yaml`.
61
+ * @returns The packager.
62
+ * @throws {UnsupportedPlatformError} When the platform has no packaging (AC-16).
63
+ */
64
+ export declare function packagerFor(platform: PlatformId): OperationalPackager;
65
+ /** Does this platform have operational packaging? */
66
+ export declare function hasOperationalPackaging(platform: string): boolean;
67
+ //# sourceMappingURL=packagers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"packagers.d.ts","sourceRoot":"","sources":["../../src/operational/packagers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAMpD,yEAAyE;AACzE,eAAO,MAAM,eAAe,8BAA8B,CAAC;AAE3D,+EAA+E;AAC/E,eAAO,MAAM,oBAAoB,6BAA6B,CAAC;AAE/D,wFAAwF;AACxF,eAAO,MAAM,mBAAmB,0CAA0C,CAAC;AAM3E;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEpD;AAWD,2CAA2C;AAC3C,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,EAAE,UAAU,CAAC;IAC9B,4DAA4D;IAC5D,IAAI,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,EAAE,CAAC;IACxC,8EAA8E;IAC9E,SAAS,CAAC,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,GAAG,IAAI,CAAC;CACvD;AAED,8EAA8E;AAC9E,qBAAa,wBAAyB,SAAQ,KAAK;aAE/B,QAAQ,EAAE,MAAM;gBAAhB,QAAQ,EAAE,MAAM,EAChC,SAAS,EAAE,SAAS,MAAM,EAAE;CAQ/B;AAED,iDAAiD;AACjD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AA0L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