omniconductor 0.3.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 (118) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/LICENSE +219 -0
  3. package/NOTICE +11 -0
  4. package/README.md +526 -0
  5. package/THIRD_PARTY_NOTICES.md +31 -0
  6. package/TRADEMARKS.md +26 -0
  7. package/VISION.md +106 -0
  8. package/adapters/README.md +121 -0
  9. package/adapters/claude/README.md +102 -0
  10. package/adapters/claude/SUPPORTED-FEATURES.md +66 -0
  11. package/adapters/claude/hookify-templates/.recipe-scoped +9 -0
  12. package/adapters/claude/hookify-templates/README.md +93 -0
  13. package/adapters/claude/hookify-templates/block-completion-claim-without-push.local.md.template +56 -0
  14. package/adapters/claude/hookify-templates/block-direct-push-protected-branch.local.md.template +18 -0
  15. package/adapters/claude/hookify-templates/block-force-push-protected-branch.local.md.template +42 -0
  16. package/adapters/claude/hookify-templates/block-server-secret-in-client.local.md.template +36 -0
  17. package/adapters/claude/hookify-templates/warn-any-type-added.local.md.template +44 -0
  18. package/adapters/claude/hookify-templates/warn-commit-without-pre-commit-review.local.md.template +52 -0
  19. package/adapters/claude/hookify-templates/warn-console-direct.local.md.template +55 -0
  20. package/adapters/claude/hookify-templates/warn-create-table-without-access-control.local.md.template +35 -0
  21. package/adapters/claude/hookify-templates/warn-current-work-without-remaining-tasks.local.md.template +36 -0
  22. package/adapters/claude/hookify-templates/warn-gh-pr-create-without-pre-merge-review.local.md.template +38 -0
  23. package/adapters/claude/hookify-templates/warn-hardcoded-text-without-i18n-key.local.md.template +21 -0
  24. package/adapters/claude/hookify-templates/warn-on-gh-pr-merge.local.md.template +33 -0
  25. package/adapters/claude/hookify-templates/warn-plan-spec-without-remaining-tasks.local.md.template +44 -0
  26. package/adapters/claude/hookify-templates/warn-raw-hex-instead-of-token.local.md.template +21 -0
  27. package/adapters/claude/hookify-templates/warn-security-definer-without-search-path.local.md.template +30 -0
  28. package/adapters/claude/hookify-templates/warn-stop-commit-without-current-work.local.md.template +47 -0
  29. package/adapters/claude/hookify-templates/warn-user-manual-completion.local.md.template +40 -0
  30. package/adapters/claude/transform-spec.md +140 -0
  31. package/adapters/claude/transform.sh +1169 -0
  32. package/adapters/codex/README.md +87 -0
  33. package/adapters/codex/SUPPORTED-FEATURES.md +66 -0
  34. package/adapters/codex/transform-spec.md +90 -0
  35. package/adapters/codex/transform.sh +748 -0
  36. package/adapters/copilot/README.md +88 -0
  37. package/adapters/copilot/SUPPORTED-FEATURES.md +73 -0
  38. package/adapters/copilot/transform-spec.md +111 -0
  39. package/adapters/copilot/transform.sh +757 -0
  40. package/adapters/cursor/README.md +87 -0
  41. package/adapters/cursor/SUPPORTED-FEATURES.md +90 -0
  42. package/adapters/cursor/transform-spec.md +124 -0
  43. package/adapters/cursor/transform.sh +731 -0
  44. package/adapters/gemini/README.md +93 -0
  45. package/adapters/gemini/SUPPORTED-FEATURES.md +80 -0
  46. package/adapters/gemini/transform-spec.md +102 -0
  47. package/adapters/gemini/transform.sh +844 -0
  48. package/adapters/windsurf/README.md +93 -0
  49. package/adapters/windsurf/SUPPORTED-FEATURES.md +67 -0
  50. package/adapters/windsurf/transform-spec.md +99 -0
  51. package/adapters/windsurf/transform.sh +727 -0
  52. package/bin/omniconductor.js +130 -0
  53. package/core/README.md +64 -0
  54. package/core/anti-patterns/README.md +142 -0
  55. package/core/anti-patterns/dynamic-system-prompt.md +113 -0
  56. package/core/anti-patterns/frequent-rule-file-edit.md +83 -0
  57. package/core/anti-patterns/large-file-read-no-range.md +90 -0
  58. package/core/anti-patterns/no-sub-agent-dispatch.md +89 -0
  59. package/core/anti-patterns/single-monolithic-rule-file.md +99 -0
  60. package/core/anti-patterns/skill-eager-load.md +83 -0
  61. package/core/anti-patterns/tool-call-spam.md +93 -0
  62. package/core/docs-templates/CURRENT_WORK.md +64 -0
  63. package/core/docs-templates/INDEX.md +57 -0
  64. package/core/docs-templates/PLANS.md +44 -0
  65. package/core/docs-templates/README.md +40 -0
  66. package/core/docs-templates/REMAINING_TASKS.md +43 -0
  67. package/core/docs-templates/TASKS.md +51 -0
  68. package/core/docs-templates/specs/_example.md +121 -0
  69. package/core/hooks/README.md +62 -0
  70. package/core/hooks/pretool-agent-routing.sh.template +97 -0
  71. package/core/hooks/pretool-commit-current-work-check.sh.template +103 -0
  72. package/core/hooks/pretool-commit-test-coverage-check.sh.template +116 -0
  73. package/core/hooks/pretool-large-file-read-guard.sh.template +117 -0
  74. package/core/hooks/stop-cache-hit-baseline-check.sh.template +133 -0
  75. package/core/hooks/stop-r6-review-check.sh.template +80 -0
  76. package/core/hooks/stop-session-log-check.sh.template +101 -0
  77. package/core/hooks/stop-trajectory-log.sh.template +96 -0
  78. package/core/memory-pattern/EXAMPLES.md +114 -0
  79. package/core/memory-pattern/README.md +133 -0
  80. package/core/recipes/README.md +46 -0
  81. package/core/recipes/auto-mock-data.md +82 -0
  82. package/core/recipes/branch-strategy.md +100 -0
  83. package/core/recipes/coding-conventions.md +123 -0
  84. package/core/recipes/database-discipline.md +65 -0
  85. package/core/recipes/debugging.md +143 -0
  86. package/core/recipes/design-system.md +30 -0
  87. package/core/recipes/i18n.md +118 -0
  88. package/core/recipes/monorepo.md +101 -0
  89. package/core/recipes/self-improvement.md +61 -0
  90. package/core/recipes/tdd.md +128 -0
  91. package/core/recipes/web-mobile-parity.md +87 -0
  92. package/core/reflector/SCHEDULING.md +83 -0
  93. package/core/reflector/prune-lessons.sh +105 -0
  94. package/core/reflector/reflect-brief.md +11 -0
  95. package/core/reflector/reflect.command.md +13 -0
  96. package/core/reflector/run-weekly.sh +54 -0
  97. package/core/reflector/trajectory-log.sh +55 -0
  98. package/core/roles/README.md +61 -0
  99. package/core/roles/builder.md +75 -0
  100. package/core/roles/designer.md +93 -0
  101. package/core/roles/helper.md +70 -0
  102. package/core/roles/planner.md +123 -0
  103. package/core/roles/reflector.md +72 -0
  104. package/core/roles/reviewer.md +104 -0
  105. package/core/roles/scribe.md +89 -0
  106. package/core/universal-rules/README.md +71 -0
  107. package/core/universal-rules/meta-discipline.md +292 -0
  108. package/core/universal-rules/operations.md +162 -0
  109. package/core/universal-rules/quality-gates.md +191 -0
  110. package/core/universal-rules/spec-as-you-go.md +123 -0
  111. package/core/universal-rules/workflow.md +153 -0
  112. package/core/workflow/PHASES.md +134 -0
  113. package/core/workflow/README.md +56 -0
  114. package/docs/MANUAL-INSTALL.md +456 -0
  115. package/package.json +52 -0
  116. package/tools/check-framework-purity.sh +91 -0
  117. package/tools/measure-tokens.sh +169 -0
  118. package/tools/validate-adapter-output.sh +611 -0
