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,132 @@
|
|
|
1
|
+
# Code-Anchored Context: The Structure
|
|
2
|
+
|
|
3
|
+
This is the companion to the
|
|
4
|
+
[reasoning article](code-anchored-context-why.md). It covers how development
|
|
5
|
+
context is laid out so both humans and agents can navigate it.
|
|
6
|
+
|
|
7
|
+
## Denormalize Navigation, Not Knowledge
|
|
8
|
+
|
|
9
|
+
Agents and IDEs do not always open from the repo root — they may start in
|
|
10
|
+
`src/`, `deploy/`, or a nested app. If all guidance lives at the top, it gets
|
|
11
|
+
missed. If each area keeps its own plans, cross-project work fragments.
|
|
12
|
+
|
|
13
|
+
> Denormalize navigation, not knowledge.
|
|
14
|
+
|
|
15
|
+
Local `AGENTS.md` files point agents toward the right place. But plans, specs,
|
|
16
|
+
ADRs, release context, testing strategy, delivery notes, and infrastructure
|
|
17
|
+
context live centrally under `Development/`.
|
|
18
|
+
|
|
19
|
+
## The Core Model
|
|
20
|
+
|
|
21
|
+
Vocabulary is captured in `Development/terminology.md`. The main containers:
|
|
22
|
+
|
|
23
|
+
```text
|
|
24
|
+
Program Long-lived multi-release effort.
|
|
25
|
+
Planned initiative A scoped future slice inside a program.
|
|
26
|
+
Release initiative Active or historical work for a specific release.
|
|
27
|
+
Development backlog item Isolated work cut from scope but worth preserving.
|
|
28
|
+
Program release slice What a release contributes to a program.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Each kind of context gets a home:
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
Development/
|
|
35
|
+
terminology.md
|
|
36
|
+
current.md
|
|
37
|
+
programs/
|
|
38
|
+
backlog/
|
|
39
|
+
releases/
|
|
40
|
+
_templates/
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Structure follows delivery concerns, not technologies. Name a file for the
|
|
44
|
+
knowledge it preserves, not the tool that produced it.
|
|
45
|
+
|
|
46
|
+
## Release Initiatives
|
|
47
|
+
|
|
48
|
+
The main unit of active delivery:
|
|
49
|
+
|
|
50
|
+
```text
|
|
51
|
+
Development/releases/<version>/initiatives/<initiative>/
|
|
52
|
+
README.md plan.md spec.md interface.md architecture.md
|
|
53
|
+
testing.md delivery.md infrastructure.md operations.md
|
|
54
|
+
backlog.md decisions/ release-doc-notes.md
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The most important file is `plan.md` — the working alignment space. It can be
|
|
58
|
+
messy with notes, options, and tradeoffs, with one rule:
|
|
59
|
+
|
|
60
|
+
> `plan.md` may be messy, but it must not be the only place settled truth lives.
|
|
61
|
+
|
|
62
|
+
Once something stabilizes, it moves to a durable file:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
spec.md What the system should do.
|
|
66
|
+
interface.md How clients, APIs, config, or tools interact with it.
|
|
67
|
+
architecture.md Internal shape, boundaries, data flow, tradeoffs.
|
|
68
|
+
testing.md Verification strategy, coverage, gates, known gaps.
|
|
69
|
+
delivery.md CI/CD, build, deployment, promotion, release toggles.
|
|
70
|
+
infrastructure.md Environments, IaC, networking, identity, storage, secrets.
|
|
71
|
+
operations.md Runtime/support: observability, failure modes, rollback.
|
|
72
|
+
backlog.md Trackable work items and progress.
|
|
73
|
+
decisions/ Durable decisions and consequences (ADRs).
|
|
74
|
+
release-doc-notes.md What should become product documentation later.
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Not every initiative needs every file. The point is to give stable knowledge a
|
|
78
|
+
place to land — testing, delivery, and infrastructure are first-class context,
|
|
79
|
+
not afterthoughts buried in pipeline files or PRs.
|
|
80
|
+
|
|
81
|
+
## Programs And Planned Initiatives
|
|
82
|
+
|
|
83
|
+
Some work is bigger than one release. A program holds durable multi-release
|
|
84
|
+
context:
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
Development/programs/<program>/
|
|
88
|
+
README.md context.md roadmap.md backlog.md
|
|
89
|
+
decisions/ planned-initiatives/ releases/
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Future work that is clear enough to plan — but whose target release is not
|
|
93
|
+
current yet — becomes a planned initiative:
|
|
94
|
+
|
|
95
|
+
```text
|
|
96
|
+
Development/programs/<program>/planned-initiatives/<initiative>/
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
When the target release becomes current, it is promoted into
|
|
100
|
+
`Development/releases/<version>/initiatives/<initiative>/`. Promotion is
|
|
101
|
+
explicit; the original planned initiative stays as historical context.
|
|
102
|
+
|
|
103
|
+
## Development Backlog
|
|
104
|
+
|
|
105
|
+
Work cut from scope but worth preserving — when it doesn't justify a program or
|
|
106
|
+
planned initiative — lives in:
|
|
107
|
+
|
|
108
|
+
```text
|
|
109
|
+
Development/backlog/items/<originating-initiative>--<item>.md
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Each item records where it came from, why it was deferred, future value, and
|
|
113
|
+
re-entry criteria. If picked up later, it is marked promoted and linked — never
|
|
114
|
+
silently rewritten.
|
|
115
|
+
|
|
116
|
+
## Release Transitions
|
|
117
|
+
|
|
118
|
+
Changing the current release is more than editing a pointer. When
|
|
119
|
+
`Development/current.md` moves to a new release, agents should scan program
|
|
120
|
+
planned initiatives, promote items targeting the new release into the release
|
|
121
|
+
folder, update links both ways, and preserve the originals as history.
|
|
122
|
+
|
|
123
|
+
```mermaid
|
|
124
|
+
flowchart TD
|
|
125
|
+
Start["Set a new current release"]
|
|
126
|
+
Scan["Scan program planned initiatives"]
|
|
127
|
+
Promote["Promote into releases/<version>/initiatives/"]
|
|
128
|
+
Link["Update links both ways"]
|
|
129
|
+
Preserve["Preserve original as history"]
|
|
130
|
+
|
|
131
|
+
Start --> Scan --> Promote --> Link --> Preserve
|
|
132
|
+
```
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Code-Anchored Context: Giving AI Agents The Context Around The Code
|
|
2
|
+
|
|
3
|
+
AI agents are good at reading repositories, editing files, and following
|
|
4
|
+
instructions. But in large codebases, code is not the whole story.
|
|
5
|
+
|
|
6
|
+
The hard part is not whether an agent can change a file. It is whether it
|
|
7
|
+
understands the intent behind the change, the current release scope, the
|
|
8
|
+
decisions already made, the work deliberately deferred, how the change should
|
|
9
|
+
be verified, how it ships, and what infrastructure or operational risks
|
|
10
|
+
surround it.
|
|
11
|
+
|
|
12
|
+
That context usually exists — in chats, tickets, pull request comments,
|
|
13
|
+
planning notes, and people's heads — but agents need it in a structured,
|
|
14
|
+
discoverable form.
|
|
15
|
+
|
|
16
|
+
## Documentation vs Development
|
|
17
|
+
|
|
18
|
+
This is why I separate **released product documentation** from **development
|
|
19
|
+
context**:
|
|
20
|
+
|
|
21
|
+
```text
|
|
22
|
+
Documentation/ What shipped.
|
|
23
|
+
Development/ What we are planning, building, deciding, testing,
|
|
24
|
+
shipping, hosting, deferring, and learning.
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Product documentation stays stable and release-accurate: it describes a known
|
|
28
|
+
release, not an unfinished branch. Development context is allowed to evolve —
|
|
29
|
+
it is where humans and agents work through ambiguity.
|
|
30
|
+
|
|
31
|
+
## The Principle
|
|
32
|
+
|
|
33
|
+
I think of this as **Code-Anchored Context**. Not a methodology — a rule of
|
|
34
|
+
thumb:
|
|
35
|
+
|
|
36
|
+
> Keep truth as close to code as possible, and keep the surrounding context
|
|
37
|
+
> structured enough that both humans and agents can find it.
|
|
38
|
+
|
|
39
|
+
It is opinionated on purpose: prefer repository-local context, explicit
|
|
40
|
+
lifetimes, and navigable structure over scattered notes that only make sense
|
|
41
|
+
to the people who were in the room. Repository-local context scales beyond one
|
|
42
|
+
person.
|
|
43
|
+
|
|
44
|
+
## Why It Travels
|
|
45
|
+
|
|
46
|
+
When context is materialized in the repository, it stops being tied to one
|
|
47
|
+
chat transcript, IDE, agent, or session. A team can switch tools without
|
|
48
|
+
losing the trail of why the system is shaped the way it is. The next human or
|
|
49
|
+
agent opens the repo and continues from the same accumulated understanding
|
|
50
|
+
instead of reconstructing it from memory.
|
|
51
|
+
|
|
52
|
+
```mermaid
|
|
53
|
+
flowchart LR
|
|
54
|
+
Code["Codebase<br/>What exists"]
|
|
55
|
+
Dev["Development/<br/>What is being planned, built, decided, tested, shipped, deferred"]
|
|
56
|
+
Docs["Documentation/<br/>What shipped in a known release"]
|
|
57
|
+
Agents["Agents and humans"]
|
|
58
|
+
|
|
59
|
+
Agents --> Code
|
|
60
|
+
Agents --> Dev
|
|
61
|
+
Dev -->|"release-doc-notes.md captures future docs impact"| Docs
|
|
62
|
+
Docs -->|"stable release truth"| Agents
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Why It Matters
|
|
66
|
+
|
|
67
|
+
Code-Anchored Context is context continuity. It helps agents and humans answer:
|
|
68
|
+
|
|
69
|
+
- What is active now, and what belongs to a future phase?
|
|
70
|
+
- What was cut from scope, and why was a decision made?
|
|
71
|
+
- How should this be tested, and what gates must pass before release?
|
|
72
|
+
- How will it ship, and what infrastructure does it depend on?
|
|
73
|
+
- What should become product documentation later?
|
|
74
|
+
- What reasoning needs to survive a change of IDE, agent, or session?
|
|
75
|
+
|
|
76
|
+
Code tells an agent *what exists*. Development context tells it *why* it
|
|
77
|
+
exists, where it is going, what has been decided, and what was left for later.
|
|
78
|
+
|
|
79
|
+
For the concrete folder layout, see the companion article,
|
|
80
|
+
[Code-Anchored Context: The Structure](code-anchored-context-structure.md).
|