Skip to content

Commit 07a2f03

Browse files
committed
Add context delta system
1 parent 20ae81b commit 07a2f03

35 files changed

Lines changed: 15794 additions & 12298 deletions

.agent-context/architecture.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ This document is generated from static repository signals. Treat it as a startin
99
- Internal modules: 25
1010

1111
## Important Modules
12-
- `outputs`: outputs contains 23 files and depends on core.
13-
- `test`: test contains 27 files and depends on analyzers, benchmarks, cli, config, core, mcp, outputs, retrievers.
12+
- `outputs`: outputs contains 24 files and depends on core.
13+
- `test`: test contains 28 files and depends on analyzers, benchmarks, cli, config, core, mcp, outputs, retrievers.
1414
- `core`: core contains 17 files and depends on analyzers, config, llm, outputs.
1515
- `retrievers`: retrievers contains 6 files and depends on core, outputs.
1616
- `analyzers`: analyzers contains 6 files and depends on core.

.agent-context/contracts/architecture.contract.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
"imports": [
114114
"core"
115115
],
116-
"summary": "outputs contains 23 files and depends on core."
116+
"summary": "outputs contains 24 files and depends on core."
117117
},
118118
{
119119
"name": "test",
@@ -130,7 +130,7 @@
130130
"outputs",
131131
"retrievers"
132132
],
133-
"summary": "test contains 27 files and depends on analyzers, benchmarks, cli, config, core, mcp, outputs, retrievers."
133+
"summary": "test contains 28 files and depends on analyzers, benchmarks, cli, config, core, mcp, outputs, retrievers."
134134
},
135135
{
136136
"name": "core",

.agent-context/contracts/module-boundaries.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"publicFiles": [
3131
"src/outputs/agents-md.ts",
3232
"src/outputs/architecture.ts",
33+
"src/outputs/context-delta.ts",
3334
"src/outputs/context-layers.ts",
3435
"src/outputs/contract-validator.ts",
3536
"src/outputs/contracts.ts",

.agent-context/contracts/test.contract.json

Lines changed: 141 additions & 133 deletions
Large diffs are not rendered by default.

.agent-context/delta/latest.json

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
{
2+
"base": "main",
3+
"impact": "high",
4+
"changedFiles": [
5+
{
6+
"path": "README.en.md",
7+
"status": "modified",
8+
"kind": "docs",
9+
"moduleName": "root",
10+
"isTest": false,
11+
"isGenerated": false
12+
},
13+
{
14+
"path": "README.md",
15+
"status": "modified",
16+
"kind": "docs",
17+
"moduleName": "root",
18+
"isTest": false,
19+
"isGenerated": false
20+
},
21+
{
22+
"path": "README.zh-CN.md",
23+
"status": "modified",
24+
"kind": "docs",
25+
"moduleName": "root",
26+
"isTest": false,
27+
"isGenerated": false
28+
},
29+
{
30+
"path": "src/cli/index.ts",
31+
"status": "modified",
32+
"kind": "source",
33+
"moduleName": "cli",
34+
"isTest": false,
35+
"isGenerated": false
36+
},
37+
{
38+
"path": "src/outputs/context-delta.ts",
39+
"status": "added",
40+
"kind": "source",
41+
"moduleName": "outputs",
42+
"isTest": false,
43+
"isGenerated": false
44+
},
45+
{
46+
"path": "test/context-delta.test.ts",
47+
"status": "added",
48+
"kind": "test",
49+
"moduleName": "test",
50+
"isTest": true,
51+
"isGenerated": false
52+
}
53+
],
54+
"affectedGraphNodes": [
55+
"README.en.md",
56+
"README.md",
57+
"README.zh-CN.md",
58+
"src/benchmarks/benchmark.ts",
59+
"src/cli/index.ts",
60+
"src/cli/task-args.ts",
61+
"src/config/starter-config.ts",
62+
"src/core/context-builder.ts",
63+
"src/core/freshness.ts",
64+
"src/core/git.ts",
65+
"src/core/readiness.ts",
66+
"src/core/token-estimator.ts",
67+
"src/core/token-savings.ts",
68+
"src/core/types.ts",
69+
"src/core/validator.ts",
70+
"src/outputs/context-delta.ts",
71+
"src/outputs/contract-validator.ts",
72+
"src/outputs/dependency-graph.ts",
73+
"src/outputs/execution-trace.ts",
74+
"src/outputs/impact.ts",
75+
"src/outputs/loop-controller.ts",
76+
"src/outputs/markdown.ts",
77+
"src/outputs/policy-engine.ts",
78+
"src/outputs/rag.ts",
79+
"src/outputs/task-context.ts",
80+
"src/outputs/task-harness.ts",
81+
"src/outputs/task-run.ts",
82+
"src/outputs/test-selector.ts",
83+
"src/outputs/writer.ts",
84+
"src/retrievers/index.ts",
85+
"test/context-delta.test.ts"
86+
],
87+
"affectedModules": [
88+
"benchmarks",
89+
"cli",
90+
"config",
91+
"core",
92+
"outputs",
93+
"retrievers",
94+
"root",
95+
"test"
96+
],
97+
"affectedOutputs": [
98+
"agent-guide",
99+
"architecture",
100+
"contracts",
101+
"dependency-graph",
102+
"index",
103+
"key-files",
104+
"manifest",
105+
"module-map",
106+
"rag",
107+
"readiness",
108+
"repo-summary",
109+
"task-packs",
110+
"token-savings"
111+
],
112+
"staleOutputs": [
113+
".agent-context/AGENTS.generated.md",
114+
".agent-context/architecture.md",
115+
".agent-context/context-layers.md",
116+
".agent-context/contracts/architecture.contract.json",
117+
".agent-context/contracts/module-boundaries.json",
118+
".agent-context/contracts/test.contract.json",
119+
".agent-context/dependency-graph.md",
120+
".agent-context/graphs/dependencies.json",
121+
".agent-context/graphs/dependencies.mmd",
122+
".agent-context/index/chunks.json",
123+
".agent-context/index/files.json",
124+
".agent-context/index/modules.json",
125+
".agent-context/index/symbols.json",
126+
".agent-context/key-files.md",
127+
".agent-context/manifest.json",
128+
".agent-context/module-map.md",
129+
".agent-context/onboarding.md",
130+
".agent-context/rag/README.md",
131+
".agent-context/rag/documents.jsonl",
132+
".agent-context/rag/manifest.json",
133+
".agent-context/readiness.json",
134+
".agent-context/readiness.md",
135+
".agent-context/repo-summary.md",
136+
".agent-context/tasks/bugfix-context.md",
137+
".agent-context/tasks/feature-context.md",
138+
".agent-context/tasks/refactor-context.md",
139+
".agent-context/token-savings.json",
140+
".agent-context/token-savings.md",
141+
"AGENTS.md"
142+
],
143+
"agentMustReRead": [
144+
"README.en.md",
145+
"README.md",
146+
"README.zh-CN.md",
147+
"src/benchmarks/benchmark.ts",
148+
"src/cli/index.ts",
149+
"src/cli/task-args.ts",
150+
"src/config/starter-config.ts",
151+
"src/core/context-builder.ts",
152+
"src/core/freshness.ts",
153+
"src/core/git.ts",
154+
"src/core/readiness.ts",
155+
"src/core/token-estimator.ts",
156+
"src/core/token-savings.ts",
157+
"src/core/types.ts",
158+
"src/core/validator.ts",
159+
"src/mcp/server.ts",
160+
"src/outputs/context-delta.ts",
161+
"src/outputs/contract-validator.ts",
162+
"src/outputs/dependency-graph.ts",
163+
"src/outputs/execution-trace.ts",
164+
"src/outputs/impact.ts",
165+
"src/outputs/loop-controller.ts",
166+
"src/outputs/markdown.ts",
167+
"src/outputs/policy-engine.ts",
168+
"src/outputs/rag.ts",
169+
"src/outputs/task-context.ts",
170+
"src/outputs/task-harness.ts",
171+
"src/outputs/task-run.ts",
172+
"src/outputs/test-selector.ts",
173+
"src/outputs/writer.ts",
174+
"src/retrievers/index.ts",
175+
"test/context-delta.test.ts",
176+
"test/fixtures/monorepo/packages/api/src/index.ts",
177+
"test/fixtures/monorepo/packages/web/src/index.ts"
178+
],
179+
"taskPacksToRefresh": [
180+
"bugfix",
181+
"feature",
182+
"refactor"
183+
],
184+
"reasons": [
185+
"6 changed file(s) detected from git diff/status.",
186+
"31 graph node(s) are adjacent to changed files.",
187+
"8 module(s) may need refreshed summaries or boundaries.",
188+
"13 context output area(s) are marked stale."
189+
],
190+
"recommendedCommand": "repo-context evolve . --base main"
191+
}

.agent-context/delta/latest.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Context Delta
2+
3+
Base: main
4+
Impact: high
5+
Recommended: repo-context evolve . --base main
6+
7+
## What Changed In Repo
8+
| File | Status | Kind | Module |
9+
| --- | --- | --- | --- |
10+
| `README.en.md` | modified | docs | root |
11+
| `README.md` | modified | docs | root |
12+
| `README.zh-CN.md` | modified | docs | root |
13+
| `src/cli/index.ts` | modified | source | cli |
14+
| `src/outputs/context-delta.ts` | added | source | outputs |
15+
| `test/context-delta.test.ts` | added | test | test |
16+
17+
## What Context Must Update
18+
- `.agent-context/AGENTS.generated.md`
19+
- `.agent-context/architecture.md`
20+
- `.agent-context/context-layers.md`
21+
- `.agent-context/contracts/architecture.contract.json`
22+
- `.agent-context/contracts/module-boundaries.json`
23+
- `.agent-context/contracts/test.contract.json`
24+
- `.agent-context/dependency-graph.md`
25+
- `.agent-context/graphs/dependencies.json`
26+
- `.agent-context/graphs/dependencies.mmd`
27+
- `.agent-context/index/chunks.json`
28+
- `.agent-context/index/files.json`
29+
- `.agent-context/index/modules.json`
30+
- `.agent-context/index/symbols.json`
31+
- `.agent-context/key-files.md`
32+
- `.agent-context/manifest.json`
33+
- `.agent-context/module-map.md`
34+
- `.agent-context/onboarding.md`
35+
- `.agent-context/rag/README.md`
36+
- `.agent-context/rag/documents.jsonl`
37+
- `.agent-context/rag/manifest.json`
38+
- `.agent-context/readiness.json`
39+
- `.agent-context/readiness.md`
40+
- `.agent-context/repo-summary.md`
41+
- `.agent-context/tasks/bugfix-context.md`
42+
- `.agent-context/tasks/feature-context.md`
43+
- `.agent-context/tasks/refactor-context.md`
44+
- `.agent-context/token-savings.json`
45+
- `.agent-context/token-savings.md`
46+
- `AGENTS.md`
47+
48+
## Affected Graph Nodes
49+
- `README.en.md`
50+
- `README.md`
51+
- `README.zh-CN.md`
52+
- `src/benchmarks/benchmark.ts`
53+
- `src/cli/index.ts`
54+
- `src/cli/task-args.ts`
55+
- `src/config/starter-config.ts`
56+
- `src/core/context-builder.ts`
57+
- `src/core/freshness.ts`
58+
- `src/core/git.ts`
59+
- `src/core/readiness.ts`
60+
- `src/core/token-estimator.ts`
61+
- `src/core/token-savings.ts`
62+
- `src/core/types.ts`
63+
- `src/core/validator.ts`
64+
- `src/outputs/context-delta.ts`
65+
- `src/outputs/contract-validator.ts`
66+
- `src/outputs/dependency-graph.ts`
67+
- `src/outputs/execution-trace.ts`
68+
- `src/outputs/impact.ts`
69+
- `src/outputs/loop-controller.ts`
70+
- `src/outputs/markdown.ts`
71+
- `src/outputs/policy-engine.ts`
72+
- `src/outputs/rag.ts`
73+
- `src/outputs/task-context.ts`
74+
- `src/outputs/task-harness.ts`
75+
- `src/outputs/task-run.ts`
76+
- `src/outputs/test-selector.ts`
77+
- `src/outputs/writer.ts`
78+
- `src/retrievers/index.ts`
79+
- `test/context-delta.test.ts`
80+
81+
## Affected Modules
82+
- `benchmarks`
83+
- `cli`
84+
- `config`
85+
- `core`
86+
- `outputs`
87+
- `retrievers`
88+
- `root`
89+
- `test`
90+
91+
## What Agent Must Re-read
92+
- `README.en.md`
93+
- `README.md`
94+
- `README.zh-CN.md`
95+
- `src/benchmarks/benchmark.ts`
96+
- `src/cli/index.ts`
97+
- `src/cli/task-args.ts`
98+
- `src/config/starter-config.ts`
99+
- `src/core/context-builder.ts`
100+
- `src/core/freshness.ts`
101+
- `src/core/git.ts`
102+
- `src/core/readiness.ts`
103+
- `src/core/token-estimator.ts`
104+
- `src/core/token-savings.ts`
105+
- `src/core/types.ts`
106+
- `src/core/validator.ts`
107+
- `src/mcp/server.ts`
108+
- `src/outputs/context-delta.ts`
109+
- `src/outputs/contract-validator.ts`
110+
- `src/outputs/dependency-graph.ts`
111+
- `src/outputs/execution-trace.ts`
112+
- `src/outputs/impact.ts`
113+
- `src/outputs/loop-controller.ts`
114+
- `src/outputs/markdown.ts`
115+
- `src/outputs/policy-engine.ts`
116+
- `src/outputs/rag.ts`
117+
- `src/outputs/task-context.ts`
118+
- `src/outputs/task-harness.ts`
119+
- `src/outputs/task-run.ts`
120+
- `src/outputs/test-selector.ts`
121+
- `src/outputs/writer.ts`
122+
- `src/retrievers/index.ts`
123+
- `test/context-delta.test.ts`
124+
- `test/fixtures/monorepo/packages/api/src/index.ts`
125+
- `test/fixtures/monorepo/packages/web/src/index.ts`
126+
127+
## Task Packs To Refresh
128+
- `bugfix`
129+
- `feature`
130+
- `refactor`
131+
132+
## Reasons
133+
- 6 changed file(s) detected from git diff/status.
134+
- 31 graph node(s) are adjacent to changed files.
135+
- 8 module(s) may need refreshed summaries or boundaries.
136+
- 13 context output area(s) are marked stale.

.agent-context/dependency-graph.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ graph TD
4747
| cli | benchmarks | 1 |
4848
| cli | config | 1 |
4949
| cli | core | 8 |
50-
| cli | outputs | 12 |
50+
| cli | outputs | 13 |
5151
| cli | retrievers | 1 |
5252
| config | core | 2 |
5353
| core | analyzers | 4 |
@@ -58,15 +58,15 @@ graph TD
5858
| mcp | core | 1 |
5959
| mcp | outputs | 5 |
6060
| mcp | retrievers | 2 |
61-
| outputs | core | 36 |
61+
| outputs | core | 38 |
6262
| retrievers | core | 3 |
6363
| retrievers | outputs | 2 |
6464
| test | analyzers | 3 |
6565
| test | benchmarks | 1 |
6666
| test | cli | 1 |
6767
| test | config | 3 |
68-
| test | core | 33 |
68+
| test | core | 36 |
6969
| test | mcp | 1 |
70-
| test | outputs | 19 |
70+
| test | outputs | 21 |
7171
| test | retrievers | 1 |
7272
| test/fixtures/monorepo/packages/web | test/fixtures/monorepo/packages/api | 1 |

0 commit comments

Comments
 (0)