open-wiki-spec 0.3.0 → 0.4.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 (54) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +33 -2
  3. package/dist/cli/commands/init.d.ts +1 -1
  4. package/dist/cli/commands/init.d.ts.map +1 -1
  5. package/dist/cli/commands/init.js +14 -2
  6. package/dist/cli/commands/init.js.map +1 -1
  7. package/dist/cli/init/agents/agents-md.d.ts +24 -0
  8. package/dist/cli/init/agents/agents-md.d.ts.map +1 -0
  9. package/dist/cli/init/agents/agents-md.js +100 -0
  10. package/dist/cli/init/agents/agents-md.js.map +1 -0
  11. package/dist/cli/init/agents/claude.d.ts +12 -0
  12. package/dist/cli/init/agents/claude.d.ts.map +1 -0
  13. package/dist/cli/init/agents/claude.js +38 -0
  14. package/dist/cli/init/agents/claude.js.map +1 -0
  15. package/dist/cli/init/agents/codex.d.ts +15 -0
  16. package/dist/cli/init/agents/codex.d.ts.map +1 -0
  17. package/dist/cli/init/agents/codex.js +68 -0
  18. package/dist/cli/init/agents/codex.js.map +1 -0
  19. package/dist/cli/init/agents/detect.d.ts +19 -0
  20. package/dist/cli/init/agents/detect.d.ts.map +1 -0
  21. package/dist/cli/init/agents/detect.js +78 -0
  22. package/dist/cli/init/agents/detect.js.map +1 -0
  23. package/dist/cli/init/agents/index.d.ts +15 -0
  24. package/dist/cli/init/agents/index.d.ts.map +1 -0
  25. package/dist/cli/init/agents/index.js +22 -0
  26. package/dist/cli/init/agents/index.js.map +1 -0
  27. package/dist/cli/init/agents/transform.d.ts +10 -0
  28. package/dist/cli/init/agents/transform.d.ts.map +1 -0
  29. package/dist/cli/init/agents/transform.js +24 -0
  30. package/dist/cli/init/agents/transform.js.map +1 -0
  31. package/dist/cli/init/agents/types.d.ts +19 -0
  32. package/dist/cli/init/agents/types.d.ts.map +1 -0
  33. package/dist/cli/init/agents/types.js +2 -0
  34. package/dist/cli/init/agents/types.js.map +1 -0
  35. package/dist/cli/init/init-engine.d.ts.map +1 -1
  36. package/dist/cli/init/init-engine.js +16 -10
  37. package/dist/cli/init/init-engine.js.map +1 -1
  38. package/dist/cli/init/skill-generator.d.ts +11 -9
  39. package/dist/cli/init/skill-generator.d.ts.map +1 -1
  40. package/dist/cli/init/skill-generator.js +8 -988
  41. package/dist/cli/init/skill-generator.js.map +1 -1
  42. package/dist/cli/init/types.d.ts +8 -0
  43. package/dist/cli/init/types.d.ts.map +1 -1
  44. package/dist/cli/init/types.js +0 -3
  45. package/dist/cli/init/types.js.map +1 -1
  46. package/dist/cli/init/workflow-definitions.d.ts +15 -0
  47. package/dist/cli/init/workflow-definitions.d.ts.map +1 -0
  48. package/dist/cli/init/workflow-definitions.js +75 -0
  49. package/dist/cli/init/workflow-definitions.js.map +1 -0
  50. package/dist/core/embedding/embedder.d.ts +5 -1
  51. package/dist/core/embedding/embedder.d.ts.map +1 -1
  52. package/dist/core/embedding/embedder.js +5 -1
  53. package/dist/core/embedding/embedder.js.map +1 -1
  54. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,34 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.4.0] - 2026-06-01
6
+
7
+ ### Added
8
+ - **Codex compatibility.** `ows init` now generates OpenAI Codex integration alongside
9
+ Claude Code: `.agents/skills/ows-*/SKILL.md` skills (one per workflow) plus an
10
+ idempotent, clearly-marked `AGENTS.md` managed block. The Codex skills shell out to
11
+ the same `ows` CLI and carry no Claude-specific syntax (`$ows-*` invocation, no
12
+ `/ows-*` slash refs).
13
+ - **`ows init --agent claude|codex|both|auto`** selector (default `auto`). Auto-detect
14
+ uses project markers (`.claude/`, `CLAUDE.md` → Claude; `.codex/`, `.agents/`,
15
+ `AGENTS.md` → Codex), then host signals, then falls back to Claude. Fully
16
+ backward-compatible: Claude-only projects produce byte-identical output to 0.3.x.
17
+
18
+ ### Changed
19
+ - Refactored the init delivery layer into an agent-neutral adapter architecture
20
+ (`WORKFLOW_DEFINITIONS` is the single source of truth; `ClaudeAdapter` /
21
+ `CodexAdapter` render it). Claude command output is unchanged (verified
22
+ byte-for-byte). `InitResult` gains `agents` and `agentArtifacts`.
23
+
24
+ ### Safeguards
25
+ - `ows init` warns when `AGENTS.override.md` shadows the generated `AGENTS.md`, and
26
+ when the merged `AGENTS.md` would exceed Codex's ~32 KiB `project_doc_max_bytes`.
27
+
28
+ ## [0.3.1] - 2026-04-19
29
+
30
+ ### Fixed
31
+ - **Embedding model downloads fail → silent lexical-only fallback.** `DEFAULT_MODEL_REVISION` in `src/core/embedding/embedder.ts` was pinned to a commit hash that does not exist in the `Xenova/multilingual-e5-small` repository, so `tokenizer.json` returned 404 on every fresh install and the embedder quietly degraded to lexical retrieval. Hash is now pinned to a valid commit (`761b726d...`, Transformers.js v3 quantized ONNX). Semantic search restored for users who have never cached the model. Existing embedding caches are automatically re-keyed on the new revision.
32
+
5
33
  ## [0.3.0] - 2026-04-13
