intentdna 1.7.5 → 1.8.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.
Files changed (154) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/LICENSE +201 -0
  4. package/README.md +143 -194
  5. package/dist/assets/candidates.d.ts +124 -0
  6. package/dist/assets/candidates.js +1249 -0
  7. package/dist/assets/catalog.d.ts +101 -0
  8. package/dist/assets/catalog.js +311 -0
  9. package/dist/assets/evidence.d.ts +93 -0
  10. package/dist/assets/evidence.js +391 -0
  11. package/dist/assets/index.d.ts +4 -0
  12. package/dist/assets/index.js +4 -0
  13. package/dist/assets/metadata.d.ts +19 -0
  14. package/dist/assets/metadata.js +227 -0
  15. package/dist/cli/commands/assets.d.ts +65 -0
  16. package/dist/cli/commands/assets.js +2871 -0
  17. package/dist/cli/commands/auth.d.ts +322 -0
  18. package/dist/cli/commands/auth.js +1592 -0
  19. package/dist/cli/commands/cloud-auth-guidance.d.ts +2 -0
  20. package/dist/cli/commands/cloud-auth-guidance.js +4 -0
  21. package/dist/cli/commands/cloud.d.ts +1359 -0
  22. package/dist/cli/commands/cloud.js +8364 -0
  23. package/dist/cli/commands/evolve.js +18 -2
  24. package/dist/cli/commands/generate.js +25 -2
  25. package/dist/cli/commands/guard.d.ts +1 -1
  26. package/dist/cli/commands/guard.js +1 -1
  27. package/dist/cli/commands/guide.d.ts +15 -0
  28. package/dist/cli/commands/guide.js +1747 -0
  29. package/dist/cli/commands/init.d.ts +12 -0
  30. package/dist/cli/commands/init.js +95 -60
  31. package/dist/cli/commands/org.d.ts +16 -0
  32. package/dist/cli/commands/org.js +2393 -0
  33. package/dist/cli/commands/release.d.ts +59 -0
  34. package/dist/cli/commands/release.js +716 -0
  35. package/dist/cli/commands/report.d.ts +82 -0
  36. package/dist/cli/commands/report.js +1516 -0
  37. package/dist/cli/commands/run.d.ts +8 -1
  38. package/dist/cli/commands/run.js +129 -57
  39. package/dist/cli/commands/sync.d.ts +8 -1
  40. package/dist/cli/commands/sync.js +436 -141
  41. package/dist/cli/commands/templates.d.ts +64 -0
  42. package/dist/cli/commands/templates.js +2151 -1
  43. package/dist/cli/commands/workflow.d.ts +26 -0
  44. package/dist/cli/commands/workflow.js +3053 -0
  45. package/dist/cli/index.js +703 -36
  46. package/dist/compiler/cascade.js +4 -9
  47. package/dist/compiler/compile.js +1 -0
  48. package/dist/governance/evidence-capture-attribution.d.ts +12 -0
  49. package/dist/governance/evidence-capture-attribution.js +46 -0
  50. package/dist/governance/index.d.ts +2 -0
  51. package/dist/governance/index.js +1 -0
  52. package/dist/hooks/cli.d.ts +9 -0
  53. package/dist/hooks/cli.js +170 -411
  54. package/dist/hooks/enforce.d.ts +1 -0
  55. package/dist/hooks/protocol.d.ts +1 -1
  56. package/dist/hooks/protocol.js +1 -1
  57. package/dist/hooks/state.d.ts +41 -0
  58. package/dist/hooks/state.js +126 -2
  59. package/dist/index.d.ts +3 -0
  60. package/dist/index.js +3 -0
  61. package/dist/mcp/tools-state.js +2 -0
  62. package/dist/organization/index.d.ts +121 -0
  63. package/dist/organization/index.js +413 -0
  64. package/dist/runtime/claude-sync-target.d.ts +49 -0
  65. package/dist/runtime/claude-sync-target.js +280 -0
  66. package/dist/runtime/codex-adapter.d.ts +254 -0
  67. package/dist/runtime/codex-adapter.js +1204 -0
  68. package/dist/runtime/codex-sync-target.d.ts +33 -0
  69. package/dist/runtime/codex-sync-target.js +241 -0
  70. package/dist/runtime/index.d.ts +8 -0
  71. package/dist/runtime/index.js +4 -0
  72. package/dist/runtime/output-artifact-registry.d.ts +1 -1
  73. package/dist/runtime/output-artifact-registry.js +2 -0
  74. package/dist/runtime/settings-adapter.d.ts +1 -1
  75. package/dist/runtime/settings-adapter.js +1 -1
  76. package/dist/runtime/skill-adapter.d.ts +5 -1
  77. package/dist/runtime/skill-adapter.js +164 -39
  78. package/dist/runtime/sync-artifact-registry.d.ts +99 -0
  79. package/dist/runtime/sync-artifact-registry.js +194 -0
  80. package/dist/runtime/sync-target-plan.d.ts +45 -0
  81. package/dist/runtime/sync-target-plan.js +19 -0
  82. package/dist/runtime/verifier.d.ts +51 -0
  83. package/dist/runtime/verifier.js +462 -0
  84. package/dist/schema/controller-registry.d.ts +8 -1
  85. package/dist/schema/controller-registry.js +8 -0
  86. package/dist/schema/types.d.ts +35 -23
  87. package/dist/schema/types.js +10 -1
  88. package/dist/schema/validate.js +22 -22
  89. package/dist/schema/validators/controllers.js +38 -20
  90. package/dist/schema/workflow-authoring-contract.d.ts +29 -0
  91. package/dist/schema/workflow-authoring-contract.js +109 -0
  92. package/dist/schema/yaml-parser.js +18 -0
  93. package/dist/templates/api-backend.dna.yaml +19 -0
  94. package/dist/templates/brainstorming-first.dna.yaml +19 -0
  95. package/dist/templates/code-cleanup.dna.yaml +19 -0
  96. package/dist/templates/code-review-pipeline.dna.yaml +18 -0
  97. package/dist/templates/documentation-writer.dna.yaml +19 -0
  98. package/dist/templates/flutter-behavior-lock.dna.yaml +19 -0
  99. package/dist/templates/flutter-refactoring-rescue.dna.yaml +19 -0
  100. package/dist/templates/flutter-rewrite-diagnosis-review.dna.yaml +210 -0
  101. package/dist/templates/flutter-rewrite-fix-review-loop.dna.yaml +260 -0
  102. package/dist/templates/flutter-rewrite-new.dna.yaml +506 -0
  103. package/dist/templates/flutter-rewrite.dna.yaml +100 -4
  104. package/dist/templates/frontend-quality.dna.yaml +19 -0
  105. package/dist/templates/full-pipeline.dna.yaml +20 -0
  106. package/dist/templates/marketplace.d.ts +92 -0
  107. package/dist/templates/marketplace.js +502 -0
  108. package/dist/templates/metadata.d.ts +25 -0
  109. package/dist/templates/metadata.js +136 -3
  110. package/dist/templates/mobile-dev.dna.yaml +19 -0
  111. package/dist/templates/multi-agent-handoff-coordination.dna.yaml +156 -0
  112. package/dist/templates/multi-perspective-review.dna.yaml +19 -0
  113. package/dist/templates/persistent-executor.dna.yaml +19 -0
  114. package/dist/templates/qa-loop.dna.yaml +18 -0
  115. package/dist/templates/release-evidence-gate.dna.yaml +131 -0
  116. package/dist/templates/requirements-gate.dna.yaml +19 -0
  117. package/dist/templates/research-orchestration.dna.yaml +19 -0
  118. package/dist/templates/root-cause-analysis.dna.yaml +19 -0
  119. package/dist/templates/safe-refactoring.dna.yaml +321 -0
  120. package/dist/templates/secure-dev.dna.yaml +19 -0
  121. package/dist/templates/subagent-parallel.dna.yaml +19 -0
  122. package/dist/templates/systematic-debugging.dna.yaml +19 -0
  123. package/dist/templates/tdd-strict.dna.yaml +19 -0
  124. package/dist/templates/ui-visual-regression-qa.dna.yaml +133 -0
  125. package/dist/templates/workflow-author.dna.yaml +302 -0
  126. package/dist/templates/workflow-blocked-scope-triage.dna.yaml +242 -0
  127. package/dist/templates/workflow-completion-audit.dna.yaml +254 -0
  128. package/dist/templates/workflow-cross-boundary-resource-approval.dna.yaml +249 -0
  129. package/dist/templates/workflow-evidence-review.dna.yaml +198 -0
  130. package/dist/templates/workflow-module-inventory.dna.yaml +257 -0
  131. package/dist/templates/workflow-runtime-smoke-review.dna.yaml +252 -0
  132. package/dist/templates/workflow-verification-command-routing.dna.yaml +278 -0
  133. package/dist/workflow/authoring-packet.d.ts +67 -0
  134. package/dist/workflow/authoring-packet.js +218 -0
  135. package/dist/workflow/draft.d.ts +159 -0
  136. package/dist/workflow/draft.js +800 -0
  137. package/dist/workflow/index.d.ts +3 -0
  138. package/dist/workflow/index.js +3 -0
  139. package/dist/workflow/suggestion-review.d.ts +65 -0
  140. package/dist/workflow/suggestion-review.js +245 -0
  141. package/package.json +1 -1
  142. package/spec/README.md +15 -48
  143. package/spec/codex-adapter-contract.md +176 -0
  144. package/spec/sync-target-plan.md +158 -0
  145. package/spec/workflow-capability-ir.md +153 -0
  146. package/spec/agent-dispatch-fix.md +0 -116
  147. package/spec/control-plane-convergence-handoff-2026-04-24.md +0 -432
  148. package/spec/flutter-rewrite-template-optimization.md +0 -301
  149. package/spec/foundation-hardening.md +0 -178
  150. package/spec/hooks-infra-harness-hardening.md +0 -741
  151. package/spec/multi-config.md +0 -172
  152. package/spec/parallel-isolation.md +0 -268
  153. package/spec/template-version-namespace-fix.md +0 -653
  154. package/spec/workflow-pipeline.md +0 -101
