openspec-context-docs

Organize OpenSpec docs into spec.md and context.md two-layer structure.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/rafazafar/codex-octopus --skill openspec-context-docs-rafazafar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openspec-context-docs
Source: https://github.com/rafazafar/codex-octopus/tree/main/.agents/skills/openspec-context-docs
Command: npx skills add https://github.com/rafazafar/codex-octopus --skill openspec-context-docs-rafazafar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OpenSpec context docs provide a disciplined approach that keeps normative requirements in a single place while capturing narrative rationale, decisions, and operational notes in a separate context document.

Core Features & Use Cases

  • Two-layer documentation structure: spec.md for requirements and context.md for rationale, examples, constraints, and rollout notes.
  • Organized locations: spec and context live under openspec/specs, with optional overview, rationale, and ops notes to support readers and maintainers.
  • Synchronization workflow: after implementation, stable context from change notes should be promoted to the main context docs, with a link back to the spec.

Quick Start

Create or update an OpenSpec capability by adding a spec.md with normative requirements and a corresponding context.md that documents purpose, decisions, constraints, and examples.

Frequently Asked Questions about openspec-context-docs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I separate normative requirements from narrative context in documentation?

Two-layer documentation separates normative requirements from narrative context by keeping requirements in spec.md as the authoritative source and capturing rationale, decisions, and operational notes in context.md.

What is the best way to structure onboarding docs for new components?

Onboarding docs are structured by placing spec.md with normative requirements and context.md with purpose, constraints, and examples under openspec/specs, optionally adding overview, rationale, and ops notes for maintainers.

How do I synchronize change notes with main context documentation?

After implementation, stable context from change notes is promoted to the main context docs, with a link back to the spec to maintain synchronization between implemented changes and authoritative requirements.

When should I use a two-layer spec and context documentation approach?

Use a two-layer spec and context approach when you need a disciplined structure to keep normative requirements in a single place while separately capturing narrative rationale, failure modes, constraints, and rollout notes.

What should I include in context.md for an OpenSpec capability?

Context.md should document purpose, decisions, constraints, examples, failure modes, operational notes, and links back to the spec to fully capture the narrative rationale alongside the normative requirements.

Where should spec and context files be organized in an OpenSpec project?

Spec and context files should be organized under openspec/specs, with optional overview, rationale, and ops notes placed alongside to support both readers and maintainers effectively.