Lightwork Studio
Enforced orchestration runtime for AI-assisted development.
33 rules. 23 hooks. 7 agents. Quality enforcement by code, not hopes.
Works with: Claude Code | VS Code | Cursor | Gemini CLI | Codex | GitHub Copilot
What Is Lightwork?
AI coding tools generate code 10x faster. But 66% of developers say the output is "almost right, but not quite." 45% contains known security flaws. 37.6% more vulnerabilities with each iteration cycle.
Speed without quality is just faster failure.
Lightwork Studio transforms Claude Code into a rigorously enforced production system. Install it, scaffold the framework, and every AI interaction runs through 33 battle-tested rules enforced by 23 hooks.
How the rules reach the model, and the honest ceiling
At session start Lightwork injects your CLAUDE.md into the model's context
itself, rather than relying on you remembering to open the file. It then
reports what it actually delivered on every message.
There is a real limit, and it is stated here rather than left to be assumed.
Claude Code caps a single hook's injected context at 10,000 characters —
above that the platform writes the value to a file and hands the model a path
instead, which for a constitution is as good as losing it. CLAUDE.md is
larger than that on its own, so Lightwork splits it across two SessionStart
registrations (the budget is per registration, measured): one carries the
numbered rules, the other carries everything else.
The budget does not pool between them — it is 9,200 characters for the
rules section and 9,200 for the rest, separately. A very large rules section
can therefore lose rules while the document total still looks comfortable. 9,200
per part is the number that holds regardless of how your constitution is
shaped.
If your constitution exceeds that, the excess is not silently dropped: the
exact character shortfall is named in the injected context and in the
[Lightwork] PARTIAL — … line, and .claude/state/session-bootstrap.json
records constitution_chars_injected against constitution_chars_total. If one
of the two registrations is missing, every message reports K of N parts.
One caveat worth knowing: hook-emitted status lines are shown to you in the
Claude Code terminal and in Gemini CLI, but the VS Code extension does not
render them — it runs the agent in a mode where that channel has no renderer.
On VS Code, read .claude/state/session-bootstrap.json (or the per-message
line the model sees) rather than expecting a banner.
Who Is Lightwork For?
Non-technical founders: You're the CEO with an idea. Lightwork is your CTO — it handles engineering discipline, quality enforcement, and technical decision-making so you can focus on what to build, not how to build it.
Solo developers: You know the discipline is important but context-switching between coding and quality checking kills your flow. Lightwork enforces the discipline automatically so you stay in the zone.
Senior engineers who use AI tools: You've seen the quality problems firsthand. Lightwork gives you the enforcement hooks to keep AI-generated code at your standards without manually reviewing every line.
Features
Free Tier
- Build Lightwork — One command scaffolds the entire framework into any project
- Pipeline Visualizer — See current phase, task, session count in the sidebar
- Status Bar — Live indicator showing Lightwork state
- 33 Rules — Browse all rules with categories in the sidebar
- 3 Agents — Researcher, Developer, Reviewer
- State Management — Automatic state file creation and tracking
- PR Quality Gate — GitHub Actions workflow that enforces Lightwork standards on every PR
Pro ($29/month — save with quarterly, 6-month, or yearly plans)
- 23 Enforcement Hooks — Rules enforced by code. Can't stop without tests. Can't skip steps.
- All 7 Agents — Adds Planner, Tester, Security, Architect with strict tool separation
- Constraint Snapshot — Evaluate decisions against all constraint fields before implementing
- Quality Dashboard — Live visualization of knowledge connections, weights, and field health
- Intent Capture — Structured intent extraction saved to CONTEXT.md
- Knowledge System — UUID-indexed entries with weight-based retrieval
- Task Triage — PATCH/SMALL/MEDIUM/LARGE classification scales the cycle to complexity
- Haiku Semantic Evaluation — Each /proceed cycle fires an independent evaluation of all 33 rules. Uses your Claude API quota (~1 short message per cycle). Degrades gracefully if unavailable.
Enterprise ($199/user/month — save with quarterly, 6-month, or yearly plans)
- Everything in Pro
- Cognition Engine — Knowledge graph over your entries, with per-domain field health (outcome-driven learning in development)
- Team Dashboard — Aggregated enforcement metrics across developers (trends, not surveillance)
- Branch-Scoped Enforcement — Cycle history audit trail across branches
- Cross-Repo Knowledge Sharing — Export/import knowledge entries between projects
- Role-Based CONTEXT.md — Product Owner, Tech Lead, Designer sections with ownership
- Team Onboarding — Complete TEAM.md with shared vs per-developer file management
The 33 Rules
Every rule earned through failure in production development:
- ONE CYCLE PER PROCEED
- ZERO MANUAL STEPS
- MAXIMUM EFFORT
- OVERKILL GATE
- R/T/P/B PIPELINE
- SESSION BOOTSTRAP
- STATE FILES CURRENT
- ONE FEATURE PER CYCLE
- CONTEXT.MD SACRED
- RESEARCH IS A LIBRARY
- GIT DISCIPLINE
- REAL SCIENCE
- SELF-IMPROVEMENT
- VERIFY BEFORE BUILD
- DISAGREE WHEN EVIDENCE DEMANDS
- SELF-CRITIQUE
- SPEC COMPLETENESS GATE
- UNIVERSAL SECURITY
- TRACE THE FULL PATH
- TEST WITH THE HUMAN
- DOMAIN RESEARCH FIRST
- PLAYTEST FEEDBACK OVERRIDES
- DEPENDENCY COMPLETENESS
- ITERATION-AWARE SECURITY
- LOOP DETECTION
- COMPLETION VERIFICATION
- INTENT VERSIONING
- RATIONALIZATION DETECTION
- DEPLOYMENT IS BUILD
- REGRESSION PREVENTION
- VALIDATE BEFORE BUILD
- DOCUMENTATION INTEGRITY
- FALSIFIABILITY
Why Lightwork Exists
Without orchestration frameworks, measured AI code quality:
- 1.7x more issues per PR (CodeRabbit 2025-26)
- 37.6% vulnerability increase per iteration cycle (IEEE-ISTAS 2025)
- 45% of AI code has known security flaws (Veracode 2025)
- 31.7% fail in clean environments (Reproducibility Study 2026)
- +41% complexity increase with AI agents (GitClear/Cortex 2025)
Every Lightwork rule, hook, and agent exists to address a specific measured failure mode. Every rule earned through failure, not theory.
Prerequisites
Pick your editor + AI tool combination:
| Editor |
AI Tool |
How to Install Lightwork |
| VS Code |
Claude Code CLI |
Install from VS Code Marketplace |
| VS Code |
Claude Code Extension |
Install from VS Code Marketplace |
| Cursor |
Claude Code |
Install from VS Code Marketplace (Cursor can install marketplace VSIX packages); not yet published to Open VSX |
| Gemini CLI |
Gemini |
Copy the Gemini plugin into your project |
| Codex |
OpenAI |
Install the Codex plugin |
| Any editor |
GitHub Copilot |
Copy the Copilot instructions into your project |
Quick Start
VS Code / Cursor (Extension)
- Install Lightwork Studio from the VS Code Marketplace
- Open any project
- Run command palette: Lightwork: Build Lightwork
- Open Claude Code and type
/proceed for your first enforced cycle
Gemini CLI
- Copy
lightwork-gemini-plugin/ contents into your project root
GEMINI.md and .gemini/ directory provide the full framework
- Type
/proceed in Gemini CLI for your first enforced cycle
Codex
- Copy
lightwork-codex-plugin/ contents into your project root
AGENTS.md and the skills/hooks directories provide the full framework
- Type
/proceed in Codex for your first enforced cycle
GitHub Copilot
- Copy
lightwork-copilot/.github/ into your project root
copilot-instructions.md and the skills directory provide the framework
- Type
/proceed in Copilot for your first enforced cycle
Research Basis
Grounded in 20+ peer-reviewed sources: DORA/Accelerate, Reflexion (Shinn et al. 2023), Swiss Cheese Model, Praetorian 8-layer architecture, CodeRabbit AI Code Report, IEEE-ISTAS Security, Veracode GenAI Security, and more.
Security — running a repository's own test command
Lightwork's Stop gate does not take your word for it that the tests passed: it
runs your project's test suite itself and uses the exit code the process
returned. That command comes out of the repository — package.json
scripts.test, or test_command in .claude/state/session-config.json — and
both of those arrive with a git clone.
Stated plainly, because it was true and undisclosed for one release: before
the consent gate, opening an untrusted repository with Lightwork active and
letting the agent edit a single file was sufficient for that repository to
execute arbitrary code on your machine, with your full privileges. We reproduced
it twice, including from a fresh clone with no attacker-supplied state.
What protects you now. Nothing executes until you approve it:
bash .claude/scripts/approve-test-command.sh --show # see exactly what would run
bash .claude/scripts/approve-test-command.sh # approve it
The approval lives in ~/.lightwork/approved-test-commands.json — outside
the repository, because an approval the untrusted party can write is not an
approval.
It is keyed to a hash of the command text: the resolved command plus every
npm script body it dispatches to, pre/post lifecycle scripts included. If
the repository rewrites what npm test invokes — a different script, an
injected pretest, a changed test_command — your approval is revoked and
you are asked again.
What that does not cover, stated plainly: the contents of the files
those commands run. Approving npm test → vitest run authorises running
this project's test suite, and a test suite is code from the repository:
editing a test file, vitest.config.ts, or a script the command invokes does
not re-prompt you. No practical consent design can cover that — direnv
hashes your .envrc, not the programs it calls — and pretending otherwise
would be the more dangerous error. Approve test commands only from
repositories whose code you would already run.
Consent is remembered per project. Until it exists, the Stop gate blocks and
shows you the exact command it is waiting on.
Consent authorises execution, not trust in output: whatever the
command prints is always presented to the agent as untrusted data.
Honest limits. The approval file is an ordinary file on your machine, so
this closes the clone-and-open attack — a hostile repository cannot arrive
pre-approved — but it is not a sandbox, and it does not stop an agent you have
already given shell access from writing the file itself. Each approval records
who granted it and when, and Lightwork prints both every time it uses one, so
that is at least visible rather than silent. Only approve test commands from
repositories you would already trust to run on your machine.
Support
Bug reports, feature requests, and questions go to the public issue tracker:
https://github.com/mobiusgpt/lightwork-issues/issues
That is the whole support route — there is no email address, and we would rather
say so than publish one that nobody reads. The Support link in this
extension's marketplace listing points at the same tracker.
Privacy
Lightwork Studio collects zero data by default. Optional telemetry (opt-in only) collects anonymous usage patterns — never code, file names, specs, or project content. Your CONTEXT.md never leaves your machine.
License
Extension: MIT | Framework methodology: CC BY-NC-SA 4.0
Built in Arkansas. By a human and an AI. Who decided that "good enough" isn't.