Date: 2026-03-12 Author: Coordinator (AI) Status: 🔵 HL — Awaiting review
Downstream projects can discover, fetch, and apply upstream TFW updates with a single config field and a gitignored staging directory — no OS-specific hacks, no hardcoded URLs.
tfw-update workflow says “Obtain upstream” 11 times but never explains:
/tmp is OS-specificCompany forks trace-first-starter to an internal repo. All company projects must pull updates from the internal fork, not from the public GitHub. Currently there’s nowhere to configure this.
PROJECT_CONFIG.yaml has no tfw.upstream field. update.md has no fetch step.
D1: One config field tfw.upstream — URL to the upstream TFW starter repo.
https://github.com/saubakirov/trace-first-starter.tfw/README.md §Canonical Reference (not in config)D2: .tfw/.upstream/ staging directory — gitignored, inside the project.
/tmp, no $TMPDIR, no $env:TEMPD3: Step 0 in update.md — concrete fetch instructions.
tfw.upstream from config.tfw/.upstream/.tfw/.upstream/ already exists from previous update — clean and re-clone1. Agent reads PROJECT_CONFIG.yaml → tfw.upstream = "https://..."
2. Agent clones upstream into .tfw/.upstream/
3. Agent reads .tfw/.upstream/.tfw/VERSION → target version
4. Agent reads .tfw/.upstream/.tfw/CHANGELOG.md → changes list
5. Agent follows existing Steps 1-8 (compare, categorize, checklist, apply)
6. Clean .tfw/.upstream/ when done
| # | File | Action | Description |
|---|---|---|---|
| 1 | .tfw/PROJECT_CONFIG.yaml |
MODIFY | Add tfw.upstream field with default URL |
| 2 | .tfw/workflows/update.md |
MODIFY | Add Step 0: Fetch Upstream, update prerequisites to reference config |
| 3 | .tfw/init.md |
MODIFY | Mention tfw.upstream in Step 2 (configure), mention .upstream/ in .gitignore |
| 4 | .tfw/glossary.md |
MODIFY | Update tfw-update entry to mention source resolution |
| 5 | .gitignore |
MODIFY | Add .tfw/.upstream/ |
Scope: 0 NEW + 5 MODIFY. Within budget.
PROJECT_CONFIG.yaml has tfw.upstream field with https://github.com/saubakirov/trace-first-starterupdate.md Step 0 reads tfw.upstream, clones to .tfw/.upstream/, with cleanup.gitignore has .tfw/.upstream/ entryinit.md mentions tfw.upstream and .upstream/ gitignoreupdate.md end-to-end: knows where, how, and where to put files.tfw/.upstream/ committed to git.tfw/.upstream/ works on any OS| Risk | Mitigation |
|---|---|
| Private repos need auth for git clone | CL mode — user runs the command, handles auth |
.tfw/.upstream/ left after failed update |
Gitignored, harmless. Step 0 cleans before clone |
| Company fork diverges from canonical | tfw.upstream points to company fork; canonical stays in .tfw/README.md for reference |
| *HL — TFW-9: Update Source Mechanism | 2026-03-12* |