{
  "markdown": "# Leyline\n\n**An opinionated developer-session workflow plugin for Claude Code, Cursor, Codex, OpenCode, GitHub Copilot CLI, and Gemini CLI.**\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)\n[![Version: 1.2.5](https://img.shields.io/badge/Version-1.2.5-green.svg)](./CHANGELOG.md)\n[![Harnesses: 6](https://img.shields.io/badge/Harnesses-6-informational)](./dev/reference/harness-matrix.md)\n\nLeyline encodes one coherent developer session from first message to merged branch as a deterministic pipeline of skills that hand off to each other in a fixed order. Every stage has an entry gate, a verifiable output, and an explicit successor. No stage silently skips. No completion claim ships without evidence. The iron laws are enforced at every handoff.\n\n---\n\n## First-response rule\n\n```\nBefore any response or action - including clarifying questions - check whether any Leyline skill applies. If one does (probability >= 1%), invoke it before narrating. If none does, name the skills you considered and why you rejected each.\n```\n\nThis rule is the single highest-leverage instruction Leyline ships. It appears verbatim in `CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, and `skills/using-leyline/SKILL.md` so every load path delivers it to the agent. Drift between files is caught by `scripts/check-manifests.sh`.\n\n---\n\n## What Leyline gives you\n\n- **A full development pipeline.** Eight stages covering Discovery, Interrogate, Isolate, Plan, Execute, Discipline, Review, and Finish. Each stage's skill names its successor; nothing improvises.\n- **Five iron laws enforced as code.** TDD, systematic debugging, verification-before-completion, design-driven-development, and accessibility-verification are not suggestions — they are hard gates that block downstream work when violated.\n- **Fresh-subagent review per task.** Stage 5 dispatches a new subagent per task with up to four review passes (spec, quality, design when surfaces are touched), then hands off to Stage 7 for branch-level review with bias-free reviewer agents. Each subagent receives constructed context only.\n- **Verifiable markers at every stage boundary.** Specs carry approval markers, plans reference spec rounds, baselines record worktree state, review logs carry completion markers. Downstream stages grep for markers; session-state promises do not pass.\n- **Tool-agnostic accessibility and design review.** Harness-aware subagents use browser automation, a11y scanners, design-tool MCPs when present; fall back to structural review when absent. Zero runtime dependencies.\n- **A meta-skill for contributors.** `writing-skills` enforces TDD-for-prose: baseline pressure test, write minimal rebuttal, verify, refactor. Every skill change requires traces.\n\n---\n\n## Pipeline at a glance\n\n```\nHuman partner: \"let's build X\"\n        |\n        v\n  [1] Discovery ........... brainstorming + design-brainstorming\n        |                   approved product + UX specs\n        v\n  [2] Interrogate ......... deep-discovery + design-interrogation\n        |                   100-question pressure tests; loop back on material revisions\n        v\n  [3] Isolate ............. using-git-worktrees\n        |                   isolated branch workspace, green baseline\n        v\n  [4] Plan ................ writing-plans\n        |                   2-to-5-minute tasks with exact paths, code, verification\n        v\n  [5] Execute ............. subagent-driven-development OR executing-plans\n        |                   fresh subagent per task + up to 4 review passes\n        v   <-- governed by [6] Discipline overlays:\n        |       Code: TDD, systematic-debugging, verification-before-completion\n        |       Experience: design-driven-development, accessibility-verification\n        v\n  [7] Review .............. requesting/receiving-code-review (+ design when surfaces)\n        |                   code-reviewer and design-reviewer subagents\n        v\n  [8] Finish .............. finishing-a-development-branch\n        |                   merge / PR / keep / discard\n        v\n  Pipeline terminates with evidence trail in docs/leyline/\n```\n\n---\n\n## Install\n\nInstall commands for each supported harness. All paths resolve against `github.com/forsonny/leyline`.\n\n### Claude Code\n\n```\n/plugin marketplace add forsonny/leyline\n/plugin install leyline@leyline-marketplace\n```\n\nThe first command registers this repo as a marketplace via `.claude-plugin/marketplace.json`. The second installs the plugin it lists.\n\n### Cursor\n\nCursor consumes Claude Code-compatible plugins. Use the same marketplace add-and-install flow in Cursor's plugin interface, pointing at `https://github.com/forsonny/leyline`.\n\n### GitHub Copilot CLI\n\n```\ncopilot plugin marketplace add https://github.com/forsonny/leyline\ncopilot plugin install leyline\n```\n\n### Gemini CLI\n\n```\ngemini extensions install https://github.com/forsonny/leyline\n```\n\n### Codex\n\n```\ncodex plugin marketplace add forsonny/leyline\n```\n\nThen follow [`docs/README.codex.md`](./docs/README.codex.md) for the Codex-specific marketplace, install, and verification notes. Codex's official Plugin Directory is curated; Leyline appears through the repo marketplace shipped in [marketplace.json](./.agents/plugins/marketplace.json) and the Codex plugin manifest in [plugin.json](./.codex-plugin/plugin.json), not as an OpenAI-curated plugin.\n\n### OpenCode\n\nLeyline works with OpenCode's native `plugin` array, like other OpenCode plugins. Recommended install: add Leyline to `opencode.json` and let OpenCode install it from Git on startup:\n\n```json\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"plugin\": [\"leyline@git+https://github.com/forsonny/leyline.git\"]\n}\n```\n\nRestart OpenCode after updating the config.\n\nFor local development from a checkout, OpenCode also auto-loads local plugin files from `.opencode/plugins/` in a project or `~/.config/opencode/plugins/` globally. In that case, symlink Leyline's real plugin entry into the plugin directory:\n\n```\nLEYLINE_REPO=\"$HOME/path/to/leyline\"   # replace with your actual checkout path\ngit clone https://github.com/forsonny/leyline.git \"$LEYLINE_REPO\"\nmkdir -p ~/.config/opencode/plugins\nln -sf \"$LEYLINE_REPO/.opencode/plugins/leyline.js\" ~/.config/opencode/plugins/leyline.js\n```\n\nDo not copy only `leyline.js` by itself; the plugin resolves paths back to the repo checkout so it can sync Leyline's assets.\n\nThen follow [`docs/README.opencode.md`](./docs/README.opencode.md) for the full install, project-local variant, Windows variant, and verification notes. No manual hook wiring is needed; the plugin injects Leyline's instructions itself.\n\n### After install\n\nStart a new session in your harness and ask for something that should deterministically trigger a skill:\n\n> \"let's build a dashboard filters feature\"\n\nThe agent should announce it is using Leyline and invoke `brainstorming`. In Codex, explicit `@leyline` or bundled-skill invocation works immediately after plugin install. Automatic session-start injection is now wired through repo-scoped or home-scoped `.codex/hooks.json`, not the plugin manifest itself, and current official Codex hooks docs disable hooks on Windows as of 2026-04-21. See [`docs/README.codex.md`](./docs/README.codex.md) for the exact setup and platform split.\n\n---\n\n## The five iron laws\n\nViolating the letter of the rules is violating the spirit of the rules.\n\n### Code Discipline (applies to every code change)\n\n- `NO PRODUCTION CODE WITHOUT A FAILING TEST FIRST`\n- `NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST`\n- `NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE`\n\n### Experience Discipline (applies additionally to user-facing surface changes)\n\n- `NO USER-FACING SURFACE WITHOUT AN APPROVED DESIGN ARTIFACT FIRST`\n- `NO COMPLETION CLAIMS ON A USER-FACING SURFACE WITHOUT FRESH ACCESSIBILITY EVIDENCE`\n\nEach iron law has a home skill that enforces it procedurally (`test-driven-development`, `systematic-debugging`, `verification-before-completion`, `design-driven-development`, `accessibility-verification`).\n\n---\n\n## What's inside\n\n| Directory | Contents | Count |\n|-----------|----------|-------|\n| `skills/` | Behavior-shaping skill library (flat namespace) | 21 skills |\n| `agents/` | `code-reviewer.md` and `design-reviewer.md` subagent definitions | 2 agents |\n| `.codex/` | Codex install guide plus repo-scoped config (`config.toml`, `hooks.json`, custom reviewer agents) | 5 files |\n| `hooks/` | Launcher scripts and non-Codex hook registration for Claude Code and Cursor | 4 files |\n| `scripts/` | Release and maintenance helpers (bump-version, stage-0 self-test, manifest-sync lint, test-runner) | 4 scripts |\n| `commands/` | Slash-command redirectors for harnesses that support plugin-defined commands; not used by Codex | 3 commands |\n| `docs/` | Install guides, spec archive, plan archive, design archive | Per-harness guides |\n| `tests/` | Pressure-test scenarios verifying skill compliance | 4 scenarios |\n\nPer-harness manifest files (`CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, `gemini-extension.json`, `.claude-plugin/`, `.github/plugin/`) live at the repo root.\n\n### Full skill inventory\n\n| Stage | Skills |\n|-------|--------|\n| Entry | `using-leyline` |\n| 1 - Discovery | `brainstorming`, `design-brainstorming` |\n| 2 - Interrogate | `deep-discovery`, `design-interrogation` |\n| 3 - Isolate | `using-git-worktrees` |\n| 4 - Plan | `writing-plans` |\n| 5 - Execute | `subagent-driven-development`, `executing-plans`, `dispatching-parallel-agents` |\n| 6 - Discipline | `test-driven-development`, `systematic-debugging`, `verification-before-completion`, `design-driven-development`, `accessibility-verification` |\n| 7 - Review | `requesting-code-review`, `receiving-code-review`, `requesting-design-review`, `receiving-design-review` |\n| 8 - Finish | `finishing-a-development-branch` |\n| Meta | `writing-skills` |\n\n---\n\n## Verification evidence\n\nEvery shipped stage went through a dedicated deep-discovery review (100-question adversarial interrogation) and a follow-up hardening pass before the next stage was built. Nine deep-discovery reviews total, nine hardening passes, nine CHANGELOG entries documenting the findings and fixes. The review/fix cycle produced:\n\n- 40+ critical issues identified and resolved across the stages.\n- 120+ important issues identified and resolved.\n- Verbatim completion markers (`Deep-discovery pass complete - round N - YYYY-MM-DD`, `Product spec approved - round N - YYYY-MM-DD`, `Code review complete - round N - YYYY-MM-DD`, etc.) replacing session-state promises at every handoff.\n- Mechanical grep-based preconditions at every stage entry, replacing judgment-only gates.\n\nThe four sample pressure-test scenarios under `tests/skill-triggering/` demonstrate the format for contributor-added tests.\n\n---\n\n## Contributing\n\nRead [`CLAUDE.md`](./CLAUDE.md) before opening a PR. Skills are behavior-shaping code, not prose; modifications require before-and-after pressure-test evidence per the [`writing-skills`](./skills/writing-skills/SKILL.md) meta-skill's TDD-for-prose methodology. The full rules, including the 15-section mandatory skill structure, live in `writing-skills/SKILL.md`.\n\nPRs without the required skill-change-evidence section completed are closed unreviewed per [`.github/PULL_REQUEST_TEMPLATE.md`](./.github/PULL_REQUEST_TEMPLATE.md).\n\n---\n\n## Learn more\n\n- [`RELEASE-NOTES.md`](./RELEASE-NOTES.md) - narrative release notes for significant versions\n- [`CHANGELOG.md`](./CHANGELOG.md) - complete change history\n- [`dev/combined-workflow-prompt.md`](./dev/combined-workflow-prompt.md) - the top-level specification the plugin was built from\n- [`dev/`](./dev/) - reference corpus expanding every stage, structure, principle, and convention\n- [`docs/testing.md`](./docs/testing.md) - testing methodology\n- [`dev/reference/harness-matrix.md`](./dev/reference/harness-matrix.md) - per-harness feature availability\n\n---\n\n## License\n\nMIT. See [`LICENSE`](./LICENSE).\n\n---\n\nInspired by [obra/superpowers](https://github.com/obra/superpowers).\n",
  "bytes": 12034,
  "sha": "f9a36cb2de76304127e9fa49ae3613c21a771551ce255114d4b54f135ff25e63",
  "repo_slug": "forsonny/leyline",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_forsonny_leyline_5e1eae9b/readme"
}