code-anchored-context 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/README.md +13 -0
- package/.agents/skills/development-initiative-context/SKILL.md +209 -0
- package/AGENTS.md +52 -0
- package/Development/AGENTS.md +46 -0
- package/Development/README.md +259 -0
- package/Development/_templates/backlog-item.md +40 -0
- package/Development/_templates/initiative/README.md +59 -0
- package/Development/_templates/initiative/architecture.md +44 -0
- package/Development/_templates/initiative/backlog.md +28 -0
- package/Development/_templates/initiative/brief.html +56 -0
- package/Development/_templates/initiative/decisions/ADR-0000-template.md +34 -0
- package/Development/_templates/initiative/delivery.md +38 -0
- package/Development/_templates/initiative/infrastructure.md +33 -0
- package/Development/_templates/initiative/interface.md +41 -0
- package/Development/_templates/initiative/operations.md +40 -0
- package/Development/_templates/initiative/plan.md +57 -0
- package/Development/_templates/initiative/release-doc-notes.md +35 -0
- package/Development/_templates/initiative/spec.md +35 -0
- package/Development/_templates/initiative/testing.md +41 -0
- package/Development/_templates/planned-initiative/README.md +55 -0
- package/Development/_templates/planned-initiative/architecture.md +44 -0
- package/Development/_templates/planned-initiative/backlog.md +27 -0
- package/Development/_templates/planned-initiative/decisions/ADR-0000-template.md +35 -0
- package/Development/_templates/planned-initiative/delivery.md +33 -0
- package/Development/_templates/planned-initiative/infrastructure.md +30 -0
- package/Development/_templates/planned-initiative/interface.md +41 -0
- package/Development/_templates/planned-initiative/operations.md +41 -0
- package/Development/_templates/planned-initiative/plan.md +40 -0
- package/Development/_templates/planned-initiative/release-doc-notes.md +28 -0
- package/Development/_templates/planned-initiative/spec.md +37 -0
- package/Development/_templates/planned-initiative/testing.md +30 -0
- package/Development/_templates/program/README.md +63 -0
- package/Development/_templates/program/backlog.md +26 -0
- package/Development/_templates/program/context.md +25 -0
- package/Development/_templates/program/decisions/ADR-0000-template.md +34 -0
- package/Development/_templates/program/planned-initiatives/.gitkeep +1 -0
- package/Development/_templates/program/releases/v0_1_0.md +32 -0
- package/Development/_templates/program/roadmap.md +27 -0
- package/Development/_templates/release-context/README.md +33 -0
- package/Development/_templates/release-context/backlog.md +14 -0
- package/Development/_templates/release-context/initiatives/.gitkeep +1 -0
- package/Development/_templates/release-transition.md +39 -0
- package/Development/backlog/README.md +17 -0
- package/Development/backlog/items/.gitkeep +0 -0
- package/Development/code-anchored-context-structure.md +132 -0
- package/Development/code-anchored-context-why.md +80 -0
- package/Development/code-anchored-context.html +830 -0
- package/Development/current.md +32 -0
- package/Development/giving-ai-agents-context-around-code.md +496 -0
- package/Development/programs/README.md +27 -0
- package/Development/releases/v0_1_0/README.md +33 -0
- package/Development/releases/v0_1_0/backlog.md +15 -0
- package/Development/releases/v0_1_0/initiatives/.gitkeep +1 -0
- package/Development/terminology.md +120 -0
- package/Documentation/.order +2 -0
- package/Documentation/Welcome.md +43 -0
- package/Documentation/_authoring/README.md +45 -0
- package/Documentation/_authoring/areas/README.md +16 -0
- package/Documentation/_authoring/areas/_template.md +51 -0
- package/Documentation/_authoring/terminology.md +40 -0
- package/Documentation/_authoring/workflow.md +123 -0
- package/Documentation/_templates/area/README.md +20 -0
- package/Documentation/_templates/area/features/feature-template.md +29 -0
- package/Documentation/releases/index.md +18 -0
- package/LICENSE +21 -0
- package/README.md +85 -0
- package/bin/code-anchored-context.js +558 -0
- package/package.json +45 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Development Terminology
|
|
2
|
+
|
|
3
|
+
This glossary defines the terms used by the Code-Anchored Context practice in
|
|
4
|
+
`Development/`. Use these terms consistently in programs, initiatives,
|
|
5
|
+
backlog items, ADRs, agent summaries, and release-transition work.
|
|
6
|
+
|
|
7
|
+
## Core Folders
|
|
8
|
+
|
|
9
|
+
| Term | Meaning |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| `Development/` | Working development context: plans, specs, ADRs, implementation notes, delivery-surface context, future scope, and release-documentation notes. |
|
|
12
|
+
| `Documentation/` | Released product documentation. It describes shipped behavior for a release/tag and is not edited during normal development work. |
|
|
13
|
+
| `Development/current.md` | Pointer to the current active release context. Updating this is a release transition. |
|
|
14
|
+
| `Development/releases/<version>/` | Release-scoped development context for one version. |
|
|
15
|
+
| `Development/programs/` | Durable multi-release development context. |
|
|
16
|
+
| `Development/backlog/items/` | Deferred isolated work cut from initiatives but worth preserving. |
|
|
17
|
+
|
|
18
|
+
## Work Containers
|
|
19
|
+
|
|
20
|
+
| Term | Meaning | Lives in |
|
|
21
|
+
| --- | --- | --- |
|
|
22
|
+
| Program | A cross-release parent effort with durable context, roadmap, phase history, and program-level decisions. | `Development/programs/<program-slug>/` |
|
|
23
|
+
| Planned initiative | A scoped future delivery slice that belongs to a program but is not in the current release yet. | `Development/programs/<program-slug>/planned-initiatives/<initiative-slug>/` |
|
|
24
|
+
| Release initiative | An active or historical delivery slice for a specific release. | `Development/releases/<version>/initiatives/<initiative-slug>/` |
|
|
25
|
+
| Development backlog item | Isolated deferred work that was cut from an initiative and may be picked up later. | `Development/backlog/items/<originating-initiative>--<item>.md` |
|
|
26
|
+
| Program release slice | A program-level summary of what a release is expected to do or did for the program. | `Development/programs/<program-slug>/releases/<version>.md` |
|
|
27
|
+
|
|
28
|
+
## Choosing The Right Container
|
|
29
|
+
|
|
30
|
+
Use a release initiative when work is active in the current release or is
|
|
31
|
+
historical delivery context for a specific release.
|
|
32
|
+
|
|
33
|
+
Use a program when the work spans releases, has phases, has durable decisions,
|
|
34
|
+
or needs a roadmap beyond one release.
|
|
35
|
+
|
|
36
|
+
Use a planned initiative when future program work is clear enough to plan,
|
|
37
|
+
specify, or split, but the target release is not current yet.
|
|
38
|
+
|
|
39
|
+
Use a development backlog item when an isolated piece of work was cut from
|
|
40
|
+
scope and should be preserved, but it does not need program-level context.
|
|
41
|
+
|
|
42
|
+
## Files
|
|
43
|
+
|
|
44
|
+
The structure follows delivery concerns, not technologies. Use concern names
|
|
45
|
+
such as `testing.md`, `delivery.md`, and `infrastructure.md`; name specific
|
|
46
|
+
tools inside those files only when the tools matter.
|
|
47
|
+
|
|
48
|
+
Mermaid is the preferred diagram syntax for development context because it is
|
|
49
|
+
both readable Markdown for agents and renderable visual context for humans.
|
|
50
|
+
|
|
51
|
+
| Term | Meaning |
|
|
52
|
+
| --- | --- |
|
|
53
|
+
| `README.md` | Entry point for a folder. It should explain status, scope, links, and where to start. |
|
|
54
|
+
| `plan.md` | Working alignment space for humans and agents. It may be messy, but settled truth must move into stable files. |
|
|
55
|
+
| `spec.md` | Stable description of what the system should do. |
|
|
56
|
+
| `interface.md` | Stable description of how humans, clients, APIs, config, reports, or tools interact with the work. |
|
|
57
|
+
| `architecture.md` | Stable description of internal shape, boundaries, data flow, contracts, and tradeoffs. |
|
|
58
|
+
| `testing.md` | Stable description of verification strategy, automated and manual coverage, test data, and release gates. |
|
|
59
|
+
| `delivery.md` | Stable description of CI/CD, build behavior, deployment flow, environment promotion, release toggles, and delivery automation. |
|
|
60
|
+
| `infrastructure.md` | Stable description of environment shape, IaC, resources, networking, identity, storage, secrets, and environment dependencies. |
|
|
61
|
+
| `operations.md` | Optional actionable runtime support context: observability, failure modes, rollback, repair, support procedures, and tooling. |
|
|
62
|
+
| `backlog.md` | Trackable work items for the containing initiative or program. |
|
|
63
|
+
| `release-doc-notes.md` | Notes for future product documentation refresh work. This is the bridge to `Documentation/`. |
|
|
64
|
+
| ADR | Architecture Decision Record. Use for durable decisions and tradeoffs. |
|
|
65
|
+
| `brief.html` | Optional human-friendly presentation layer. |
|
|
66
|
+
|
|
67
|
+
## Status Terms
|
|
68
|
+
|
|
69
|
+
| Status | Meaning |
|
|
70
|
+
| --- | --- |
|
|
71
|
+
| Draft | Early context exists, but scope or direction is not settled. |
|
|
72
|
+
| Planned | Future scope is known, but it is not active in the current release. |
|
|
73
|
+
| Active | Work is part of the current release's delivery scope. |
|
|
74
|
+
| Implementing | Code or documentation work is actively being changed. |
|
|
75
|
+
| Blocked | Work cannot proceed until a dependency, decision, or external condition changes. |
|
|
76
|
+
| Parked | Intentionally paused, but not abandoned. |
|
|
77
|
+
| Deferred | Removed from current scope and kept for possible later work. |
|
|
78
|
+
| Promoted | Planned or backlog work has been materialized into a release initiative. |
|
|
79
|
+
| Superseded | Replaced by another plan, initiative, decision, or backlog item. |
|
|
80
|
+
| Released | Delivered and preserved as historical release context. |
|
|
81
|
+
|
|
82
|
+
## Promotion
|
|
83
|
+
|
|
84
|
+
Promotion materializes future or deferred work into a release initiative.
|
|
85
|
+
Promotion is explicit and traceable.
|
|
86
|
+
|
|
87
|
+
Planned initiatives are promoted when their target release becomes current or
|
|
88
|
+
when release planning explicitly begins:
|
|
89
|
+
|
|
90
|
+
```text
|
|
91
|
+
Development/programs/<program>/planned-initiatives/<initiative>/
|
|
92
|
+
-> Development/releases/<version>/initiatives/<initiative>/
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Backlog items are promoted when someone decides to pick them up:
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
Development/backlog/items/<originating-initiative>--<item>.md
|
|
99
|
+
-> Development/releases/<version>/initiatives/<initiative>/
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Promotion does not silently move or delete the original context. Leave the
|
|
103
|
+
original planned initiative or backlog item in place, update its status to
|
|
104
|
+
`Promoted`, and link to the release initiative.
|
|
105
|
+
|
|
106
|
+
## Release Transition
|
|
107
|
+
|
|
108
|
+
A release transition is the act of changing `Development/current.md` to a new
|
|
109
|
+
release. This is not just a line edit.
|
|
110
|
+
|
|
111
|
+
During a release transition, agents should:
|
|
112
|
+
|
|
113
|
+
- create the release folder if missing
|
|
114
|
+
- scan programs for planned initiatives targeting the new release
|
|
115
|
+
- promote matching planned initiatives into the release's `initiatives/`
|
|
116
|
+
folder
|
|
117
|
+
- update links both ways
|
|
118
|
+
- leave planned initiatives as historical planning context
|
|
119
|
+
|
|
120
|
+
Use `Development/_templates/release-transition.md` as the checklist.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# PROJECT_NAME Documentation
|
|
2
|
+
|
|
3
|
+
Welcome to the release-anchored documentation for PROJECT_NAME.
|
|
4
|
+
|
|
5
|
+
This folder describes shipped behavior for a known release or tag. It is not
|
|
6
|
+
the place for in-progress feature planning, implementation notes, or draft
|
|
7
|
+
architecture decisions. Put that work in `Development/`.
|
|
8
|
+
|
|
9
|
+
## How This Documentation Is Organized
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
Documentation/
|
|
13
|
+
.order
|
|
14
|
+
Welcome.md
|
|
15
|
+
releases/
|
|
16
|
+
index.md
|
|
17
|
+
_authoring/
|
|
18
|
+
README.md
|
|
19
|
+
workflow.md
|
|
20
|
+
terminology.md
|
|
21
|
+
areas/
|
|
22
|
+
<area>.md
|
|
23
|
+
<Area>/
|
|
24
|
+
README.md
|
|
25
|
+
features/
|
|
26
|
+
<feature>.md
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Every documented area should have:
|
|
30
|
+
|
|
31
|
+
- a high-level `README.md` that explains the area's purpose and architecture
|
|
32
|
+
- one page per feature under `features/`
|
|
33
|
+
- an authoring guide under `Documentation/_authoring/areas/`
|
|
34
|
+
|
|
35
|
+
## Contributing
|
|
36
|
+
|
|
37
|
+
- Refresh docs only when explicitly asked.
|
|
38
|
+
- Write for non-developer technical readers unless the project states
|
|
39
|
+
otherwise.
|
|
40
|
+
- Describe behavior, inputs, outputs, permissions, errors, business rules, and
|
|
41
|
+
operational expectations in domain language.
|
|
42
|
+
- Prefer Mermaid diagrams for flows, architecture, and relationships.
|
|
43
|
+
- Add release refreshes to `Documentation/releases/index.md`.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Documentation Authoring Guide
|
|
2
|
+
|
|
3
|
+
This subtree owns all guidance for authoring and refreshing the documentation
|
|
4
|
+
under `Documentation/`. Humans and agents both read from here to know how
|
|
5
|
+
documentation is structured, when it is refreshed, what belongs in each area,
|
|
6
|
+
and which domain terminology to use.
|
|
7
|
+
|
|
8
|
+
## Start Here
|
|
9
|
+
|
|
10
|
+
- [`workflow.md`](workflow.md) explains how docs are versioned, refreshed, and
|
|
11
|
+
structured.
|
|
12
|
+
- [`terminology.md`](terminology.md) holds project-specific domain language.
|
|
13
|
+
- [`areas/`](areas/) contains one file per documented area, covering feature
|
|
14
|
+
inventory, code orientation, conventions, and what matters at release time.
|
|
15
|
+
|
|
16
|
+
## Area Guide Pattern
|
|
17
|
+
|
|
18
|
+
Create one authoring guide per documented area:
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
Documentation/_authoring/areas/<area-slug>.md
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Each area guide should identify:
|
|
25
|
+
|
|
26
|
+
- the code folder or folders that own the behavior
|
|
27
|
+
- the documentation root under `Documentation/`
|
|
28
|
+
- feature pages that should exist
|
|
29
|
+
- behavior that matters at release time
|
|
30
|
+
- changes to ignore, such as pure refactors or test-only edits
|
|
31
|
+
- domain terms and cross-links specific to that area
|
|
32
|
+
|
|
33
|
+
Use [`areas/_template.md`](areas/_template.md) when adding a new area guide.
|
|
34
|
+
|
|
35
|
+
## Relationship To `AGENTS.md`
|
|
36
|
+
|
|
37
|
+
Area `AGENTS.md` files may point here, but they should not copy the detailed
|
|
38
|
+
documentation workflow. Keep authoring rules in this subtree so the guidance
|
|
39
|
+
has one source of truth.
|
|
40
|
+
|
|
41
|
+
## Contributing
|
|
42
|
+
|
|
43
|
+
Edits to this subtree usually belong with documentation workflow changes or
|
|
44
|
+
release refresh work. If a project's documented area changes shape, update the
|
|
45
|
+
matching authoring guide.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Area Authoring Guides
|
|
2
|
+
|
|
3
|
+
This folder contains one authoring guide per documented area.
|
|
4
|
+
|
|
5
|
+
Create a guide from `_template.md` when adding a documentation area:
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
Documentation/_authoring/areas/<area-slug>.md
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Each guide should help a human or agent refresh docs from a release diff
|
|
12
|
+
without rediscovering the area's structure from scratch.
|
|
13
|
+
|
|
14
|
+
## Current Area Guides
|
|
15
|
+
|
|
16
|
+
- None yet.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Area Name
|
|
2
|
+
|
|
3
|
+
## Scope
|
|
4
|
+
|
|
5
|
+
- Code root: `path/to/code`
|
|
6
|
+
- Documentation root: `Documentation/<Area>/`
|
|
7
|
+
- Owner or reviewer: TBD
|
|
8
|
+
|
|
9
|
+
Describe what this area owns and what it intentionally does not own.
|
|
10
|
+
|
|
11
|
+
## Feature Inventory
|
|
12
|
+
|
|
13
|
+
| Feature | Documentation page | Notes |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| TBD | `Documentation/<Area>/features/<feature>.md` | TBD |
|
|
16
|
+
|
|
17
|
+
## What Matters At Release Time
|
|
18
|
+
|
|
19
|
+
Document behavior changes that affect:
|
|
20
|
+
|
|
21
|
+
- user, operator, or API-visible behavior
|
|
22
|
+
- permissions, validation, or error handling
|
|
23
|
+
- data creation, mutation, retention, or migration
|
|
24
|
+
- integrations or external contracts
|
|
25
|
+
- observability, support, or operational procedures
|
|
26
|
+
- configuration, environment shape, or deployment behavior
|
|
27
|
+
|
|
28
|
+
## What To Ignore
|
|
29
|
+
|
|
30
|
+
Ignore changes that do not alter released behavior:
|
|
31
|
+
|
|
32
|
+
- pure refactors
|
|
33
|
+
- internal renames
|
|
34
|
+
- formatting or lint-only changes
|
|
35
|
+
- test-only changes
|
|
36
|
+
- dependency bumps with no behavior impact
|
|
37
|
+
- temporary migration scaffolding that will not ship as behavior
|
|
38
|
+
|
|
39
|
+
## Code Orientation
|
|
40
|
+
|
|
41
|
+
List the files, folders, entry points, or search terms that help an agent map a
|
|
42
|
+
release diff to documentation pages.
|
|
43
|
+
|
|
44
|
+
## Terminology
|
|
45
|
+
|
|
46
|
+
List area-specific terms or link to `Documentation/_authoring/terminology.md`.
|
|
47
|
+
|
|
48
|
+
## Cross-Links
|
|
49
|
+
|
|
50
|
+
List related areas and when docs should cross-link instead of duplicating
|
|
51
|
+
behavior.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Project Terminology
|
|
2
|
+
|
|
3
|
+
Use this file to define the domain language that documentation should use.
|
|
4
|
+
|
|
5
|
+
Documentation should translate code-level names into reader-facing domain
|
|
6
|
+
terms when those differ. The goal is consistency for QA, product, support,
|
|
7
|
+
operators, and future agents.
|
|
8
|
+
|
|
9
|
+
## Core Terms
|
|
10
|
+
|
|
11
|
+
| Term | Meaning | Code-level names to translate |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| TBD | TBD | TBD |
|
|
14
|
+
|
|
15
|
+
## Relationships
|
|
16
|
+
|
|
17
|
+
Use this section for named relationships between important domain concepts.
|
|
18
|
+
|
|
19
|
+
| Relationship | Between | Meaning |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| TBD | TBD | TBD |
|
|
22
|
+
|
|
23
|
+
## Guardrails
|
|
24
|
+
|
|
25
|
+
Capture wording rules that prevent misleading documentation.
|
|
26
|
+
|
|
27
|
+
Examples:
|
|
28
|
+
|
|
29
|
+
- Prefer one canonical term over an overloaded code name.
|
|
30
|
+
- Avoid implying that a relationship is permanent when it can change.
|
|
31
|
+
- Call out standards-driven terms that must remain as-is.
|
|
32
|
+
|
|
33
|
+
## Diagram
|
|
34
|
+
|
|
35
|
+
Add a Mermaid diagram when relationships are easier to understand visually.
|
|
36
|
+
|
|
37
|
+
```mermaid
|
|
38
|
+
flowchart LR
|
|
39
|
+
ConceptA["Concept A"] -->|"relationship"| ConceptB["Concept B"]
|
|
40
|
+
```
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# Documentation Workflow
|
|
2
|
+
|
|
3
|
+
This file defines how documentation is versioned, refreshed, and structured
|
|
4
|
+
across the repo. It applies to all documented areas; area-specific guidance
|
|
5
|
+
lives in [`areas/`](areas/).
|
|
6
|
+
|
|
7
|
+
## When Docs Get Edited
|
|
8
|
+
|
|
9
|
+
Doc refresh is an explicit, on-request activity, not a side effect of code
|
|
10
|
+
work. Humans or agents touch `Documentation/` only when:
|
|
11
|
+
|
|
12
|
+
- A human explicitly asks for a release-time refresh, typically after the
|
|
13
|
+
release tag is cut and QA has signed off.
|
|
14
|
+
- A human explicitly asks to update a specific page.
|
|
15
|
+
- A human asks to fix a demonstrable error in an existing page, such as a
|
|
16
|
+
broken link or factual inaccuracy.
|
|
17
|
+
|
|
18
|
+
Do not update docs as part of a feature PR, bug fix, refactor, or dependency
|
|
19
|
+
bump. Mid-stream commits are partial work; "feature complete" is only
|
|
20
|
+
well-defined once the release is accepted.
|
|
21
|
+
|
|
22
|
+
Agents: if you are working on a code change and notice a doc that looks
|
|
23
|
+
outdated, leave it alone. Flag the staleness in your summary or add it to the
|
|
24
|
+
initiative's `release-doc-notes.md`, but do not edit the doc as part of the
|
|
25
|
+
current change unless explicitly asked.
|
|
26
|
+
|
|
27
|
+
## Cadence And Versioning
|
|
28
|
+
|
|
29
|
+
Docs live under `Documentation/` and are refreshed once per release, at
|
|
30
|
+
git-tag time, after release acceptance. Docs are anchored to the release tag;
|
|
31
|
+
the docs at tag `release/v1_2_3` describe the behavior of that release.
|
|
32
|
+
|
|
33
|
+
Default tag names follow the convention `release/vMAJOR_MINOR_PATCH` and match
|
|
34
|
+
the release branch name. If a project uses a different release convention,
|
|
35
|
+
document it here before the first refresh.
|
|
36
|
+
|
|
37
|
+
## Audience
|
|
38
|
+
|
|
39
|
+
Docs are written for non-developer technical readers by default: QA, product
|
|
40
|
+
owners, solution owners, support engineers, customer engineers, or operators.
|
|
41
|
+
Adjust this only when the project explicitly defines a different audience.
|
|
42
|
+
|
|
43
|
+
- Describe behavior, inputs, outputs, permissions, error conditions, and
|
|
44
|
+
business rules in domain language.
|
|
45
|
+
- Avoid code snippets, private type names, SQL, and framework jargon unless
|
|
46
|
+
the concept has no plain-language equivalent.
|
|
47
|
+
- For readers who need more depth than the docs provide, link to the source
|
|
48
|
+
rather than replicating the implementation in prose.
|
|
49
|
+
|
|
50
|
+
## Two Levels Of Detail
|
|
51
|
+
|
|
52
|
+
Every documented area has two layers:
|
|
53
|
+
|
|
54
|
+
1. High level: a summary of what the area is for and an architecture
|
|
55
|
+
description.
|
|
56
|
+
2. Detailed: one page per feature, written to the audience above.
|
|
57
|
+
|
|
58
|
+
Standard per-area layout:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
Documentation/<Area>/
|
|
62
|
+
README.md
|
|
63
|
+
features/
|
|
64
|
+
<feature>.md
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Diagrams
|
|
68
|
+
|
|
69
|
+
Use Mermaid for architecture, flow, sequence, state, and data-relationship
|
|
70
|
+
diagrams. Mermaid remains readable as Markdown source and renders in common
|
|
71
|
+
Markdown viewers.
|
|
72
|
+
|
|
73
|
+
Use a diagram when the relationship between moving parts is easier to show
|
|
74
|
+
than to describe in prose. Prefer a short diagram over a long paragraph; prefer
|
|
75
|
+
a short sentence over an unnecessary diagram.
|
|
76
|
+
|
|
77
|
+
Avoid ASCII-art box drawings. When you edit a page that already has one,
|
|
78
|
+
replace it with Mermaid if the diagram is still useful.
|
|
79
|
+
|
|
80
|
+
Preferred diagram types:
|
|
81
|
+
|
|
82
|
+
| Scenario | Mermaid type |
|
|
83
|
+
| --- | --- |
|
|
84
|
+
| Component, topology, or data flow | `flowchart LR` or `flowchart TD` |
|
|
85
|
+
| Sequence of interactions | `sequenceDiagram` |
|
|
86
|
+
| Entity or table relationships | `erDiagram` |
|
|
87
|
+
| State machine | `stateDiagram-v2` |
|
|
88
|
+
|
|
89
|
+
Keep diagrams small enough to read. If a diagram needs more than about 15 nodes
|
|
90
|
+
or steps, simplify it or split it.
|
|
91
|
+
|
|
92
|
+
## Feature Docs Cover The Full Vertical
|
|
93
|
+
|
|
94
|
+
A feature doc should describe the full behavior path the feature touches:
|
|
95
|
+
entry point, important services or processes, data stored or read, external
|
|
96
|
+
systems, permissions, validation, errors, and operational expectations.
|
|
97
|
+
|
|
98
|
+
If a feature spans multiple areas, place the doc in the area that owns the
|
|
99
|
+
user-facing or operator-facing entry point. Cross-link from the other areas.
|
|
100
|
+
|
|
101
|
+
## Release-Time Doc Refresh
|
|
102
|
+
|
|
103
|
+
When invoked to refresh docs for a release:
|
|
104
|
+
|
|
105
|
+
1. Work from the diff `<previous-release-tag>..HEAD`, scoped to one area at a
|
|
106
|
+
time.
|
|
107
|
+
2. Read the matching area guide in `Documentation/_authoring/areas/`.
|
|
108
|
+
3. Update the area's `README.md` if the high-level picture changed.
|
|
109
|
+
4. Update feature pages for behavior that changed.
|
|
110
|
+
5. Ignore pure refactors, internal renames, test-only changes, formatting,
|
|
111
|
+
lint fixes, and dependency bumps with no behavior change.
|
|
112
|
+
6. Append one row to `Documentation/releases/index.md`.
|
|
113
|
+
|
|
114
|
+
## What Not To Document
|
|
115
|
+
|
|
116
|
+
- Internal helpers, private types, or implementation details that can change
|
|
117
|
+
without user or operator impact.
|
|
118
|
+
- Anything already covered by generated API reference or inline comments. Link
|
|
119
|
+
to it when helpful.
|
|
120
|
+
- Transient migration scaffolding that will be removed before or soon after
|
|
121
|
+
the release.
|
|
122
|
+
- Draft plans, undecided architecture, or open implementation questions. Those
|
|
123
|
+
belong in `Development/`.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Area Name
|
|
2
|
+
|
|
3
|
+
Briefly describe what this area does, who uses it, and why it exists.
|
|
4
|
+
|
|
5
|
+
## Architecture At A Glance
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
flowchart LR
|
|
9
|
+
User["User or operator"] -->|"uses"| Area["Area"]
|
|
10
|
+
Area -->|"reads or writes"| Data["Data store"]
|
|
11
|
+
Area -->|"calls"| External["External system"]
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Responsibilities
|
|
15
|
+
|
|
16
|
+
- TBD
|
|
17
|
+
|
|
18
|
+
## Feature Pages
|
|
19
|
+
|
|
20
|
+
- [Feature Name](features/feature-template.md)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Feature Name
|
|
2
|
+
|
|
3
|
+
Describe the shipped behavior in domain language.
|
|
4
|
+
|
|
5
|
+
## Who Uses It
|
|
6
|
+
|
|
7
|
+
- TBD
|
|
8
|
+
|
|
9
|
+
## Behavior
|
|
10
|
+
|
|
11
|
+
- TBD
|
|
12
|
+
|
|
13
|
+
## Inputs And Outputs
|
|
14
|
+
|
|
15
|
+
| Input or output | Description |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| TBD | TBD |
|
|
18
|
+
|
|
19
|
+
## Permissions And Validation
|
|
20
|
+
|
|
21
|
+
- TBD
|
|
22
|
+
|
|
23
|
+
## Errors And Edge Cases
|
|
24
|
+
|
|
25
|
+
- TBD
|
|
26
|
+
|
|
27
|
+
## Operational Notes
|
|
28
|
+
|
|
29
|
+
- TBD
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Release Documentation Index
|
|
2
|
+
|
|
3
|
+
One row per tagged release. Tag names default to `release/vMAJOR_MINOR_PATCH`
|
|
4
|
+
unless the project documents a different convention.
|
|
5
|
+
|
|
6
|
+
Docs at a given tag describe the behavior of that release.
|
|
7
|
+
|
|
8
|
+
| Tag | Date | Areas refreshed | Owner | Summary |
|
|
9
|
+
| --- | --- | --- | --- | --- |
|
|
10
|
+
| TBD | TBD | TBD | TBD | First documentation refresh. |
|
|
11
|
+
|
|
12
|
+
## Notes For Future Release Rows
|
|
13
|
+
|
|
14
|
+
- The first row may be a bootstrap refresh. Subsequent rows should describe
|
|
15
|
+
incremental refreshes from `<previous-tag>..HEAD`.
|
|
16
|
+
- "Areas refreshed" lists only areas with material behavior changes.
|
|
17
|
+
- Keep the summary to one sentence. Link to an area or feature doc when a
|
|
18
|
+
change deserves more space.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ricardo Mendez Rodriguez
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Code-Anchored Context Template
|
|
2
|
+
|
|
3
|
+
This repository is a reusable starting point for keeping repository-local
|
|
4
|
+
development context and release-anchored product documentation close to the
|
|
5
|
+
code they describe.
|
|
6
|
+
|
|
7
|
+
It separates two kinds of truth:
|
|
8
|
+
|
|
9
|
+
| Folder | Meaning | Updated when |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| `Development/` | What the team is planning, building, deciding, validating, shipping, hosting, deferring, and learning. | During normal development. |
|
|
12
|
+
| `Documentation/` | What the product does as of a known release or tag. | Only during explicit documentation refresh work. |
|
|
13
|
+
|
|
14
|
+
The goal is to give humans and AI agents enough structured context to change a
|
|
15
|
+
codebase without relying on chat history, tribal memory, or scattered planning
|
|
16
|
+
notes.
|
|
17
|
+
|
|
18
|
+
## What This Template Contains
|
|
19
|
+
|
|
20
|
+
- `AGENTS.md` with repo-wide agent guidance.
|
|
21
|
+
- `.agents/skills/development-initiative-context/SKILL.md` for the recurring
|
|
22
|
+
development-context workflow.
|
|
23
|
+
- `Development/` with terminology, release context, backlog/program structure,
|
|
24
|
+
initiative templates, and a human-readable article and brief.
|
|
25
|
+
- `Documentation/` with a generic release-anchored documentation workflow,
|
|
26
|
+
authoring guide structure, and area/page templates.
|
|
27
|
+
|
|
28
|
+
## Adopting This In A Project
|
|
29
|
+
|
|
30
|
+
The quickest path is the npm initializer:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx code-anchored-context init \
|
|
34
|
+
--project-name "My Project" \
|
|
35
|
+
--release v0_1_0
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Useful options:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx code-anchored-context init --dry-run
|
|
42
|
+
npx code-anchored-context init --no-documentation
|
|
43
|
+
npx code-anchored-context init --target ../existing-project
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The initializer copies the repo-local agent context into the target project,
|
|
47
|
+
adds or updates guidance in `AGENTS.md`, installs the
|
|
48
|
+
`development-initiative-context` skill under `.agents/skills/`, and replaces
|
|
49
|
+
basic placeholders such as `PROJECT_NAME` and the initial release slug.
|
|
50
|
+
|
|
51
|
+
Manual adoption still works:
|
|
52
|
+
|
|
53
|
+
1. Copy the files into a repository root.
|
|
54
|
+
2. Replace `PROJECT_NAME` placeholders with the project name.
|
|
55
|
+
3. Set the first active release in `Development/current.md`.
|
|
56
|
+
4. Add or revise area-specific `AGENTS.md` files so they point back to
|
|
57
|
+
`Development/` and `Documentation/_authoring/`.
|
|
58
|
+
5. Create `Documentation/_authoring/areas/<area>.md` for each documented
|
|
59
|
+
product or code area.
|
|
60
|
+
6. Keep product or domain-specific documentation out of this template repo.
|
|
61
|
+
|
|
62
|
+
## Publishing The Package
|
|
63
|
+
|
|
64
|
+
From this repository:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npm test
|
|
68
|
+
npm pack --dry-run
|
|
69
|
+
npm publish --access public
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
If the unscoped package name is unavailable, rename the package in
|
|
73
|
+
`package.json`, for example to `@your-scope/code-anchored-context`, then use:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npx @your-scope/code-anchored-context init
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Working Rule
|
|
80
|
+
|
|
81
|
+
Development context can evolve with the branch. Product documentation should
|
|
82
|
+
stay stable and release-accurate. When behavior changes during development,
|
|
83
|
+
record future documentation impact in the relevant initiative's
|
|
84
|
+
`release-doc-notes.md`; refresh `Documentation/` only when that work is
|
|
85
|
+
explicitly requested.
|