diff --git a/AGENT.md b/AGENT.md index 624f17df..f85c5c1c 100644 --- a/AGENT.md +++ b/AGENT.md @@ -56,12 +56,16 @@ behavior change. (generated code, test-only, formatting). - Commits: no AI attribution, explicit `git add` of intended files only. - Update `knowledge/` files your change made stale, add a `devlogs/` entry for - the session, and push to `origin main` when done. + the session, and land the work as a **pull request** when done — push your + branch and open the PR with the `tang` CLI (`tang pr create`; flow in + knowledge/workflows.md). PRs are the norm (Cameron, 2026-07-06); never + push `main` directly. - **HARD RULE — always work in a worktree.** Multiple agent sessions operate this repo in parallel at all times; the main checkout is shared ground. Enter a git worktree as your first action, before any edit (EnterWorktree, or `git worktree add`); do all edits, tests, and commits there; land by - rebasing onto `origin/main` and pushing. NEVER `git checkout -- `, + rebasing onto `origin/main`, pushing the branch, and opening a PR with + the `tang` CLI. NEVER `git checkout -- `, `git reset`, or `git stash` in the main checkout — a file that "changed under you" there is another session's live work, not noise. (Rule from Cameron, 2026-07-06, after a main-tree revert destroyed a parallel diff --git a/DESIGN.md b/DESIGN.md index a8860c9e..582a15d9 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -829,3 +829,9 @@ knows."* held hostage. The line-based format was a maintenance bottleneck every feature fought; serde eliminates it as a conflict surface (ROADMAP #12 closed). +- **2026-07-06 — PRs are the norm.** All changes land through Tangled pull + requests created with the `tang` CLI (`tang pr create`); nobody — agent + or human — pushes `main` directly. Supersedes the earlier direct-push + convention in knowledge/workflows.md. Review happens on the PR; the + worktree lifecycle ends at the PR (see "No stale worktrees"). Rule from + Cameron, 2026-07-06. diff --git a/DEVLOG.md b/DEVLOG.md index b33f9b12..c39e1311 100644 --- a/DEVLOG.md +++ b/DEVLOG.md @@ -2,6 +2,20 @@ Reverse chronological implementation notes. Keep this factual: what changed, why, checks, and spec impact. +## 2026-07-06 - Process: PRs are the norm + +- Intent: land Cameron's process decision — all changes go through Tangled + pull requests via the `tang` CLI; `main` is never pushed directly. +- Changed: AGENT.md non-negotiables and the worktree hard rule now end at a + PR; knowledge/workflows.md git conventions replaced the "push main + directly; no PR flow" note with the tang PR flow (rebase first, push + branch, `tang pr create -F body.md`, headless behind-check caveat); + knowledge/development-style.md working-loop step 7 ends in a PR; + DESIGN.md decisions log entry added. +- Design/spec impact: process only, no game behavior. Decisions log: + "PRs are the norm." +- Checks: docs-only; link/wording review. + ## 2026-07-06 - Spec update: serde JSON save format amendment - Intent: address PR review comment — the save format rewrite needed a diff --git a/knowledge/development-style.md b/knowledge/development-style.md index 1caa9fcf..71813981 100644 --- a/knowledge/development-style.md +++ b/knowledge/development-style.md @@ -57,4 +57,6 @@ That only works if: 6. Write it down: devlog entry for a session's work, DEVLOG.md line for the ledger. 7. Commit (spec + code + knowledge together, with a `Defense:` paragraph in - every behavior-changing commit) and push. + every behavior-changing commit) and open a pull request with the `tang` + CLI (see [workflows.md](workflows.md) — PRs are the norm; `main` is + never pushed directly). diff --git a/knowledge/workflows.md b/knowledge/workflows.md index 63a7c2ce..8c0664d9 100644 --- a/knowledge/workflows.md +++ b/knowledge/workflows.md @@ -60,8 +60,23 @@ sleep 8 && kill %1; grep -iE "panic|ERROR" /tmp/bevy.log multi-part changes. Stage files explicitly — `git add -A` is not permitted. - Spec-driven rule: functional change commits include their DESIGN.md amendment and any knowledge/ updates (see development-style.md). -- Remote: `origin` is a Tangled knot (`tangled.org`, SSH). Push `main` - directly; no PR flow currently. +- Remote: `origin` is a Tangled knot (`tangled.org`, SSH). **All changes + land through pull requests** (decided 2026-07-06) created with the + `tang` CLI; nobody pushes `main` directly. From your worktree branch: + + ```bash + git fetch origin && git rebase origin/main + git push -u origin + tang pr create -B main -H -t "Title" -F /path/to/body.md + tang pr list # ids and status + tang pr view + ``` + + Rebase before `tang pr create`: its behind-check prompt is interactive + and dies in headless sessions (`--skip-behind-check` exists, but the + rebase is the real fix). PR bodies follow the same rules as commits: + no AI attribution, and the `Defense:` paragraph rides along for + behavior-changing work. - **Identity map:** this machine's SSH keys (`id_ed25519` and `sensemaker_ed25519`, per `~/.ssh/config`) both authenticate to Tangled as **sensemaker.computer** (`did:plc:4j7exarb62djxycrgdfhuulr`). The