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,93 @@
1
+ # Adapter — Windsurf (T3)
2
+
3
+ Windsurf (the AI-IDE) is a T3 target because:
4
+
5
+ - It supports an always-loaded baseline at `.windsurfrules`.
6
+ - It supports a directory of additional rules at `.devin/rules/*.md` (preferred; legacy `.windsurf/rules/` is still read).
7
+ - Its workflow is similar to Cursor's but with less per-pattern scoping.
8
+
9
+ It is **T3** because:
10
+
11
+ - ❌ No per-pattern rule scoping (rules in `.devin/rules/` all load together; no glob filtering).
12
+ - ❌ No sub-agent dispatch.
13
+ - ❌ No hooks.
14
+ - ❌ No per-call model routing.
15
+ - ❌ No built-in memory directory.
16
+
17
+ **Tier**: T3 — Basic. Rule TEXT installs and groups well, but enforcement and scoping are minimal.
18
+
19
+ ## Installation path
20
+
21
+ ```bash
22
+ # Install (always-loaded baseline + grouped rules + docs):
23
+ bash adapters/windsurf/transform.sh <target>
24
+
25
+ # With opt-in recipes:
26
+ bash adapters/windsurf/transform.sh <target> --recipes=i18n,monorepo
27
+
28
+ # Preview without writing:
29
+ bash adapters/windsurf/transform.sh <target> --dry-run
30
+
31
+ # Revert a previous install (manifest-based):
32
+ bash adapters/windsurf/transform.sh <target> --uninstall
33
+ ```
34
+
35
+ ## What gets installed
36
+
37
+ ```
38
+ <target>/
39
+ ├── .windsurfrules # Always-loaded baseline (orchestrator manual + ABSOLUTE rules)
40
+ ├── .devin/ # Preferred rules dir (legacy .windsurf/rules/ still read)
41
+ │ └── rules/
42
+ │ ├── operations.md
43
+ │ ├── coding-conventions.md
44
+ │ ├── token-economy.md
45
+ │ ├── spec-as-you-go.md
46
+ │ └── model-routing.md
47
+ └── docs/
48
+ ├── CURRENT_WORK.md # Universal templates
49
+ ├── REMAINING_TASKS.md
50
+ ├── PLANS.md
51
+ ├── TASKS.md
52
+ ├── INDEX.md
53
+ └── specs/_example.md
54
+ ```
55
+
56
+ ## Native features supported
57
+
58
+ - ✅ Always-loaded baseline (`.windsurfrules`).
59
+ - ✅ Directory-based rule loading (`.devin/rules/`; legacy `.windsurf/rules/` still read).
60
+ - ✅ All universal rule TEXT.
61
+ - ✅ All doc templates.
62
+
63
+ ## Features NOT supported
64
+
65
+ | Feature | Workaround |
66
+ |---|---|
67
+ | Per-pattern rule scoping | All rules in `.devin/rules/` load together. No glob filtering. |
68
+ | Sub-agent dispatch | Human plays orchestrator. |
69
+ | Hooks | Pair with project pre-commit git hooks. |
70
+ | Per-call model routing | Single model per session. |
71
+ | Built-in memory directory | DIY at `.memory/`. |
72
+
73
+ ## After install — first steps
74
+
75
+ 1. Open the project in Windsurf.
76
+ 2. Verify `.windsurfrules` loads on session start.
77
+ 3. Verify `.devin/rules/*.md` load alongside.
78
+ 4. Customize `.windsurfrules` — replace `{{PROJECT_NAME}}`.
79
+ 5. Rename `docs/specs/_example.md` → `docs/specs/<your-area>.md`.
80
+ 6. Add `.memory/` to `.gitignore`.
81
+
82
+ ## Quirks / known issues (P3.5 will fill)
83
+
84
+ - TBD: confirm Windsurf reads ALL files under `.devin/rules/` (vs requiring a manifest); legacy `.windsurf/rules/` is still read.
85
+ - TBD: priority order when `.windsurfrules` and `.devin/rules/*.md` contain conflicting rules.
86
+
87
+ ## Status (P0 foundation)
88
+
89
+ - ✅ `README.md`
90
+ - ✅ `SUPPORTED-FEATURES.md`
91
+ - ✅ `transform-spec.md`
92
+ - ✅ `transform.sh` (implemented)
93
+ - ⏳ `notes.md` (P3.5)
@@ -0,0 +1,67 @@
1
+ # Windsurf — supported features
2
+
3
+ Detailed matrix of which CONDUCTOR features Windsurf supports.
4
+
5
+ ## Feature support
6
+
7
+ | Feature | Windsurf support | Mechanism | Notes |
8
+ |---|---|---|---|
9
+ | **Always-loaded baseline** | ✅ Native | `.windsurfrules` at project root | Auto-loaded on session start. |
10
+ | **Directory-based rule loading** | ✅ Native | `.devin/rules/*.md` | All files in directory load together. No per-pattern scoping. Legacy `.windsurf/rules/` still read. |
11
+ | **In-IDE chat / completion** | ✅ Native | Windsurf's primary feature | Similar to Cursor. |
12
+ | **Per-pattern rule scoping** | ⚠️ Directory-based only | — | Whole `.devin/rules/` directory loads; no per-file glob filtering. |
13
+ | **Sub-agent dispatch** | ✅ Native (2026) | Cascade sub-agent dispatch | See `docs/COMPATIBILITY-MATRIX.md` / ADR-031. CONDUCTOR ships the reflector as a manual rule (`.devin/rules/reflector.md`) rather than a named agent file. |
14
+ | **Hooks** | ✅ Native (2026) | `.windsurf/hooks.json` | ADR-031. No session-start/stop hook event — CONDUCTOR uses `post_cascade_response_with_transcript` instead. Only the Reflector hook is emitted today (ADR-032); broader hook-set emission is Phase 2. |
15
+ | **Per-task model routing** | ✅ Native (2026) | Per-task model selection | ADR-031. |
16
+ | **Custom slash commands** | ✅ Native (2026) | Workflows at `.windsurf/workflows/*.md` | ADR-031. |
17
+ | **Built-in memory directory** | ❌ | — | DIY at `.memory/`. |
18
+ | **In-repo doc templates** | ✅ Universal | Plain markdown | Read on demand. |
19
+ | **Spec-as-you-go ABSOLUTE enforcement** | ❌ rule reminder only | Rule text reminds | Self-policed. |
20
+ | **Two-stage code review enforcement** | ❌ rule reminder only | | |
21
+
22
+ ## Universal-rule → Windsurf translation
23
+
24
+ For each `core/universal-rules/<rule>.md`:
25
+
26
+ 1. Parse YAML front-matter.
27
+ 2. If `always_loaded: true` → APPEND content (sans front-matter) to `.windsurfrules`.
28
+ 3. Else → write `.devin/rules/<rule>.md` (preferred dir; legacy `.windsurf/rules/` still read) (front-matter STRIPPED — Windsurf doesn't use it for filtering).
29
+ 4. Tool-specific callouts:
30
+ - `> **Windsurf-only mechanism**` (rare): keep.
31
+ - `> **Claude-only mechanism**`: REPLACE with `> **Note (Windsurf)**: enforced by hook on Claude Code; on Windsurf, follow self-policed.`
32
+ - Other tool callouts: STRIP.
33
+
34
+ ## Strengths to lean into
35
+
36
+ - Always-loaded baseline + grouped rules directory is a natural fit for the universal-rules collection.
37
+ - In-IDE experience similar to Cursor — many of the same UX wins.
38
+
39
+ ## Weaknesses to acknowledge
40
+
41
+ - Lack of per-pattern scoping means `coding-conventions.md` loads even when editing a `README.md`. Acceptable; just adds a small context cost per session.
42
+ - Hooks are now natively supported (`.windsurf/hooks.json` — see `docs/COMPATIBILITY-MATRIX.md` / ADR-031), but Windsurf has no session-start/stop hook event; CONDUCTOR uses `post_cascade_response_with_transcript` as the closest equivalent. CONDUCTOR currently emits only the self-improvement Reflector hook (ADR-032); broader hook-set emission (commit-blocking, spec enforcement) is Phase 2 — until then, pair with a git pre-commit hook for mechanical enforcement.
43
+
44
+ ## Adapter status
45
+
46
+ - ✅ `transform.sh` implemented — emits `.windsurfrules` (always-loaded baseline), `.devin/rules/*.md` (5 universal rules + opt-in recipes, front-matter stripped; legacy `.windsurf/rules/` still read), and `docs/*`. Supports `--recipes=`, `--dry-run`, `--no-prompt`, `--uninstall`/`--force`, `--help`. Writes a `.conductor-manifest.json` for clean rollback.
47
+
48
+ ## Self-improvement (Reflector) — opt-in
49
+
50
+ With `--recipes=self-improvement`, the Windsurf adapter emits the Reflector loop (ADR-032):
51
+
52
+ - **Hook**: `.windsurf/hooks.json` — registers `.conductor/reflect/trajectory-log.sh` on the `post_cascade_response_with_transcript` event (Windsurf has no session-start/stop event; this is the closest equivalent). Written only if no hook config exists; if one is already present, the adapter emits a manual-merge log entry instead of overwriting.
53
+ - **Command**: `.windsurf/workflows/reflect.md` — the `/reflect` workflow that distills the trajectory log into lesson candidates.
54
+ - **Rule**: `.devin/rules/reflector.md` — the reflector is shipped as a manual rule (not a named agent file) on Windsurf.
55
+ - **Scripts**: `.conductor/reflect/trajectory-log.sh` (session trajectory capture) and `.conductor/reflect/prune-lessons.sh` (lesson-file size pruning).
56
+
57
+ Note: the adapter's rules now target `.devin/rules/` (the legacy `.windsurf/rules/` location is still read by Windsurf).
58
+
59
+ 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).
60
+
61
+ ## Verification
62
+
63
+ | Feature claim | Verified-by-real-install | Verification command / observation |
64
+ |---|---|---|
65
+ | `transform.sh` emits baseline + grouped rules + docs | ✅ implemented | `bash adapters/windsurf/transform.sh <target> --no-prompt` then inspect tree. |
66
+ | `.windsurfrules` auto-loads | ⏳ P3.5 | Open project in Windsurf; verify rule indicator. |
67
+ | `.devin/rules/*.md` auto-loads | ⏳ P3.5 | Verify rule indicator includes all files in directory. |
@@ -0,0 +1,99 @@
1
+ # Windsurf adapter — transform.sh specification
2
+
3
+ What `adapters/windsurf/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/windsurf/_native/windsurfrules.tpl # Header template (Windsurf-flavored intro)
23
+ ```
24
+
25
+ ## Outputs
26
+
27
+ ```
28
+ <target-dir>/
29
+ ├── .windsurfrules # Always-loaded baseline (orchestrator manual + ABSOLUTE rules + always-loaded rules)
30
+ ├── .devin/ # Preferred rules dir (legacy .windsurf/rules/ still read)
31
+ │ └── rules/
32
+ │ ├── meta-discipline.md
33
+ │ ├── operations.md
34
+ │ ├── quality-gates.md
35
+ │ ├── spec-as-you-go.md
36
+ │ └── workflow.md
37
+ └── docs/
38
+ ├── CURRENT_WORK.md # Verbatim
39
+ ├── REMAINING_TASKS.md
40
+ ├── PLANS.md
41
+ ├── TASKS.md
42
+ ├── INDEX.md
43
+ └── specs/_example.md
44
+ ```
45
+
46
+ ## `.windsurfrules` composition (in order)
47
+
48
+ 1. **Header from `_native/windsurfrules.tpl`** — bilingual (한/영) intro adapted for Windsurf.
49
+ 2. **ABSOLUTE rules section** — R1-R8 minus Claude-only sub-agent enforcement. R-prefix renumbered.
50
+ 3. **Always-loaded universal rules** — content from rules with `always_loaded: true` in `core/`.
51
+ 4. **Pointer to docs** — `Read docs/CURRENT_WORK.md first every session.`
52
+ 5. **Pointer to `.devin/rules/`** — informational ("additional rules load from .devin/rules/ (preferred; legacy .windsurf/rules/ still read)").
53
+
54
+ ## Universal-rules → Windsurf translation
55
+
56
+ For each `core/universal-rules/<rule>.md`:
57
+
58
+ 1. Parse YAML front-matter.
59
+ 2. If `always_loaded: true`:
60
+ - APPEND content (sans front-matter, with section heading) to `.windsurfrules` "Universal Rules" section.
61
+ - Do NOT also emit to `.devin/rules/` (would double-load).
62
+ 3. Else:
63
+ - Emit `.devin/rules/<rule>.md` (preferred dir; legacy `.windsurf/rules/` is still read) with front-matter STRIPPED (Windsurf doesn't use it).
64
+ - Body preserved verbatim (with tool-specific callout replacement).
65
+
66
+ ## Edge cases
67
+
68
+ | Case | Adapter behavior |
69
+ |---|---|
70
+ | `.devin/` doesn't exist | Create it. |
71
+ | Existing `.windsurfrules` at target | Skip; report "SKIP (exists)". |
72
+ | Existing `.devin/rules/operations.md` | Skip individually. |
73
+
74
+ ## Idempotency check
75
+
76
+ Re-run reports "SKIP (exists)" for everything.
77
+
78
+ ## Verification commands (P3.5 will fill)
79
+
80
+ ```bash
81
+ test -f "<target>/.windsurfrules" || echo "MISSING .windsurfrules"
82
+ test -d "<target>/.devin/rules" || echo "MISSING .devin/rules dir"
83
+ test -f "<target>/.devin/rules/spec-as-you-go.md" || echo "MISSING spec-as-you-go"
84
+
85
+ # Open project in Windsurf; verify rule indicator shows .windsurfrules + all .devin/rules/ files.
86
+ ```
87
+
88
+ ## P3.5 Windsurf version compatibility check
89
+
90
+ - Confirm `.windsurfrules` IS the canonical always-loaded location.
91
+ - Confirm Windsurf reads ALL files under `.devin/rules/` (not just a manifest-listed subset); legacy `.windsurf/rules/` is still read.
92
+ - Confirm priority order when same rule exists in both locations.
93
+
94
+ If Windsurf has changed conventions by P3.5, document in `notes.md`.
95
+
96
+ ## Out of scope
97
+
98
+ - Windsurf authentication.
99
+ - Per-stack auto-detection.