6
34
 
7
35
  ### Added
package/README.md CHANGED
@@ -200,7 +200,11 @@ ows status
200
200
  ows verify
201
201
  ```
202
202
 
203
- `ows init` creates the vault structure and generates 12 Claude Code skill files (`.claude/commands/ows-*.md`) so you can invoke workflows directly:
203
+ `ows init` creates the vault structure and generates agent integration files for
204
+ whichever coding agent(s) it detects (override with `--agent claude|codex|both|auto`):
205
+
206
+ - **Claude Code** → 12 slash commands in `.claude/commands/ows-*.md`
207
+ - **Codex** → 12 skills in `.agents/skills/ows-*/SKILL.md` + an `AGENTS.md` managed block
204
208
 
205
209
  ```
206
210
  /ows-propose /ows-continue /ows-apply /ows-verify
@@ -208,6 +212,33 @@ ows verify
208
212
  /ows-init /ows-migrate /ows-explore /ows-onboard
209
213
  ```
210
214
 
215
+ In Codex these same workflows are skills — mention one inline as `$ows-propose` or
216
+ pick it from the `/skills` menu. See **[Agent runtime support](#agent-runtime-support)**.
217
+
218
+ ### Agent runtime support
219
+
220
+ `ows` is the engine; coding agents drive it through generated integration files.
221
+ The workflow logic is shared — only the delivery format differs per agent.
222
+
223
+ | Agent | Files generated by `ows init` | How you invoke a workflow |
224
+ |-------|-------------------------------|---------------------------|
225
+ | **Claude Code** | `.claude/commands/ows-*.md` (12 slash commands) | `/ows-propose`, `/ows-continue`, … |
226
+ | **Codex** | `.agents/skills/ows-*/SKILL.md` (12 skills) + `AGENTS.md` block | `$ows-propose` inline, the `/skills` menu, or implicit selection |
227
+
228
+ `ows init` auto-detects which agent(s) to generate for:
229
+
230
+ - **Project markers** first — `.claude/` or `CLAUDE.md` → Claude; `.codex/`, `.agents/`, or `AGENTS.md` → Codex.
231
+ - Otherwise, whichever agent is installed on your machine.
232
+ - Otherwise, Claude Code.
233
+
234
+ Override anytime with `--agent claude|codex|both|auto` (default `auto`). The
235
+ generated `AGENTS.md` carries an idempotent, clearly-marked block; your own content
236
+ outside the markers is never touched. Re-running `ows init` is safe and idempotent.
237
+
238
+ > **Codex note:** the skills shell out to the `ows` CLI, so run Codex in a sandbox
239
+ > mode that permits executing it (`workspace-write` or `danger-full-access`), and make
240
+ > sure `ows` is installed (`ows --version`).
241
+
211
242
  ### Vault structure
212
243
 
213
244
  ```
@@ -389,7 +420,7 @@ npm test # 805+ tests should pass
389
420
 
390
421
  - **Semantic search improvements** — better embedding models, multilingual support
391
422
  - **Obsidian plugin** — native Obsidian integration for graph view, Dataview queries
392
- - **Additional agent runtime support** — Cursor, Codex, Gemini CLI adapters
423
+ - **Additional agent runtime support** — Cursor and Gemini CLI adapters (Codex shipped in 0.4.0)
393
424
  - **Documentation** — tutorials, examples, translations
394
425
  - **Testing** — edge cases, performance benchmarks, real-world usage reports
395
426
 
@@ -1,3 +1,3 @@
1
- import type { Command } from 'commander';
1
+ import { type Command } from 'commander';
2
2
  export declare function registerInitCommand(program: Command): void;
3
3
  //# sourceMappingURL=init.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIzC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiD1D"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAKA,OAAO,EAAU,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAKjD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8D1D"}
@@ -3,6 +3,7 @@ import { handleCliError } from "./error-handler.js";
3
3
  * CLI handler for `ows init`.
4
4
  */
5
5
  import * as path from 'node:path';
6
+ import { Option } from 'commander';
6
7
  import { initVault } from '../init/init-engine.js';
7
8
  import { jsonEnvelope } from '../json-envelope.js';
