coding-agent-harness 1.0.1 → 1.0.2
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/CHANGELOG.md +19 -0
- package/README.en-US.md +14 -0
- package/README.md +111 -86
- package/README.zh-CN.md +270 -0
- package/SKILL.md +116 -189
- package/docs-release/README.md +72 -5
- package/docs-release/architecture/overview.md +286 -28
- package/docs-release/architecture/overview.zh-CN.md +288 -0
- package/docs-release/assets/dashboard-overview-en.png +0 -0
- package/docs-release/assets/harness-architecture.svg +163 -0
- package/docs-release/assets/harness-workflow.svg +64 -0
- package/docs-release/guides/agent-installation.en-US.md +214 -0
- package/docs-release/guides/agent-installation.md +123 -26
- package/docs-release/guides/document-audience-and-surfaces.en-US.md +112 -0
- package/docs-release/guides/document-audience-and-surfaces.md +112 -0
- package/docs-release/guides/full-legacy-migration-subagent-strategy.md +334 -0
- package/docs-release/guides/full-legacy-migration-subagent-strategy.zh-CN.md +334 -0
- package/docs-release/guides/legacy-migration-agent-prompt.md +384 -0
- package/docs-release/guides/legacy-migration-agent-prompt.zh-CN.md +361 -0
- package/docs-release/guides/migration-playbook.en-US.md +325 -0
- package/docs-release/guides/migration-playbook.md +329 -0
- package/docs-release/guides/parent-control-repository-pattern.en-US.md +252 -0
- package/docs-release/guides/parent-control-repository-pattern.md +252 -0
- package/docs-release/guides/repository-operating-models.en-US.md +196 -0
- package/docs-release/guides/repository-operating-models.md +196 -0
- package/docs-release/intl/README.md +15 -0
- package/docs-release/intl/de-DE.md +18 -0
- package/docs-release/intl/en-US.md +18 -0
- package/docs-release/intl/es-ES.md +18 -0
- package/docs-release/intl/fr-FR.md +18 -0
- package/docs-release/intl/ja-JP.md +18 -0
- package/docs-release/intl/ko-KR.md +18 -0
- package/docs-release/intl/zh-CN.md +18 -0
- package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/brief.md +13 -0
- package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/lesson_candidates.md +24 -0
- package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/progress.md +1 -1
- package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/task_plan.md +4 -2
- package/examples/minimal-project/docs/09-PLANNING/TASKS/demo-task/{visual_roadmap.md → visual_map.md} +9 -1
- package/package.json +3 -1
- package/references/agents-md-pattern.md +3 -3
- package/references/docs-directory-standard.md +47 -3
- package/references/external-source-intake-standard.md +75 -0
- package/references/harness-ledger.md +5 -3
- package/references/legacy-12-phase-bootstrap.md +41 -0
- package/references/lessons-governance.md +23 -6
- package/references/planning-loop.md +41 -3
- package/references/project-onboarding-audit.md +10 -0
- package/references/repo-governance-standard.md +2 -0
- package/references/testing-standard.md +50 -0
- package/references/walkthrough-closeout.md +6 -5
- package/scripts/check-harness.mjs +76 -35
- package/scripts/harness.mjs +303 -12
- package/scripts/lib/capability-registry.mjs +533 -0
- package/scripts/lib/check-profiles.mjs +510 -0
- package/scripts/lib/core-shared.mjs +186 -0
- package/scripts/lib/dashboard-data.mjs +389 -0
- package/scripts/lib/dashboard-workbench.mjs +217 -0
- package/scripts/lib/dashboard-writer.mjs +93 -2
- package/scripts/lib/harness-core.mjs +10 -1318
- package/scripts/lib/lesson-maintenance.mjs +145 -0
- package/scripts/lib/markdown-utils.mjs +158 -0
- package/scripts/lib/migration-planner.mjs +478 -0
- package/scripts/lib/migration-support.mjs +312 -0
- package/scripts/lib/task-lifecycle.mjs +755 -0
- package/scripts/lib/task-scanner.mjs +682 -0
- package/scripts/smoke-dashboard.mjs +22 -0
- package/scripts/test-harness.mjs +926 -14
- package/templates/AGENTS.md.template +41 -30
- package/templates/architecture/Architecture-SSoT.md +21 -0
- package/templates/architecture/README.md +49 -0
- package/templates/architecture/critical-flows.md +22 -0
- package/templates/architecture/local-repo-context.md +20 -0
- package/templates/architecture/service-catalog.md +17 -0
- package/templates/architecture/services/service-template.md +31 -0
- package/templates/architecture/system-map.md +22 -0
- package/templates/dashboard/assets/app-src/00-state.js +41 -0
- package/templates/dashboard/assets/app-src/10-router.js +76 -0
- package/templates/dashboard/assets/app-src/20-overview.js +235 -0
- package/templates/dashboard/assets/app-src/30-tasks.js +563 -0
- package/templates/dashboard/assets/app-src/40-modules.js +58 -0
- package/templates/dashboard/assets/app-src/45-review.js +128 -0
- package/templates/dashboard/assets/app-src/50-migration.js +169 -0
- package/templates/dashboard/assets/app-src/60-shared.js +61 -0
- package/templates/dashboard/assets/app-src/90-bindings.js +382 -0
- package/templates/dashboard/assets/app.css +2575 -310
- package/templates/dashboard/assets/app.js +1498 -307
- package/templates/dashboard/assets/app.manifest.json +11 -0
- package/templates/dashboard/assets/i18n.js +429 -44
- package/templates/dashboard/assets/mermaid-renderer.js +58 -8
- package/templates/development/README.md +52 -0
- package/templates/development/codebase-map.md +11 -0
- package/templates/development/cross-repo-debugging.md +18 -0
- package/templates/development/external-context/service-template.md +33 -0
- package/templates/development/external-source-packs/README.md +24 -0
- package/templates/development/external-source-packs/digest-template.md +28 -0
- package/templates/development/local-setup.md +16 -0
- package/templates/development/stubs-and-mocks.md +11 -0
- package/templates/integrations/README.md +40 -0
- package/templates/integrations/api-contract.md +42 -0
- package/templates/integrations/event-contract.md +46 -0
- package/templates/integrations/third-party/vendor-template.md +42 -0
- package/templates/integrations/webhook-contract.md +41 -0
- package/templates/planning/brief.md +32 -0
- package/templates/planning/lesson_candidates.md +58 -0
- package/templates/planning/long-running-task-contract.md +7 -0
- package/templates/planning/module_brief.md +25 -0
- package/templates/planning/module_session_prompt.md +6 -0
- package/templates/planning/task_plan.md +7 -5
- package/templates/planning/{visual_roadmap.md → visual_map.md} +24 -2
- package/templates/reference/docs-library-standard.md +31 -0
- package/templates/reference/execution-workflow-standard.md +4 -2
- package/templates/reference/external-source-intake-standard.md +82 -0
- package/templates/reference/harness-ledger-standard.md +1 -0
- package/templates/reference/repo-governance-standard.md +6 -4
- package/templates/reference/walkthrough-standard.md +2 -1
- package/templates/walkthrough/walkthrough-template.md +2 -2
- package/templates-zh-CN/AGENTS.md.template +69 -70
- package/templates-zh-CN/architecture/Architecture-SSoT.md +21 -0
- package/templates-zh-CN/architecture/README.md +51 -0
- package/templates-zh-CN/architecture/critical-flows.md +24 -0
- package/templates-zh-CN/architecture/local-repo-context.md +20 -0
- package/templates-zh-CN/architecture/service-catalog.md +17 -0
- package/templates-zh-CN/architecture/services/service-template.md +31 -0
- package/templates-zh-CN/architecture/system-map.md +22 -0
- package/templates-zh-CN/development/README.md +54 -0
- package/templates-zh-CN/development/codebase-map.md +11 -0
- package/templates-zh-CN/development/cross-repo-debugging.md +18 -0
- package/templates-zh-CN/development/external-context/service-template.md +33 -0
- package/templates-zh-CN/development/external-source-packs/README.md +24 -0
- package/templates-zh-CN/development/external-source-packs/digest-template.md +28 -0
- package/templates-zh-CN/development/local-setup.md +16 -0
- package/templates-zh-CN/development/stubs-and-mocks.md +11 -0
- package/templates-zh-CN/integrations/README.md +42 -0
- package/templates-zh-CN/integrations/api-contract.md +42 -0
- package/templates-zh-CN/integrations/event-contract.md +46 -0
- package/templates-zh-CN/integrations/third-party/vendor-template.md +42 -0
- package/templates-zh-CN/integrations/webhook-contract.md +41 -0
- package/templates-zh-CN/planning/brief.md +32 -0
- package/templates-zh-CN/planning/lesson_candidates.md +58 -0
- package/templates-zh-CN/planning/long-running-task-contract.md +1 -1
- package/templates-zh-CN/planning/module_brief.md +25 -0
- package/templates-zh-CN/planning/module_plan.md +2 -2
- package/templates-zh-CN/planning/module_session_prompt.md +4 -3
- package/templates-zh-CN/planning/task_plan.md +10 -4
- package/templates-zh-CN/planning/{visual_roadmap.md → visual_map.md} +21 -2
- package/templates-zh-CN/reference/docs-library-standard.md +35 -0
- package/templates-zh-CN/reference/execution-workflow-standard.md +9 -2
- package/templates-zh-CN/reference/external-source-intake-standard.md +82 -0
- package/templates-zh-CN/reference/harness-ledger-standard.md +5 -2
- package/templates-zh-CN/reference/repo-governance-standard.md +2 -0
- package/templates-zh-CN/reference/walkthrough-standard.md +4 -4
- package/templates-zh-CN/walkthrough/Closeout-SSoT.md +2 -2
- package/templates-zh-CN/walkthrough/walkthrough-template.md +2 -2
- package/templates-zh-CN/dashboard/assets/app.css +0 -399
- package/templates-zh-CN/dashboard/assets/app.js +0 -435
- package/templates-zh-CN/dashboard/assets/i18n.js +0 -47
- package/templates-zh-CN/dashboard/assets/markdown-reader.js +0 -116
- package/templates-zh-CN/dashboard/assets/mermaid-renderer.js +0 -59
- package/templates-zh-CN/dashboard/index.html +0 -18
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# Parent-Control Repository Pattern
|
|
2
|
+
|
|
3
|
+
Chinese mirror: `docs-release/guides/parent-control-repository-pattern.md`
|
|
4
|
+
|
|
5
|
+
The parent-control repository pattern is a repository organization model for multi-repo Coding Agent Harness projects.
|
|
6
|
+
|
|
7
|
+
Its core rule is:
|
|
8
|
+
|
|
9
|
+
> Business code may be distributed across many repositories, but the agent operating contract must not be distributed.
|
|
10
|
+
|
|
11
|
+
The parent repository owns the harness. Child repositories own implementation facts.
|
|
12
|
+
|
|
13
|
+
## Why This Pattern Exists
|
|
14
|
+
|
|
15
|
+
Multi-repo projects often run into these failures:
|
|
16
|
+
|
|
17
|
+
- Frontend, backend, SDK, and services each have their own plans, and no one can tell where the global release is blocked.
|
|
18
|
+
- An agent starts inside a child repository, reads only local `AGENTS.md`, and misses cross-repo architecture constraints.
|
|
19
|
+
- Each repository maintains its own Feature SSoT, and the states conflict.
|
|
20
|
+
- Review evidence, test evidence, and walkthroughs are scattered across repositories, making it hard to prove that a cross-repo task is complete.
|
|
21
|
+
|
|
22
|
+
The parent-control pattern solves a control-plane problem. It does not force code back into a monorepo. It moves the harness source of truth into one place.
|
|
23
|
+
|
|
24
|
+
## Basic Topology
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
product-control-repo/
|
|
28
|
+
AGENTS.md
|
|
29
|
+
README.md
|
|
30
|
+
docs/
|
|
31
|
+
01-GOVERNANCE/
|
|
32
|
+
02-PRODUCT/
|
|
33
|
+
03-ARCHITECTURE/
|
|
34
|
+
04-DEVELOPMENT/
|
|
35
|
+
05-TEST-QA/
|
|
36
|
+
06-INTEGRATIONS/
|
|
37
|
+
09-PLANNING/
|
|
38
|
+
10-WALKTHROUGH/
|
|
39
|
+
11-REFERENCE/
|
|
40
|
+
tools/
|
|
41
|
+
check-harness.mjs
|
|
42
|
+
internal-ci.mjs
|
|
43
|
+
frontend/ -> child repository
|
|
44
|
+
backend/ -> child repository
|
|
45
|
+
sdk/ -> child repository
|
|
46
|
+
services/auth/ -> child repository
|
|
47
|
+
services/bill/ -> child repository
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Child repositories can be git submodules, git subtrees, workspace checkouts, fixed local paths, or entries in an internal repo registry. The technical mechanism matters less than ownership of facts:
|
|
51
|
+
|
|
52
|
+
- The parent repository records global plans and evidence.
|
|
53
|
+
- Child repositories record code and local verification.
|
|
54
|
+
|
|
55
|
+
## Parent Repository Responsibilities
|
|
56
|
+
|
|
57
|
+
The parent repository is the control plane.
|
|
58
|
+
|
|
59
|
+
It should contain:
|
|
60
|
+
|
|
61
|
+
- `AGENTS.md`: the single agent startup entrypoint and reading matrix.
|
|
62
|
+
- `docs/03-ARCHITECTURE/repository-topology.md`: repository topology, owners, boundaries, dependency direction.
|
|
63
|
+
- `docs/04-DEVELOPMENT/local-development.md`: cross-repo local startup, integration workflow, dependency setup.
|
|
64
|
+
- `docs/06-INTEGRATIONS/`: cross-service APIs, events, SDKs, databases, permissions, and external contracts.
|
|
65
|
+
- `docs/09-PLANNING/Feature-SSoT.md`: global feature and release state.
|
|
66
|
+
- `docs/09-PLANNING/TASKS/`: cross-repo task contracts.
|
|
67
|
+
- `docs/05-TEST-QA/Regression-SSoT.md`: cross-repo regression gates.
|
|
68
|
+
- `docs/05-TEST-QA/Cadence-Ledger.md`: which changes trigger which checks.
|
|
69
|
+
- `docs/10-WALKTHROUGH/`: cross-repo closeout and human confirmation.
|
|
70
|
+
- `docs/11-REFERENCE/`: local standards for using Harness in this project.
|
|
71
|
+
|
|
72
|
+
The parent repository should also provide a check command, for example:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
node tools/check-harness.mjs
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
At minimum, that command should verify:
|
|
79
|
+
|
|
80
|
+
- Required harness files exist.
|
|
81
|
+
- `AGENTS.md` contains repo topology and child repo routing.
|
|
82
|
+
- Current tasks have planning, progress, review, or closeout state.
|
|
83
|
+
- Cross-repo regression gates have owners and evidence.
|
|
84
|
+
- Child repo pointers, branches, commits, or release versions are recorded.
|
|
85
|
+
|
|
86
|
+
## Child Repository Responsibilities
|
|
87
|
+
|
|
88
|
+
Child repositories are the execution plane.
|
|
89
|
+
|
|
90
|
+
They should contain:
|
|
91
|
+
|
|
92
|
+
- Local `AGENTS.md`: repository rules, commands, stack, and test workflow.
|
|
93
|
+
- Code, dependencies, lockfiles, and CI.
|
|
94
|
+
- Repository-local reviews or pull requests.
|
|
95
|
+
- Repository-local test evidence.
|
|
96
|
+
|
|
97
|
+
Child repositories should not independently maintain the global Feature SSoT, and they should not decide whether a cross-repo release is complete.
|
|
98
|
+
|
|
99
|
+
A child repository `AGENTS.md` can be short:
|
|
100
|
+
|
|
101
|
+
````md
|
|
102
|
+
# Backend Agent Guide
|
|
103
|
+
|
|
104
|
+
This child repository owns the backend implementation.
|
|
105
|
+
Parent-level planning, architecture, and cross-repo closeout live in `../docs/`.
|
|
106
|
+
|
|
107
|
+
## Rules
|
|
108
|
+
|
|
109
|
+
1. Keep API contracts aligned with the parent task plan.
|
|
110
|
+
2. Do not change frontend or SDK assumptions without updating the parent integration docs.
|
|
111
|
+
3. Run `npm run typecheck` after TypeScript changes.
|
|
112
|
+
|
|
113
|
+
## Commands
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
npm install
|
|
117
|
+
npm run typecheck
|
|
118
|
+
npm test
|
|
119
|
+
```
|
|
120
|
+
````
|
|
121
|
+
|
|
122
|
+
## Agent Startup Rule
|
|
123
|
+
|
|
124
|
+
In the parent-control model, the default rule is:
|
|
125
|
+
|
|
126
|
+
1. The agent starts from the parent repository.
|
|
127
|
+
2. The agent reads the parent `AGENTS.md`.
|
|
128
|
+
3. The agent reads parent architecture, development, integration, planning, and regression docs based on the task type.
|
|
129
|
+
4. The agent enters one or more child repositories to make code changes.
|
|
130
|
+
5. The agent runs local checks inside child repositories.
|
|
131
|
+
6. The agent returns to the parent repository to record global evidence, review, walkthrough, and residuals.
|
|
132
|
+
|
|
133
|
+
Do not let agents start cross-repo tasks from random child repositories. They will naturally miss global context.
|
|
134
|
+
|
|
135
|
+
## Cross-Repo Task Contract
|
|
136
|
+
|
|
137
|
+
Cross-repo tasks should be created in the parent repository:
|
|
138
|
+
|
|
139
|
+
```text
|
|
140
|
+
docs/09-PLANNING/TASKS/2026-05-22-example-cross-repo-feature/
|
|
141
|
+
brief.md
|
|
142
|
+
task_plan.md
|
|
143
|
+
execution_strategy.md
|
|
144
|
+
visual_map.md
|
|
145
|
+
progress.md
|
|
146
|
+
review.md
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
The task plan should state:
|
|
150
|
+
|
|
151
|
+
- Which child repositories will be modified.
|
|
152
|
+
- The write scope for each child repository.
|
|
153
|
+
- Where shared contracts live, such as API schema, SDK types, or event format.
|
|
154
|
+
- Which local checks each child repository must run.
|
|
155
|
+
- The final cross-repo regression gate.
|
|
156
|
+
- Who updates the parent global SSoT and walkthrough.
|
|
157
|
+
|
|
158
|
+
A child repository commit is not the end of the task. It is evidence for the parent task.
|
|
159
|
+
|
|
160
|
+
## What To Put In Architecture / Development / Integration
|
|
161
|
+
|
|
162
|
+
In the parent-control model, the parent repository must document more external context than a single-repo project.
|
|
163
|
+
|
|
164
|
+
### Architecture
|
|
165
|
+
|
|
166
|
+
`docs/03-ARCHITECTURE/` explains how the system is split across repositories:
|
|
167
|
+
|
|
168
|
+
- Repo topology.
|
|
169
|
+
- Service boundaries.
|
|
170
|
+
- Data flow.
|
|
171
|
+
- Dependency direction.
|
|
172
|
+
- Which repositories are product code and which are upstream references.
|
|
173
|
+
- Which interfaces must not be called across boundaries directly.
|
|
174
|
+
|
|
175
|
+
### Development
|
|
176
|
+
|
|
177
|
+
`docs/04-DEVELOPMENT/` explains cross-repo development:
|
|
178
|
+
|
|
179
|
+
- How to clone or initialize all child repositories.
|
|
180
|
+
- How to install dependencies.
|
|
181
|
+
- How to start the local integration environment.
|
|
182
|
+
- Which ports, environment variables, accounts, or fixtures are shared.
|
|
183
|
+
- How to validate the overall contract when only one child repository changed.
|
|
184
|
+
|
|
185
|
+
### Integration
|
|
186
|
+
|
|
187
|
+
`docs/06-INTEGRATIONS/` explains how repositories connect:
|
|
188
|
+
|
|
189
|
+
- API contract.
|
|
190
|
+
- SDK contract.
|
|
191
|
+
- Event contract.
|
|
192
|
+
- Database ownership.
|
|
193
|
+
- Auth boundary.
|
|
194
|
+
- Queue or topic ownership.
|
|
195
|
+
- External vendor integration.
|
|
196
|
+
- Breaking change policy.
|
|
197
|
+
|
|
198
|
+
If these external facts are missing, the parent repository becomes only a bigger task list, not a real control plane.
|
|
199
|
+
|
|
200
|
+
## Regression Strategy
|
|
201
|
+
|
|
202
|
+
The parent `Regression-SSoT.md` should not duplicate every child repository test. It should define layered gates:
|
|
203
|
+
|
|
204
|
+
| Gate | Location | Purpose |
|
|
205
|
+
| --- | --- | --- |
|
|
206
|
+
| Repo-local gate | Child repository | Prove local code did not break |
|
|
207
|
+
| Contract gate | Parent repo or shared package | Prove cross-repo interfaces did not drift |
|
|
208
|
+
| Integration gate | Parent tools or CI | Prove multiple child repositories can run together |
|
|
209
|
+
| Release gate | Parent repository | Prove the current feature or release can close |
|
|
210
|
+
|
|
211
|
+
Child repositories may run `npm test`, `pytest`, or `go test`. The parent repository projects those results into evidence that a release can understand.
|
|
212
|
+
|
|
213
|
+
## Many Microservices
|
|
214
|
+
|
|
215
|
+
If there are dozens or hundreds of repositories, do not hand-write long documentation for each one. The parent repository should maintain a repo registry:
|
|
216
|
+
|
|
217
|
+
```md
|
|
218
|
+
| Repo | Role | Owner | Local checks | Integration surface | Release critical |
|
|
219
|
+
| --- | --- | --- | --- | --- | --- |
|
|
220
|
+
| `services/auth` | auth service | platform | `go test ./...` | JWT, user session events | yes |
|
|
221
|
+
| `services/bill` | billing service | revenue | `npm test` | invoice events, payment API | yes |
|
|
222
|
+
| `frontend` | product shell | product | `npm run typecheck` | backend API, SDK client | yes |
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
The agent does not need to read all docs in 100 repositories at startup. It reads the parent task first, then enters only the repositories relevant to the current task.
|
|
226
|
+
|
|
227
|
+
## Anti-Patterns
|
|
228
|
+
|
|
229
|
+
Avoid:
|
|
230
|
+
|
|
231
|
+
- Each child repository maintaining its own global Feature SSoT.
|
|
232
|
+
- A parent repository with only a README and no task, regression, or closeout surface.
|
|
233
|
+
- Child `AGENTS.md` files copying large sections from the parent, causing drift.
|
|
234
|
+
- Starting cross-repo tasks from a child repository and backfilling parent records at the end.
|
|
235
|
+
- Putting all business code directly in the parent repository and losing independent release ability.
|
|
236
|
+
- Recording only child repository test passes without contract and release gates.
|
|
237
|
+
|
|
238
|
+
## Minimum Adoption Checklist
|
|
239
|
+
|
|
240
|
+
To adopt the parent-control model, start with:
|
|
241
|
+
|
|
242
|
+
- Parent `AGENTS.md` states that this is the control repository.
|
|
243
|
+
- `docs/03-ARCHITECTURE/repository-topology.md` lists all child repositories.
|
|
244
|
+
- `docs/09-PLANNING/Feature-SSoT.md` is the global feature source of truth.
|
|
245
|
+
- `docs/05-TEST-QA/Regression-SSoT.md` defines local, contract, integration, and release gates.
|
|
246
|
+
- Each child repository has only a short local `AGENTS.md`.
|
|
247
|
+
- New cross-repo tasks are created only in the parent repository.
|
|
248
|
+
- Child commits, PRs, and test output are recorded as parent task evidence.
|
|
249
|
+
|
|
250
|
+
## One Sentence
|
|
251
|
+
|
|
252
|
+
The parent-control repository pattern does not add a repository for its own sake. It gives a multi-repo product one harness brain.
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# 主控仓库模式
|
|
2
|
+
|
|
3
|
+
English mirror: `docs-release/guides/parent-control-repository-pattern.en-US.md`
|
|
4
|
+
|
|
5
|
+
主控仓库模式是一种多仓库 Coding Agent Harness 组织方式。
|
|
6
|
+
|
|
7
|
+
它的核心判断是:
|
|
8
|
+
|
|
9
|
+
> 业务代码可以分散在很多仓库,但 Agent 的运行合同不能分散。
|
|
10
|
+
|
|
11
|
+
父仓库管理 Harness。子仓库管理代码执行事实。
|
|
12
|
+
|
|
13
|
+
## 为什么需要这个模式
|
|
14
|
+
|
|
15
|
+
多仓项目里,经常出现这些问题:
|
|
16
|
+
|
|
17
|
+
- 前端、后端、SDK、微服务各有自己的计划,没人知道全局 release 到底卡在哪里。
|
|
18
|
+
- Agent 从某个子仓库启动,只看到局部 `AGENTS.md`,忽略了跨仓架构约束。
|
|
19
|
+
- 每个仓库各自维护 Feature SSoT,状态互相冲突。
|
|
20
|
+
- Review 证据、测试证据、walkthrough 分散在不同仓库,最后无法证明一个跨仓任务真正完成。
|
|
21
|
+
|
|
22
|
+
主控仓库模式解决的是控制面问题。它不是要求把代码放回单仓,而是把 Harness 的事实源收回一个地方。
|
|
23
|
+
|
|
24
|
+
## 基本拓扑
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
product-control-repo/
|
|
28
|
+
AGENTS.md
|
|
29
|
+
README.md
|
|
30
|
+
docs/
|
|
31
|
+
01-GOVERNANCE/
|
|
32
|
+
02-PRODUCT/
|
|
33
|
+
03-ARCHITECTURE/
|
|
34
|
+
04-DEVELOPMENT/
|
|
35
|
+
05-TEST-QA/
|
|
36
|
+
06-INTEGRATIONS/
|
|
37
|
+
09-PLANNING/
|
|
38
|
+
10-WALKTHROUGH/
|
|
39
|
+
11-REFERENCE/
|
|
40
|
+
tools/
|
|
41
|
+
check-harness.mjs
|
|
42
|
+
internal-ci.mjs
|
|
43
|
+
frontend/ -> child repository
|
|
44
|
+
backend/ -> child repository
|
|
45
|
+
sdk/ -> child repository
|
|
46
|
+
services/auth/ -> child repository
|
|
47
|
+
services/bill/ -> child repository
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
子仓库可以是 git submodule、git subtree、workspace checkout、固定路径约定,或由内部工具解析的 repo registry。关键不是技术形式,而是事实归属:
|
|
51
|
+
|
|
52
|
+
- 父仓库记录全局计划和证据。
|
|
53
|
+
- 子仓库记录代码和局部验证。
|
|
54
|
+
|
|
55
|
+
## 父仓库职责
|
|
56
|
+
|
|
57
|
+
父仓库是 control plane。
|
|
58
|
+
|
|
59
|
+
它应该包含:
|
|
60
|
+
|
|
61
|
+
- `AGENTS.md`:Agent 的唯一启动入口和读文件矩阵。
|
|
62
|
+
- `docs/03-ARCHITECTURE/repository-topology.md`:仓库拓扑、owner、边界、依赖方向。
|
|
63
|
+
- `docs/04-DEVELOPMENT/local-development.md`:跨仓本地启动、联调、依赖安装。
|
|
64
|
+
- `docs/06-INTEGRATIONS/`:跨服务 API、事件、SDK、数据库、权限、外部系统契约。
|
|
65
|
+
- `docs/09-PLANNING/Feature-SSoT.md`:全局 feature 和 release 状态。
|
|
66
|
+
- `docs/09-PLANNING/TASKS/`:跨仓任务合同。
|
|
67
|
+
- `docs/05-TEST-QA/Regression-SSoT.md`:跨仓 regression gates。
|
|
68
|
+
- `docs/05-TEST-QA/Cadence-Ledger.md`:哪些变更触发哪些检查。
|
|
69
|
+
- `docs/10-WALKTHROUGH/`:跨仓 closeout 和人工确认。
|
|
70
|
+
- `docs/11-REFERENCE/`:本项目使用 Harness 的本地标准。
|
|
71
|
+
|
|
72
|
+
父仓库还应该有一个检查命令,例如:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
node tools/check-harness.mjs
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
这个命令至少检查:
|
|
79
|
+
|
|
80
|
+
- 必需 Harness 文件存在。
|
|
81
|
+
- `AGENTS.md` 含有 repo topology 和子仓库路由。
|
|
82
|
+
- 当前任务有计划、进度、review 或 closeout 状态。
|
|
83
|
+
- 跨仓 regression gate 有 owner 和 evidence。
|
|
84
|
+
- 子仓库 pointer、branch、commit 或 release version 已记录。
|
|
85
|
+
|
|
86
|
+
## 子仓库职责
|
|
87
|
+
|
|
88
|
+
子仓库是 execution plane。
|
|
89
|
+
|
|
90
|
+
它应该包含:
|
|
91
|
+
|
|
92
|
+
- 局部 `AGENTS.md`:本仓库规则、命令、技术栈、测试方式。
|
|
93
|
+
- 代码、依赖、lockfile、CI。
|
|
94
|
+
- 本仓库局部 review 或 PR。
|
|
95
|
+
- 本仓库局部测试证据。
|
|
96
|
+
|
|
97
|
+
子仓库不应该单独维护全局 Feature SSoT,也不应该自己决定跨仓 release 是否完成。
|
|
98
|
+
|
|
99
|
+
一个子仓库 `AGENTS.md` 可以很短:
|
|
100
|
+
|
|
101
|
+
````md
|
|
102
|
+
# Backend Agent Guide
|
|
103
|
+
|
|
104
|
+
This child repository owns the backend implementation.
|
|
105
|
+
Parent-level planning, architecture, and cross-repo closeout live in `../docs/`.
|
|
106
|
+
|
|
107
|
+
## Rules
|
|
108
|
+
|
|
109
|
+
1. Keep API contracts aligned with the parent task plan.
|
|
110
|
+
2. Do not change frontend or SDK assumptions without updating the parent integration docs.
|
|
111
|
+
3. Run `npm run typecheck` after TypeScript changes.
|
|
112
|
+
|
|
113
|
+
## Commands
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
npm install
|
|
117
|
+
npm run typecheck
|
|
118
|
+
npm test
|
|
119
|
+
```
|
|
120
|
+
````
|
|
121
|
+
|
|
122
|
+
## Agent 启动规则
|
|
123
|
+
|
|
124
|
+
主控仓库模式下,默认规则是:
|
|
125
|
+
|
|
126
|
+
1. Agent 从父仓库启动。
|
|
127
|
+
2. Agent 先读父仓库 `AGENTS.md`。
|
|
128
|
+
3. Agent 根据任务类型读取父仓库的 architecture、development、integration、planning、regression 文档。
|
|
129
|
+
4. Agent 进入一个或多个子仓库执行代码变更。
|
|
130
|
+
5. Agent 在子仓库跑局部检查。
|
|
131
|
+
6. Agent 回到父仓库记录全局证据、review、walkthrough、residual。
|
|
132
|
+
|
|
133
|
+
不要让 Agent 直接从随机子仓库启动跨仓任务。那样它会天然缺少全局上下文。
|
|
134
|
+
|
|
135
|
+
## 跨仓任务合同
|
|
136
|
+
|
|
137
|
+
跨仓任务应该在父仓库创建:
|
|
138
|
+
|
|
139
|
+
```text
|
|
140
|
+
docs/09-PLANNING/TASKS/2026-05-22-example-cross-repo-feature/
|
|
141
|
+
brief.md
|
|
142
|
+
task_plan.md
|
|
143
|
+
execution_strategy.md
|
|
144
|
+
visual_map.md
|
|
145
|
+
progress.md
|
|
146
|
+
review.md
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
任务计划至少说明:
|
|
150
|
+
|
|
151
|
+
- 哪些子仓库会被修改。
|
|
152
|
+
- 每个子仓库的 write scope。
|
|
153
|
+
- 共享契约在哪里,例如 API schema、SDK type、事件格式。
|
|
154
|
+
- 每个子仓库要跑哪些局部检查。
|
|
155
|
+
- 最终跨仓 regression gate 是什么。
|
|
156
|
+
- 谁负责更新父仓库的全局 SSoT 和 walkthrough。
|
|
157
|
+
|
|
158
|
+
子仓库提交不是独立任务的终点,而是父任务的 evidence。
|
|
159
|
+
|
|
160
|
+
## Architecture / Development / Integration 要写什么
|
|
161
|
+
|
|
162
|
+
主控仓库模式下,父仓库必须比单仓项目多写三类外围事实。
|
|
163
|
+
|
|
164
|
+
### Architecture
|
|
165
|
+
|
|
166
|
+
`docs/03-ARCHITECTURE/` 说明系统如何被拆成多个仓库:
|
|
167
|
+
|
|
168
|
+
- repo topology。
|
|
169
|
+
- 服务边界。
|
|
170
|
+
- 数据流。
|
|
171
|
+
- 依赖方向。
|
|
172
|
+
- 哪些仓库是产品代码,哪些是 upstream reference。
|
|
173
|
+
- 哪些接口不能跨边界直接调用。
|
|
174
|
+
|
|
175
|
+
### Development
|
|
176
|
+
|
|
177
|
+
`docs/04-DEVELOPMENT/` 说明如何跨仓工作:
|
|
178
|
+
|
|
179
|
+
- 如何 clone 或初始化所有子仓库。
|
|
180
|
+
- 如何安装依赖。
|
|
181
|
+
- 如何启动本地联调环境。
|
|
182
|
+
- 哪些端口、环境变量、账号或 fixture 是共享的。
|
|
183
|
+
- 如何在只改一个子仓库时仍然验证整体契约。
|
|
184
|
+
|
|
185
|
+
### Integration
|
|
186
|
+
|
|
187
|
+
`docs/06-INTEGRATIONS/` 说明仓库之间如何对接:
|
|
188
|
+
|
|
189
|
+
- API contract。
|
|
190
|
+
- SDK contract。
|
|
191
|
+
- event contract。
|
|
192
|
+
- database ownership。
|
|
193
|
+
- auth boundary。
|
|
194
|
+
- queue/topic ownership。
|
|
195
|
+
- external vendor integration。
|
|
196
|
+
- breaking change policy。
|
|
197
|
+
|
|
198
|
+
如果这些外围事实不写,主控仓库只会变成一个更大的任务列表,而不会真正控制多仓协作。
|
|
199
|
+
|
|
200
|
+
## 回归策略
|
|
201
|
+
|
|
202
|
+
父仓库的 `Regression-SSoT.md` 不应该复制所有子仓库测试。它应该定义分层 gate:
|
|
203
|
+
|
|
204
|
+
| Gate | 位置 | 目的 |
|
|
205
|
+
| --- | --- | --- |
|
|
206
|
+
| Repo-local gate | 子仓库 | 证明局部代码没有坏 |
|
|
207
|
+
| Contract gate | 父仓库或共享包 | 证明跨仓接口没有漂移 |
|
|
208
|
+
| Integration gate | 父仓库工具或 CI | 证明多个子仓库可以一起运行 |
|
|
209
|
+
| Release gate | 父仓库 | 证明当前 feature/release 可以收口 |
|
|
210
|
+
|
|
211
|
+
子仓库可以自己跑 `npm test`、`pytest`、`go test`。父仓库负责把这些结果投影成 release 能看懂的证据。
|
|
212
|
+
|
|
213
|
+
## 微服务很多时怎么做
|
|
214
|
+
|
|
215
|
+
如果有几十个或上百个仓库,不要给每个仓库手写大段文档。父仓库应该维护 repo registry:
|
|
216
|
+
|
|
217
|
+
```md
|
|
218
|
+
| Repo | Role | Owner | Local checks | Integration surface | Release critical |
|
|
219
|
+
| --- | --- | --- | --- | --- | --- |
|
|
220
|
+
| `services/auth` | auth service | platform | `go test ./...` | JWT, user session events | yes |
|
|
221
|
+
| `services/bill` | billing service | revenue | `npm test` | invoice events, payment API | yes |
|
|
222
|
+
| `frontend` | product shell | product | `npm run typecheck` | backend API, SDK client | yes |
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Agent 不需要在启动时读 100 个仓库的所有文档。它先读父任务,再按 repo registry 进入本次相关的几个仓库。
|
|
226
|
+
|
|
227
|
+
## 反模式
|
|
228
|
+
|
|
229
|
+
避免这些做法:
|
|
230
|
+
|
|
231
|
+
- 每个子仓库各自维护全局 Feature SSoT。
|
|
232
|
+
- 父仓库只有 README,没有任务、回归和 closeout。
|
|
233
|
+
- 子仓库 `AGENTS.md` 复制父仓库大段内容,导致漂移。
|
|
234
|
+
- 跨仓任务从子仓库启动,最后再补父仓库记录。
|
|
235
|
+
- 父仓库直接承载所有业务代码,失去子仓库独立发布能力。
|
|
236
|
+
- 只记录子仓库测试通过,不记录跨仓 contract 和 release gate。
|
|
237
|
+
|
|
238
|
+
## 最小落地清单
|
|
239
|
+
|
|
240
|
+
采用主控仓库模式时,先做到这些:
|
|
241
|
+
|
|
242
|
+
- 父仓库 `AGENTS.md` 写清楚它是 control repo。
|
|
243
|
+
- `docs/03-ARCHITECTURE/repository-topology.md` 列出所有子仓库。
|
|
244
|
+
- `docs/09-PLANNING/Feature-SSoT.md` 成为全局 feature source of truth。
|
|
245
|
+
- `docs/05-TEST-QA/Regression-SSoT.md` 定义局部、契约、集成、发布 gate。
|
|
246
|
+
- 每个子仓库只有短的局部 `AGENTS.md`。
|
|
247
|
+
- 新跨仓任务只在父仓库创建。
|
|
248
|
+
- 子仓库 commit、PR、test output 都作为父任务 evidence。
|
|
249
|
+
|
|
250
|
+
## 一句话
|
|
251
|
+
|
|
252
|
+
主控仓库模式不是为了多建一个仓库,而是为了让多仓项目只有一个 Harness 大脑。
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
# Repository Operating Models
|
|
2
|
+
|
|
3
|
+
Chinese mirror: `docs-release/guides/repository-operating-models.md`
|
|
4
|
+
|
|
5
|
+
Coding Agent Harness can live inside different repository structures. If you choose the wrong one, the main problem is not "not enough docs." The harness itself becomes another source of confusion.
|
|
6
|
+
|
|
7
|
+
This guide explains three common models:
|
|
8
|
+
|
|
9
|
+
- Single-repo model: one code repository, one harness.
|
|
10
|
+
- Independent multi-repo model: multiple code repositories, each with its own harness.
|
|
11
|
+
- Parent-control repository model: one parent control repository owns the harness, while child repositories hold implementation facts.
|
|
12
|
+
|
|
13
|
+
## Quick Choice
|
|
14
|
+
|
|
15
|
+
| Model | Fits | Does not fit | Harness source of truth |
|
|
16
|
+
| --- | --- | --- | --- |
|
|
17
|
+
| Single repo | One product, one code repository, clear team boundary | A system already split across independently released repositories | Current repo `AGENTS.md` + `docs/` |
|
|
18
|
+
| Independent multi-repo | Frontend, backend, SDK, or services evolve independently and cross-repo work is rare | Frequent cross-repo features and one shared release plan | Each repo's own `AGENTS.md` + `docs/` |
|
|
19
|
+
| Parent-control repo | Microservices, many subsystems, shared roadmap, cross-repo releases, agents need one startup point | Small projects or short-lived script repositories | Parent repo `AGENTS.md` + `docs/` |
|
|
20
|
+
|
|
21
|
+
## Single-Repo Model
|
|
22
|
+
|
|
23
|
+
The single-repo model is the simplest. Code, plans, regression state, and walkthroughs live in one repository.
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
product-repo/
|
|
27
|
+
AGENTS.md
|
|
28
|
+
docs/
|
|
29
|
+
03-ARCHITECTURE/
|
|
30
|
+
04-DEVELOPMENT/
|
|
31
|
+
05-TEST-QA/
|
|
32
|
+
09-PLANNING/
|
|
33
|
+
10-WALKTHROUGH/
|
|
34
|
+
11-REFERENCE/
|
|
35
|
+
src/
|
|
36
|
+
tests/
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The agent starts at the repository root, reads `AGENTS.md`, then moves into task files and code.
|
|
40
|
+
|
|
41
|
+
### When To Choose It
|
|
42
|
+
|
|
43
|
+
- The application, service, script, or library is in one repository.
|
|
44
|
+
- A feature usually modifies only this repository.
|
|
45
|
+
- Regression commands can run inside one checkout.
|
|
46
|
+
- The team wants to adopt Harness quickly without first changing repository structure.
|
|
47
|
+
|
|
48
|
+
### Risk
|
|
49
|
+
|
|
50
|
+
When the project later splits into several repositories, the single-repo harness can lose global visibility. Frontend, backend, and SDK repositories may each have local state, but no single place explains whether the cross-repo task is actually complete.
|
|
51
|
+
|
|
52
|
+
## Independent Multi-Repo Model
|
|
53
|
+
|
|
54
|
+
The independent multi-repo model gives each repository its own harness.
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
frontend-repo/
|
|
58
|
+
AGENTS.md
|
|
59
|
+
docs/
|
|
60
|
+
|
|
61
|
+
backend-repo/
|
|
62
|
+
AGENTS.md
|
|
63
|
+
docs/
|
|
64
|
+
|
|
65
|
+
sdk-repo/
|
|
66
|
+
AGENTS.md
|
|
67
|
+
docs/
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Each repository entrypoint only governs that repository. Frontend tasks are planned and closed in the frontend repo. Backend tasks are planned and closed in the backend repo.
|
|
71
|
+
|
|
72
|
+
### When To Choose It
|
|
73
|
+
|
|
74
|
+
- The repositories are genuinely independent from an organizational point of view.
|
|
75
|
+
- Each repository has its own owners, release cadence, and review rules.
|
|
76
|
+
- Cross-repo tasks are rare, or humans coordinate them manually.
|
|
77
|
+
- One repository's harness should not know another repository's internal state.
|
|
78
|
+
|
|
79
|
+
### Required External Context
|
|
80
|
+
|
|
81
|
+
Independent multi-repo mode is not just "copy the template into every repo." If you do that, cross-repo context disappears.
|
|
82
|
+
|
|
83
|
+
Each repository should document its external boundary in:
|
|
84
|
+
|
|
85
|
+
- `docs/03-ARCHITECTURE/`: where this repository sits in the overall system.
|
|
86
|
+
- `docs/04-DEVELOPMENT/`: sibling repo dependencies and local integration startup.
|
|
87
|
+
- `docs/06-INTEGRATIONS/`: APIs, events, SDKs, queues, databases, auth, and other contracts.
|
|
88
|
+
- `docs/05-TEST-QA/Regression-SSoT.md`: which checks cover this repository only and which require integration across repositories.
|
|
89
|
+
- `AGENTS.md`: whether agents should stop, switch repositories, or ask humans when a task crosses repository boundaries.
|
|
90
|
+
|
|
91
|
+
### Risk
|
|
92
|
+
|
|
93
|
+
The risk is harness fragmentation:
|
|
94
|
+
|
|
95
|
+
- The frontend Feature SSoT says a task is complete while the backend Regression SSoT is still red.
|
|
96
|
+
- An SDK breaking change is not projected into the product shell.
|
|
97
|
+
- An agent starts from a child repository, sees only local facts, and incorrectly treats the global task as complete.
|
|
98
|
+
|
|
99
|
+
If this happens often, move to the parent-control repository model.
|
|
100
|
+
|
|
101
|
+
## Parent-Control Repository Model
|
|
102
|
+
|
|
103
|
+
The parent-control model puts the harness in a parent repository. Child repositories hold implementation facts.
|
|
104
|
+
|
|
105
|
+
```text
|
|
106
|
+
product-control-repo/
|
|
107
|
+
AGENTS.md
|
|
108
|
+
docs/
|
|
109
|
+
03-ARCHITECTURE/
|
|
110
|
+
04-DEVELOPMENT/
|
|
111
|
+
05-TEST-QA/
|
|
112
|
+
06-INTEGRATIONS/
|
|
113
|
+
09-PLANNING/
|
|
114
|
+
10-WALKTHROUGH/
|
|
115
|
+
11-REFERENCE/
|
|
116
|
+
tools/
|
|
117
|
+
frontend/ -> child repository
|
|
118
|
+
backend/ -> child repository
|
|
119
|
+
sdk/ -> child repository
|
|
120
|
+
service-a/ -> child repository
|
|
121
|
+
service-b/ -> child repository
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The parent repository is the control plane. It owns:
|
|
125
|
+
|
|
126
|
+
- Overall architecture and repo topology.
|
|
127
|
+
- Cross-repo Feature SSoT.
|
|
128
|
+
- Task plans, reviews, and walkthroughs.
|
|
129
|
+
- Regression SSoT and cross-repo cadence.
|
|
130
|
+
- Agent entrypoint and reading matrix.
|
|
131
|
+
- Evidence for child repository commits, branches, submodule pointers, or release versions.
|
|
132
|
+
|
|
133
|
+
Child repositories are the execution plane. They own:
|
|
134
|
+
|
|
135
|
+
- Code implementation.
|
|
136
|
+
- Repository-local dependencies and lockfiles.
|
|
137
|
+
- Repository-local tests and CI.
|
|
138
|
+
- Repository-local `AGENTS.md`.
|
|
139
|
+
- Concrete commits and pull requests.
|
|
140
|
+
|
|
141
|
+
### When To Choose It
|
|
142
|
+
|
|
143
|
+
- One product is delivered by multiple repositories.
|
|
144
|
+
- Features often touch frontend, backend, SDKs, or services together.
|
|
145
|
+
- You want every agent to start from one entrypoint.
|
|
146
|
+
- You need unified task state, review gates, and release closeout.
|
|
147
|
+
- There are many services, and you cannot let each repository maintain its own global plan.
|
|
148
|
+
|
|
149
|
+
### Main Benefit
|
|
150
|
+
|
|
151
|
+
The parent-control model fixes global truth in one place. Even if there are 100 child repositories, the agent first reads the parent task contract, then enters the specific child repository to execute.
|
|
152
|
+
|
|
153
|
+
This avoids:
|
|
154
|
+
|
|
155
|
+
- Conflicting Feature SSoTs.
|
|
156
|
+
- Each child repo saying "done" while the release still cannot ship.
|
|
157
|
+
- Agents starting from the wrong repository and seeing only local context.
|
|
158
|
+
- Cross-repo review and regression evidence scattered across many places.
|
|
159
|
+
|
|
160
|
+
See `docs-release/guides/parent-control-repository-pattern.en-US.md` for the full method.
|
|
161
|
+
|
|
162
|
+
## Moving Between Models
|
|
163
|
+
|
|
164
|
+
### Single Repo To Multi-Repo
|
|
165
|
+
|
|
166
|
+
When a single repository splits into frontend, backend, or SDK repositories, do not copy the same `docs/` tree into every repository.
|
|
167
|
+
|
|
168
|
+
Decide first:
|
|
169
|
+
|
|
170
|
+
- Which tasks remain global?
|
|
171
|
+
- Which tasks become repository-local?
|
|
172
|
+
- Does the old Regression SSoT stay at a parent layer or split into local gates?
|
|
173
|
+
- Where should agents start in the future?
|
|
174
|
+
|
|
175
|
+
If cross-repo features remain common, create a parent-control repository.
|
|
176
|
+
|
|
177
|
+
### Independent Multi-Repo To Parent-Control
|
|
178
|
+
|
|
179
|
+
Migration order:
|
|
180
|
+
|
|
181
|
+
1. Create the parent `AGENTS.md` and repo topology.
|
|
182
|
+
2. Move global Feature SSoT, Regression SSoT, and walkthrough index into the parent repository.
|
|
183
|
+
3. Keep local `AGENTS.md` files in child repositories, but point global planning back to the parent.
|
|
184
|
+
4. Create new cross-repo tasks only in the parent repository.
|
|
185
|
+
5. Treat child repository commits as evidence for parent tasks.
|
|
186
|
+
|
|
187
|
+
Do not rewrite all historical tasks at once. Start by moving the current release and active features into the parent repository.
|
|
188
|
+
|
|
189
|
+
## Recommended Defaults
|
|
190
|
+
|
|
191
|
+
- New small project: single-repo model.
|
|
192
|
+
- Several strongly independent teams: independent multi-repo model.
|
|
193
|
+
- One product, multiple code repositories, one release target: parent-control model.
|
|
194
|
+
- Many microservices that need unified agent collaboration: parent-control model.
|
|
195
|
+
|
|
196
|
+
The real decision is not the number of repositories. It is whether global decisions need one source of truth.
|