Commit 65841d2
Add downstream seam sync command and registry (#22)
* Add downstream seam sync command and registry
Add bin/push-downstream and downstream.yml so the managed
"## Agent Workflow Configuration" seam can be rolled into consumer repos as
one PR per repo, while each repo's seam values stay repo-owned.
- reuse AgentWorkflowSeamDoctor::REQUIRED_KEYS and parsing as the single
source of truth, so the command and the seam doctor cannot drift
- reconcile is idempotent: insert a base-branch-seeded, n/a-filled seam when
absent; preserve existing values (including multi-line) and extra optional
keys when present
- registry mode plans by default and clones/reconciles/validates/opens PRs
under --apply; --root reconciles a local checkout with no network
- seed downstream.yml with the 16 public consumer repos (react_on_rails is the
reference seam; private and archived repos are out of scope)
- wire bin/push-downstream-test.rb and a registry dry-run into bin/validate
- document the workflow in docs/downstream-sync.md and the README
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Create AGENTS.md when missing in downstream sync
Adopt repos that have no AGENTS.md yet by creating a minimal one (title plus the
managed seam) instead of erroring. Both --root mode and registry --apply now
create-or-update via a shared reconcile_agents helper; --root also fails cleanly
when the target directory does not exist.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Read AGENTS.md as UTF-8 in downstream sync
Real AGENTS.md files carry non-ASCII bytes (em dashes, arrows). Under a non-UTF-8
default external encoding (e.g. LANG=C, common in headless agents), File.read
returned a US-ASCII string and crashed match? on the first non-ASCII line. Read
via binread + force_encoding("UTF-8").scrub, matching agent-workflow-seam-doctor.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Add three-layer seam value adapter
Seed seam values through defaults -> preset -> per-repo overrides so the fan-out
renders complete, agent-optimized seams instead of n/a scaffolds.
- seam-presets.yml: org-uniform defaults + archetype presets (ts-package,
ruby-gem, ror-demo, site)
- downstream.yml: per-repo `preset:` + optional `overrides:` (RSC carries the
NODE_CONDITIONS override and is disabled pending its canary PR)
- resolve_values layers the three sources and seeds the base branch; unknown
presets fail before any writes
- reconcile(..., seed:) fills unset keys from the seed while repo-owned values
still win, so re-runs stay idempotent
- registry plan shows the chosen preset; --presets selects the preset file
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Address downstream sync review feedback
* Handle existing downstream sync branches
* Preserve downstream sync branch reruns
* Harden downstream sync branch reruns
* Reuse existing downstream sync branches
* Skip PR creation for synced downstream branches
* Validate current downstream seams
* Assert downstream sync branch preconditions
* Rework downstream sync around binstub contract
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Fix upgrade validation with no consumers
* Address downstream sync review followups
* Clarify workflow policy sources
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 156d4eb commit 65841d2
36 files changed
Lines changed: 2494 additions & 713 deletions
File tree
- bin
- docs
- skills
- address-review
- autoreview
- plan-pr-batch
- post-merge-audit
- pr-batch
- qa-stress
- replicate-ci
- run-ci
- tdd
- update-changelog
- verify-pr-fix
- verify
- test/fixtures/consumer-repo
- .agents
- bin
- workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
19 | | - | |
| 19 | + | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
| |||
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
83 | | - | |
84 | | - | |
85 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
86 | 90 | | |
87 | | - | |
| 91 | + | |
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
| |||
98 | 102 | | |
99 | 103 | | |
100 | 104 | | |
101 | | - | |
| 105 | + | |
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
107 | 111 | | |
108 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
109 | 128 | | |
110 | 129 | | |
111 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
29 | 39 | | |
30 | | - | |
31 | | - | |
32 | 40 | | |
33 | 41 | | |
34 | 42 | | |
| |||
76 | 84 | | |
77 | 85 | | |
78 | 86 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
86 | 91 | | |
87 | 92 | | |
88 | 93 | | |
| |||
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
96 | | - | |
| 101 | + | |
97 | 102 | | |
98 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
99 | 106 | | |
100 | | - | |
101 | | - | |
| 107 | + | |
| 108 | + | |
102 | 109 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
108 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
109 | 166 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
114 | 192 | | |
115 | 193 | | |
116 | 194 | | |
117 | | - | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
118 | 205 | | |
119 | 206 | | |
120 | | - | |
121 | | - | |
| 207 | + | |
| 208 | + | |
122 | 209 | | |
123 | 210 | | |
124 | | - | |
125 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
126 | 222 | | |
127 | 223 | | |
128 | 224 | | |
| |||
139 | 235 | | |
140 | 236 | | |
141 | 237 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | 238 | | |
163 | 239 | | |
164 | 240 | | |
| |||
0 commit comments