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.
- package/CHANGELOG.md +64 -0
- package/LICENSE +219 -0
- package/NOTICE +11 -0
- package/README.md +526 -0
- package/THIRD_PARTY_NOTICES.md +31 -0
- package/TRADEMARKS.md +26 -0
- package/VISION.md +106 -0
- package/adapters/README.md +121 -0
- package/adapters/claude/README.md +102 -0
- package/adapters/claude/SUPPORTED-FEATURES.md +66 -0
- package/adapters/claude/hookify-templates/.recipe-scoped +9 -0
- package/adapters/claude/hookify-templates/README.md +93 -0
- package/adapters/claude/hookify-templates/block-completion-claim-without-push.local.md.template +56 -0
- package/adapters/claude/hookify-templates/block-direct-push-protected-branch.local.md.template +18 -0
- package/adapters/claude/hookify-templates/block-force-push-protected-branch.local.md.template +42 -0
- package/adapters/claude/hookify-templates/block-server-secret-in-client.local.md.template +36 -0
- package/adapters/claude/hookify-templates/warn-any-type-added.local.md.template +44 -0
- package/adapters/claude/hookify-templates/warn-commit-without-pre-commit-review.local.md.template +52 -0
- package/adapters/claude/hookify-templates/warn-console-direct.local.md.template +55 -0
- package/adapters/claude/hookify-templates/warn-create-table-without-access-control.local.md.template +35 -0
- package/adapters/claude/hookify-templates/warn-current-work-without-remaining-tasks.local.md.template +36 -0
- package/adapters/claude/hookify-templates/warn-gh-pr-create-without-pre-merge-review.local.md.template +38 -0
- package/adapters/claude/hookify-templates/warn-hardcoded-text-without-i18n-key.local.md.template +21 -0
- package/adapters/claude/hookify-templates/warn-on-gh-pr-merge.local.md.template +33 -0
- package/adapters/claude/hookify-templates/warn-plan-spec-without-remaining-tasks.local.md.template +44 -0
- package/adapters/claude/hookify-templates/warn-raw-hex-instead-of-token.local.md.template +21 -0
- package/adapters/claude/hookify-templates/warn-security-definer-without-search-path.local.md.template +30 -0
- package/adapters/claude/hookify-templates/warn-stop-commit-without-current-work.local.md.template +47 -0
- package/adapters/claude/hookify-templates/warn-user-manual-completion.local.md.template +40 -0
- package/adapters/claude/transform-spec.md +140 -0
- package/adapters/claude/transform.sh +1169 -0
- package/adapters/codex/README.md +87 -0
- package/adapters/codex/SUPPORTED-FEATURES.md +66 -0
- package/adapters/codex/transform-spec.md +90 -0
- package/adapters/codex/transform.sh +748 -0
- package/adapters/copilot/README.md +88 -0
- package/adapters/copilot/SUPPORTED-FEATURES.md +73 -0
- package/adapters/copilot/transform-spec.md +111 -0
- package/adapters/copilot/transform.sh +757 -0
- package/adapters/cursor/README.md +87 -0
- package/adapters/cursor/SUPPORTED-FEATURES.md +90 -0
- package/adapters/cursor/transform-spec.md +124 -0
- package/adapters/cursor/transform.sh +731 -0
- package/adapters/gemini/README.md +93 -0
- package/adapters/gemini/SUPPORTED-FEATURES.md +80 -0
- package/adapters/gemini/transform-spec.md +102 -0
- package/adapters/gemini/transform.sh +844 -0
- package/adapters/windsurf/README.md +93 -0
- package/adapters/windsurf/SUPPORTED-FEATURES.md +67 -0
- package/adapters/windsurf/transform-spec.md +99 -0
- package/adapters/windsurf/transform.sh +727 -0
- package/bin/omniconductor.js +130 -0
- package/core/README.md +64 -0
- package/core/anti-patterns/README.md +142 -0
- package/core/anti-patterns/dynamic-system-prompt.md +113 -0
- package/core/anti-patterns/frequent-rule-file-edit.md +83 -0
- package/core/anti-patterns/large-file-read-no-range.md +90 -0
- package/core/anti-patterns/no-sub-agent-dispatch.md +89 -0
- package/core/anti-patterns/single-monolithic-rule-file.md +99 -0
- package/core/anti-patterns/skill-eager-load.md +83 -0
- package/core/anti-patterns/tool-call-spam.md +93 -0
- package/core/docs-templates/CURRENT_WORK.md +64 -0
- package/core/docs-templates/INDEX.md +57 -0
- package/core/docs-templates/PLANS.md +44 -0
- package/core/docs-templates/README.md +40 -0
- package/core/docs-templates/REMAINING_TASKS.md +43 -0
- package/core/docs-templates/TASKS.md +51 -0
- package/core/docs-templates/specs/_example.md +121 -0
- package/core/hooks/README.md +62 -0
- package/core/hooks/pretool-agent-routing.sh.template +97 -0
- package/core/hooks/pretool-commit-current-work-check.sh.template +103 -0
- package/core/hooks/pretool-commit-test-coverage-check.sh.template +116 -0
- package/core/hooks/pretool-large-file-read-guard.sh.template +117 -0
- package/core/hooks/stop-cache-hit-baseline-check.sh.template +133 -0
- package/core/hooks/stop-r6-review-check.sh.template +80 -0
- package/core/hooks/stop-session-log-check.sh.template +101 -0
- package/core/hooks/stop-trajectory-log.sh.template +96 -0
- package/core/memory-pattern/EXAMPLES.md +114 -0
- package/core/memory-pattern/README.md +133 -0
- package/core/recipes/README.md +46 -0
- package/core/recipes/auto-mock-data.md +82 -0
- package/core/recipes/branch-strategy.md +100 -0
- package/core/recipes/coding-conventions.md +123 -0
- package/core/recipes/database-discipline.md +65 -0
- package/core/recipes/debugging.md +143 -0
- package/core/recipes/design-system.md +30 -0
- package/core/recipes/i18n.md +118 -0
- package/core/recipes/monorepo.md +101 -0
- package/core/recipes/self-improvement.md +61 -0
- package/core/recipes/tdd.md +128 -0
- package/core/recipes/web-mobile-parity.md +87 -0
- package/core/reflector/SCHEDULING.md +83 -0
- package/core/reflector/prune-lessons.sh +105 -0
- package/core/reflector/reflect-brief.md +11 -0
- package/core/reflector/reflect.command.md +13 -0
- package/core/reflector/run-weekly.sh +54 -0
- package/core/reflector/trajectory-log.sh +55 -0
- package/core/roles/README.md +61 -0
- package/core/roles/builder.md +75 -0
- package/core/roles/designer.md +93 -0
- package/core/roles/helper.md +70 -0
- package/core/roles/planner.md +123 -0
- package/core/roles/reflector.md +72 -0
- package/core/roles/reviewer.md +104 -0
- package/core/roles/scribe.md +89 -0
- package/core/universal-rules/README.md +71 -0
- package/core/universal-rules/meta-discipline.md +292 -0
- package/core/universal-rules/operations.md +162 -0
- package/core/universal-rules/quality-gates.md +191 -0
- package/core/universal-rules/spec-as-you-go.md +123 -0
- package/core/universal-rules/workflow.md +153 -0
- package/core/workflow/PHASES.md +134 -0
- package/core/workflow/README.md +56 -0
- package/docs/MANUAL-INSTALL.md +456 -0
- package/package.json +52 -0
- package/tools/check-framework-purity.sh +91 -0
- package/tools/measure-tokens.sh +169 -0
- package/tools/validate-adapter-output.sh +611 -0
package/VISION.md
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# VISION — CONDUCTOR
|
|
2
|
+
|
|
3
|
+
## The problem
|
|
4
|
+
|
|
5
|
+
> **한글:** AI 코딩 도구가 우후죽순 늘어났습니다. 2026년의 개발자 한 명이 Claude Code (깊은 리팩터), Cursor (IDE 내 페어 프로그래밍), GitHub Copilot (인라인 자동완성 + PR 리뷰), Gemini CLI (저렴한 대용량 컨텍스트 탐색), Codex (셸 기반 작업), Windsurf 를 동시에 쓸 수 있습니다. 그런데 도구마다 룰·컨텍스트 포맷이 제각각입니다. **도구를 바꾸는 순간 그동안 쌓은 규율이 사라집니다.** Claude 용으로 쓴 룰은 Cursor 에서 자동 로드되지 않고, 스스로 훈련해 온 Plan → Architecture → Tasks 워크플로는 다른 에이전트를 여는 순간 증발합니다. 6개월간 다듬은 취향이 통째로 날아갑니다. 이것이 CONDUCTOR 가 푸는 문제입니다.
|
|
6
|
+
|
|
7
|
+
AI coding tools have multiplied. A single developer in 2026 might use:
|
|
8
|
+
|
|
9
|
+
- **Claude Code** for deep refactors and multi-file work (Anthropic's CLI agent).
|
|
10
|
+
- **Cursor** for in-IDE pair programming with native completion + chat.
|
|
11
|
+
- **GitHub Copilot** for inline autocomplete and PR review.
|
|
12
|
+
- **Gemini CLI** for cheap large-context exploration.
|
|
13
|
+
- **Codex** (OpenAI) for shell-driven tasks.
|
|
14
|
+
- **Windsurf** when collaborating with someone who prefers it.
|
|
15
|
+
|
|
16
|
+
Each tool has its own rules-and-context format:
|
|
17
|
+
|
|
18
|
+
| Tool | Rules file | Rule scoping | Sub-agents | Hooks |
|
|
19
|
+
|---|---|---|---|---|
|
|
20
|
+
| Claude Code | `CLAUDE.md` + `.claude/rules/*.md` + `.claude/agents/*.md` | glob-based via paths front-matter | ✅ Agent tool | ✅ PreToolUse / Stop / etc. |
|
|
21
|
+
| Cursor | `.cursorrules` + `.cursor/rules/*.mdc` | `globs:` front-matter on `.mdc` | ✅ (2.4+) | ✅ (v1.7) |
|
|
22
|
+
| GitHub Copilot | `.github/instructions/*.instructions.md` + AGENTS.md | `applyTo:` front-matter | ✅ | ✅ (CLI + agent) |
|
|
23
|
+
| Gemini CLI | `GEMINI.md` + AGENTS.md (opt-in) | nested-file hierarchy | ✅ | ✅ (v0.26) |
|
|
24
|
+
| Codex | `AGENTS.md` | nested-file hierarchy | ✅ | ✅ |
|
|
25
|
+
| Windsurf / Devin Desktop | `.devin/rules/*.md` (legacy `.windsurf/rules/`) | directory-based | ✅ (Devin Local) | ⚠️ no session/stop events |
|
|
26
|
+
|
|
27
|
+
> As of 2026, sub-agents and hooks are **no longer Claude-only** — every tool ships them (first-party verified 2026-07-04; see `docs/COMPATIBILITY-MATRIX.md`). CONDUCTOR's problem is unchanged, because what still diverges is the **format**: each tool has a different rules file + scoping syntax, and a rule written for one does not auto-load in another. That portability gap — not a raw capability gap — is what CONDUCTOR closes. (2026년 기준 sub-agent·hook 은 더 이상 Claude 전용이 아니며 모든 도구가 지원합니다. 그럼에도 여전히 **포맷**이 제각각이라 CONDUCTOR 가 푸는 문제는 그대로입니다.)
|
|
28
|
+
|
|
29
|
+
**Switch tools → lose your discipline.** The rules you wrote for Claude don't auto-load in Cursor. The Plan → Architecture → Tasks workflow you trained yourself to follow disappears the moment you open a different agent. Six months of accumulated taste — gone.
|
|
30
|
+
|
|
31
|
+
This is the problem CONDUCTOR solves.
|
|
32
|
+
|
|
33
|
+
## The solution
|
|
34
|
+
|
|
35
|
+
> **한글:** 프로젝트의 규율을 도구 독립적인 포맷으로 **단 한 번** 작성하세요. 도구별로 명령어 하나만 실행하면, CONDUCTOR 가 해당 도구에 맞는 파일을 올바른 경로·올바른 포맷으로 생성합니다 (`core/` 에 룰을 한 번 쓰면 → `.claude/` / `.cursor/rules/` / `.github/instructions/` / `GEMINI.md` / `.codex/codex.md` / `.windsurfrules` 로 변환). 같은 Plan → Architecture → Tasks 워크플로가, 그날 개발자가 어떤 도구를 쓰든 프로젝트의 모든 에이전트를 동일하게 지배하게 됩니다.
|
|
36
|
+
|
|
37
|
+
Write your project's discipline ONCE in a tool-agnostic format. Run a single command per tool, and CONDUCTOR generates the right files at the right paths in the right format for that specific tool.
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
core/ ← write rules here, ONCE
|
|
41
|
+
├── workflow/
|
|
42
|
+
├── universal-rules/
|
|
43
|
+
├── docs-templates/
|
|
44
|
+
└── memory-pattern/
|
|
45
|
+
|
|
46
|
+
↓ bash adapters/<tool>/transform.sh <target> (6 adapters today; an npx wrapper is planned)
|
|
47
|
+
|
|
48
|
+
target-project/
|
|
49
|
+
├── .claude/ (if --target=claude)
|
|
50
|
+
├── .cursor/rules/ (if --target=cursor)
|
|
51
|
+
├── .github/instructions/ (if --target=copilot)
|
|
52
|
+
├── GEMINI.md (if --target=gemini)
|
|
53
|
+
├── AGENTS.md (if --target=codex)
|
|
54
|
+
└── .windsurf/rules/ (if --target=windsurf)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The same Plan → Architecture → Tasks workflow now governs every agent in the project, regardless of which tool the developer happens to be using that day.
|
|
58
|
+
|
|
59
|
+
## Audience
|
|
60
|
+
|
|
61
|
+
> **한글:** **주 대상**은 AI 코딩 도구로 프로덕션 소프트웨어를 출시하는 1인 개발자와 2~3인 팀입니다. 이들은 룰을 직접 다시 쓰는 당사자이고, 위에서 강제되는 조직 표준이 없기 때문에 도구 전환의 고통을 가장 절실히 느낍니다. 또한 하나의 도구로 표준화하기보다 전술적으로 도구를 골라 씁니다 (빠른 UI 반복은 Cursor, 깊은 리팩터는 Claude). **부 대상**은 서로 다른 AI 도구를 쓰는 기여자들이 모두 같은 프로젝트 컨벤션을 따르길 바라는 오픈소스 메인테이너입니다.
|
|
62
|
+
|
|
63
|
+
**Primary**: solo developers and 2-3-person teams shipping production software with AI coding tools.
|
|
64
|
+
|
|
65
|
+
These users feel the tool-switching pain most acutely because they personally do the rule-rewriting and they do not have an org-wide standard imposed from above. They also pick tools tactically (Cursor for fast UI iteration, Claude for deep refactors) instead of standardizing on one.
|
|
66
|
+
|
|
67
|
+
**Secondary**: open-source maintainers who want contributors using different AI tools to all follow the same project conventions.
|
|
68
|
+
|
|
69
|
+
## Non-goals
|
|
70
|
+
|
|
71
|
+
> **한글:** CONDUCTOR 는 의도적으로 다음이 **아닙니다**: 프로젝트 관리 도구가 아니며 (티켓·스프린트·칸반 없음, CURRENT_WORK.md 는 보드가 아니라 텍스트 파일 하나), 엔터프라이즈 팀 관리 제품이 아니며 (SSO·관리자 UI·감사 로그 없음, 1인/소규모 범위), 스스로 학습하는 에이전트가 아니며 (메모리는 사용자가 쓴 것만 쌓이고, 조용히 학습하지 않음. 옵트인 Reflector 가 세션 궤적에서 메모리/룰 변경을 *제안* 할 수 있으나, 사람 승인 없이는 아무것도 적용되지 않습니다 — 제안은 조용한 학습이 아닙니다), 모델 라우터 제품이 아니며 (라우팅은 룰 텍스트일 뿐 실제 추론 프록시를 돌리지 않음), 텔레메트리 벤더가 아니며 (phone-home·사용 통계 없음, 디스크 위 파일뿐), 모든 도구 기능의 상위 집합이 아닙니다 (sub-agent 는 Claude 에만 존재하며, Cursor 에서 셸 프로세스로 가짜 흉내 내지 않고 Layer 3 가 그 한계를 솔직히 인정합니다).
|
|
72
|
+
|
|
73
|
+
CONDUCTOR is intentionally NOT:
|
|
74
|
+
|
|
75
|
+
- **A project management tool.** No tickets, no sprints, no Kanban. CURRENT_WORK.md is a single text file, not a board.
|
|
76
|
+
- **An enterprise team-management product.** No SSO, no admin UI, no audit log. Solo / small-team scope only.
|
|
77
|
+
- **A self-improving / agentic auto-learner.** Memory accumulates only what the user (or the orchestrator on the user's behalf) writes. Nothing learns silently. An opt-in Reflector may *propose* memory/rule deltas from session trajectories, but nothing is applied without human approval — proposing is not silent learning.
|
|
78
|
+
- **A model-router product.** Model routing is a *rule* text that travels via CONDUCTOR; the actual routing happens inside Claude Code (and only Claude Code). We do not run an inference proxy.
|
|
79
|
+
- **A telemetry vendor.** No phone-home, no usage stats, no opt-in tracking. Files on disk only.
|
|
80
|
+
- **A super-set of every tool's features.** Sub-agent dispatch only exists in Claude. We refuse to fake it on Cursor by spawning shell processes — that is fragile and confusing. Layer 3 acknowledges these gaps openly.
|
|
81
|
+
|
|
82
|
+
## Why this can win
|
|
83
|
+
|
|
84
|
+
1. **Bilingual (한/영) is a moat.** All major competitors (GSD, SpecKit, BMAD, Cursor Rules) are English-first. Korean solo devs are a meaningful early-adopter pool with high willingness to share what works.
|
|
85
|
+
2. **Production-pedigree.** Born from a real shipping project at LFamily Labs — every rule earned through an incident, not theorized in a blog post.
|
|
86
|
+
3. **Honest about limits.** We will not pretend Cursor can do sub-agents. Other multi-tool projects gloss over this; CONDUCTOR's documentation calls it out explicitly. That builds trust.
|
|
87
|
+
4. **Opinionated, light.** GSD has 60+ skills and is a maximalist superset. CONDUCTOR has 5 universal rules + 8 sub-agent definitions and is intentionally a small, opinionated kernel.
|
|
88
|
+
|
|
89
|
+
## Why this might fail
|
|
90
|
+
|
|
91
|
+
- **Fragmentation accelerates faster than adapters can keep up.** If 12 new tools launch in 2026, we can't write 12 new adapters.
|
|
92
|
+
Mitigation: `docs/CONTRIBUTING.md` makes adding a new adapter a well-documented community contribution.
|
|
93
|
+
- **Tools converge on a common format.** If GitHub, Anthropic, OpenAI, Google all agree on `.airules/*.mdc` (unlikely soon), CONDUCTOR's transform layer becomes redundant.
|
|
94
|
+
Mitigation: even with a common format, the *opinionated* universal-rules content + workflow definitions remain valuable.
|
|
95
|
+
- **Solo-dev market is too narrow.** Maybe everyone settles on one tool.
|
|
96
|
+
Mitigation: even single-tool users benefit from the rule + agent + workflow library.
|
|
97
|
+
|
|
98
|
+
## Success in 12 months
|
|
99
|
+
|
|
100
|
+
By 2027-05:
|
|
101
|
+
|
|
102
|
+
- 6 tool adapters working end-to-end.
|
|
103
|
+
- 50+ GitHub stars, 5+ community-contributed adapter PRs.
|
|
104
|
+
- The originating LFamily Labs product ships v1.0 using CONDUCTOR as its production scaffold (eat-our-own-dogfood case study).
|
|
105
|
+
- One Korean and one English Show HN / launch tweet.
|
|
106
|
+
- Free and open under Apache 2.0 (commercial use included); the CONDUCTOR name is a trademark of LFamily Labs LLC. File-on-disk, no telemetry.
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# `adapters/` — Layer 2, per-tool transformers
|
|
2
|
+
|
|
3
|
+
One adapter per supported tool. Each reads the tool-agnostic content under `core/` and emits files in the format and at the paths the target tool expects.
|
|
4
|
+
|
|
5
|
+
## Adapter directory layout
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
adapters/
|
|
9
|
+
├── claude/ # Claude Code (T1 — full support)
|
|
10
|
+
├── cursor/ # Cursor (T1 — partial; no sub-agents/hooks)
|
|
11
|
+
├── copilot/ # GitHub Copilot (T2)
|
|
12
|
+
├── gemini/ # Gemini CLI (T2)
|
|
13
|
+
├── codex/ # OpenAI Codex (T3)
|
|
14
|
+
└── windsurf/ # Windsurf (T3)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Each adapter directory contains:
|
|
18
|
+
|
|
19
|
+
| File | Required | Purpose |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `README.md` | YES | Tier (T1/T2/T3) with reasoning; what installs; what works; what is lost. |
|
|
22
|
+
| `SUPPORTED-FEATURES.md` | YES | Detailed feature support breakdown for that tool. |
|
|
23
|
+
| `transform-spec.md` | YES | What `transform.sh` MUST do (input, output, edge cases). |
|
|
24
|
+
| `transform.sh` | P1+ | The actual transformer (Bash, idempotent, supports `--dry-run`). |
|
|
25
|
+
| `notes.md` | optional | Real-install discoveries (quirks, surprises). |
|
|
26
|
+
|
|
27
|
+
## Adapter contract
|
|
28
|
+
|
|
29
|
+
Every adapter MUST honor:
|
|
30
|
+
|
|
31
|
+
### 1. Input
|
|
32
|
+
|
|
33
|
+
- Read from `core/` directory (relative to the conductor repo root).
|
|
34
|
+
- Treat `core/` as read-only. Never modify.
|
|
35
|
+
|
|
36
|
+
### 2. Output
|
|
37
|
+
|
|
38
|
+
- Write tool-native files at the conventional path for that tool, into a target directory passed as an argument.
|
|
39
|
+
- Conventional paths per tool are documented in `docs/HOW-IT-WORKS-PER-TOOL.md`.
|
|
40
|
+
- `docs/` templates from `core/docs-templates/` install at `<target>/docs/` for every adapter (universal across tools).
|
|
41
|
+
|
|
42
|
+
### 3. Idempotency
|
|
43
|
+
|
|
44
|
+
- Safe to re-run. Existing files at target paths are NOT overwritten — skip and report.
|
|
45
|
+
- Re-running with the same inputs produces the same outputs.
|
|
46
|
+
|
|
47
|
+
### 4. Dry-run support
|
|
48
|
+
|
|
49
|
+
- `--dry-run` flag prints what WOULD be written without touching disk.
|
|
50
|
+
- Useful for previewing before installing into a real project.
|
|
51
|
+
|
|
52
|
+
### 5. No telemetry
|
|
53
|
+
|
|
54
|
+
- Zero network calls. Zero usage metrics. Zero opt-in tracking. (CONDUCTOR ADR-008.)
|
|
55
|
+
|
|
56
|
+
### 6. Bash 4+ portability
|
|
57
|
+
|
|
58
|
+
- `set -euo pipefail` at the top.
|
|
59
|
+
- POSIX-friendly constructs where possible.
|
|
60
|
+
- Quote all variable expansions.
|
|
61
|
+
- Tested on macOS Bash and modern Linux Bash.
|
|
62
|
+
|
|
63
|
+
### 7. Failure mode
|
|
64
|
+
|
|
65
|
+
- On error: print to stderr, exit non-zero.
|
|
66
|
+
- On partial success: report what was installed and what was skipped.
|
|
67
|
+
|
|
68
|
+
## Front-matter translation
|
|
69
|
+
|
|
70
|
+
The Layer-1 universal-rules use `applies_to:` front-matter for routing hints. Each adapter translates it:
|
|
71
|
+
|
|
72
|
+
| `core/` front-matter | Adapter output |
|
|
73
|
+
|---|---|
|
|
74
|
+
| `applies_to: ["**/*.ts", "**/*.tsx"]` (Claude) | `paths:\n - "**/*.ts"\n - "**/*.tsx"` |
|
|
75
|
+
| (Cursor) | `globs:\n - "**/*.ts"\n - "**/*.tsx"` |
|
|
76
|
+
| (Copilot) | `applyTo: '**/*.ts,**/*.tsx'` |
|
|
77
|
+
| (Gemini / Codex) | (bundled — no per-pattern routing) |
|
|
78
|
+
| (Windsurf) | (bundled into `.windsurf/rules/`) |
|
|
79
|
+
|
|
80
|
+
| `core/` front-matter | Adapter behavior |
|
|
81
|
+
|---|---|
|
|
82
|
+
| `always_loaded: true` | Merge content into the always-loaded baseline file (`CLAUDE.md`, `.cursorrules`, `applyTo: '**'`, `GEMINI.md`, `.codex/codex.md`, `.windsurfrules`) |
|
|
83
|
+
| `always_loaded: false` (or absent) | Emit as a separate rule file with appropriate per-pattern scoping |
|
|
84
|
+
|
|
85
|
+
## Adapter-specific extensions
|
|
86
|
+
|
|
87
|
+
Each adapter MAY also install tool-native artifacts that have no `core/` source (because they are Layer-3, tool-only). Examples:
|
|
88
|
+
|
|
89
|
+
- **Claude adapter** also installs `.claude/agents/*.md`, `.claude/hooks/*.sh`, and a generated `.claude/settings.json` (written by `transform.sh`).
|
|
90
|
+
- **Cursor adapter** also installs `.cursor/commands/*.md` (project commands, where applicable).
|
|
91
|
+
- **Other adapters** typically do NOT have tool-native extensions to install.
|
|
92
|
+
|
|
93
|
+
These tool-native artifacts live IN THE ADAPTER (not in `core/`) and are documented in the adapter's `transform-spec.md`.
|
|
94
|
+
|
|
95
|
+
## Running an adapter
|
|
96
|
+
|
|
97
|
+
The Claude, Cursor, and Copilot adapters ship a runnable `transform.sh`. Gemini, Codex, and Windsurf are manual-install (see `docs/MANUAL-INSTALL.md`); their `transform-spec.md` documents the intended mapping.
|
|
98
|
+
|
|
99
|
+
Usage (shipping adapters):
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Current usage (shipping):
|
|
103
|
+
bash adapters/<tool>/transform.sh <target> [--dry-run]
|
|
104
|
+
|
|
105
|
+
# Or by absolute path:
|
|
106
|
+
/path/to/conductor/adapters/<tool>/transform.sh /path/to/target [--dry-run]
|
|
107
|
+
|
|
108
|
+
# (planned / roadmap — not yet available):
|
|
109
|
+
# npx omniconductor init --target=<tool> [target-dir]
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Status (P0 foundation)
|
|
113
|
+
|
|
114
|
+
All 6 adapter directories have:
|
|
115
|
+
- ✅ `README.md`
|
|
116
|
+
- ✅ `SUPPORTED-FEATURES.md`
|
|
117
|
+
- ✅ `transform-spec.md`
|
|
118
|
+
- ⏳ `transform.sh` (P1+)
|
|
119
|
+
- ⏳ `notes.md` (P1+ when real-install quirks discovered)
|
|
120
|
+
|
|
121
|
+
See `ROADMAP.md` for which adapter ships in which phase.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Adapter — Claude Code (T1, full support)
|
|
2
|
+
|
|
3
|
+
The reference implementation. Claude Code is CONDUCTOR's most-feature-complete target because:
|
|
4
|
+
|
|
5
|
+
- It supports per-call sub-agent dispatch via the `Agent` tool.
|
|
6
|
+
- It supports hooks (PreToolUse, Stop, etc.) for ABSOLUTE rule enforcement.
|
|
7
|
+
- It supports lazy rule loading via `paths:` front-matter on `.claude/rules/*.md`.
|
|
8
|
+
- It supports per-call model routing via the `model:` argument.
|
|
9
|
+
- It has a built-in per-project memory directory (`~/.claude/projects/<encoded>/memory/`).
|
|
10
|
+
|
|
11
|
+
**Tier**: T1 — Full.
|
|
12
|
+
|
|
13
|
+
## Installation path
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Current usage (shipping):
|
|
17
|
+
bash adapters/claude/transform.sh <target> [--dry-run]
|
|
18
|
+
|
|
19
|
+
# Or by absolute path:
|
|
20
|
+
/path/to/conductor/adapters/claude/transform.sh /path/to/target [--dry-run]
|
|
21
|
+
|
|
22
|
+
# (planned / roadmap — not yet available):
|
|
23
|
+
# npx omniconductor init --target=claude [target-dir]
|
|
24
|
+
|
|
25
|
+
# Today (P0 foundation): use the v0.1 archive:
|
|
26
|
+
/path/to/conductor/archive/v0.1/install.sh /path/to/target
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## What gets installed
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
<target>/
|
|
33
|
+
├── CLAUDE.md # Slim orchestrator manual (~200 lines)
|
|
34
|
+
├── .claude/
|
|
35
|
+
│ ├── agents/
|
|
36
|
+
│ │ ├── planner.md
|
|
37
|
+
│ │ ├── builder.md
|
|
38
|
+
│ │ ├── reviewer.md
|
|
39
|
+
│ │ ├── helper.md
|
|
40
|
+
│ │ ├── designer.md
|
|
41
|
+
│ │ └── scribe.md
|
|
42
|
+
│ ├── rules/
|
|
43
|
+
│ │ ├── workflow.md
|
|
44
|
+
│ │ ├── spec-as-you-go.md
|
|
45
|
+
│ │ ├── quality-gates.md
|
|
46
|
+
│ │ ├── operations.md
|
|
47
|
+
│ │ └── meta-discipline.md
|
|
48
|
+
│ ├── hooks/ # 7 hook scripts
|
|
49
|
+
│ │ ├── pretool-agent-routing.sh
|
|
50
|
+
│ │ ├── pretool-commit-current-work-check.sh
|
|
51
|
+
│ │ ├── pretool-commit-test-coverage-check.sh
|
|
52
|
+
│ │ ├── pretool-large-file-read-guard.sh
|
|
53
|
+
│ │ ├── stop-session-log-check.sh
|
|
54
|
+
│ │ ├── stop-r6-review-check.sh
|
|
55
|
+
│ │ └── stop-cache-hit-baseline-check.sh
|
|
56
|
+
│ └── settings.json # Generated by transform.sh (permissions + hooks registry)
|
|
57
|
+
├── docs/
|
|
58
|
+
│ ├── CURRENT_WORK.md
|
|
59
|
+
│ ├── REMAINING_TASKS.md
|
|
60
|
+
│ ├── PLANS.md
|
|
61
|
+
│ ├── TASKS.md
|
|
62
|
+
│ ├── INDEX.md
|
|
63
|
+
│ └── specs/
|
|
64
|
+
│ └── _example.md
|
|
65
|
+
└── (memory pattern docs — for reference; actual memory at ~/.claude/projects/.../memory/)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Native features supported
|
|
69
|
+
|
|
70
|
+
- ✅ Sub-agent dispatch (`Agent` tool with named persona).
|
|
71
|
+
- ✅ Hooks (Stop, PreToolUse) for ABSOLUTE rule enforcement.
|
|
72
|
+
- ✅ Lazy rule loading (`paths:` front-matter, glob-matched).
|
|
73
|
+
- ✅ Per-call model routing (`model: "opus" | "sonnet" | "haiku"`).
|
|
74
|
+
- ✅ Custom slash commands.
|
|
75
|
+
- ✅ Built-in memory directory.
|
|
76
|
+
- ✅ Always-loaded baseline (`CLAUDE.md`).
|
|
77
|
+
|
|
78
|
+
## Features NOT supported (Claude limitations)
|
|
79
|
+
|
|
80
|
+
None relevant to CONDUCTOR's scope. Claude is the reference implementation.
|
|
81
|
+
|
|
82
|
+
## After install — first steps
|
|
83
|
+
|
|
84
|
+
1. Edit `CLAUDE.md` — replace `{{PROJECT_NAME}}` and `{{DESIGN_SYSTEM_NAME}}` placeholders with your project's values.
|
|
85
|
+
2. Review the generated `.claude/settings.json` (permissions allowlist + hooks registry). Customize hook paths if needed, or add per-user overrides in `.claude/settings.local.json`.
|
|
86
|
+
3. Rename `docs/specs/_example.md` → `docs/specs/<your-area>.md` and start a real spec.
|
|
87
|
+
4. Restart Claude Code in the project directory. Verify with `/help` that the new agents are recognized.
|
|
88
|
+
5. Add your first entry to `docs/CURRENT_WORK.md`.
|
|
89
|
+
|
|
90
|
+
## Quirks / known issues
|
|
91
|
+
|
|
92
|
+
To be filled in `notes.md` after P1 real-install verification.
|
|
93
|
+
|
|
94
|
+
## Status (P0 foundation)
|
|
95
|
+
|
|
96
|
+
- ✅ `README.md` (this file)
|
|
97
|
+
- ✅ `SUPPORTED-FEATURES.md`
|
|
98
|
+
- ✅ `transform-spec.md`
|
|
99
|
+
- ⏳ `transform.sh` (P1)
|
|
100
|
+
- ⏳ `notes.md` (P1 — after first real verification)
|
|
101
|
+
|
|
102
|
+
The v0.1 `install.sh` (under `archive/v0.1/`) provides equivalent output today and continues to work until the v0.2 Claude adapter ships in P1.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Claude Code — supported features
|
|
2
|
+
|
|
3
|
+
Detailed matrix of which CONDUCTOR features Claude Code supports natively.
|
|
4
|
+
|
|
5
|
+
## Feature support
|
|
6
|
+
|
|
7
|
+
| Feature | Claude support | Mechanism | Notes |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| **Sub-agent dispatch** | ✅ Native | `Agent` tool with `subagent_type` arg | Named personas live in `.claude/agents/*.md`. Each is isolated — does NOT inherit `CLAUDE.md`. |
|
|
10
|
+
| **Per-call model routing** | ✅ Native | `model: "opus" \| "sonnet" \| "haiku"` arg on Agent call | Orchestrator classifies task → picks tier per call. |
|
|
11
|
+
| **Hooks (PreToolUse, Stop, etc.)** | ✅ Native | `.claude/settings.json` `hooks:` block | Stop hooks are CONDUCTOR's spec-as-you-go enforcement. PreToolUse for routing. |
|
|
12
|
+
| **Lazy rule loading** | ✅ Native | `paths:` front-matter on `.claude/rules/*.md` | Rule loads when matching file path is touched. |
|
|
13
|
+
| **Always-loaded baseline** | ✅ Native | `CLAUDE.md` | Auto-read on every session start. Keep slim (~200 lines). |
|
|
14
|
+
| **Custom slash commands** | ✅ Native | `.claude/commands/*.md` | Project-level commands available in chat (`/<command>`). |
|
|
15
|
+
| **Skills (plugin ecosystem)** | ✅ Native | `Skill` tool + plugin marketplace | CONDUCTOR doesn't depend on skills, but is compatible. |
|
|
16
|
+
| **MCP servers** | ✅ Native | `~/.claude/mcp.json` or project `.mcp.json` | CONDUCTOR doesn't ship MCP integration; projects can add their own. |
|
|
17
|
+
| **Memory directory** | ✅ Native | `~/.claude/projects/<encoded>/memory/` | 4-type pattern: user / feedback / project / reference. |
|
|
18
|
+
| **In-repo doc templates** | ✅ Native | Plain markdown under `docs/` | Read by orchestrator on demand. |
|
|
19
|
+
| **Spec-as-you-go ABSOLUTE enforcement** | ✅ Stop hook | `stop-session-log-check.sh` blocks session-end if code commit is detected without spec update | Strongest CONDUCTOR feature. |
|
|
20
|
+
| **Two-stage code review enforcement** | ✅ Stop hook | `stop-r6-review-check.sh` reminds about Stage A pre-commit + Stage B pre-merge PR | |
|
|
21
|
+
| **Token economy enforcement** | ⚠️ Rule reminder | `meta-discipline.md` rule + agent self-discipline | No mechanical enforcement; relies on agent following the rule. |
|
|
22
|
+
|
|
23
|
+
## Model tier mapping
|
|
24
|
+
|
|
25
|
+
CONDUCTOR's universal `meta-discipline.md` rubric (token economy + model routing) maps directly to Claude's three tiers:
|
|
26
|
+
|
|
27
|
+
| Universal tier | Claude model | Use cases |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| Opus | `claude-opus-4` (or current Opus equivalent) | Conceptual, multi-file, cross-cutting |
|
|
30
|
+
| Sonnet | `claude-sonnet-4` (or current Sonnet equivalent) | Routine implementation following patterns |
|
|
31
|
+
| Haiku | `claude-haiku-4` (or current Haiku equivalent) | Trivial reads / single-line edits |
|
|
32
|
+
|
|
33
|
+
## Hook execution model
|
|
34
|
+
|
|
35
|
+
CONDUCTOR ships 7 hooks, all registered in the generated `.claude/settings.json` (written directly by `transform.sh` — there is no `settings.template.json`):
|
|
36
|
+
|
|
37
|
+
| Hook | Event | Purpose |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| `pretool-agent-routing.sh` | `PreToolUse` (Agent calls) | Optionally remap or validate sub-agent dispatch (e.g., block `general-purpose` per CONDUCTOR R1). |
|
|
40
|
+
| `pretool-commit-current-work-check.sh` | `PreToolUse` (Bash commit) | Block a commit if `CURRENT_WORK.md` was not updated alongside the change. |
|
|
41
|
+
| `pretool-commit-test-coverage-check.sh` | `PreToolUse` (Bash commit) | Block a commit that adds code without matching test coverage. |
|
|
42
|
+
| `pretool-large-file-read-guard.sh` | `PreToolUse` (Read) | Warn / guard against reading very large files wholesale (token economy). |
|
|
43
|
+
| `stop-session-log-check.sh` | `Stop` | Block session end if code commits detected without matching spec update. |
|
|
44
|
+
| `stop-r6-review-check.sh` | `Stop` (session end) | Inject reminder to run Stage B `/code-review` slash command if a feature/fix branch has open PR + cool-down. |
|
|
45
|
+
| `stop-cache-hit-baseline-check.sh` | `Stop` | Flag prompt-cache baseline regressions at session end. |
|
|
46
|
+
|
|
47
|
+
`transform.sh` registers all 7 in `.claude/settings.json` (4 `PreToolUse` + 3 `Stop`). Users customize paths and conditions in that generated file, or override per-user in `settings.local.json` (gitignored).
|
|
48
|
+
|
|
49
|
+
## What Claude DOES NOT support that CONDUCTOR doesn't try to compensate for
|
|
50
|
+
|
|
51
|
+
- Direct CI integration. Hooks run locally; CI is the project's responsibility.
|
|
52
|
+
- IDE-style inline completion (Claude is a chat agent, not an IDE assistant — Cursor / Copilot fill that role).
|
|
53
|
+
- Visual GUI for rule management (CLI / file-on-disk only).
|
|
54
|
+
|
|
55
|
+
## Verification (P1 complete)
|
|
56
|
+
|
|
57
|
+
The Claude adapter ships a working `transform.sh`. Verified by fresh-target install:
|
|
58
|
+
|
|
59
|
+
| Feature claim | Verified-by-real-install | Verification command / observation |
|
|
60
|
+
|---|---|---|
|
|
61
|
+
| `transform.sh` emits 6 roles, 5 rules, 7 hooks, settings.json, docs | ✅ | `bash adapters/claude/transform.sh <tmp>` then inspect `<tmp>/.claude/` |
|
|
62
|
+
| Sub-agent dispatch works | ✅ | `.claude/agents/{planner,builder,reviewer,helper,designer,scribe}.md` recognized by `/help` |
|
|
63
|
+
| Lazy / always-loaded rules present | ✅ | `.claude/rules/{workflow,spec-as-you-go,quality-gates,operations,meta-discipline}.md` |
|
|
64
|
+
| Hooks registered in settings.json | ✅ | `.claude/settings.json` `hooks:` block lists 4 PreToolUse + 3 Stop |
|
|
65
|
+
| Stop hook blocks on missing spec update | ✅ | commit code without spec → `stop-session-log-check.sh` fires |
|
|
66
|
+
| Idempotent re-run | ✅ | second run reports "SKIP (exists)" for every emitted file |
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Recipe-scoped hookify templates (ADR-028).
|
|
2
|
+
# Format: <template-basename-without-.template> <recipe-name>
|
|
3
|
+
# A template listed here is emitted by transform.sh ONLY when its recipe is in --recipes.
|
|
4
|
+
# Templates NOT listed here are always-on (the default set).
|
|
5
|
+
warn-create-table-without-access-control.local.md database-discipline
|
|
6
|
+
warn-security-definer-without-search-path.local.md database-discipline
|
|
7
|
+
warn-raw-hex-instead-of-token.local.md design-system
|
|
8
|
+
warn-hardcoded-text-without-i18n-key.local.md i18n
|
|
9
|
+
block-direct-push-protected-branch.local.md branch-strategy
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Hookify Rule Templates (Claude Code adapter)
|
|
2
|
+
|
|
3
|
+
> Reusable hookify rule templates for Claude Code consumer projects. Hookify is a Claude Code plugin that intercepts events (Bash, file edits, prompts, stop) and injects warning/blocker messages based on YAML-frontmatter rules. These templates encode universal discipline patterns derived from production iteration in the originating reference project.
|
|
4
|
+
|
|
5
|
+
## What this directory contains
|
|
6
|
+
|
|
7
|
+
17 `.local.md.template` files. Each is a hookify rule with placeholders (`${CONDUCTOR_*}`) substituted at install time by `adapters/claude/transform.sh`. The output lands in the consumer project as `.claude/hookify.<name>.local.md`. Most are always-on; five are **recipe-scoped** (emitted only when their recipe is selected — see "Recipe-scoped templates" below).
|
|
8
|
+
|
|
9
|
+
> **Branch-strategy disclaimer (2026-05-09)**: Direct-push to protected branches is **not** a universal pattern. Trunk-based projects routinely push to `main`. Multi-stage projects (e.g., `develop → release → main`) protect `main`/`release`. Because of this, direct-push blocking ships as an **opt-in** template (`block-direct-push-protected-branch`, recipe-scoped to `branch-strategy`) rather than always-on — adopters who want it select the `branch-strategy` recipe, and trunk-based projects simply omit it. Force-push protection (below) **is** universal — even trunk projects rarely want history rewrites — so it remains always-on.
|
|
10
|
+
|
|
11
|
+
| Template | Event | Action | Universal trigger |
|
|
12
|
+
|---|---|---|---|
|
|
13
|
+
| `block-completion-claim-without-push` | stop | block | False completion claim before `git push` evidence |
|
|
14
|
+
| `block-force-push-protected-branch` | bash | block | `git push --force origin <protected-branch>` |
|
|
15
|
+
| `block-direct-push-protected-branch` | bash | block | Direct `git push` to a protected branch (recipe-scoped: branch-strategy) |
|
|
16
|
+
| `warn-current-work-without-remaining-tasks` | file | warn | CURRENT_WORK edited without REMAINING_TASKS sync |
|
|
17
|
+
| `warn-plan-spec-without-remaining-tasks` | file | warn | Plan/spec edited without cross-doc flip |
|
|
18
|
+
| `warn-on-gh-pr-merge` | bash | warn | `gh pr merge` triggers 4-spot status flip |
|
|
19
|
+
| `warn-stop-commit-without-current-work` | stop | warn | Session has commit but CURRENT_WORK not touched |
|
|
20
|
+
| `warn-commit-without-pre-commit-review` | bash | warn | `git commit` without Q1 pre-commit review evidence |
|
|
21
|
+
| `warn-gh-pr-create-without-pre-merge-review` | bash | warn | `gh pr create` triggers Q2 pre-merge review reminder |
|
|
22
|
+
| `warn-user-manual-completion` | prompt | warn | User reports manual completion → docs-sync trigger |
|
|
23
|
+
| `warn-any-type-added` | file | warn | TypeScript `: any` added (TS projects only) |
|
|
24
|
+
| `warn-console-direct` | file | warn | Direct `console.error/log/warn` in production code |
|
|
25
|
+
| `block-server-secret-in-client` | file | block | Server-only secret pattern added to a client-bundled file |
|
|
26
|
+
| `warn-create-table-without-access-control` | file | warn | `CREATE TABLE` in a `.sql` file with no row-level access control in the same change (recipe-scoped: database-discipline) |
|
|
27
|
+
| `warn-security-definer-without-search-path` | file | warn | `SECURITY DEFINER` function with no explicit `SET search_path` (recipe-scoped: database-discipline) |
|
|
28
|
+
| `warn-raw-hex-instead-of-token` | file | warn | Inline raw hex color added to a `.tsx`/`.jsx`/`.css`/`.scss` file instead of a design token (recipe-scoped: design-system) |
|
|
29
|
+
| `warn-hardcoded-text-without-i18n-key` | file | warn | Hardcoded user-facing string rendered in a component instead of a translation key (recipe-scoped: i18n) |
|
|
30
|
+
|
|
31
|
+
## Recipe-scoped templates
|
|
32
|
+
|
|
33
|
+
Most templates above are **always-on**: every install emits them. Five are **recipe-scoped** — they emit only when the matching recipe is passed via `--recipes`. The mapping lives in the `.recipe-scoped` file in this directory (basename → recipe):
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
warn-create-table-without-access-control.local.md database-discipline
|
|
37
|
+
warn-security-definer-without-search-path.local.md database-discipline
|
|
38
|
+
warn-raw-hex-instead-of-token.local.md design-system
|
|
39
|
+
warn-hardcoded-text-without-i18n-key.local.md i18n
|
|
40
|
+
block-direct-push-protected-branch.local.md branch-strategy
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
The SQL rules above are stack-shaped (they only make sense for projects with a relational store), so shipping them always-on would inject SQL-specific noise into projects that have no SQL. The same logic applies to the UI-shaped rules: `warn-raw-hex-instead-of-token` only matters where a design-token system exists, and `warn-hardcoded-text-without-i18n-key` only matters on multi-locale projects. Gating each behind its recipe (`design-system`, `i18n`) keeps the always-on set vendor- and stack-neutral while still letting stack-shaped rules ship opt-in.
|
|
44
|
+
|
|
45
|
+
`transform.sh` Step 4.5 consults `.recipe-scoped`: a listed template is skipped unless its recipe is in `--recipes`; a template NOT listed is always emitted. Lines beginning with `#` are comments. See `docs/DESIGN-DECISIONS.md` ADR-028.
|
|
46
|
+
|
|
47
|
+
## Placeholder reference
|
|
48
|
+
|
|
49
|
+
These tokens are substituted by `transform.sh` `substitute_template()`:
|
|
50
|
+
|
|
51
|
+
| Placeholder | Default | Override |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| `${CONDUCTOR_PROTECTED_BRANCHES}` | `main\|release` | env `CONDUCTOR_PROTECTED_BRANCHES` (alternation regex) |
|
|
54
|
+
| `${CONDUCTOR_CURRENT_WORK_PATH}` | `docs/CURRENT_WORK.md` | env `CONDUCTOR_CURRENT_WORK_PATH` |
|
|
55
|
+
| `${CONDUCTOR_REMAINING_TASKS_PATH}` | `docs/REMAINING_TASKS.md` | env `CONDUCTOR_REMAINING_TASKS_PATH` |
|
|
56
|
+
| `${CONDUCTOR_SOURCE_GLOB}` | `apps/.*\\.(ts\|tsx)$` | env `CONDUCTOR_SOURCE_GLOB` |
|
|
57
|
+
| `${CONDUCTOR_CLIENT_GLOB}` | `(src/(components\|hooks\|pages\|ui)\|public)/.*\\.(ts\|tsx\|js\|jsx)$` | env `CONDUCTOR_CLIENT_GLOB` (client-bundled paths; lookahead-free) |
|
|
58
|
+
| `${CONDUCTOR_SERVER_SECRET_PATTERN}` | `(SERVICE_ROLE_KEY\|SERVICE_ROLE\|_SECRET_KEY\|_PRIVATE_KEY\|ADMIN_API_KEY\|SECRET_ACCESS_KEY)` | env `CONDUCTOR_SERVER_SECRET_PATTERN` (generic credential env-var name shapes, not a vendor reference) |
|
|
59
|
+
| `${CONDUCTOR_PROJECT_NAME}` | `your-project` | env `CONDUCTOR_PROJECT_NAME` |
|
|
60
|
+
|
|
61
|
+
If an adopter project doesn't use a particular convention (e.g., no `docs/REMAINING_TASKS.md`), the relevant rule body should be edited or the file deleted post-install. Templates are scaffolding, not enforcement.
|
|
62
|
+
|
|
63
|
+
## Install / update
|
|
64
|
+
|
|
65
|
+
Run via the Claude adapter:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
bash adapters/claude/transform.sh <target-project> [--recipes=...]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Step 4.5 of the pipeline copies these templates to `<target>/.claude/hookify.<name>.local.md` with placeholders substituted. Existing files in `<target>/.claude/hookify.*` are NOT overwritten — adopter customizations win.
|
|
72
|
+
|
|
73
|
+
## Adopting / removing individual rules
|
|
74
|
+
|
|
75
|
+
After install, every emitted file has `enabled: true` in frontmatter. To disable a rule without deleting it, flip to `enabled: false`. To delete entirely, remove the file. Adopters MAY add their own `hookify.<custom-name>.local.md` — the framework-emitted templates are namespaced clearly enough to coexist (no collisions expected, but check before adding).
|
|
76
|
+
|
|
77
|
+
## Why hookify-only (no Cursor / Copilot equivalent)
|
|
78
|
+
|
|
79
|
+
Hookify is a Claude Code plugin. Cursor uses MDC files with separate semantics. Copilot uses repository instructions without runtime intercept. If those tools add comparable runtime hook plugins, equivalent templates land under their respective adapter (`adapters/cursor/`, `adapters/copilot/`).
|
|
80
|
+
|
|
81
|
+
## Originating reference project
|
|
82
|
+
|
|
83
|
+
Patterns abstracted from production iteration. Each template body cites the universal rule it enforces (`workflow.md`, `quality-gates.md`, `spec-as-you-go.md`) — NOT vendor-specific stack rules. Vendor-specific rules (database row-level-security policies, transactional-email header conventions, UI-library / icon-pack banlists, design-token enforcement, multi-platform parity) are intentionally out of scope: they belong in the adopter project as project-local hookify files, not in framework templates.
|
|
84
|
+
|
|
85
|
+
**Refinement (ADR-027)**: the original port boundary (ADR-018) placed "service-role key in client" entirely out of scope as a vendor-specific literal. That boundary is now refined. The *vendor literal* (a specific key name) stays project-local — but the *generalized server-secret-leak pattern* (any server-only credential-shaped name appearing in a client-bundled path) is a universal security hazard, not a stack specific. It now ships as `block-server-secret-in-client` with overridable `${CONDUCTOR_CLIENT_GLOB}` and `${CONDUCTOR_SERVER_SECRET_PATTERN}` placeholders (the latter defaults to generic credential env-var name shapes, never a vendor product name). See ADR-027.
|
|
86
|
+
|
|
87
|
+
## Related
|
|
88
|
+
|
|
89
|
+
- `adapters/claude/transform.sh` — installer
|
|
90
|
+
- `adapters/claude/SUPPORTED-FEATURES.md` — Claude adapter feature matrix
|
|
91
|
+
- `core/universal-rules/workflow.md`, `quality-gates.md`, `spec-as-you-go.md` — the rule bodies these templates enforce
|
|
92
|
+
- `docs/DESIGN-DECISIONS.md` ADR-018 — port boundary decision
|
|
93
|
+
- `docs/DESIGN-DECISIONS.md` ADR-027 — generalized server-secret-leak pattern carved back in (refines ADR-018)
|
package/adapters/claude/hookify-templates/block-completion-claim-without-push.local.md.template
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: block-completion-claim-without-push
|
|
3
|
+
enabled: true
|
|
4
|
+
event: stop
|
|
5
|
+
action: block
|
|
6
|
+
conditions:
|
|
7
|
+
- field: transcript
|
|
8
|
+
operator: regex_match
|
|
9
|
+
pattern: ✅\s*(완료|DONE|SHIPPED|done|shipped)|(?:Task|Phase|PR)\s*#?\d+\s*(완료|done|shipped|✅)|구현\s*완료|개발\s*완료|기능\s*완료|implementation\s+complete|feature\s+complete
|
|
10
|
+
- field: transcript
|
|
11
|
+
operator: not_contains
|
|
12
|
+
pattern: git push origin
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
🚨 **Verify before completion claim — completion declared without `git push` evidence**
|
|
16
|
+
|
|
17
|
+
The session transcript contains a completion claim ("✅ DONE / SHIPPED / 완료 / implementation complete / feature complete") but no `git push origin` trace.
|
|
18
|
+
|
|
19
|
+
This rule enforces the **verification-before-completion** principle from `core/universal-rules/quality-gates.md` Q4. False completion claims are the highest-friction failure mode — they cascade into stale documentation, wasted next-session investigation time, and broken downstream work.
|
|
20
|
+
|
|
21
|
+
### Required evidence checklist
|
|
22
|
+
|
|
23
|
+
**1. Code / docs change evidence**:
|
|
24
|
+
```bash
|
|
25
|
+
git status --short # uncommitted = incomplete
|
|
26
|
+
git log --oneline origin/<branch>..HEAD # local-only commit?
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**2. If the claim concerns features / implementation**:
|
|
30
|
+
- Read the relevant file(s) and confirm the implementation lines exist.
|
|
31
|
+
- Confirm test PASS output (e.g., test runner exit 0).
|
|
32
|
+
- Confirm spec frontmatter `last-updated` and body sections were updated (per `core/universal-rules/spec-as-you-go.md`).
|
|
33
|
+
|
|
34
|
+
**3. If the claim concerns a PR merge**:
|
|
35
|
+
- `gh pr view <#> --json mergedAt,state` actually verified.
|
|
36
|
+
- `git log origin/<branch>` contains the merge sha.
|
|
37
|
+
|
|
38
|
+
**4. Cross-doc flip** (per `core/universal-rules/spec-as-you-go.md` §3 same-turn rule):
|
|
39
|
+
- `${CONDUCTOR_REMAINING_TASKS_PATH}` task item closed.
|
|
40
|
+
- `${CONDUCTOR_CURRENT_WORK_PATH}` `+N` entry appended.
|
|
41
|
+
- The relevant plan/spec frontmatter status flipped (e.g., `APPROVED → SHIPPED`).
|
|
42
|
+
- Any related runbook checklists closed.
|
|
43
|
+
|
|
44
|
+
### Stop-gate decision
|
|
45
|
+
|
|
46
|
+
- All four pieces of evidence verified → run `git push origin <branch>` then Stop.
|
|
47
|
+
- Work is in progress → restate as "in progress / partially complete / blocked on X" and Stop.
|
|
48
|
+
- Some items false-claimed → retract the claim and report accurate state.
|
|
49
|
+
|
|
50
|
+
### Refresh logic (loop prevention)
|
|
51
|
+
|
|
52
|
+
Once `git push origin` appears in the transcript at least once, this rule no longer fires (the work has actually been pushed). The goal is to block the *first* false claim within a single session.
|
|
53
|
+
|
|
54
|
+
### Project-local note
|
|
55
|
+
|
|
56
|
+
If `${CONDUCTOR_PROJECT_NAME}` does not use `git push origin` as the canonical "shipped" signal (e.g., trunk-based with direct deploy from CI artifact), edit this rule body's "evidence" section to match the actual shipped signal. Do NOT delete the rule outright — the underlying principle (verify-before-claim) is universal.
|
package/adapters/claude/hookify-templates/block-direct-push-protected-branch.local.md.template
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: block-direct-push-protected-branch
|
|
3
|
+
enabled: true
|
|
4
|
+
event: bash
|
|
5
|
+
action: block
|
|
6
|
+
conditions:
|
|
7
|
+
- field: command
|
|
8
|
+
operator: regex_match
|
|
9
|
+
pattern: git\s+push\b.*\b(${CONDUCTOR_PROTECTED_BRANCHES})\b
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
🚫 **Direct push to a protected branch (blocked)**
|
|
13
|
+
|
|
14
|
+
A direct `git push` to a protected branch (`${CONDUCTOR_PROTECTED_BRANCHES}`) was attempted. Open a PR and merge through review instead.
|
|
15
|
+
|
|
16
|
+
If your project is trunk-based and pushes to its mainline by design, this rule should not be installed — remove it or do not select the `branch-strategy` recipe.
|
|
17
|
+
|
|
18
|
+
**block — operation halted. Push to a feature branch and open a PR.**
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: block-force-push-protected-branch
|
|
3
|
+
enabled: true
|
|
4
|
+
event: bash
|
|
5
|
+
action: block
|
|
6
|
+
conditions:
|
|
7
|
+
- field: command
|
|
8
|
+
operator: regex_match
|
|
9
|
+
pattern: \bgit\s+push\b.*(?:--force\b|--force-with-lease\b|-f\b).*\borigin\s+(${CONDUCTOR_PROTECTED_BRANCHES})\b
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
🚨 **Protected-branch force push blocked**
|
|
13
|
+
|
|
14
|
+
`git push --force` (or `--force-with-lease` / `-f`) targeting `origin (${CONDUCTOR_PROTECTED_BRANCHES})` detected. **Forbidden operation** per `core/recipes/branch-strategy.md`.
|
|
15
|
+
|
|
16
|
+
### Why force push to protected branches is dangerous
|
|
17
|
+
|
|
18
|
+
- `--force` overwrites remote history — every collaborator's commit on top of the prior tip is lost or orphaned.
|
|
19
|
+
- `--force-with-lease` is safer in spirit but still race-prone: a fetch immediately before push satisfies the lease while another collaborator's just-pushed work is lost.
|
|
20
|
+
- Auto-deploy branches force-pushed mid-deploy can produce a half-deployed system (CDN cached old, origin holds new, etc.).
|
|
21
|
+
- Audit trails break: bisects past the rewrite point fail, blame loses authorship continuity.
|
|
22
|
+
|
|
23
|
+
### Recovery / alternative workflow
|
|
24
|
+
|
|
25
|
+
If the goal was to remove a bad commit from a protected branch:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Revert via additional commit (preserves history)
|
|
29
|
+
git checkout -b <branch>-revert-<topic>
|
|
30
|
+
git revert <bad-commit> # or cherry-pick a fix commit
|
|
31
|
+
gh pr create --base <protected> --head <branch>-revert-<topic>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Explicit user override
|
|
35
|
+
|
|
36
|
+
The framework's branch-strategy recipe records that on **non-protected** branches (feature / fix / chore branches), force push may be the user's preference (faster than rebasing carefully). On protected branches, it is never acceptable without an incident-response justification.
|
|
37
|
+
|
|
38
|
+
### Project-local note
|
|
39
|
+
|
|
40
|
+
`${CONDUCTOR_PROTECTED_BRANCHES}` is an alternation regex matching your project's protected branches. If you have GitHub branch protection rules enforcing the same constraint server-side, this rule provides the client-side early stop (faster feedback than waiting for the server reject).
|
|
41
|
+
|
|
42
|
+
**Block — operation halted. Use revert-via-PR workflow and retry.**
|