Files
yvgude--lean-ctx/specs/899-dev-workflow-hardening/spec.md
T
wehub-resource-sync 26382a7ac6
CI / Clippy (push) Failing after 15m13s
CI / Test (ubuntu-latest) (push) Failing after 16m1s
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Build (no embeddings / no ORT) (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / Cookbook (Node) (push) Has been cancelled
CI / Pi Extension (Node) (push) Has been cancelled
CI / Rust SDK (lean-ctx-client) (push) Has been cancelled
CI / Embed SDK (lean-ctx-sdk) (push) Has been cancelled
CI / Python SDK (leanctx) (push) Has been cancelled
CI / Hermes Plugin (Python) (push) Has been cancelled
CI / SDK Conformance Matrix (push) Has been cancelled
CI / Coverage (push) Has been cancelled
CI / cargo-deny (push) Has been cancelled
CI / Adversarial Safety (push) Has been cancelled
CI / Benchmarks (push) Has been cancelled
CI / Output-Quality Gate (eval A/B) (push) Has been cancelled
CI / Documentation (push) Has been cancelled
CI / CI Green (push) Has been cancelled
JetBrains Plugin / Actionlint (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (rust) (push) Has been cancelled
JetBrains Plugin / Validation (push) Has been cancelled
JetBrains Plugin / Build (push) Has been cancelled
JetBrains Plugin / Test (push) Has been cancelled
Security Check / Security Scan (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:35:30 +08:00

2.2 KiB

Spec: AI Dev-Workflow Hardening — Cursor-Loop + Dogfooding (refs #899)

SDD spec-anchored. Source of truth for the intent of this initiative. This is the first spec authored under specs/ — it documents (and dogfoods) the very workflow it introduces.

Problem / Why

lean-ctx is ahead of most 2026 teams on dev infrastructure (specs/contracts, drift gates, evidence ledger, ctx_impact), but the day-to-day Cursor loop does not consistently use it, and the project's own primitives are under-dogfooded. Symptoms: a released binary with un-wired entrypoints (v3.4.7), instruction sprawl across AGENTS.md / CLAUDE.md / .kiro / .cursor/rules with no drift gate, and a manual plan/spec practice that is not anchored in the editor loop.

Goal

A repeatable, review-gated loop (spec → plan → tasks → implement → verify → evidence) that is wired into Cursor and enforced by deterministic gates.

Acceptance Criteria (EARS)

  • #900 WHEN the agent edits rust/src/**, THE workflow SHALL require running impact analysis (ctx_impact) and verifying the affected tests beforehand.
  • #901 THE repo SHALL provide specs/_template/{spec,plan,tasks}.md and THE workflow SHALL create specs/NNN-<slug>/ per non-trivial feature; commits SHALL cite the spec (refs specs/NNN-<slug>).
  • #902 THE test suite SHALL fail if any registered MCP tool lacks a dispatch arm, or any CLI subcommand falls through to help (no un-wired entrypoints).
  • #903 WHEN the agent-instruction SSOT changes, THE generated rule artifacts SHALL be regenerable and a drift test SHALL fail on divergence.
  • #904 THE repo SHALL establish .cursor/plans/ with a convention linking plan ↔ specs/NNN ↔ GitLab ticket, documented in CONTRIBUTING.

Out of Scope

  • Migrating existing docs/superpowers/** or docs/specs/** into specs/.
  • Changing any runtime behavior or docs/contracts/*-v1.md.
  • Touching the in-progress rust/src/core/addons/** work.

Verification (deterministic first)

  • cargo test -q entrypoints_wired · cargo test -q rules_drift
  • scripts/preflight.sh fast
  • Rules/specs render in Cursor; .mdc frontmatter valid.
  • GitLab: #899 (epic) → #900 #901 #902 #903 #904
  • Plan: ./plan.md · Tasks: ./tasks.md