ground-first
Diagnose a stalled flow on a legacy codebase: inventory the existing corpus, author a coarse C4-L1 vision map, HALT for human ratification before decomposing, then hand one walking-skeleton RFC to the sdlc chain. Use when asked to "ground this repo first", "we are stuck, where do we start", "map the legacy system", "chưa hiểu hệ thống thì bắt đầu từ đâu", or before any breadth-first decomposition of an unfamiliar codebase.
- License 许可
- MIT
- 所属仓库
- baodq97/govkit
- 最近更新
- 2026-09-07
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- ground-first
- background
- true
- description
- Diagnose a stalled flow on a legacy codebase: inventory the existing corpus, author a coarse C4-L1 vision map, HALT for human ratification before decomposing, then hand one walking-skeleton RFC to the sdlc chain. Use when asked to "ground this repo first", "we are stuck, where do we start", "map the legacy system", "chưa hiểu hệ thống thì bắt đầu từ đâu", or before any breadth-first decomposition of an unfamiliar codebase.
03 SKILL.md 正文
/ground-first
A thin front onto the .claude/workflows/ground-first.js orchestration — the UPSTREAM
capstone, the mirror image of sdlc.js. It automates the half that produces a grounded input:
DIAGNOSE -> GROUND-INVENTORY -> VISION-FIRST -> DECOMPOSE(grounding-driven) ->
WALKING-SKELETON, then hands off to the sdlc workflow. Invoke ground-first.js; it makes
the grounding ratio VISIBLE and HALTS before a breadth-first decompose rather than run it on
unconfirmed evidence. This wrapper reimplements none of that logic — the .js stays the single
source of truth.
By-hand fallback — workflows are research-preview and globally disableable
Workflows are research-preview and globally disableable (disableWorkflows /
CLAUDE_CODE_DISABLE_WORKFLOWS=1), and cannot be bundled in a plugin (there is no
workflows field in plugin.json). If ground-first.js does not run, drive the SAME order
BY HAND:
- Fan out readers to run
ddd_state.py --json+ddd_check.py --jsonandnpx govkit verify/npx govkit evalcapturing EXIT codes, and read LEARNING-LOOP.md + journals for the stall edge; join them into one warning-only diagnose report by hand. - Run the
ddd-flow:2-discoverDISCOVER mode over the legacy corpus and validate withmine_coverage.py --strict. - Follow
ddd-flow:1-understandthen a COARSEddd-flow:3-decompose, and land a C4-L1 vision map viaswe-flow:spec-authorat draft. - COMPUTE the grounding ratio yourself and STOP if confirmed events/rules are below floor — do NOT decompose on thin grounding.
- Follow
ddd-flow:3-decompose+ measure-playbook Stages 6/7 to emit a CANDIDATE model at draft. - Author ONE thin walking-skeleton RFC via
swe-flow:spec-author+swe-flow:work-breakdown, then run thesdlcworkflow.
Nothing is lost — the govkit PreToolUse/Stop hook + CI govkit verify enforce every structural
gate regardless. The workflow is an accelerant, not the source of truth.
This wrapper dispatches only the subagents ground-first.js already dispatches —
swe-flow:reviewer, swe-flow:red-teamer, swe-flow:doc-keeper, swe-flow:analyst, with the
authoring/discovery phases guided by the ddd-flow:1-understand, ddd-flow:2-discover,
ddd-flow:3-decompose, swe-flow:spec-author, and swe-flow:work-breakdown skills. It
introduces no new agent type or skill. It is warning-first: it never flips a governed-doc
status: and never assigns an owner — every draft lands owner: TBD at its START status, and
the terminal flips (the vision PRD, the walking-skeleton RFC at handoff) stay a human act
(AGENTS.md § Agent constraints).
04 同仓库更多 Skills
trigger-shaped
Use when the user says "plan a sprint retro"; drafts retro/notes.md for the team.
terse-unguarded
Step 2 — writes docs/x/output.json quietly.
guarded
Summarizes ledger totals into reports/monthly.csv.
open
Draft a spec. Use when asked to "draft a spec" or "write the RFC".
guarded
Deploy the thing.
working-discipline
Thinking-checkpoint discipline for substantive implementation, debugging, or autonomous work — 21 trigger-gated items (trigger → mandatory question → evidence to produce) that cut agent error and human escalation. Use before an autonomous or long-running run, when asked to "work carefully", "double-check", "làm cẩn thận", "reduce errors", "be more autonomous", or after looping twice on the same failing fix. NOT a procedure — checkpoints fire on their triggers and demand evidence, with an N/A escape valve so a strong model pays near-zero overhead.