--- name: document-context description: Skill to document context in a structured and consistent manner. Use it when you create or update context documentation. I. e. when adding new requirements, decisions, standards, or clarifications. --- # Document Context Skill ## Purpose Use `/context` as the repository's normative source for requirements, decisions, constraints, quality goals, security expectations, and user experience. Keep implementation details and conformance evidence outside it. ## Organization - Keep one root index and an index for each applicable area. Indexes provide scope, links, and navigation. - During onboarding or when creating an area, add a repository-local `TEMPLATE.md` showing that area's record structure. - Group related records by topic. Use separate files only for unusually large or independently maintained topics. - Write records as readable statements of intended outcomes; include rationale, constraints, or verification only when useful. - Keep records aligned with confirmed intent and the rest of the documentation. Cross-cutting material belongs in the narrowest relevant area and links to related records. ## Record IDs A record is one independently understandable requirement, decision, convention, quality attribute, security expectation, UX need, or clarification. Give every atomic record its own stable ID, including list items and table rows. - Use `TYPE-NNN` with a type prefix (`REQ`, `ADR`, `COD`, `QUA`, `SEC`, `UX`, or `CLR`). Additional uppercase alphanumeric prefixes may be passed to the Bash or PowerShell validator. - Put the ID on the record: an `ID` table column or a bold `ID: TYPE-NNN` label. Keep it stable, never reuse it, and assign the next available number. - Refer to related records by ID; verify links and split independently testable obligations into separate records. - Add ownership or status only when it helps. Ground records in confirmed stakeholder intent; initial onboarding does not require prior context and must keep implementation observations separate. ## Scope - Requirements: stakeholder goals, constraints, and acceptance needs. - Architecture: system structure, integrations, and decisions. - Coding: implementation conventions. - Quality: measurable attributes and verification. - Security: assets, threats, controls, and residual risks. - User experience: user goals, flows, and interaction expectations. ## Validation - Manually review indexes, applicable templates, record IDs, references, readability, and completeness. Structural validators support but do not replace this review. - Confirm README files contain no record IDs and each non-template record file contains at least one. Use the repository's Bash or PowerShell validator, including any custom ID prefixes. - Keep unresolved questions outside normative records until confirmed. Clarify blockers; state non-blocking assumptions. Follow any approval policy in `context/README.md`.