Capability 010: Documentation and Requirements¶
Status: Accepted
Context¶
Projects differ in how much they document and where they keep their requirements. A small project needs the Capability Specifications and nothing else. A commercial project may need ADRs with considered options, use cases, and business rules for readers outside the development team. Its requirements may live in an issue tracker. The workflow keeps the Working Documents the same in every case and adds Input and Derived Documents around them. This capability lets the developer choose the Documentation Mode (extent) and the Requirements Source and generates the files each choice needs.
References¶
- Workflow
- Capability 001: Configuration
- Capability 003: Content Structure
- Capability 004: Rules and Tools
Details¶
New fields of .repo.yaml, all at repository level:
| Field | Required | Values | Default |
|---|---|---|---|
documentation |
no | lean, extended |
lean |
requirements |
no | repo, external |
repo |
tracker |
no | URL of the issue list holding the Capability Specifications | The issue list of repository on the forge of ci, filtered by the label capability; see below |
Default of tracker, by ci:
ci |
Default of tracker |
|---|---|
gitlab |
https://<repository>/-/issues/?label_name%5B%5D=capability |
github |
https://<repository>/issues?q=is%3Aissue+label%3Acapability |
name: Example Shop
description: Online shop for spare parts.
repository: gitlab.com/example/shop
repoType: single
ci: gitlab
documentation: extended
requirements: external
artifacts:
- name: shop
...
Files per setting, relative to the artifact directory and to the root of a mono-repository:
| File | Setting | Owner | Content |
|---|---|---|---|
specs/inputs/README.md |
every | Generator | What an Input Document is and that it is translated into Capability Specifications |
docs/README.md |
every | Generator | What belongs in docs/ and that the assistant works on it only when asked |
specs/technical_design/ADRs/README.md |
lean |
Generator | The lean ADR template, as today |
specs/technical_design/ADRs/README.md |
extended |
Generator | The MADR template |
docs/use_cases/README.md |
extended |
Generator | Use case template (Alistair Cockburn) |
docs/business_rules/README.md |
extended |
Generator | Business rule template |
docs/architecture/README.md |
extended |
Generator | Architecture description template with the 12 arc42 chapters. Chapters 3, 9, 10, and 12 link the system context, the ADRs, the Non-Functional Requirements, and the glossary |
specs/capabilities/README.md |
repo |
Generator | The Capability Specification template, as today |
specs/capabilities/README.md |
external |
Generator | That the Capability Specifications are issues, and where the issue template is |
specs/capabilities/tracker.md |
external |
Generator | The link of tracker |
.gitlab/issue_templates/capability_specification.md |
every, ci: gitlab |
Generator | The sections of the Capability Specification template |
.github/ISSUE_TEMPLATE/capability_specification.yml |
every, ci: github |
Generator | As for GitLab |
Sections of the MADR template:
- Status, Date, Decision-makers, Consulted, Informed
- Context and Problem Statement
- Decision Drivers
- Considered Options
- Decision Outcome, with Consequences and Confirmation
- Pros and Cons of the Options
- More Information
Functional Requirements¶
repo updategenerates the files of Details for the values ofdocumentationandrequirements.- The core rule tells the assistant to read an Input Document only when asked, and to translate it into Capability Specifications instead of implementing it.
- The core rule tells the assistant to read and change
docs/only when asked. - With assistant
claude,.claude/settings.jsonasks before every read, edit, and write belowdocs/. - With
requirements: external, the core rule tells the assistant that the Capability Specifications are issues in the tracker thatspecs/capabilities/tracker.mdlinks, and that feature files and ADRs refer to the issue keys. - Changing
documentationorrequirementsand runningrepo updatereplaces the generator-owned files of Details. It changes no ADR, no Derived Document, and no Capability Specification. - The docs site shows the documents below
specs/,docs/,test/bdd/features/, andtest/manual/.
Non-Functional Requirements¶
None.
Technical Requirements¶
None.
Error Handling¶
- A value of
documentationorrequirementsoutside Details is reported like any other invalid field (capability 001), naming the field and the permitted values. - A
trackerthat is not anhttporhttpsURL is reported the same way.
Out of Scope¶
- Deriving a Derived Document, which the developer does with or without the assistant
- Issue templates for trackers other than GitLab and GitHub, such as Jira
- Fetching issues from a tracker, e.g. an MCP server configuration
- Converting existing ADRs to the other template
- Links between the docs sites of a mono-repository's root and its artifacts
- Copilot's access to
docs/beyond the core rule
Acceptance Criteria¶
- Go service without
documentation:specs/technical_design/ADRs/README.mdcontains## Alternativesand notConsidered Options. There is nodocs/use_cases/. - Go service with
documentation: extended:specs/technical_design/ADRs/README.mdcontainsDecision Drivers,Considered Options, andPros and Cons of the Options.docs/use_cases/README.md,docs/business_rules/README.md, anddocs/architecture/README.mdexist. - Every profile with assistant
claude:.claude/settings.jsonlistsRead(docs/**),Edit(docs/**), andWrite(docs/**)underask. - Every profile with assistant
claude:.claude/rules/core.mdnamesspecs/inputs/anddocs/. - Go service with
requirements: external,ci: gitlab, andrepository: gitlab.com/example/shop:specs/capabilities/tracker.mdcontainshttps://gitlab.com/example/shop/-/issues..claude/rules/core.mdnamesspecs/capabilities/tracker.md. - Same with
tracker: https://example.atlassian.net/jira/software/projects/SHOP/issues:specs/capabilities/tracker.mdcontains that URL. - Generated and committed Go service,
requirements: externalset,repo update:specs/capabilities/tracker.mdexists. - Go service with
ci: gitlab:.gitlab/issue_templates/capability_specification.mdcontains every section heading of the Capability Specification template. Same withci: githubfor.github/ISSUE_TEMPLATE/capability_specification.yml. Generated and committed Go service and mono-repository, the GitLab template deleted and committed,repo update: the template exists again. - Generated Go service with an ADR committed,
documentation: extendedset,repo update: the ADR is unchanged.specs/technical_design/ADRs/README.mdcontainsConsidered Options. documentation: verbose: reported as invalid, namingdocumentation,lean, andextended.tracker: jira: reported as not anhttporhttpsURL.- Go service with
documentation: extended, a file added todocs/use_cases/: the docs site builds withmkdocs build --strictand contains a page for it, forspecs/inputs/README.md, for each feature file, and for each manual test. Same for the combined docs site of a mono-repository, below each artifact, and for a file added to the root'sdocs/(manual testtest/manual/generated_docs_site.md).
Decisions¶
- Two settings at repository level, not per artifact. Who reads the documents and where requirements are kept is a property of the project. Consequence: all artifacts of a mono-repository share both settings.
- The ADR template follows
documentation, without a setting of its own. Projects that expect a detailed rationale also expect the other Derived Documents. Consequence: MADR without Derived Documents needs a later capability, once a project asks for it. - The generator writes templates for Derived Documents, never the documents themselves. Deriving is not deterministic and may need an assistant that is not available. A committed document stays readable without one. Consequence: a Derived Document can fall behind. The developer has it reviewed on request.
docs/is guarded byask, notdeny.denywould also block the assistant when the developer asks for a change indocs/. Consequence: the developer confirms every access. Copilot relies on the core rule alone.- Issue templates follow
ci, whateverrequirementssays. The template does not get in the way, and one rule keeps the generator simple. Consequence: a repository keeping its Capability Specifications as files also has the issue template. - With
requirements: external, feature files, manual tests, and ADRs stay in the repository. They are versioned with the code they verify or explain. Consequence: they refer to issue keys instead of capability numbers. tracker.mdbelongs to the generator; its link comes fromtrackeror fromrepository. A file of the developer would not appear when a repository switches toexternallater, sincerepo updatewrites such files only for a new module. GitLab and GitHub need no extra field. Consequence: a tracker other than the forge, such as Jira, needstracker. The issue templates label every Capability Specificationcapability.