openspec-context-docs
OpenSpec context documentation policy: keep requirements in spec.md and capture narrative context in context/overview/rationale docs under openspec/specs. Use when creating or updating OpenSpec docs, spec context, or onboarding/guide documentation.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 28
- Forks
- 4
01 前言 Front Matter
- name
- openspec-context-docs
- description
- OpenSpec context documentation policy: keep requirements in spec.md and capture narrative context in context/overview/rationale docs under openspec/specs. Use when creating or updating OpenSpec docs, spec context, or onboarding/guide documentation.
03 SKILL.md 正文
OpenSpec Context Docs
When to use
- Writing or updating OpenSpec documentation (specs, onboarding, guide, change artifacts).
- A spec is complete but readers lack background, rationale, examples, or operational notes.
- You need to preserve rich context without weakening SSOT.
Core rule: two-layer docs
spec.md= normative, testable requirements (SHALL/MUST + scenarios).- Context docs = narrative and operational detail that helps humans understand and apply the spec.
Locations
- Main specs:
openspec/specs/<capability>/spec.md(requirements)openspec/specs/<capability>/context.md(preferred)
- Optional split (if context grows):
overview.md,rationale.md,examples.md,ops.mdinside the same capability folder.
- Change-level notes (working context):
openspec/changes/<change>/context.mdornotes.md
Detail prompts (add depth without forcing a template)
Include at least 4 of these in context docs:
- Purpose / scope / non-goals
- Decision rationale + alternatives considered
- Constraints (security, performance, policy)
- Failure modes / edge cases
- Example request/response, data shape, or user flow
- Operational notes (rollout, monitoring, runbooks)
- Links to related specs/contracts
Sync rule
- After implementation/verification, promote stable context from change notes into the main context docs.
- Do not duplicate normative requirements in context docs; link back to
spec.md. - Never create or update a
docs/directory; keep everything underopenspec/.
Prompt snippet
"Keep spec.md strictly for requirements. Add/update context.md with purpose, decisions, constraints, failure modes, and at least one concrete example."
04 同仓库更多 Skills
opensrc
Fetch exact dependency or external repository source before inspecting internals. Use for package implementation, upstream behavior, or external GitHub source lookup.
gx-act
Run GitHub Actions workflows locally with nektos/act before pushing, so CI failures are caught on the laptop and the PR can be squash-merged on the first remote run.
guardex-merge-skills-to-dev
Use when you need to merge SKILL.md updates from agent branches/worktrees into the local base branch (default: dev) with the multiagent-safety flow.
gitguardex
Use for GitGuardex branch/worktree safety, agent or subagent collision avoidance, file ownership, and gated PR finishing. Not for code-quality review.
pr-lens
Generate local PR Lens architecture and data-flow diagrams alongside a GitGuardex Codex or Claude PR review.
gx-act
Run GitHub Actions workflows locally with nektos/act before pushing, so CI failures are caught on the laptop and the PR can be squash-merged on the first remote run.