@@ -0,0 +1,33 @@
1
+ import type { ConstraintIR } from "../schema/types.js";
2
+ import { type CodexAdapterArtifacts, type CodexHookInstallMode } from "./codex-adapter.js";
3
+ import type { AdapterCapabilityReport, CapabilityReportEntry, EvidencePlan, PlannedArtifact, SyncTargetPlan } from "./sync-target-plan.js";
4
+ export interface CodexSyncTargetPlanOptions {
5
+ hookInstallMode?: CodexHookInstallMode;
6
+ packageVersion: string;
7
+ }
8
+ export type CodexPlannedArtifact = PlannedArtifact;
9
+ export type CodexCapabilityReportEntry = CapabilityReportEntry;
10
+ export type CodexAdapterCapabilityReport = AdapterCapabilityReport & {
11
+ adapter: "codex_cli";
12
+ runtime: "codex_cli";
13
+ };
14
+ export type CodexEvidencePlan = EvidencePlan;
15
+ export interface CodexSyncTargetPlan extends SyncTargetPlan {
16
+ target: "codex_cli";
17
+ hookInstallMode: CodexHookInstallMode;
18
+ artifacts: CodexAdapterArtifacts;
19
+ plannedArtifacts: CodexPlannedArtifact[];
20
+ capabilityReport: CodexAdapterCapabilityReport;
21
+ evidencePlan: CodexEvidencePlan;
22
+ warnings: string[];
23
+ unsupported: string[];
24
+ }
25
+ export interface ExecuteCodexSyncTargetPlanOptions {
26
+ projectDir: string;
27
+ dogfood?: boolean;
28
+ }
29
+ export declare function createCodexSyncTargetPlan(ir: ConstraintIR, options: CodexSyncTargetPlanOptions): CodexSyncTargetPlan;
30
+ export declare function executeCodexSyncTargetPlan(plan: CodexSyncTargetPlan, options: ExecuteCodexSyncTargetPlanOptions): Promise<string[]>;
31
+ export declare function codexSyncDispatcherCommand(): string;
32
+ export declare function removeCodexSyncTargetArtifacts(projectDir: string): Promise<string[]>;
33
+ export declare function formatCodexSyncTargetPlanSummary(plan: CodexSyncTargetPlan): string;
@@ -0,0 +1,241 @@
1
+ import { dirname, resolve } from "node:path";
2
+ import { fileURLToPath } from "node:url";
3
+ import { compileCodexAdapterArtifacts, removeCodexAdapterArtifacts, runCodexExecDogfood, withCodexDogfoodEvidence, writeCodexAdapterArtifacts, } from "./codex-adapter.js";
4
+ import { formatSyncTargetPlanDiagnostics } from "./sync-target-plan.js";
5
+ const PACKAGE_ROOT = resolve(dirname(fileURLToPath(import.meta.url)), "..", "..");
6
+ const CODEX_DISPATCHER_SCRIPT = "dist/hooks/cli.js";
7
+ function plannedArtifacts(artifacts) {
8
+ const plans = [
9
+ {
10
+ kind: "codex_instruction",
11
+ path: artifacts.instruction.path,
12
+ ownership: "intentdna_owned",
13
+ trackedByLock: true,
14
+ outputArtifact: "codex-adapter",
15
+ },
16
+ {
17
+ kind: "codex_policy_map",
18
+ path: artifacts.policyMap.path,
19
+ ownership: "diagnostic",
20
+ trackedByLock: true,
21
+ outputArtifact: "codex-adapter",
22
+ },
23
+ {
24
+ kind: "codex_adapter_evidence",
25
+ path: ".dna/compiled/codex-adapter-evidence.json",
26
+ ownership: "diagnostic",
27
+ trackedByLock: true,
28
+ outputArtifact: "codex-adapter",
29
+ },
30
+ ];
31
+ if (artifacts.evidence.install_mode_semantics.writes_project_fallback) {
32
+ plans.push({
33
+ kind: "codex_fallback_hooks",
34
+ path: artifacts.evidence.fallback_hooks_path,
35
+ ownership: "merge_preserve_user",
36
+ trackedByLock: true,
37
+ outputArtifact: "codex-adapter",
38
+ }, {
39
+ kind: "codex_fallback_trust_state",
40
+ path: artifacts.evidence.fallback_config_path,
41
+ ownership: "merge_preserve_user",
42
+ trackedByLock: true,
43
+ outputArtifact: "codex-adapter",
44
+ });
45
+ }
46
+ if (artifacts.evidence.install_mode_semantics.writes_plugin_artifacts) {
47
+ plans.push({
48
+ kind: "codex_plugin_manifest",
49
+ path: "codex-plugin/.codex-plugin/plugin.json",
50
+ ownership: "intentdna_owned",
51
+ trackedByLock: true,
52
+ outputArtifact: "codex-adapter",
53
+ }, {
54
+ kind: "codex_plugin_hooks",
55
+ path: "codex-plugin/hooks/hooks.json",
56
+ ownership: "intentdna_owned",
57
+ trackedByLock: true,
58
+ outputArtifact: "codex-adapter",
59
+ });
60
+ }
61
+ return plans;
62
+ }
63
+ function supportStatus(status, keys, fallback = "unknown") {
64
+ const values = keys.map((key) => status[key]).filter((value) => value !== undefined);
65
+ if (values.includes("partial"))
66
+ return "partial";
67
+ if (values.includes("supported"))
68
+ return "supported";
69
+ if (values.includes("unsupported"))
70
+ return "unsupported";
71
+ return values[0] ?? fallback;
72
+ }
73
+ function capabilityReport(artifacts) {
74
+ const status = artifacts.evidence.support_status;
75
+ const instructionPath = artifacts.evidence.instruction_path;
76
+ const capabilities = {
77
+ intent_lock: {
78
+ status: supportStatus(status, ["prompt_directives"]),
79
+ surfaces: [instructionPath],
80
+ evidenceRefs: ["codex-instruction-artifact"],
81
+ notes: ["Prompt directives are rendered as Codex instructions and remain soft guidance until paired with runtime evidence."],
82
+ },
83
+ boundary_constraint: {
84
+ status: supportStatus(status, ["role_scope", "pre_execution_gates"]),
85
+ surfaces: ["Codex permissions/rules plus PreToolUse hook diagnostics"],
86
+ evidenceRefs: ["codex-role-scope-map", "codex-pre-tool-use-hook"],
87
+ notes: ["Scope constraints require concrete Codex permission and hook coverage for each runtime path."],
88
+ },
89
+ context_control: {
90
+ status: supportStatus(status, ["context_injections"]),
91
+ surfaces: [instructionPath],
92
+ evidenceRefs: ["codex-context-instruction-artifact"],
93
+ notes: ["Static context can be injected into instructions; dynamic context control remains event-limited."],
94
+ },
95
+ tool_policy: {
96
+ status: supportStatus(status, ["tool_filters", "role_tool_permissions"]),
97
+ surfaces: ["Codex execpolicy/rules and PreToolUse hook subset"],
98
+ evidenceRefs: ["codex-tool-filter-map", "codex-role-scope-map"],
99
+ notes: ["Non-Bash and unsupported tool paths stay explicit in unsupported gaps."],
100
+ },
101
+ approval_gate: {
102
+ status: supportStatus(status, ["pre_execution_gates", "permission_request"]),
103
+ surfaces: ["PreToolUse hook", "PermissionRequest unsupported fixture"],
104
+ evidenceRefs: ["codex-pre-tool-use-hook"],
105
+ notes: ["PreToolUse gates can diagnose or block supported paths; native permission-request parity is not claimed."],
106
+ },
107
+ checkpoint: {
108
+ status: supportStatus(status, ["post_execution_validators"]),
109
+ surfaces: ["PostToolUse/Stop validation evidence"],
110
+ evidenceRefs: ["codex-validation-hook"],
111
+ notes: ["Validation hooks can record evidence but cannot reverse completed side effects."],
112
+ },
113
+ completion_check: {
114
+ status: supportStatus(status, ["post_execution_validators"]),
115
+ surfaces: ["PostToolUse/Stop validation evidence"],
116
+ evidenceRefs: ["codex-validation-hook"],
117
+ notes: ["Completion checks remain partial until verifier outcomes are backed by RuntimeDecisionEvent provenance."],
118
+ },
119
+ artifact_handoff: {
120
+ status: "partial",
121
+ surfaces: [...new Set([artifacts.policyMap.path, artifacts.evidence.policy_map_path, artifacts.evidence.dispatcher_script])],
122
+ evidenceRefs: ["codex-policy-map", "codex-adapter-evidence"],
123
+ notes: ["Generated artifacts describe handoff surfaces but are diagnostic artifacts, not policy truth."],
124
+ },
125
+ isolation: {
126
+ status: "unknown",
127
+ surfaces: ["Codex sandbox flags are execution-time choices outside sync artifact generation"],
128
+ evidenceRefs: [],
129
+ notes: ["Workflow isolation requirements can be declared, but this sync target does not yet prove runtime sandbox isolation."],
130
+ },
131
+ dry_run: {
132
+ status: "supported",
133
+ surfaces: ["dna sync --dry-run Codex target plan"],
134
+ evidenceRefs: ["codex-sync-target-plan"],
135
+ notes: ["Dry-run reports planned Codex artifacts, support posture, evidence classification, and unsupported gaps without writing files."],
136
+ },
137
+ rollback_or_compensation: {
138
+ status: "unsupported",
139
+ surfaces: [],
140
+ evidenceRefs: ["post_execution_side_effect_rollback"],
141
+ notes: ["Codex validation hooks can observe outcomes but cannot roll back completed side effects."],
142
+ },
143
+ trace: {
144
+ status: supportStatus(status, ["runtime_decision_event"]),
145
+ surfaces: ["RuntimeDecisionEvent state writer", ".dna/compiled/codex-adapter-evidence.json"],
146
+ evidenceRefs: ["RuntimeDecisionEvent", "codex-adapter-evidence"],
147
+ notes: ["Adapter evidence is trace-adjacent diagnostic data; RuntimeDecisionEvent remains the primary trace contract."],
148
+ },
149
+ runtime_decision_evidence: {
150
+ status: supportStatus(status, ["runtime_decision_event"]),
151
+ surfaces: ["appendRuntimeDecisionEvent", ".dna/compiled/codex-adapter-evidence.json"],
152
+ evidenceRefs: ["RuntimeDecisionEvent", "codex-adapter-evidence"],
153
+ notes: ["Diagnostic adapter evidence must not be upgraded to enterprise evidence without trusted RuntimeDecisionEvent provenance."],
154
+ },
155
+ logic_equivalence_validation: {
156
+ status: "unknown",
157
+ surfaces: ["Workflow verifier specs and external test commands"],
158
+ evidenceRefs: ["verifier_specs", "RuntimeDecisionEvent"],
159
+ notes: ["Equivalence validation is a workflow capability, not a Codex-native sync artifact; concrete proof must come from verifier execution evidence."],
160
+ },
161
+ };
162
+ return {
163
+ adapter: "codex_cli",
164
+ runtime: "codex_cli",
165
+ capabilities,
166
+ unsupported: artifacts.evidence.unsupported,
167
+ };
168
+ }
169
+ function evidencePlan(artifacts) {
170
+ return {
171
+ primary: "RuntimeDecisionEvent",
172
+ diagnosticArtifacts: [
173
+ artifacts.evidence.policy_map_path,
174
+ ".dna/compiled/codex-adapter-evidence.json",
175
+ artifacts.evidence.instruction_path,
176
+ ],
177
+ classification: artifacts.evidence.trust_verification?.classification ?? artifacts.evidence.install_mode_semantics.classification,
178
+ notes: artifacts.evidence.notes,
179
+ };
180
+ }
181
+ export function createCodexSyncTargetPlan(ir, options) {
182
+ const hookInstallMode = options.hookInstallMode ?? "project_fallback";
183
+ const artifacts = compileCodexAdapterArtifacts(ir, {
184
+ adapterRoot: PACKAGE_ROOT,
185
+ dispatcherScript: CODEX_DISPATCHER_SCRIPT,
186
+ hookInstallMode,
187
+ pluginVersion: options.packageVersion,
188
+ });
189
+ return {
190
+ target: "codex_cli",
191
+ hookInstallMode,
192
+ artifacts,
193
+ plannedArtifacts: plannedArtifacts(artifacts),
194
+ capabilityReport: capabilityReport(artifacts),
195
+ evidencePlan: evidencePlan(artifacts),
196
+ warnings: artifacts.evidence.notes,
197
+ unsupported: artifacts.evidence.unsupported,
198
+ };
199
+ }
200
+ export async function executeCodexSyncTargetPlan(plan, options) {
201
+ let artifacts = plan.artifacts;
202
+ if (options.dogfood) {
203
+ const dogfood = await runCodexExecDogfood({ projectDir: options.projectDir });
204
+ artifacts = { ...artifacts, evidence: withCodexDogfoodEvidence(artifacts.evidence, dogfood) };
205
+ }
206
+ return writeCodexAdapterArtifacts(options.projectDir, artifacts);
207
+ }
208
+ export function codexSyncDispatcherCommand() {
209
+ return createCodexSyncTargetPlan({
210
+ source_dna_ids: [],
211
+ compiled_at: new Date().toISOString(),
212
+ prompt_directives: [],
213
+ tool_filters: [],
214
+ pre_execution_gates: [],
215
+ post_execution_validators: [],
216
+ context_injections: [],
217
+ }, {
218
+ packageVersion: "0.0.0",
219
+ }).artifacts.evidence.dispatcher_command;
220
+ }
221
+ export async function removeCodexSyncTargetArtifacts(projectDir) {
222
+ return removeCodexAdapterArtifacts(projectDir, codexSyncDispatcherCommand());
223
+ }
224
+ export function formatCodexSyncTargetPlanSummary(plan) {
225
+ const lines = [
226
+ `Codex target support posture: ${plan.artifacts.evidence.install_mode_semantics.support_status}`,
227
+ `Codex evidence plan: primary=${plan.evidencePlan.primary}, classification=${plan.evidencePlan.classification}`,
228
+ `Codex planned artifacts: ${plan.plannedArtifacts.length}`,
229
+ ];
230
+ for (const artifact of plan.plannedArtifacts) {
231
+ lines.push(` - ${artifact.kind}: ${artifact.path} (${artifact.ownership})`);
232
+ }
233
+ const capabilityEntries = Object.entries(plan.capabilityReport.capabilities)
234
+ .sort(([left], [right]) => left.localeCompare(right));
235
+ lines.push("Codex capability report:");
236
+ for (const [capability, entry] of capabilityEntries) {
237
+ const surfaces = entry.surfaces.length > 0 ? entry.surfaces.join(", ") : "no Codex sync surface";
238
+ lines.push(` - ${capability}: ${entry.status} via ${surfaces}`);
239
+ }
240
+ return `${lines.join("\n")}\n${formatSyncTargetPlanDiagnostics(plan)}`;
241
+ }
@@ -7,3 +7,11 @@ export type { WorkflowShellOptions, WorkflowShellResult } from "./workflow-runne
7
7
  export { createCompiledIR, writeCompiledIR, loadCompiledIR, removeCompiledIR, } from "./plugin-adapter.js";
