Context-LSP is a Codex-centered CLI and skill layer for ContextPack retrieval, project-brain bootstrapping, warning-first guards, architecture drift checks, doc-update recommendations, and advisory diagnostics.
The current Phase 1 MVP implements local rag-lite over Markdown planning docs:
- index
docs/planningby frontmatter, headings, wikilinks, and paths - retrieve a JSON
ContextPackfor planning/code/review tasks - populate
ContextPack.code_refsfrom local source files when--rootis provided - extract source-backed
must,should, andwarnconstraints - run warning-first output guard checks before code generation
- report warning-first vault and code-doc drift findings
- recommend minimal planning doc updates after drift findings
- expose verification findings as advisory LSP-style diagnostics
- expose bootstrap/index/retrieve/output-guard/verify/diagnostics/recommend-doc-updates through a local CLI
- provide repo-local Codex skill scaffolding under
skills/
Use directly with npx:
npx context-lsp bootstrap --root . --docs docs/planningOr install the CLI globally:
npm install -g context-lsp
context-lsp bootstrap --root . --docs docs/planningFor local development from this repository:
npm linknpm test
npm run verify
node src/cli.js bootstrap --root . --docs docs/planning
node src/cli.js index --docs docs/planning
node src/cli.js retrieve --docs docs/planning --task "기능 구현 계획 작성" --type plan
node src/cli.js retrieve --docs docs/planning --root . --task "ContextPack code refs" --type code --concept ContextPack --target src
node src/cli.js output-guard --docs docs/planning --root . --task "ContextPack 기반 코드 생성" --type code --target src/core/retriever.js --plan "Use retrieved ContextPack constraints before editing."
node src/cli.js verify --docs docs/planning
node src/cli.js verify --docs docs/planning --root . --changed src/core/retriever.js
node src/cli.js diagnostics --docs docs/planning --root . --changed src/core/retriever.js
node src/cli.js recommend-doc-updates --docs docs/planning --root . --changed src/core/retriever.js
node src/cli.js init-project-brain --root . --docs docs/planning --name "My Project" --idea "One sentence product idea"
node src/cli.js reverse-engineer --root . --docs docs/planning
node src/cli.js guaranteesAfter global install or npm link, replace node src/cli.js with context-lsp.
Install the CLI from this repository once for local testing:
npm linkRegister the repo skills globally:
ln -sfn /Users/song/Projects/Context-LSP/skills/context-bootstrap ~/.codex/skills/context-bootstrap
ln -sfn /Users/song/Projects/Context-LSP/skills/init-project-brain ~/.codex/skills/init-project-brain
ln -sfn /Users/song/Projects/Context-LSP/skills/reverse-engineer-project ~/.codex/skills/reverse-engineer-project
ln -sfn /Users/song/Projects/Context-LSP/skills/retrieve-project-context ~/.codex/skills/retrieve-project-context
ln -sfn /Users/song/Projects/Context-LSP/skills/plan-with-project-brain ~/.codex/skills/plan-with-project-brain
ln -sfn /Users/song/Projects/Context-LSP/skills/generate-compliant-code ~/.codex/skills/generate-compliant-code
ln -sfn /Users/song/Projects/Context-LSP/skills/verify-architecture-drift ~/.codex/skills/verify-architecture-drift
ln -sfn /Users/song/Projects/Context-LSP/skills/update-project-brain ~/.codex/skills/update-project-brainThen open another project and run:
context-lsp bootstrap --root . --docs docs/planning
context-lsp init-project-brain --root . --docs docs/planning --name "My Project" --idea "One sentence product idea"
context-lsp reverse-engineer --root . --docs docs/planning
context-lsp retrieve --docs docs/planning --root . --task "기능 구현 계획 작성" --type plan
context-lsp output-guard --docs docs/planning --root . --task "기능 구현" --type code --target src
context-lsp verify --docs docs/planning
context-lsp diagnostics --docs docs/planning --root . --changed src
context-lsp recommend-doc-updates --docs docs/planning --root . --changed srcIf the other project has no docs/planning vault yet, start with context-lsp bootstrap and create the vault before retrieval/verification.
Start from:
docs/planning/00-index.mddocs/planning/00-agent-retrieval-map.mddocs/planning/02-architecture/interface-contracts.md
The v1 guard is warning-first. Findings provide evidence and recommended actions but do not hard block changes.
The current implementation guarantee registry is available in two forms:
- human-readable:
docs/planning/06-validation/implementation-guarantees.md - machine-readable:
node src/cli.js guarantees
The npm package ships the CLI source, planning docs, and Codex skill scaffolds. Tests and fixtures are excluded from the published tarball.