MyCL — my-claude-lang 1.0.46
A semantic-verification layer on top of Claude Code. MyCL imposes a
22-phase development pipeline, ratchets discipline through audit
chains, and refuses to fail open. Opt-in per session via /mycl
(1.0.5+) — silent until you ask for it. Pure Python 3.8+, no AI
agent frameworks, no MCP servers.
Türkçe sürüm: README.tr.md
What MyCL is (and isn't)
MyCL is six Python hooks (UserPromptSubmit, PreToolUse,
PostToolUse, Stop, SubagentStop, PreCompact) that, once
activated with /mycl:
- Track the active phase in
.mycl/state.json
- Seal each phase with an audit entry in
.mycl/audit.log
- Enforce per-phase tool allowlists (
gate_spec.json) — fail-closed
- Detect spec blocks line-anchored, hash them, and gate downstream
tools on developer approval
- Inject phase-specific context (
<mycl_active_phase_directive>,
<mycl_phase_status>, <mycl_phase_allowlist_escalate>) every turn
- Speak TR + EN bilingually (no labels, blank-line separated)
Before activation (default state for any new session): all six
hooks no-op — banner, deny, audit, snapshot — nothing fires. Claude
Code behaves exactly as without MyCL installed.
MyCL is not:
- An AI agent framework (we don't reinvent Claude Code)
- LangGraph or any state-machine library (the 22 phases are data
in
gate_spec.json)
- An MCP server (Plugin Rule C filters out any plugin with
.mcp.json)
Quick install
git clone https://github.com/YZ-LLM/my-claude-lang.git
cd my-claude-lang
bash setup.sh
The installer:
- Verifies Python 3.8+
- Copies the repo to
~/.claude/mycl/
- Registers
mycl.md skill in ~/.claude/skills/
- Drops data files into
~/.claude/data/
- Merges 6 hooks into
~/.claude/settings.json (idempotent — safe
to re-run)
- Smoke-tests
py_compile + lib imports
Activation (1.0.5+)
MyCL is opt-in per Claude Code session. After installation:
> /mycl # bare activation — MyCL now runs the pipeline
> /mycl todo app yap # activation + first intent in one prompt
Once /mycl is detected on any prompt, the active session ID is
written to .mycl/active_session.txt and MyCL stays on for the rest
of that session. Closing Claude Code starts a fresh session ID, so the
next time you open it, MyCL is silent again until you type /mycl.
The /mycl token is stripped from the prompt before the model sees
the user's actual message; the model receives an <mycl_activation_note>
that quotes the stripped message so it knows what the user asked.
Why opt-in? Many sessions don't need the 22-phase pipeline (quick
edits, exploration, scripts). MyCL only kicks in when you explicitly
ask for it.
The 22 phases
| # | Phase | What it does |
|---|
| 1 | Intent Gathering | Clarify what the developer wants — one question per turn, summary + askq approval |
| 2 | Precision Audit | Validate intent across 7 dimensions (auth, failure modes, scope, PII, observability, SLA, idempotency) |
| 3 | Engineering Brief | Translate intent to engineering English — silent phase |
| 4 | Spec + Approval | Write 📋 Spec block (Objective/MUST/SHOULD/AC/Edge/Technical/OOS) + askq approval |
| 5 | Pattern Matching | Learn naming/error/test patterns from existing code (greenfield → skip) |
| 6 | UI Build | Frontend with mock data, dev server + browser auto-open (no UI → skip) |
| 7 | UI Review | Deferred — free-form intent classify (approve/revise/cancel/sen-de-bak) |
| 8 | Database Design | 3NF schema, covering indexes, reversible migrations (no DB → skip) |
| 9 | TDD Execution | RED → GREEN → REFACTOR per AC; final test suite green |
| 10 | Risk Review | 4-lens parallel scan (review/simplify/perf/security) + unbounded askq |
| 11 | Code Review | Auto-fix correctness/logic/error-handling/dead-code |
| 12 | Simplification | Remove premature abstractions, duplicates, unnecessary patterns |
| 13 | Performance | Auto-fix N+1, blocking I/O, memory leaks, allocation churn |
| 14 | Security (project-wide) | semgrep + npm/pip/cargo audit + secret scanner |
| 15 | Unit Tests | Code-coverage tests beyond Phase 9's AC tests |
| 16 | Integration Tests | Real cross-module flows (testcontainers, in-memory DB) |
| 17 | E2E Tests | Playwright headless (no UI → skip) |
| 18 | Load Tests | k6/locust against spec NFRs (no NFR → skip) |
| 19 | Impact Review | Downstream effects (importers, contracts, schema, cache) |
| 20 | Verification + Mock Cleanup | Spec coverage table + automation barriers + process trace |
| 21 | Localized Report | Translate Phase 20 to user's language (skippable) |
| 22 | Completeness Audit | Hook-written audit; surfaces uncovered MUSTs |
For each phase, see skills/mycl/asama<NN>-*.md.
Architecture