8
9
  export function registerInitCommand(program) {
@@ -11,10 +12,18 @@ export function registerInitCommand(program) {
11
12
  .description('Initialize a new open-wiki-spec vault')
12
13
  .option('--force', 'Force re-initialization, recreating meta files')
13
14
  .option('--skip-seed', 'Skip creating seed notes')
15
+ .addOption(new Option('--agent <agent>', 'Agent integration to generate')
16
+ .choices(['claude', 'codex', 'both', 'auto'])
17
+ .default('auto'))
14
18
  .option('--json', 'Output result as JSON')
15
19
  .action(async (targetPath, opts) => {
16
20
  try {
17
- const result = await initVault({ path: targetPath, force: opts.force, skipSeed: opts.skipSeed });
21
+ const result = await initVault({
22
+ path: targetPath,
23
+ force: opts.force,
24
+ skipSeed: opts.skipSeed,
25
+ agent: opts.agent,
26
+ });
18
27
  if (opts.json) {
19
28
  console.log(jsonEnvelope('init', result));
20
29
  }
@@ -28,7 +37,10 @@ export function registerInitCommand(program) {
28
37
  console.log(` Directories: ${result.directoriesCreated.length} created`);
29
38
  console.log(` Meta files: ${result.metaFilesCreated.length} created`);
30
39
  console.log(` Seed notes: ${result.seedFilesCreated.length} created`);
31
- console.log(` Skill files: ${result.skillFilesGenerated.length} generated`);
40
+ console.log(` Agents: ${result.agents.join(', ')}`);
41
+ for (const id of result.agents) {
42
+ console.log(` ${id}: ${result.agentArtifacts[id]?.length ?? 0} files`);
43
+ }
32
44
  if (result.warnings.length > 0) {
33
45
  for (const w of result.warnings)
34
46
  console.log(` Warning: ${w}`);
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD;;GAEG;AACH,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,MAAM,UAAU,mBAAmB,CAAC,OAAgB;IAClD,OAAO;SACJ,OAAO,CAAC,aAAa,CAAC;SACtB,WAAW,CAAC,uCAAuC,CAAC;SACpD,MAAM,CAAC,SAAS,EAAE,gDAAgD,CAAC;SACnE,MAAM,CAAC,aAAa,EAAE,0BAA0B,CAAC;SACjD,MAAM,CAAC,QAAQ,EAAE,uBAAuB,CAAC;SACzC,MAAM,CAAC,KAAK,EAAE,UAA8B,EAAE,IAA6D,EAAE,EAAE;QAC9G,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;YACjG,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;gBACd,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;YAC5C,CAAC;iBAAM,CAAC;gBACN,IAAI,MAAM,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;oBAC5B,OAAO,CAAC,GAAG,CAAC,wBAAwB,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;gBACzD,CAAC;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AACP,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * The ows-managed block injected into a project's `AGENTS.md` (Codex's always-on
3
+ * guidance file), plus a pure idempotent merge helper.
4
+ */
5
+ export declare const BEGIN = "<!-- ows:begin (managed by open-wiki-spec; edits inside this block are overwritten) -->";
6
+ export declare const END = "<!-- ows:end -->";
7
+ /** Codex's combined AGENTS.md cap (`project_doc_max_bytes`, ~32 KiB). */
8
+ export declare const AGENTS_MAX_BYTES: number;
9
+ export declare const OWS_AGENTS_BLOCK = "<!-- ows:begin (managed by open-wiki-spec; edits inside this block are overwritten) -->\n## open-wiki-spec (ows) \u2014 agent knowledge layer\n\nThis project keeps a persistent, typed knowledge layer in `wiki/` (a markdown\n\"vault\"). Prefer reading and maintaining that vault over re-scanning the filesystem\nfrom scratch each session. The `ows` CLI is the engine; it emits structured JSON\n(`--json`) that you parse and act on.\n\n### Setup check\nRun `ows --version` before using these skills. If it is missing, install with\n`npm i -g open-wiki-spec`. Codex must run in a sandbox mode that permits executing\n`ows` (`workspace-write` or `danger-full-access`).\n\n### Golden rule (deterministic preflight)\nBefore creating any Feature or Change, ALWAYS run the preflight and act on its\n`classification`:\n```bash\nows propose \"<summary>\" --keywords \"<k1>,<k2>\" --dry-run --json\n```\nNever decide \"does something similar already exist?\" by free-form reasoning \u2014 the\nCLI is the retrieval engine. Classifications: `existing_change`, `existing_feature`,\n`new_feature`, `needs_confirmation` (stop and ask the user).\n\n### Note types\nFeature (canonical current behavior) \u00B7 Change (a unit of proposed work) \u00B7 System\n(component boundary) \u00B7 Decision (rationale) \u00B7 Source (evidence) \u00B7 Query (investigation).\n\n### Lifecycle\n`proposed -> planned -> in_progress -> applied -> (archived)`. Use `ows continue <id>`\nto advance, `ows apply <id>` to fold a Change into Feature notes, `ows verify` to\ncheck consistency (4 dimensions), `ows archive <id>` when done.\n\n### Skills (in `.agents/skills/`)\n`ows-propose`, `ows-continue`, `ows-apply`, `ows-verify`, `ows-query`,\n`ows-status`, `ows-retrieve`, `ows-archive`, `ows-init`, `ows-explore`,\n`ows-onboard`, `ows-migrate`. Mention one inline as `$ows-<name>` or pick it\nfrom `/skills`. Each skill drives the matching `ows` subcommand.\n\n### Guardrails\nAlways `--dry-run` destructive or creative steps first. Never auto-resolve\n`needs_confirmation` or `stale_base` \u2014 ask the user. Show `ows` JSON reasoning\n(classification, scores) so decisions stay explainable.\n<!-- ows:end -->\n";
10
+ /**
11
+ * Insert or replace the ows managed block in an `AGENTS.md` body. Pure and
12
+ * convergent — any input yields a body with exactly one well-formed block.
13
+ *
14
+ * - empty existing → just the block
15
+ * - exactly one well-formed block → replace it IN PLACE (surrounding order kept)
16
+ * - no markers → append the block after the existing content
17
+ * - malformed/duplicate markers (BEGIN-only, END-only, END-before-BEGIN, multiple
18
+ * pairs) → strip every managed region and stray marker, then append one clean block
19
+ *
20
+ * Whitespace is normalized only at the join boundaries, never across the whole
21
+ * document, so user-authored blank-line runs elsewhere are preserved.
22
+ */
23
+ export declare function mergeAgentsMd(existing: string, block: string): string;
24
+ //# sourceMappingURL=agents-md.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents-md.d.ts","sourceRoot":"","sources":["../../../../src/cli/init/agents/agents-md.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,KAAK,4FAA4F,CAAC;AAC/G,eAAO,MAAM,GAAG,qBAAqB,CAAC;AAEtC,yEAAyE;AACzE,eAAO,MAAM,gBAAgB,QAAY,CAAC;AAE1C,eAAO,MAAM,gBAAgB,woEA2C5B,CAAC;AAUF;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CA8BrE"}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * The ows-managed block injected into a project's `AGENTS.md` (Codex's always-on
3
+ * guidance file), plus a pure idempotent merge helper.
4
+ */
5
+ export const BEGIN = '<!-- ows:begin (managed by open-wiki-spec; edits inside this block are overwritten) -->';
6
+ export const END = '<!-- ows:end -->';
7
+ /** Codex's combined AGENTS.md cap (`project_doc_max_bytes`, ~32 KiB). */
8
+ export const AGENTS_MAX_BYTES = 32 * 1024;
9
+ export const OWS_AGENTS_BLOCK = `${BEGIN}
10
+ ## open-wiki-spec (ows) — agent knowledge layer
11
+
12
+ This project keeps a persistent, typed knowledge layer in \`wiki/\` (a markdown
13
+ "vault"). Prefer reading and maintaining that vault over re-scanning the filesystem
14
+ from scratch each session. The \`ows\` CLI is the engine; it emits structured JSON
15
+ (\`--json\`) that you parse and act on.
16
+
17
+ ### Setup check
18
+ Run \`ows --version\` before using these skills. If it is missing, install with
19
+ \`npm i -g open-wiki-spec\`. Codex must run in a sandbox mode that permits executing
20
+ \`ows\` (\`workspace-write\` or \`danger-full-access\`).
21
+
22
+ ### Golden rule (deterministic preflight)
23
+ Before creating any Feature or Change, ALWAYS run the preflight and act on its
24
+ \`classification\`:
25
+ \`\`\`bash
26
+ ows propose "<summary>" --keywords "<k1>,<k2>" --dry-run --json
27
+ \`\`\`
28
+ Never decide "does something similar already exist?" by free-form reasoning — the
29
+ CLI is the retrieval engine. Classifications: \`existing_change\`, \`existing_feature\`,
30
+ \`new_feature\`, \`needs_confirmation\` (stop and ask the user).
31
+
32
+ ### Note types
33
+ Feature (canonical current behavior) · Change (a unit of proposed work) · System
34
+ (component boundary) · Decision (rationale) · Source (evidence) · Query (investigation).
35
+
36
+ ### Lifecycle
37
+ \`proposed -> planned -> in_progress -> applied -> (archived)\`. Use \`ows continue <id>\`
38
+ to advance, \`ows apply <id>\` to fold a Change into Feature notes, \`ows verify\` to
39
+ check consistency (4 dimensions), \`ows archive <id>\` when done.
40
+
41
+ ### Skills (in \`.agents/skills/\`)
42
+ \`ows-propose\`, \`ows-continue\`, \`ows-apply\`, \`ows-verify\`, \`ows-query\`,
43
+ \`ows-status\`, \`ows-retrieve\`, \`ows-archive\`, \`ows-init\`, \`ows-explore\`,
44
+ \`ows-onboard\`, \`ows-migrate\`. Mention one inline as \`$ows-<name>\` or pick it
45
+ from \`/skills\`. Each skill drives the matching \`ows\` subcommand.
46
+
47
+ ### Guardrails
48
+ Always \`--dry-run\` destructive or creative steps first. Never auto-resolve
49
+ \`needs_confirmation\` or \`stale_base\` — ask the user. Show \`ows\` JSON reasoning
50
+ (classification, scores) so decisions stay explainable.
51
+ ${END}
52
+ `;
53
+ function escapeRe(s) {
54
+ return s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
55
+ }
56
+ function countOccurrences(haystack, needle) {
57
+ return haystack.split(needle).length - 1;
58
+ }
59
+ /**
60
+ * Insert or replace the ows managed block in an `AGENTS.md` body. Pure and
61
+ * convergent — any input yields a body with exactly one well-formed block.
62
+ *
63
+ * - empty existing → just the block
64
+ * - exactly one well-formed block → replace it IN PLACE (surrounding order kept)
65
+ * - no markers → append the block after the existing content
66
+ * - malformed/duplicate markers (BEGIN-only, END-only, END-before-BEGIN, multiple
67
+ * pairs) → strip every managed region and stray marker, then append one clean block
68
+ *
69
+ * Whitespace is normalized only at the join boundaries, never across the whole
70
+ * document, so user-authored blank-line runs elsewhere are preserved.
71
+ */
72
+ export function mergeAgentsMd(existing, block) {
73
+ const normBlock = block.trimEnd() + '\n';
74
+ if (!existing.trim())
75
+ return normBlock;
76
+ const begins = countOccurrences(existing, BEGIN);
77
+ const ends = countOccurrences(existing, END);
78
+ const b = existing.indexOf(BEGIN);
79
+ const e = existing.indexOf(END);
80
+ // Exactly one well-formed pair → replace in place, preserving surrounding order.
81
+ if (begins === 1 && ends === 1 && b !== -1 && e > b) {
82
+ const before = existing.slice(0, b).replace(/\s+$/, '');
83
+ const after = existing.slice(e + END.length).replace(/^\s+/, '');
84
+ const parts = [before, normBlock.trimEnd(), after].filter((p) => p.length > 0);
85
+ return parts.join('\n\n').replace(/\s+$/, '') + '\n';
86
+ }
87
+ // No markers at all → append after the existing content.
88
+ if (begins === 0 && ends === 0) {
89
+ return existing.replace(/\s+$/, '') + '\n\n' + normBlock;
90
+ }
91
+ // Malformed/duplicate markers → strip all managed regions + stray markers, append clean.
92
+ let base = existing.replace(new RegExp(escapeRe(BEGIN) + '[\\s\\S]*?' + escapeRe(END), 'g'), '');
93
+ base = base
94
+ .split('\n')
95
+ .filter((line) => !line.includes(BEGIN) && !line.includes(END))
96
+ .join('\n')
97
+ .replace(/\s+$/, '');
98
+ return base ? base + '\n\n' + normBlock : normBlock;
99
+ }
100
+ //# sourceMappingURL=agents-md.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents-md.js","sourceRoot":"","sources":["../../../../src/cli/init/agents/agents-md.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,KAAK,GAAG,yFAAyF,CAAC;AAC/G,MAAM,CAAC,MAAM,GAAG,GAAG,kBAAkB,CAAC;AAEtC,yEAAyE;AACzE,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,GAAG,IAAI,CAAC;AAE1C,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CtC,GAAG;CACJ,CAAC;AAEF,SAAS,QAAQ,CAAC,CAAS;IACzB,OAAO,CAAC,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AAClD,CAAC;AAED,SAAS,gBAAgB,CAAC,QAAgB,EAAE,MAAc;IACxD,OAAO,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;AAC3C,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,aAAa,CAAC,QAAgB,EAAE,KAAa;IAC3D,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC;IACzC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE;QAAE,OAAO,SAAS,CAAC;IAEvC,MAAM,MAAM,GAAG,gBAAgB,CAAC,QAAQ,EAAE,KAAK,C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CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;IACjG,IAAI,GAAG,IAAI;SACR,KAAK,CAAC,IAAI,CAAC;SACX,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;SAC9D,IAAI,CAAC,IAAI,CAAC;SACV,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACvB,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;AACtD,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { WorkflowDefinition } from '../workflow-definitions.js';
2
+ import type { AgentAdapter, AgentArtifact } from './types.js';
3
+ /**
4
+ * Renders ows workflows as Claude Code slash commands at `.claude/commands/ows-*.md`.
5
+ * Output is byte-identical to historical releases (transform is identity).
6
+ */
7
+ export declare class ClaudeAdapter implements AgentAdapter {
8
+ readonly id: "claude";
9
+ render(defs: WorkflowDefinition[]): AgentArtifact[];
10
+ writeAll(projectPath: string, defs: WorkflowDefinition[]): string[];
11
+ }
12
+ //# sourceMappingURL=claude.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude.d.ts","sourceRoot":"","sources":["../../../../src/cli/init/agents/claude.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG9D;;;GAGG;AACH,qBAAa,aAAc,YAAW,YAAY;IAChD,QAAQ,CAAC,EAAE,EAAG,QAAQ,CAAU;IAEhC,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,GAAG,aAAa,EAAE;IAOnD,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,GAAG,MAAM,EAAE;CAmBpE"}
@@ -0,0 +1,38 @@
1
+ import * as fs from 'node:fs';
2
+ import * as path from 'node:path';
3
+ import { toClaude } from './transform.js';
4
+ /**
5
+ * Renders ows workflows as Claude Code slash commands at `.claude/commands/ows-*.md`.
6
+ * Output is byte-identical to historical releases (transform is identity).
7
+ */
8
+ export class ClaudeAdapter {
9
+ id = 'claude';
10
+ render(defs) {
11
+ return defs.map((d) => ({
12
+ path: path.join('.claude', 'commands', `${d.name}.md`),
13
+ contents: `---\nname: ${d.name}\ndescription: ${toClaude(d.description)}\n---\n\n${toClaude(d.body)}\n`,
14
+ }));
15
+ }
16
+ writeAll(projectPath, defs) {
17
+ const written = [];
18
+ for (const art of this.render(defs)) {
19
+ const abs = path.join(projectPath, art.path);
20
+ fs.mkdirSync(path.dirname(abs), { recursive: true });
21
+ // If an existing file was customized, back it up before overwriting.
22
+ if (fs.existsSync(abs)) {
23
+ try {
24
+ const existing = fs.readFileSync(abs, 'utf-8');
25
+ if (existing !== art.contents)
26
+ fs.writeFileSync(`${abs}.bak`, existing);
27
+ }
28
+ catch {
29
+ // best-effort backup — don't block init if read fails
30
+ }
31
+ }
32
+ fs.writeFileSync(abs, art.contents);
33
+ written.push(abs);
34
+ }
35
+ return written;
36
+ }
37
+ }
38
+ //# sourceMappingURL=claude.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude.js","sourceRoot":"","sources":["../../../../src/cli/init/agents/claude.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C;;;GAGG;AACH,MAAM,OAAO,aAAa;IACf,EAAE,GAAG,QAAiB,CAAC;IAEhC,MAAM,CAAC,IAA0B;QAC/B,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC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';
2
+ import type { AgentAdapter, AgentArtifact } from './types.js';
3
+ /** The `## Invocation` header prepended to every Codex skill body. Exported so tests
4
+ * can assert each skill's full content by identity. */
5
+ export declare function invocationSection(name: string): string;
6
+ /**
7
+ * Renders ows workflows as OpenAI Codex skills under `.agents/skills/ows-<key>/`
8
+ * (one `SKILL.md` each) and maintains an idempotent ows block in `AGENTS.md`.
9
+ */
10
+ export declare class CodexAdapter implements AgentAdapter {
11
+ readonly id: "codex";
12
+ render(defs: WorkflowDefinition[]): AgentArtifact[];
13
+ writeAll(projectPath: string, defs: WorkflowDefinition[], warnings?: string[]): string[];
14
+ }
15
+ //# sourceMappingURL=codex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../../../src/cli/init/agents/codex.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI9D;wDACwD;AACxD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAOtD;AAED;;;GAGG;AACH,qBAAa,YAAa,YAAW,YAAY;IAC/C,QAAQ,CAAC,EAAE,EAAG,OAAO,CAAU;IAE/B,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,GAAG,aAAa,EAAE;IAUnD,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,EAAE,QAAQ,GAAE,MAAM,EAAO,GAAG,MAAM,EAAE;CA0C7F"}
@@ -0,0 +1,68 @@
1
+ import * as fs from 'node:fs';
2
+ import * as path from 'node:path';
3
+ import { toCodex } from './transform.js';
4
+ import { OWS_AGENTS_BLOCK, mergeAgentsMd, AGENTS_MAX_BYTES } from './agents-md.js';
5
+ /** The `## Invocation` header prepended to every Codex skill body. Exported so tests
6
+ * can assert each skill's full content by identity. */
7
+ export function invocationSection(name) {
8
+ const mention = '`$' + name + '`'; // e.g. `$ows-propose`
9
+ return (`## Invocation\n\nImplicitly selected when your task matches the description above, ` +
10
+ `or invoke it explicitly: mention ${mention} inline, or pick \`${name}\` from \`/skills\`. ` +
11
+ `This skill drives the \`ows\` CLI - run the commands below directly.\n\n`);
12
+ }
13
+ /**
14
+ * Renders ows workflows as OpenAI Codex skills under `.agents/skills/ows-<key>/`
15
+ * (one `SKILL.md` each) and maintains an idempotent ows block in `AGENTS.md`.
16
+ */
17
+ export class CodexAdapter {
18
+ id = 'codex';
19
+ render(defs) {
20
+ const arts = defs.map((d) => ({
21
+ path: `.agents/skills/${d.name}/SKILL.md`,
22
+ contents: `---\nname: ${d.name}\ndescription: ${toCodex(d.description)}\n---\n\n${invocationSection(d.name)}${toCodex(d.body)}\n`,
23
+ }));
24
+ // AGENTS.md artifact carries ONLY the managed block; writeAll merges it.
25
+ arts.push({ path: 'AGENTS.md', contents: OWS_AGENTS_BLOCK });
26
+ return arts;
27
+ }
28
+ writeAll(projectPath, defs, warnings = []) {
29
+ const written = [];
30
+ for (const art of this.render(defs)) {
31
+ const abs = path.join(projectPath, art.path);
32
+ if (art.path === 'AGENTS.md') {
33
+ // Safeguard: AGENTS.override.md fully supersedes AGENTS.md in Codex.
34
+ if (fs.existsSync(path.join(projectPath, 'AGENTS.override.md'))) {
35
+ warnings.push('AGENTS.override.md exists — Codex ignores the generated AGENTS.md while it is present.');
36
+ }
37
+ const existing = fs.existsSync(abs) ? fs.readFileSync(abs, 'utf-8') : '';
38
+ const merged = mergeAgentsMd(existing, art.contents);
39
+ if (Buffer.byteLength(merged, 'utf8') > AGENTS_MAX_BYTES) {
40
+ warnings.push(`AGENTS.md exceeds ${AGENTS_MAX_BYTES} bytes — Codex may truncate it.`);
41
+ }
42
+ if (merged !== existing) {
43
+ if (existing)
44
+ fs.writeFileSync(`${abs}.bak`, existing);
45
+ fs.writeFileSync(abs, merged);
46
+ written.push(abs);
47
+ }
48
+ continue;
49
+ }
50
+ // skill files
51
+ fs.mkdirSync(path.dirname(abs), { recursive: true });
52
+ if (fs.existsSync(abs)) {
53
+ try {
54
+ const cur = fs.readFileSync(abs, 'utf-8');
55
+ if (cur !== art.contents)
56
+ fs.writeFileSync(`${abs}.bak`, cur);
57
+ }
58
+ catch {
59
+ // best-effort backup
60
+ }
61
+ }
62
+ fs.writeFileSync(abs, art.contents);
63
+ written.push(abs);
64
+ }
65
+ return written;
66
+ }
67
+ }
68
+ //# sourceMappingURL=codex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex.js","sourceRoot":"","sources":["../../../../src/cli/init/agents/codex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAGlC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEnF;wDACwD;AACxD,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,MAAM,OAAO,GAAG,IAAI,GAAG,IAAI,GAAG,GAAG,CAAC,CAAC,sBAAsB;IACzD,OAAO,CACL,qFAAqF;QACrF,oCAAoC,OAAO,sBAAsB,IAAI,uBAAuB;QAC5F,0EAA0E,CAC3E,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,OAAO,YAAY;IACd,EAAE,GAAG,OAAgB,CAAC;IAE/B,MAAM,CAAC,IAA0B;QAC/B,MAAM,IAAI,GAAoB,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC7C,IAAI,EAAE,kBAAkB,CAAC,CAAC,IAAI,WAAW;YACzC,QAAQ,EAAE,cAAc,CAAC,CAAC,IAAI,kBAAkB,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,YAAY,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,GAA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AAG,GAAG,MAAM,EAAE,QAAQ,CAAC,CAAC;oBACvD,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;oBAC9B,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACpB,CAAC;gBACD,SAAS;YACX,CAAC;YAED,cAAc;YACd,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YACrD,IAAI,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;gBACvB,IAAI,CAAC;oBACH,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;oBAC1C,IAAI,GAAG,KAAK,GAAG,CAAC,QAAQ;wBAAE,EAAE,CAAC,aAAa,CAAC,GAAG,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC;gBAChE,CAAC;gBAAC,MAAM,CAAC;oBACP,qBAAqB;gBACvB,CAAC;YACH,CAAC;YACD,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC;YACpC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpB,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF"}
@@ -0,0 +1,19 @@
1
+ import type { AgentId, AgentSelector } from './types.js';
2
+ export interface DetectDeps {
3
+ /** Host-level signal provider (injectable for tests). */
4
+ host?: () => AgentId[];
5
+ }
6
+ /**
7
+ * Decide which agent integration(s) to generate.
8
+ *
9
+ * - explicit `claude`/`codex`/`both` → deterministic, no scan (hermetic).
10
+ * - `auto`/undefined → project markers first, then host signals, then `['claude']`.
11
+ *
12
+ * Directory markers (`.claude`, `.codex`, `.agents`) must be directories and file
13
+ * markers (`CLAUDE.md`, `AGENTS.md`) must be files, so a stray regular file named
14
+ * `.agents` does not mislead detection into a path the adapters can't write to.
15
+ *
16
+ * Always returns a de-duped, stable-ordered, non-empty list.
17
+ */
18
+ export declare function detectAgents(projectPath: string, explicit?: AgentSelector, deps?: DetectDeps): AgentId[];
19
+ //# sourceMappingURL=detect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../../../src/cli/init/agents/detect.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEzD,MAAM,WAAW,UAAU;IACzB,yDAAyD;IACzD,IAAI,CAAC,EAAE,MAAM,OAAO,EAAE,CAAC;CACxB;AAsCD;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,aAAa,EAAE,IAAI,GAAE,UAAe,GAAG,OAAO,EAAE,CAqB5G"}
@@ -0,0 +1,78 @@
1
+ import * as fs from 'node:fs';
2
+ import * as os from 'node:os';
3
+ import * as path from 'node:path';
4
+ import { execSync } from 'node:child_process';
5
+ function onPath(bin) {
6
+ try {
7
+ execSync(process.platform === 'win32' ? `where ${bin}` : `command -v ${bin}`, { stdio: 'ignore' });
8
+ return true;
9
+ }
10
+ catch {
11
+ return false;
12
+ }
13
+ }
14
+ /** Default host signals: agent home dir present OR agent binary on PATH. */
15
+ function hostSignals() {
16
+ const out = [];
17
+ const home = os.homedir();
18
+ if (fs.existsSync(path.join(home, '.claude')) || onPath('claude'))
19
+ out.push('claude');
20
+ if (fs.existsSync(path.join(home, '.codex')) || onPath('codex'))
21
+ out.push('codex');
22
+ return out;
23
+ }
24
+ /** Directory marker: must resolve to a real directory (broken symlink/perm → false). */
25
+ function isDir(p) {
26
+ try {
27
+ return fs.statSync(p).isDirectory();
28
+ }
29
+ catch {
30
+ return false;
31
+ }
32
+ }
33
+ /** File marker: must resolve to a real file. */
34
+ function isFile(p) {
35
+ try {
36
+ return fs.statSync(p).isFile();
37
+ }
38
+ catch {
39
+ return false;
40
+ }
41
+ }
42
+ /**
43
+ * Decide which agent integration(s) to generate.
44
+ *
45
+ * - explicit `claude`/`codex`/`both` → deterministic, no scan (hermetic).
46
+ * - `auto`/undefined → project markers first, then host signals, then `['claude']`.
47
+ *
48
+ * Directory markers (`.claude`, `.codex`, `.agents`) must be directories and file
49
+ * markers (`CLAUDE.md`, `AGENTS.md`) must be files, so a stray regular file named
50
+ * `.agents` does not mislead detection into a path the adapters can't write to.
51
+ *
52
+ * Always returns a de-duped, stable-ordered, non-empty list.
53
+ */
54
+ export function detectAgents(projectPath, explicit, deps = {}) {
55
+ if (explicit === 'claude')
56
+ return ['claude'];
57
+ if (explicit === 'codex')
58
+ return ['codex'];
59
+ if (explicit === 'both')
60
+ return ['claude', 'codex'];
61
+ const found = [];
62
+ const claudeMarker = isDir(path.join(projectPath, '.claude')) ||
63
+ isFile(path.join(projectPath, 'CLAUDE.md')) ||
64
+ isFile(path.join(projectPath, 'claude.md'));
65
+ const codexMarker = isDir(path.join(projectPath, '.codex')) ||
66
+ isDir(path.join(projectPath, '.agents')) ||
67
+ isFile(path.join(projectPath, 'AGENTS.md'));
68
+ if (claudeMarker)
69
+ found.push('claude');
70
+ if (codexMarker)
71
+ found.push('codex');
72
+ if (found.length)
73
+ return found;
74
+ const host = (deps.host ?? hostSignals)();
75
+ const ordered = ['claude', 'codex'].filter((a) => host.includes(a));
76
+ return ordered.length ? ordered : ['claude'];
77
+ }
78
+ //# sourceMappingURL=detect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"detect.js","sourceRoot":"","sources":["../../../../src/cli/init/agents/detect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAQ9C,SAAS,MAAM,CAAC,GAAW;IACzB,IAAI,C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,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { AgentAdapter, AgentId, AgentSelector } from './types.js';
2
+ import type { WorkflowDefinition } from '../workflow-definitions.js';
3
+ import { detectAgents } from './detect.js';
4
+ export declare const ADAPTERS: Record<AgentId, AgentAdapter>;
5
+ export interface RunAdaptersResult {
6
+ agents: AgentId[];
7
+ agentArtifacts: Partial<Record<AgentId, string[]>>;
8
+ allFiles: string[];
9
+ warnings: string[];
10
+ }
11
+ /** Detect (or honor explicit) agents, run each adapter, aggregate results. */
12
+ export declare function runAdapters(projectPath: string, defs: WorkflowDefinition[], explicit?: AgentSelector): RunAdaptersResult;
13
+ export { detectAgents };
14
+ export type { AgentId, AgentSelector, AgentAdapter, AgentArtifact } from './types.js';
15
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/init/agents/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGrE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,OAAO,EAAE,YAAY,CAGlD,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,cAAc,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;IACnD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,8EAA8E;AAC9E,wBAAgB,WAAW,CACzB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,kBAAkB,EAAE,EAC1B,QAAQ,CAAC,EAAE,aAAa,GACvB,iBAAiB,CAWnB;AAED,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { ClaudeAdapter } from './claude.js';
2
+ import { CodexAdapter } from './codex.js';
3
+ import { detectAgents } from './detect.js';
4
+ export const ADAPTERS = {
5
+ claude: new ClaudeAdapter(),
6
+ codex: new CodexAdapter(),
7
+ };
8
+ /** Detect (or honor explicit) agents, run each adapter, aggregate results. */
9
+ export function runAdapters(projectPath, defs, explicit) {
10
+ const agents = detectAgents(projectPath, explicit);
11
+ const agentArtifacts = {};
12
+ const allFiles = [];
13
+ const warnings = [];
14
+ for (const id of agents) {
15
+ const files = ADAPTERS[id].writeAll(projectPath, defs, warnings);
16
+ agentArtifacts[id] = files;
17
+ allFiles.push(...files);
18
+ }
19
+ return { agents, agentArtifacts, allFiles, warnings };
20
+ }
21
+ export { detectAgents };
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cli/init/agents/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,CAAC,MAAM,QAAQ,GAAkC;IACrD,MAAM,EAAE,IAAI,aAAa,EAAE;IAC3B,KAAK,EAAE,IAAI,YAAY,EAAE;CAC1B,CAAC;AASF,8EAA8E;AAC9E,MAAM,UAAU,WAAW,CACzB,WAAmB,EACnB,IAA0B,EAC1B,QAAwB;IAExB,MAAM,MAAM,GAAG,YAAY,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IACnD,MAAM,cAAc,GAAuC,EAAE,CAAC;IAC9D,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,KAAK,MAAM,EAAE,IAAI,MAAM,EAAE,CAAC;QACxB,MAAM,KAAK,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjE,cAAc,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC;QAC3B,QAAQ,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;IAC1B,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;AACxD,CAAC;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Per-agent rendering transforms applied to workflow bodies/descriptions.
3
+ *
4
+ * Source text is authored in Claude form. The Claude render is identity (so output
5
+ * stays byte-identical to historical releases); the Codex render rewrites
6
+ * Claude-specific slash syntax and wording into Codex-idiomatic form.
7
+ */
8
+ export declare function toClaude(text: string): string;
9
+ export declare function toCodex(text: string): string;
10
+ //# sourceMappingURL=transform.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transform.d.ts","sourceRoot":"","sources":["../../../../src/cli/init/agents/transform.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE7C;AAGD,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAW5C"}