Add diff-upstream.sh and document framework change workflow
New script extracts a diff of framework files against the upstream ref in .diachron-version. Both DIACHRON.md and diachron/AGENTS.md now explain how to use it and recommend keeping framework changes in discrete, well-described commits to ease upstreaming. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
20
DIACHRON.md
20
DIACHRON.md
@@ -88,8 +88,24 @@ There are two owners of files in a diachron project:
|
||||
`backend/diachron/`, and the top-level scripts (`cmd`, `develop`, `mgmt`,
|
||||
`sync.sh`, `check.sh`).
|
||||
|
||||
Don't modify framework-owned files. This separation keeps framework upgrades
|
||||
clean.
|
||||
Don't modify framework-owned files unless you need to. This separation
|
||||
keeps framework upgrades clean. If you do need to change framework files
|
||||
(especially early on, there are rough edges), you can extract your changes
|
||||
as a patch:
|
||||
|
||||
```bash
|
||||
./diff-upstream.sh # full diff against upstream
|
||||
./diff-upstream.sh --stat # just list changed files
|
||||
```
|
||||
|
||||
This diffs every file in `file-list` against the upstream ref recorded in
|
||||
`.diachron-version`.
|
||||
|
||||
When you do change framework files, make each change in its own commit with
|
||||
a clear message explaining what the change is and why it's needed. Mixing
|
||||
framework fixes with application work in a single commit makes it much
|
||||
harder to upstream later. A clean history of discrete, well-explained
|
||||
framework commits is the easiest thing to turn into contributions.
|
||||
|
||||
## Getting started
|
||||
|
||||
|
||||
Reference in New Issue
Block a user