8
8
  export type { CompiledIRFile } from "./plugin-adapter.js";
9
9
  export { compilePluginSettings, detectEnabledEvents, } from "./settings-adapter.js";
10
+ export { CODEX_ADAPTER_MINIMUM_VERSION, CODEX_NATIVE_HOOK_EVENTS, appendCodexRuntimeDecisionEvent, buildCodexDispatcherCommand, buildCodexHookTrustState, codexHookTrustedHash, codexInstallModeSemantics, codexTrustStateToml, compileCodexAdapterArtifacts, compileCodexHooksConfig, compileCodexInstructionArtifact, compileCodexPluginManifest, compileCodexPolicyMapArtifact, mapCodexDecisionEvent, mergeCodexFallbackHooks, mergeCodexTrustStateConfig, normalizeCodexHookInput, probeCodexRuntime, runCodexExecDogfood, removeCodexAdapterArtifacts, removeCodexFallbackHooks, removeCodexTrustStateConfig, runCodexHook, withCodexDogfoodEvidence, verifyCodexHookTrust, writeCodexAdapterArtifacts, } from "./codex-adapter.js";
11
+ export type { CodexAdapterArtifacts, CodexAdapterEvidence, CodexAdapterSupportStatus, CodexCommandHook, CodexDecisionMappingInput, CodexDogfoodResult, CodexEvidenceClassification, CodexExecJsonEvent, CodexHookGroup, CodexHookInput, CodexHookInstallMode, CodexHookRunnerOptions, CodexHookRunnerResult, CodexHookTrustState, CodexHooksConfig, CodexInstallModeSemantics, CodexInstructionArtifact, CodexNativeHookEvent, CodexPluginManifest, CodexPolicyMap, CodexPolicyMapArtifact, CodexPolicyMapEntry, CodexRuntimeProbe, CodexTrustVerification, RunCodexDogfoodOptions, CodexTrustVerificationInput, CompileCodexAdapterOptions, } from "./codex-adapter.js";
12
+ export { codexSyncDispatcherCommand, createCodexSyncTargetPlan, executeCodexSyncTargetPlan, formatCodexSyncTargetPlanSummary, removeCodexSyncTargetArtifacts, } from "./codex-sync-target.js";
13
+ export type { CodexAdapterCapabilityReport, CodexCapabilityReportEntry, CodexEvidencePlan, CodexPlannedArtifact, CodexSyncTargetPlan, CodexSyncTargetPlanOptions, ExecuteCodexSyncTargetPlanOptions, } from "./codex-sync-target.js";
14
+ export { createClaudeCoreSyncTargetPlan, executeClaudeCoreSyncTargetPlan, formatClaudeCoreSyncTargetPlanDryRun, removeLegacyBashHooks, } from "./claude-sync-target.js";
15
+ export type { ClaudeCoreAdapterCapabilityReport, ClaudeCoreCapabilityReportEntry, ClaudeCorePlannedArtifact, ClaudeCoreSyncTargetPlan, ClaudeCoreSyncTargetPlanOptions, ClaudeSettingsHookRegistration, ClaudeSyncMode, ExecuteClaudeCoreSyncTargetPlanResult, } from "./claude-sync-target.js";
16
+ export type { AdapterCapabilityReport, CapabilityReportEntry, CapabilitySupportStatus, EvidenceClassification, EvidencePlan, PlannedArtifact, SyncTarget, SyncTargetMode, SyncTargetPlan, } from "./sync-target-plan.js";
17
+ export { formatSyncTargetPlanDiagnostics, trackedOutputsForSyncTargetPlan, } from "./sync-target-plan.js";
@@ -3,3 +3,7 @@ export { compileRoleToAgentMD, compileAllRolesToAgentMD, writeAgentMDFiles, remo
3
3
  export { compileWorkflowToShell, writeWorkflowScript, removeWorkflowScripts, } from "./workflow-runner.js";
4
4
  export { createCompiledIR, writeCompiledIR, loadCompiledIR, removeCompiledIR, } from "./plugin-adapter.js";
5
5
  export { compilePluginSettings, detectEnabledEvents, } from "./settings-adapter.js";
6
+ export { CODEX_ADAPTER_MINIMUM_VERSION, CODEX_NATIVE_HOOK_EVENTS, appendCodexRuntimeDecisionEvent, buildCodexDispatcherCommand, buildCodexHookTrustState, codexHookTrustedHash, codexInstallModeSemantics, codexTrustStateToml, compileCodexAdapterArtifacts, compileCodexHooksConfig, compileCodexInstructionArtifact, compileCodexPluginManifest, compileCodexPolicyMapArtifact, mapCodexDecisionEvent, mergeCodexFallbackHooks, mergeCodexTrustStateConfig, normalizeCodexHookInput, probeCodexRuntime, runCodexExecDogfood, removeCodexAdapterArtifacts, removeCodexFallbackHooks, removeCodexTrustStateConfig, runCodexHook, withCodexDogfoodEvidence, verifyCodexHookTrust, writeCodexAdapterArtifacts, } from "./codex-adapter.js";
7
+ export { codexSyncDispatcherCommand, createCodexSyncTargetPlan, executeCodexSyncTargetPlan, formatCodexSyncTargetPlanSummary, removeCodexSyncTargetArtifacts, } from "./codex-sync-target.js";
8
+ export { createClaudeCoreSyncTargetPlan, executeClaudeCoreSyncTargetPlan, formatClaudeCoreSyncTargetPlanDryRun, removeLegacyBashHooks, } from "./claude-sync-target.js";
9
+ export { formatSyncTargetPlanDiagnostics, trackedOutputsForSyncTargetPlan, } from "./sync-target-plan.js";
@@ -1,4 +1,4 @@
1
- export declare const SYNC_OUTPUT_ARTIFACT_IDS: readonly ["markdown-injection", "compiled-ir", "settings-hooks", "agents", "workflows", "skills-controllers", "mcp-config", "lock-file"];
1
+ export declare const SYNC_OUTPUT_ARTIFACT_IDS: readonly ["markdown-injection", "compiled-ir", "settings-hooks", "agents", "workflows", "skills-controllers", "mcp-config", "codex-adapter", "lock-file"];
2
2
  export type SyncOutputArtifactId = typeof SYNC_OUTPUT_ARTIFACT_IDS[number];
3
3
  export interface SyncOutputArtifactMetadata {
4
4
  id: SyncOutputArtifactId;
@@ -6,6 +6,7 @@ export const SYNC_OUTPUT_ARTIFACT_IDS = [
6
6
  "workflows",
7
7
  "skills-controllers",
8
8
  "mcp-config",
9
+ "codex-adapter",
9
10
  "lock-file",
10
11
  ];
11
12
  export const SYNC_OUTPUT_ARTIFACT_REGISTRY = [
@@ -16,6 +17,7 @@ export const SYNC_OUTPUT_ARTIFACT_REGISTRY = [
16
17
  { id: "workflows", order: 60, label: "Workflows", trackedByLock: true },
17
18
  { id: "skills-controllers", order: 70, label: "Skills and controllers", trackedByLock: true },
18
19
  { id: "mcp-config", order: 80, label: "MCP config", trackedByLock: false },
20
+ { id: "codex-adapter", order: 85, label: "Codex adapter", trackedByLock: true },
19
21
  { id: "lock-file", order: 90, label: "Lock file", trackedByLock: false },
20
22
  ];
21
23
  const ARTIFACT_BY_ID = new Map(SYNC_OUTPUT_ARTIFACT_REGISTRY.map((entry) => [entry.id, entry]));
@@ -4,7 +4,7 @@
4
4
  * Compiles DNA hook events into Claude Code settings.json
5
5
  * hook configurations for the dna-hook binary.
6
6
  *
7
- * See docs/references/cc-source-analysis.md §2 for the full hook event catalog.
7
+ * See docs/archive/2026H1/references/cc-source-analysis.md §2 for the full hook event catalog.
8
8
  */
9
9
  import { type SettingsHookEventKey } from "../hooks/event-registry.js";
10
10
  export type HookEventKey = SettingsHookEventKey;
@@ -4,7 +4,7 @@
4
4
  * Compiles DNA hook events into Claude Code settings.json
5
5
  * hook configurations for the dna-hook binary.
6
6
  *
7
- * See docs/references/cc-source-analysis.md §2 for the full hook event catalog.
7
+ * See docs/archive/2026H1/references/cc-source-analysis.md §2 for the full hook event catalog.
8
8
  */
9
9
  import { readFile, writeFile } from "node:fs/promises";
10
10
  import { getHookEventBySettingsKey, settingsHookEventKeys } from "../hooks/event-registry.js";
@@ -45,7 +45,11 @@ export interface SkillResult {
45
45
  bodyFileName?: string;
46
46
  mapEntry?: SkillMapEntry;
47
47
  }
48
+ export type WorkflowSkillSurface = "claude_code" | "codex_cli";
49
+ export interface WorkflowSkillOptions {
50
+ surface?: WorkflowSkillSurface;
51
+ }
48
52
  export declare function compileControllerToSkill(controllerKey: string, controller: ControllerDef, variables?: Record<string, string>, workflows?: Record<string, WorkflowDef>): SkillResult;
49
- export declare function compileWorkflowToSkill(plan: WorkflowPlan, roles: Record<string, RoleDef>, ir?: ConstraintIR, variables?: Record<string, string>): SkillResult;
53
+ export declare function compileWorkflowToSkill(plan: WorkflowPlan, roles: Record<string, RoleDef>, ir?: ConstraintIR, variables?: Record<string, string>, options?: WorkflowSkillOptions): SkillResult;
50
54
  export declare function writeSkillFiles(results: SkillResult[], outputDir: string): Promise<string[]>;
51
55
  export declare function removeSkillFiles(outputDir: string): Promise<number>;