make-release
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- govkit-spec-planning
- description
- Generate a feature plan (plan.md) and eval_criteria.yaml from NFRs and acceptance scenarios. Use when the user asks to plan a feature or invokes /govkit-spec-planning.
03 SKILL.md 正文
Spec Planning
Plan the implementation of the named feature. When invoked, determine the feature name from the user's request; if it is not provided, ask before proceeding.
Behavior contract (skip unless this project has one)
Read authority in .govkit/skill_context.yaml before anything else. If
source is none — the default, and where most projects are — skip this
section entirely: nothing in it applies, and you should not mention it.
If source is pdg, this feature's behavior is a versioned commitment.
An approved baseline binds its Rules and scenarios to an exact revision, and
what somebody approved is that revision — not the working tree in front of
you, and not your reading of it. The governing rule is the one govkit
installed as behavior-contract; it is already loaded, and it is binding.
Before relying on anything in the feature folder:
- Run the
validate-baselineandverify-authoritychecks exactly as that rule specifies them. Both need--targetand--baseline, andverify-authorityalso needs--commitment— omit it and the answer is not authorized about the pointer you did not supply, which says nothing about your work. - Check
sourcesin the baseline first. More than one entry means the contract spans repositories and every one of them needs its own--source <source_key>=<path>checkout. Without them you get refusals about missing sources, which are not a verdict on the contract. - Drift means stop. The spec in front of you is not the one that was approved, and everything you plan from it inherits that.
- Unverified is not permission. An unreachable graph, or an unset
GOVKIT_PDG_URL, leaves the question unanswered rather than answered yes.
Then change nothing that is committed. A scope change, an exclusion you inferred, a behavior nobody asked for, or a relaxed threshold is a decision for a person: name the scenario in conflict and wait. You may still refactor, and this plan may still evolve, as long as every committed scenario keeps passing.
Multi-service repos
Read .govkit/skill_context.yaml before planning. When it lists more than
one entry under architecture.services, this repo holds several services
and every path in your output has to land inside one of them:
architecture:
source_root: ''
services:
- name: billing
root: src/billing
- name: orders
root: src/orders
- Work out which service the feature belongs to. Take it from the request
when it names one — by service name, or by a path under that service's
root. - If the request names none, ask which service to plan for and list the names. Do not guess, and do not plan across all of them at once.
- Prefix every file path in your output with that service's
root. A task touchingservices/pricing.pyin theordersservice issrc/orders/services/pricing.py. - Name the chosen service in the plan summary, so a reader knows which part of the repo the plan applies to.
When architecture.services is absent, the repo holds a single service.
Use architecture.source_root as the prefix instead — an empty value means
the layer folders sit at the repo root and paths need no prefix.
Preflight outcome
Read the preflight_outcome block in features/<feature_name>/architecture_preflight.md before planning.
approved-for-planning: plan the feature.experiment-required: plan only the experiment increments for the listedEXP-entries inexperiments.yaml. Plan the rest of the feature after the preflight is reassessed.adr-requiredorblocked: stop and report what must be resolved.
Do not reverse the preflight's ADR decision or its outcome. If you disagree, say so and ask.
Inputs to read
Feature specs:
- NFRs:
features/<feature_name>/nfrs.md - Acceptance:
features/<feature_name>/acceptance.feature
Architecture standards:
docs/{{docs_area}}/architecture/(all files)
Evaluation standards:
docs/{{docs_area}}/evaluation/eval_criteria.md
Existing artifacts (read if present, update if needed):
features/<feature_name>/eval_criteria.yaml
Instructions
- Read all inputs listed above.
- Summarize the business goal and scope of the feature.
2a. Populate the plan's
### Out of scopefromnfrs.md## Out of scope:- If
nfrs.mdhas a non-empty## Out of scopesection, copy its entries into the plan verbatim (author-declared — no marker). - If
## Out of scopeis missing or empty, infer the deferred capabilities from the spec's negative space (domain neighbors with no scenarios), then BOTH:- insert
<!-- INFERRED: not declared in nfrs.md ## Out of scope; confirm with feature owner -->directly under the plan's### Out of scopeheading, and - state in the planning summary that Out-of-scope was inferred and should be confirmed.
- insert
- If
- Identify required design elements per this project's architecture:
- Read
.govkit/skill_context.yamlfor the architecture style and the folder hints underarchitecture.layers(inbound / outbound / domain). - Read
docs/{{docs_area}}/architecture/BOUNDARIES.mdfor the canonical layer contract andLAYER_IMPLEMENTATION.mdfor the layer-by-layer guidance. - List the inbound entry points, domain logic modules, outbound dependencies, and any infrastructure adapters the feature needs — using the project's own folder names, not generic ones.
- Read
- Flag any deviation from architecture contracts:
<!-- govkit:docs-area backend -->
ARCH_CONTRACT.md,BOUNDARIES.md,API_CONVENTIONS.md,SECURITY_AUTH_PATTERNS.md<!-- /govkit:docs-area --> <!-- govkit:docs-area data -->ARCH_CONTRACT.md,BOUNDARIES.md,DATA_QUALITY_CONTRACT.md,PII_HANDLING_CONTRACT.md,LINEAGE_CONTRACT.md,ENVIRONMENTS.md- Query conventions from the selected stack overlay, when installed <!-- /govkit:docs-area -->
- Determine ADR need. Mark ADR required if any of these occur:
- New outbound dependency or external integration
- Boundary change or exception
- New pattern or approach not already documented
Output A: Plan
Write features/<feature_name>/plan.md with:
- Task checklist (files/modules to create or edit)
- Test plan (unit, integration, contract)
- LLM eval hooks and where they run
- Risks, open questions, and follow-ups
- ADR status (required or not required)
Output B: Feature Eval Criteria
Write or update features/<feature_name>/eval_criteria.yaml conforming to docs/{{docs_area}}/evaluation/eval_criteria.md. Include at minimum:
- FIRST enforcement settings
- 7 Virtues enforcement settings
- Any LLM-specific dimensions required by this feature
- Dataset or prompt-set reference placeholder
- Fail-on-regression behavior
Output A first, then Output B. No implementation code in this step.
<!-- govkit:docs-area data -->
Data projects
Use these data-specific output contracts:
- NFR categories are
freshness,quality,pii,lineage,cost(plusreliability,observability,compliancewhere relevant). Tag scenarios@nfr-<category>— the eval gate cross-checks every populated category against the tags. eval_criteria.yamluses the data schema:mode: deterministic(ornone), and each criterion'smeasurementnames a query or CI check withthresholdas a predicate string. No LLM evaluator tools.- Cite the data quality, freshness, and lineage contracts under
docs/data/architecture/. <!-- /govkit:docs-area -->