@@ -0,0 +1,87 @@
1
+ # Adapter — Codex (T3)
2
+
3
+ OpenAI Codex (the modern shell-driven agent — not the deprecated original Codex API) is a T3 target because:
4
+
5
+ - It supports a single project rules file at `AGENTS.md` (project root — the established cross-agent convention).
6
+ - It excels at shell-driven scripting and one-shot tasks.
7
+
8
+ It is **T3** because:
9
+
10
+ - ❌ No per-pattern rule scoping.
11
+ - ❌ No sub-agent dispatch.
12
+ - ❌ No hooks.
13
+ - ❌ No per-call model routing.
14
+ - ❌ No built-in memory directory.
15
+ - ⚠️ Limited multi-step orchestration capability vs Claude/Cursor.
16
+
17
+ **Tier**: T3 — Basic. Rule TEXT installs but most CONDUCTOR mechanism doesn't apply.
18
+
19
+ ## Installation path
20
+
21
+ ```bash
22
+ bash adapters/codex/transform.sh <target> # install
23
+ bash adapters/codex/transform.sh <target> --recipes=tdd,debugging # + opt-in recipes
24
+ bash adapters/codex/transform.sh <target> --dry-run --no-prompt # preview, write nothing
25
+ bash adapters/codex/transform.sh <target> --uninstall # revert (manifest-based)
26
+ ```
27
+
28
+ ## What gets installed
29
+
30
+ ```
31
+ <target>/
32
+ ├── AGENTS.md # Codex-flavored intro + 5 universal rules + compressed workflow + selected recipes + memory note
33
+ └── docs/
34
+ ├── CURRENT_WORK.md # Universal templates
35
+ ├── REMAINING_TASKS.md
36
+ ├── PLANS.md
37
+ ├── TASKS.md
38
+ ├── INDEX.md
39
+ └── specs/_example.md
40
+ ```
41
+
42
+ ## Native features supported
43
+
44
+ - ✅ Always-loaded baseline (`AGENTS.md`).
45
+ - ✅ All universal rule TEXT.
46
+ - ✅ All doc templates.
47
+ - ✅ Strong shell-task execution (Codex's primary strength).
48
+
49
+ ## Features NOT supported
50
+
51
+ | Feature | Workaround |
52
+ |---|---|
53
+ | Per-pattern rule scoping | All rules always-loaded. |
54
+ | Sub-agent dispatch | Human plays orchestrator (or breaks task into sequential prompts). |
55
+ | Hooks | Pair with project pre-commit git hooks. |
56
+ | Per-call model routing | Single model per Codex invocation. |
57
+ | Built-in memory directory | DIY at `.memory/`. |
58
+ | Multi-step orchestration | Limited — Codex shines at one-shot shell tasks. For multi-step, use Claude/Cursor. |
59
+
60
+ ## Best fit use cases
61
+
62
+ - Shell scripts.
63
+ - One-shot file transformations.
64
+ - Quick git operations.
65
+ - "Run this command and tell me the output" tasks.
66
+
67
+ ## After install — first steps
68
+
69
+ 1. Verify Codex reads `AGENTS.md` (auto-loaded from project root on session start).
70
+ 2. Customize `AGENTS.md` for your project as needed.
71
+ 3. Add `.memory/` to `.gitignore`.
72
+ 4. Use Codex for shell tasks; rely on Claude/Cursor for multi-step orchestration.
73
+
74
+ ## Quirks / known issues
75
+
76
+ - Output is `AGENTS.md` at the project root (the established cross-agent convention adopted by
77
+ OpenAI Codex / Codex CLI), superseding the early-design `.codex/codex.md` guess.
78
+ - Single-file model: everything Cursor splits across `.cursor/rules/*.mdc` is concatenated into
79
+ `AGENTS.md`. All rules are always-on — Codex has no per-pattern scoping.
80
+
81
+ ## Status
82
+
83
+ - ✅ `README.md`
84
+ - ✅ `SUPPORTED-FEATURES.md`
85
+ - ✅ `transform-spec.md`
86
+ - ✅ `transform.sh` (implemented — single-file `AGENTS.md` bundle, recipes, dry-run, manifest-based uninstall)
87
+ - ⏳ `notes.md` (real-Codex install verification deferred)
@@ -0,0 +1,66 @@
1
+ # Codex — supported features
2
+
3
+ Detailed matrix of which CONDUCTOR features Codex supports.
4
+
5
+ ## Feature support
6
+
7
+ | Feature | Codex support | Mechanism | Notes |
8
+ |---|---|---|---|
9
+ | **Always-loaded project rules** | ✅ Native | `AGENTS.md` | Auto-loaded by Codex on session start. |
10
+ | **Shell task execution** | ✅ Strength | Codex's primary capability | One-shot shell scripting is Codex's best use case. |
11
+ | **Per-pattern rule scoping** | ❌ | — | All rules always-loaded. |
12
+ | **Sub-agent dispatch** | ✅ Native (2026) | Custom named agents in `.codex/agents/*.toml` | See `docs/COMPATIBILITY-MATRIX.md` / ADR-031. |
13
+ | **Hooks (Stop etc.)** | ✅ Native (2026) | `.codex/hooks.json` | ADR-031. CONDUCTOR currently emits only the Reflector hook (ADR-032); broader hook-set emission is Phase 2. |
14
+ | **Per-task model routing** | ✅ Native (2026) | Per-agent `model` in agent TOML | ADR-031. |
15
+ | **Custom slash commands** | ✅ Native (2026) | Skills at `.agents/skills/*/SKILL.md` | ADR-031. |
16
+ | **Built-in memory directory** | ❌ | — | DIY at `.memory/`. |
17
+ | **In-repo doc templates** | ✅ Universal | Plain markdown | Read on demand. |
18
+ | **Spec-as-you-go ABSOLUTE enforcement** | ❌ rule reminder only | Rule text in `AGENTS.md` reminds | Self-policed. |
19
+ | **Two-stage code review enforcement** | ❌ rule reminder only | | |
20
+ | **Multi-step orchestration** | ⚠️ Limited | Sequential prompts | For complex multi-step work, prefer Claude/Cursor. |
21
+
22
+ ## Universal-rule → Codex bundle translation
23
+
24
+ For each `core/universal-rules/<rule>.md`:
25
+
26
+ 1. Strip front-matter (Codex doesn't use it).
27
+ 2. Concatenate body into `AGENTS.md` as a section with heading `## <rule name>`.
28
+ 3. Tool-specific callouts:
29
+ - `> **Codex-only mechanism**` (rare): keep.
30
+ - `> **Claude-only mechanism**`: REPLACE with `> **Note (Codex)**: enforced by hook on Claude Code; on Codex, follow self-policed.`
31
+ - Other tool callouts: STRIP.
32
+
33
+ ## Strengths to lean into
34
+
35
+ - One-shot shell tasks (the orchestrator role isn't really meaningful here).
36
+ - The `AGENTS.md` rule bundle gives Codex enough context to follow project conventions for code it generates inline.
37
+
38
+ ## Weaknesses to acknowledge
39
+
40
+ - Multi-step orchestration is awkward in Codex. Consider Codex a "specialist" tool — use it for shell tasks; use Claude/Cursor for the orchestrator workflow.
41
+ - Bundled rules approach the context limit faster on smaller models. If `AGENTS.md` becomes too large, consider trimming the workflow phase definitions (keep universal rules + ABSOLUTE rules).
42
+
43
+ ## transform.sh status
44
+
45
+ ✅ **Implemented.** `adapters/codex/transform.sh` emits a single-file `AGENTS.md` bundle (Codex-flavored
46
+ bilingual intro + ABSOLUTE-rules summary + 5 universal rules sans frontmatter + compressed workflow +
47
+ opt-in recipes + DIY `.memory/` note) plus universal `docs/` templates. Supports `--recipes=`,
48
+ `--dry-run`, `--no-prompt`, and manifest-based `--uninstall`/`--force`. Output target is `AGENTS.md`
49
+ at the project root (the established cross-agent convention), not the early-design `.codex/codex.md`.
50
+
51
+ ## Self-improvement (Reflector) — opt-in
52
+
53
+ With `--recipes=self-improvement`, the Codex adapter emits the Reflector loop (ADR-032):
54
+
55
+ - **Hook**: `.codex/hooks.json` — registers `.conductor/reflect/trajectory-log.sh` on the `Stop` event. Written only if no hook config exists; if one is already present, the adapter emits a manual-merge log entry instead of overwriting.
56
+ - **Command**: `.agents/skills/reflect/SKILL.md` — the `/reflect` skill that distills the trajectory log into lesson candidates.
57
+ - **Agent**: `.codex/agents/reflector.toml` — named reflector agent for the distillation pass.
58
+ - **Scripts**: `.conductor/reflect/trajectory-log.sh` (session trajectory capture) and `.conductor/reflect/prune-lessons.sh` (lesson-file size pruning).
59
+
60
+ The loop is propose-only — lessons are proposed for human review, never auto-applied to rules. The hook no-ops unless `.conductor/reflect/` exists, so installs without the recipe are unaffected (opt-in gate).
61
+
62
+ ## Verification (real-Codex install deferred)
63
+
64
+ | Feature claim | Verified-by-real-install | Verification command / observation |
65
+ |---|---|---|
66
+ | `AGENTS.md` auto-loads | ⏳ deferred | Run Codex in project; verify it cites project conventions. |
@@ -0,0 +1,90 @@
1
+ # Codex adapter — transform.sh specification
2
+
3
+ What `adapters/codex/transform.sh` MUST do when implemented in P3.5.
4
+
5
+ ## Invocation
6
+
7
+ ```bash
8
+ ./transform.sh <target-dir> [--dry-run]
9
+ ```
10
+
11
+ ## Inputs
12
+
13
+ ```
14
+ core/universal-rules/meta-discipline.md
15
+ core/universal-rules/operations.md
16
+ core/universal-rules/quality-gates.md
17
+ core/universal-rules/spec-as-you-go.md
18
+ core/universal-rules/workflow.md
19
+ core/docs-templates/*.md
20
+ core/docs-templates/specs/_example.md
21
+ core/memory-pattern/README.md
22
+ adapters/codex/_native/codex.md.tpl # Header template (Codex-flavored intro)
23
+ ```
24
+
25
+ ## Outputs
26
+
27
+ > **Convention change (post-P0):** the canonical Codex project-rules file is **`AGENTS.md`** at the
28
+ > project root — the established cross-agent standard adopted by OpenAI Codex / Codex CLI — NOT the
29
+ > early-design `.codex/codex.md` guess. The implemented `transform.sh` emits `AGENTS.md`; references
30
+ > to `.codex/codex.md` below are retained as historical design notes only.
31
+
32
+ ```
33
+ <target-dir>/
34
+ ├── AGENTS.md # Bundled all-rules + workflow + intro (project root)
35
+ └── docs/
36
+ ├── CURRENT_WORK.md # Verbatim
37
+ ├── REMAINING_TASKS.md
38
+ ├── PLANS.md
39
+ ├── TASKS.md
40
+ ├── INDEX.md
41
+ └── specs/_example.md
42
+ ```
43
+
44
+ ## `.codex/codex.md` composition (in order)
45
+
46
+ 1. **Header from `_native/codex.md.tpl`** — bilingual (한/영) intro adapted for Codex (one-shot model, shell-task strength).
47
+ 2. **ABSOLUTE rules section** — R1-R8 minus Claude-only sub-agent enforcement. R-prefix renumbered.
48
+ 3. **Universal rules section** — for each `core/universal-rules/<rule>.md`:
49
+ - Heading: `## <rule title>`
50
+ - Body: rule content sans front-matter.
51
+ 4. **Workflow section** — compressed version of `core/workflow/PHASES.md` (Codex's typical use cases skip Plan/Architecture more often than other tools).
52
+ 5. **Pointer to docs** — `Read docs/CURRENT_WORK.md before any non-trivial task.`
53
+ 6. **Note on memory** — explain DIY `.memory/`.
54
+
55
+ ## Universal-rules → Codex bundle translation
56
+
57
+ Same as Gemini adapter — strip front-matter, concatenate, replace tool-specific callouts.
58
+
59
+ ## Edge cases
60
+
61
+ | Case | Adapter behavior |
62
+ |---|---|
63
+ | `.codex/` doesn't exist | Create it. |
64
+ | Existing `.codex/codex.md` | Skip; report "SKIP (exists)". |
65
+ | `.codex/codex.md` exceeds Codex context budget | Warn; document trim strategy in `notes.md`. |
66
+
67
+ ## Idempotency check
68
+
69
+ Re-run reports "SKIP (exists)" for everything.
70
+
71
+ ## Verification commands (P3.5 will fill)
72
+
73
+ ```bash
74
+ test -f "<target>/.codex/codex.md" || echo "MISSING codex.md"
75
+
76
+ # Run Codex in <target>; verify it follows ABSOLUTE rules + universal conventions.
77
+ ```
78
+
79
+ ## P3.5 Codex version compatibility check
80
+
81
+ - Confirm `.codex/codex.md` IS the canonical project-rules location.
82
+ - Confirm Codex auto-loads it on session start.
83
+ - Confirm Codex follows the rule TEXT in its inline code generation.
84
+
85
+ If Codex has changed conventions by P3.5, document in `notes.md`.
86
+
87
+ ## Out of scope
88
+
89
+ - Codex authentication / API key.
90
+ - Per-stack auto-detection.