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,140 @@
1
+ # Claude Code adapter — transform.sh specification
2
+
3
+ What `adapters/claude/transform.sh` MUST do when implemented in P1.
4
+
5
+ ## Invocation
6
+
7
+ ```bash
8
+ ./transform.sh <target-dir> [--dry-run]
9
+ ```
10
+
11
+ - `<target-dir>` — absolute path to the project directory where files install.
12
+ - `--dry-run` — print what would be written without touching disk. Exit 0.
13
+
14
+ ## Inputs
15
+
16
+ Reads from (relative to conductor repo root):
17
+
18
+ ```
19
+ core/workflow/PHASES.md
20
+ core/universal-rules/meta-discipline.md
21
+ core/universal-rules/operations.md
22
+ core/universal-rules/quality-gates.md
23
+ core/universal-rules/spec-as-you-go.md
24
+ core/universal-rules/workflow.md
25
+ core/docs-templates/CURRENT_WORK.md
26
+ core/docs-templates/REMAINING_TASKS.md
27
+ core/docs-templates/PLANS.md
28
+ core/docs-templates/TASKS.md
29
+ core/docs-templates/INDEX.md
30
+ core/docs-templates/specs/_example.md
31
+ core/memory-pattern/README.md
32
+ core/memory-pattern/EXAMPLES.md
33
+ core/roles/*.md # 6 role personas → .claude/agents/ (planner/builder/reviewer/helper/designer/scribe)
34
+ core/hooks/*.sh.template # 7 hook templates
35
+ adapters/claude/_native/CLAUDE.md.tpl # Claude-specific orchestrator manual template
36
+ ```
37
+
38
+ > `.claude/settings.json` is synthesized by `transform.sh` via a heredoc (permissions allowlist + hooks registry) — there is no checked-in `settings.template.json`.
39
+
40
+ ## Outputs
41
+
42
+ Writes to `<target-dir>` at conventional paths. NEVER overwrites existing files at those paths — skip and report.
43
+
44
+ ```
45
+ <target-dir>/
46
+ ├── CLAUDE.md # From CLAUDE.md.tpl, with placeholders preserved
47
+ ├── .claude/
48
+ │ ├── agents/<6 .md files> # From core/roles/ (planner/builder/reviewer/helper/designer/scribe)
49
+ │ ├── rules/
50
+ │ │ ├── meta-discipline.md # Translated from core/universal-rules/meta-discipline.md
51
+ │ │ ├── operations.md # Translated from core/universal-rules/operations.md
52
+ │ │ ├── quality-gates.md # Translated
53
+ │ │ ├── spec-as-you-go.md # Translated
54
+ │ │ └── workflow.md # Translated
55
+ │ ├── hooks/<7 .sh files> # From core/hooks/*.sh.template, chmod +x
56
+ │ └── settings.json # Synthesized (permissions allowlist + hooks registry)
57
+ └── docs/
58
+ ├── CURRENT_WORK.md # Verbatim copy from core/docs-templates/
59
+ ├── REMAINING_TASKS.md
60
+ ├── PLANS.md
61
+ ├── TASKS.md
62
+ ├── INDEX.md
63
+ └── specs/_example.md
64
+ ```
65
+
66
+ ## Universal-rules → Claude-rules translation
67
+
68
+ For each `core/universal-rules/<rule>.md`:
69
+
70
+ 1. Parse the YAML front-matter. Extract `applies_to:` and `always_loaded:`.
71
+ 2. If `always_loaded: true` → APPEND content (sans front-matter) to `<target>/CLAUDE.md`'s "Universal Rules" section.
72
+ 3. Else → write `<target>/.claude/rules/<rule>.md` with translated front-matter:
73
+ ```yaml
74
+ ---
75
+ paths:
76
+ - "<glob1>"
77
+ - "<glob2>"
78
+ ---
79
+ ```
80
+ (where `<globN>` are the values from `applies_to:`).
81
+ 4. Body content is preserved verbatim, except:
82
+ - Tool-specific callout markers (`> **Claude-only mechanism**: ...`) — keep as-is (they describe Claude's mechanism, accurate here).
83
+ - Tool-specific callout markers for OTHER tools (`> **Cursor / Copilot / Gemini / Codex / Windsurf**: ...`) — STRIP (not relevant to Claude users).
84
+
85
+ ## Memory pattern handling
86
+
87
+ - Copy `core/memory-pattern/README.md` → `<target>/.claude/memory-pattern-README.md` for reference.
88
+ - Do NOT auto-create the `~/.claude/projects/<encoded>/memory/` directory. Print a hint in the post-install message that explains where memory lives + how to start.
89
+
90
+ ## Edge cases
91
+
92
+ | Case | Adapter behavior |
93
+ |---|---|
94
+ | Target dir doesn't exist | Error to stderr, exit 1. |
95
+ | Target dir is the conductor repo itself | Error to stderr, exit 1. |
96
+ | Target dir is not a git repo | Warn but continue. |
97
+ | Existing `CLAUDE.md` at target | Skip; report "SKIP (exists)". |
98
+ | Existing `.claude/agents/builder.md` | Skip individually; install other agents. |
99
+ | `core/` subdirectory missing | Error to stderr, exit 1 (broken installation). |
100
+ | `--dry-run` with no other args | Print all WOULD-WRITE actions. Exit 0. |
101
+ | `chmod +x` fails on hook | Warn but continue (hook is installed; user fixes perms). |
102
+
103
+ ## Idempotency check
104
+
105
+ After install, re-running with the same `<target-dir>` MUST:
106
+ - Report "SKIP (exists)" for every file.
107
+ - Report "Installed 0, skipped N existing files."
108
+ - Exit 0.
109
+
110
+ ## Verification commands (run after `transform.sh`)
111
+
112
+ ```bash
113
+ # Core invariants:
114
+ test -f "<target>/CLAUDE.md" || echo "MISSING CLAUDE.md"
115
+ test -d "<target>/.claude/agents" || echo "MISSING agents dir"
116
+ test -d "<target>/.claude/rules" || echo "MISSING rules dir"
117
+ test -d "<target>/.claude/hooks" || echo "MISSING hooks dir"
118
+ test -f "<target>/.claude/settings.json" || echo "MISSING settings.json"
119
+ test -d "<target>/docs/specs" || echo "MISSING docs/specs"
120
+ test -x "<target>/.claude/hooks/stop-session-log-check.sh" || echo "HOOK NOT EXECUTABLE"
121
+
122
+ # Open Claude Code in <target> and run /help
123
+ # Verify: 6 agents listed; rules load on file-pattern match; hooks fire on Stop.
124
+ ```
125
+
126
+ ## Diff parity vs v0.1
127
+
128
+ The v0.2 Claude adapter MUST produce output identical-or-better to `archive/v0.1/install.sh`. The "or-better" exception covers:
129
+ - Updates to rule content sourced from sanitized reference-adopter originals (P1 will refresh from current shipping versions).
130
+ - Migration of inline spec-as-you-go section to its own top-level rule file.
131
+
132
+ Before merging the P1 Claude adapter PR, run a diff between v0.1 and v0.2 install outputs on the same fresh target. Document any non-trivial differences.
133
+
134
+ ## Out of scope (post-v1.0)
135
+
136
+ - Bilingual placeholder substitution (`{{PROJECT_NAME_KO}}`).
137
+ - Per-stack auto-detection (web vs mobile vs library).
138
+ - Auto-installing the user's `.claude/settings.json` from the template (security-sensitive; requires user edit).
139
+
140
+ These are deferred to post-v1.0 and tracked in `ROADMAP.md` Out-of-scope section.