A project-agnostic, multi-target SDLC kit for Google Antigravity (agy), Claude Code, and Kiro (IDE + CLI) backed by the SDLC Context Engine (persistent Model Context Protocol server + fast CLI). Drop a full S1→S6 pipeline (orchestrator + 4 role agents + 3 utility agents + 24 skills + steering rules + security hooks) into any project with one command, then fill a small context contract so the agents understand your project.
📖 Installing & using the kit? → GUIDE.md (the User Guide / HDSD: install, onboard, run a work item, pass gates, update). This README is the architecture overview — what the kit is and how it's built.
Drop the entire SDLC pipeline and Context Engine into any repository in seconds with Zero external pip dependencies (100% Python standard library):
cd /path/to/my-project
# Option A: Via npx (from npm package)
npx kiro-sdlc-init --target agy
# Option B: From local clone
node /path/to/sdlc-kit/bin/init.mjs . --target agyThis single command automatically:
- Scaffolds
.agents/(Antigravity), rules, 24 skills, and subagents (analyst,architect,developer,qa). - Copies executables into
bin/sdlc-ctx,bin/sdlc-mcp,bin/sdlc-setup,bin/sdlc-demo. - Initializes the SQLite Context Engine at
.sdlc/session.db(34 tables & FTS5 full-text search). - Configures your IDE MCP integration (
~/.gemini/config/mcp_config.json, Claude, or Cursor). - Creates root
GEMINI.mdfor instant auto-discovery by Antigravity.
Want to inspect or test the kit first? Run the interactive 3-second demo:
git clone git@github.com:ThaiG2Pro/sdlc-kit.git
cd sdlc-kit
# Run automated setup (verifies environment, inits DB, auto-configures MCP)
./bin/sdlc-setup
# Run the live interactive lifecycle demo (S1 → S6 in 3 seconds)
./bin/sdlc-demoOne source emits all three targets — kit/shared/** overlaid by kit/targets/<platform>/**. You pick the platform at install time (--target agy|claude|kiro|all); the framework (process, skills, gates, security model) is identical on all.
Google Antigravity (agy) |
Claude Code | Kiro (IDE + CLI) | |
|---|---|---|---|
| Emits | .agents/ + root GEMINI.md |
.claude/ |
.kiro/ |
| Launch Orchestrator | Top-level agy session with GEMINI.md |
claude --agent sdlc-full <slug> |
sdlc-full agent (ctrl+0) |
| Delegate Phase | invoke_subagent (Analyst/Architect/Dev/QA) |
spawn role subagent (Task tool) | /agent swap (IDE) or CLI |
| Code-Write Guard | hooks.json PreToolUse hook |
agent_type in PreToolUse hook |
agent name via argv[1] |
| Context Engine | Native MCP Tools (sdlc_*) or Fast CLI |
Native MCP Tools or Fast CLI | Native MCP Tools or Fast CLI |
Instead of having AI agents repeatedly read and write dozens of kilobytes of markdown baton files (_handoff.md, _state.json), the SDLC Kit is powered by a high-performance SQLite Context Engine with sub-millisecond query execution:
- Persistent MCP Server (
bin/sdlc-mcp): Communicates over JSON-RPC stdio. Zero fork overhead, keeps SQLite connection hot in memory with WAL mode. Average latency: 1.55ms (100x faster than process-spawning CLIs). - Fast CLI (
bin/sdlc-ctx): Optimized CLI with lazy imports, fast-path argument parsing, and atomic batch commands. - 7 Chunky Tools:
sdlc_manage_lifecycle: Change init, transitions (S1→S6), gate inspection and approvals.sdlc_record_spec_bundle: Atomic batch insertion of AC requirements, edge cases, STRIDE threats, and spec lock.sdlc_get_work_context: Consolidated 1-call query delivering active task, mapped ACs, and reading order.sdlc_submit_task_result: Complete tasks with mandatory test proof and commit logging.sdlc_audit_and_verify: QA audit context inspection, batch test scenario recording, bug logging.sdlc_flex_patch: In-flight amendments (patch schema, insert urgent task, supersede ADR).sdlc_inspect_query: Swiss Army Knife for FTS5 full-text search, table inspection, and safe read-only SQL.
On both, the orchestrator is a dedicated agent (sdlc-full/sdlc-fast) that drives the
pipeline, delegates each phase to its role agent, and owns the gates — it never writes code (only
the developer agent does) and is write-fenced to baton/state files. A plain session (no role
agent) is your unrestricted default workspace — the kit's preToolUse guards bind only the
role agents, so normal interactive work is never blocked.
FRAMEWORK — per-platform, re-emitted by init SHARED — one root copy (no symlink), referenced root-relative
<platform>/agents/ role + orchestrator agents ./context/ project·stack·conventions·
<platform>/commands/ slash commands (Claude) architecture·glossary·legacy-ref.md
<platform>/skills/ 24 skills ./openspec/ spec-driven workspace
<platform>/steering/ rules (per-file `inclusion:`) ./memory/ per-role memory
<platform>/ai/ <platform>/tools/ rules + guards ./docs/ intake packages + project docs
.kiro/context-map.json (Kiro wiring only) ./sdlc.config.json · ./pipelines.json
(both platforms read these at the root, no symlink)
<platform> is .kiro/ or .claude/. The orchestrator is the sdlc-full/sdlc-fast agent
(Kiro: ctrl+0/ctrl+5; Claude: claude --agent sdlc-full). The /sdlc-full · /sdlc-fast
slash commands are thin launchers; the per-role commands (/analyst … /onboarder) spawn one
guarded role agent — see GUIDE.md § Agents & shortcuts.
Separation of concerns: the shared workspace + project config live once at the root; the
framework runtime (agents, commands, skills, steering, ai, tools, settings/hooks)
stays per-platform. Edit the root copy of context/ / sdlc.config.json / pipelines.json → both
targets see it (no drift; a kiro↔claude switch never loses config). Each project owns its copy after
init — no submodule coupling, no framework/project file mixing.
A role is a playbook, not an identity. Loading a role's prompt ("I'm the architect now") borrows its checklist; it does not grant its write-permissions. What a session may write is decided by its host-provided identity, never by what it claims:
- Kiro — the active agent's name is its own hook's
argv[1](per-agentpreToolUse). Claiming a role doesn't change it. - Claude — a role agent (
claude --agent <role>or Task-spawned) carriesagent_type; a plain session has none.
Each identity gets a fixed write-fence (Kiro: <agent>.json → toolsSettings.write.allowedPaths;
Claude: check-write-path.py's built-in policy, host-selected):
| Identity | May write | Code? |
|---|---|---|
| plain session (no role agent — your default workspace) | anything | your own session |
orchestrator (sdlc-full/sdlc-fast agent) |
baton/state only — openspec/changes/**/_*, openspec/_*.md, memory/** |
❌ |
analyst |
openspec/**, memory/** |
❌ |
architect |
openspec/**, memory/** |
❌ |
qa |
openspec/**, memory/**, test/** … __tests__/** |
❌ tests only |
intake |
docs/extra-docs/** + baton/state only |
❌ input docs only |
context-refresh |
context/**, openspec/** |
❌ |
onboarder |
context/**, openspec/** |
❌ |
developer |
src/** app/** lib/** … package.json … + the above |
✅ only this one |
Two consequences:
- The orchestrator can't even produce a phase deliverable —
proposal.md/design.md/tasks.md/specs/**/*-report.mdare not baton_-files, so if it tries to write one the guard blocks it (exit 2), forcing it to delegate to the role agent. So "the orchestrator does S3 itself" cannot happen — the guard, not goodwill, prevents it. - Only the developer identity has code paths; impersonation can't escalate, because the guard
keys on the host-provided identity, not the prose. A project whose code lives off the standard roots
extends the fence via
sdlc.config.json.paths.{code_roots,test_roots}(preserved across--force).
Three enforcement layers (defense in depth):
- Subagent
toolsfrontmatter — every role declares its tool set (noTaskon role agents; all write-capable toolsWrite/Editroute to layer 3).Editis granted to every role: it reaches no path thatWritecan't already overwrite, and a one-lineEditis far safer than rewriting a whole file. permissions.deny(Claudesettings.json) — coarse blanket bans (e.g. editing the kit's own agents/commands/settings). Not role-aware by design.- PreToolUse guards (
check-write-path.py/check-shell-command.py) — role-aware, fail-closed, host-selected policy; the only layer that grantsdeveloperits code exception. The backstop, because an LLM's self-description ("I am the developer now") isn't trustworthy.
The orchestrator is a dedicated agent, not your main session — so a plain session is unrestricted (the guards bind only the named role agents; normal work is never blocked). Code and every deliverable are produced by the role agent: on Claude the orchestrator spawns it (Task); on Kiro CLI it delegates ("use the {role} agent");
/agent swapis the manual fallback.
Every phase hands the next a baton of underscore-prefixed context files in the change dir —
_handoff.md, _decisions.jsonl, _glossary.md, _progress.md, _state.json — plus the cross-spec
bridge, one file per change: openspec/_cross-spec-context/<change-name>.md (never a single shared
file every branch would conflict on). This is deterministically enforced, not just prose:
pipeline-guard.mjs(the orchestrator calls it before every approve) blocks out-of-order gates, fence-jumps, and missing-artifact approvals; its STEP 0 rejects a drifted_state.json.cpp-guard.mjsfails a gate when the outgoing phase's baton is incomplete — and now also when a role hasn't recorded its role-memory write-back decision (_state.json.memory_writeback.<role>∈ {appended,nothing-reusable}), closing the gap where a one-shot agent returned and silently lost its only chance to persist a cross-spec lesson.state-schema.mjsvalidates the canonical_state.jsonshape at write time (viastate-set.mjs) and at guard STEP 0, so drift surfaces immediately instead of one gate later. It also holds the key allowlist:state-setrefuses a write that introduces a key nothing reads (pre-existing drift only warns, so a change mid-flight never deadlocks).
The baton is bounded, because every role re-reads all five files on every spawn — left to accumulate
it costs more than the agent prompt itself. Ceilings: _state.json ≤8 KB (canonical keys only),
_handoff.md ≤6 KB and replaced each phase rather than appended, _glossary.md ≤6 KB with one-line
definitions edited in place (no [SUPERSEDED] twins), _progress.md ≤4 KB, whole baton ≤24 KB;
_decisions.jsonl entries are the one-line WHAT (decision ≤240 chars) with the analysis in the phase
report, which is read once at its gate. cpp-guard reports anything over cap at every gate, and
baton-compact.mjs (run by the orchestrator after each approve) archives what nothing reads into
<CHANGE_DIR>/_archive/. The split that decides where content goes: baton = written once, read on
every later spawn; phase artifact = written once, read once at its gate.
Trailing side-effects the orchestrator owes (cross-spec bridge at S3, progress marking, the
convergence loop at rigor=full) are verified at the next gate. sprint-retro at S6 is the final
safety net — it harvests any skipped inline memory write-back into memory/<role>/<change-name>.md
(one file per change, so parallel branches never conflict on a shared memory file).
Every write-back also appends one line to memory/<role>/_index.md — a per-role digest roles read
FIRST (cheap, flat cost no matter how much history has accumulated), opening individual
{change-name}.md files only for entries that look relevant. And a scope axis (tiny/standard,
independent of type/rigor) scales how much a phase that DOES run produces — condensed design.md
sections, affected-tests-only at intermediate checkpoints — never which phases/gates run. A separate
test_scope axis (module/full, derived from rigor) bounds how WIDE the developer's final
checkpoint and QA's independent re-run reach — module by default, restricting the test suite to the
module/directory touched instead of the whole app. See sdlc-orchestration-core SKILL.md §Scope /
§Test scope / §Role-memory index for the full resolution rules.
Claude does not use a context map —
CLAUDE.mdholds a role × file table and each role prompt Reads only its owncontext/*.mdfiles; skills are auto-discovered. This section applies to Kiro only.
.kiro/context-map.json declares, per agent, which skills + context files + project
doc folders it consumes. The mapper regenerates each agent's resources[] from it,
skipping anything that doesn't exist (so references never break):
Edit the map (or let the onboarder do it), then node .kiro/tools/context-map.mjs.
Never hand-edit resources[] in an agent JSON — it gets overwritten.
sdlc.config.json (shared root) tunes pipeline behavior per project — no prompt edits needed.
Keys: gates.auto_pass, coverage.{diff,lines,branches}_threshold, security.stride_analysis
(auto/always/never), test_framework, sonar_scan, git.{isolation,branch_naming,protected_branches,…},
and paths.{code_roots,test_roots} (extend the developer/qa write-fence). The orchestrator honors
gates.auto_pass + git.*; developer honors coverage.*; analyst/qa honor security.stride_analysis.
(On Kiro it is loaded into every agent via context-map always; on Claude it is read by the
orchestrator + guards.) pipelines.json (also shared root) defines the phases/gates/lifecycle once
and the per-type phase lists — edit a type to tune it per project.
agents/examples/are illustrative format samples (a reference domain); only their structure is meant to be reused. Replace with your own over time.- Workspace = OpenSpec: features are OpenSpec changes at
openspec/changes/<name>/(proposal + spec deltas + design + tasks); the orchestrator drives the lifecycleopenspec new change → /opsx:apply → openspec archiveacross S1–S6, andarchivefolds the change's spec deltas into the livingopenspec/specs/. The onboarder mirrors the context contract intoopenspec/config.yamlso OpenSpec's own skills are project-aware. openspec/andmemory/are per-project workspace and are never shipped by the kit.- To pull kit updates, re-run
init --force— see GUIDE.md § Updating.