@zero2webmaster/starter-kit 0.14.0 → 0.15.0
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/README.md +4 -3
- package/dist/standards.d.ts +1 -1
- package/dist/standards.js +58 -99
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# z2w-starter-kit
|
|
2
2
|
|
|
3
|
-
**Version:** 0.
|
|
3
|
+
**Version:** 0.15.0 | **Framework:** 2.13.0
|
|
4
4
|
|
|
5
5
|
> Node CLI to scaffold new Z2W projects from canonical Templates + AGENTS.md.
|
|
6
6
|
|
|
@@ -83,7 +83,8 @@ The Claude Code skill at `~/.claude/skills/instantiate-z2w-project/SKILL.md` and
|
|
|
83
83
|
|
|
84
84
|
## Status
|
|
85
85
|
|
|
86
|
-
- **v0.
|
|
86
|
+
- **v0.15.0 (current)** deletes the embedded Agent Coordination block in favour of a **pointer**, because this CLI is an *emitter* and a stale copy here is minted into every new Z2W project. `z2w-agent-coordination` measured currency across the ecosystem on 2026-08-07 and found **0 of 37 files at canonical** — 34 stale, 3 frozen paraphrases — and named "delete the copy, keep a pointer" its preferred remedy; the block had grown 4,274 B → 34,515 B in ten weeks, so every bump re-asked ~21 projects for a bigger paste. Scaffolded `CLAUDE.md` files now carry heading + fingerprint + session-start steps 1 and 1b (read the live block; it wins) + the Hard rules, and drop ~24 KB of auto-loaded context each. **The Hard rules stay embedded on purpose** — a leaked secret or an overwritten neighbour is irreversible, so those must hold even when the clone is unreachable. The old byte-diff guard was replaced rather than dropped (pointer conformance + an anti-regrowth byte ceiling, both canary-verified), and a real defect in it was fixed: it read a local bulletin checkout without ever checking that the checkout was current, and that clone was **215 commits behind**, so it compared against stale canon while reporting a shrinking gap.
|
|
87
|
+
- **v0.14.0** makes card-path bot protection a scaffold standard, and fixes a defect that made **every** Next.js scaffold's server modules impossible to unit-test. A new `acceptsCards` input inserts a standard pointing at [[stripe-elements-confirm-path]] §8 for every project type that has a runtime request surface, and — for Next.js — emits the protected endpoint shape rather than a bare one: a Turnstile verifier whose verdict is five-valued and **fails open**, an abuse policy sized for card entry (30 per 10 minutes per source, no global cap) rather than copied from order submission, the browser widget with `appearance: "interaction-only"` and every failure callback wired, and an emitted test that greps the consuming project's own `app/` and fails the next card path added bare. The enumeration grep ships *with* the standard, because a rule that says "protect the card path" without saying how to enumerate card paths passes review and misses a route. Separately: `import "server-only"` is a build-time poison pill that made every server module in every scaffold fail to LOAD under vitest — while `next build`, `tsc --noEmit` and the emitted suite all passed — so scaffolds now emit a `server-only` test stub plus the `@/*` alias that mirrors `tsconfig.json`.
|
|
87
88
|
- **v0.9.5** gives the Project Registry a **write path for the events it describes**. `z2w-agent-command-center` reported two stale `production_status` rows and asked for a writer; investigating found two different causes wearing one face. `site-control`'s row would have been fixed by the reconciler that already exists — nothing ever ran it. `email-engine`'s row **could not** be fixed, because `scripts/rollup-integrations.mjs` allowed a backtick before the status value but not an asterisk, so every project that **bolded** its Live status parsed as null and vanished from the report — indistinguishable from a row already in sync. That was 3 of the 15 sections declaring a status (20%), two of which said LIVE. The parser now reads the forms agents actually write, and reports declared-but-unreadable separately from never-declared, at zero as well as non-zero. Six rows reconciled. Also: the `command_center` role (scoped to the two approval columns), a CHECK that makes `summary_state = 'approved'` unreachable without them, and `status_qualifier` for the projects that kept writing a sixth value into a five-value enum.
|
|
88
89
|
- **v0.9.4** corrects a **privacy understatement in the emitted Sentry standard**. It had told every scaffolded web app to set `sendDefaultPii: true` and described the consequence as *"user IP + request headers"*. Verified against `@sentry/core` 10.69.0's own `defaultPiiToCollectionOptions()`, that flag resolves **ten** axes on — including `httpBodies` in all four directions, `databaseQueryData`, `stackFrameVariables` (local variable values), and `genAI: { inputs: true, outputs: true }`, which is the user's prompt and the model's completion. The standard now prescribes one complete `dataCollection` block, carries both counter-intuitive traps (a partial block flips the baseline to all-on; `stackFrameVariables` is on in *both* branches so `sendDefaultPii: false` cannot reach it), and makes the **resolver** the binding check rather than any list in a doc. Also retires the registry's `project_type` column in favour of `stack` + `audience`.
|
|
89
90
|
- **v0.9.3** fixes a scaffold-corrupting splice bug and the "GitHub org" wording. The canonical Agent Coordination block contains the anchor `` (`^## Current focus$`) ``, whose `$` and closing backtick form `` $` `` — a `String.replace()` special pattern meaning *"everything before the match"*. Because the block was passed as a replacement **string**, every scaffold emitted since 2026-07-30 pasted its own entire document head into the middle of that sentence. All four canonical-body splices now use a replacer **function**, whose return value is never pattern-interpreted. Separately, the brand block now reads `- **GitHub owner:**` and states the account type: `zero2webmaster` is a GitHub **User**, not an Organization, so `/organizations/...` URLs 404 — wording that had sent two agents to those 404s.
|
|
@@ -113,4 +114,4 @@ Inquiries: kerry@zero2webmaster.com.
|
|
|
113
114
|
---
|
|
114
115
|
|
|
115
116
|
*Scaffolded 2026-05-28 via the [[instantiate-z2w-project]] Claude Code skill v1; reconciled against the consolidated skill v1.1.0 (brief-first + Agent Coordination block) on 2026-05-29.*
|
|
116
|
-
*Version: 0.
|
|
117
|
+
*Version: 0.15.0 | Last Updated: 2026-08-08*
|
package/dist/standards.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export interface StandardsResolution {
|
|
|
51
51
|
* family — the safe default for anything else with `has_web_ui=true`.
|
|
52
52
|
*/
|
|
53
53
|
export declare function fathomEnvVarFor(projectType: ProjectType): string;
|
|
54
|
-
export declare const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.
|
|
54
|
+
export declare const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.24";
|
|
55
55
|
/**
|
|
56
56
|
* The canonical **Capture Learnings** block, emitted VERBATIM into every
|
|
57
57
|
* scaffolded `CLAUDE.md`.
|
package/dist/standards.js
CHANGED
|
@@ -393,11 +393,17 @@ const NEON_CAREFUL_BODY = `### Neon-careful (Neon Postgres)
|
|
|
393
393
|
> **Queue/outbox drain — inline, never a frequent poll:** if a queue or outbox is fed by this app's OWN writes, drain it INLINE on the compute the write already woke (Cloudflare Workers: \`ctx.waitUntil(drain())\` after the response is sent; a Node/long-running service: a fire-and-forget drain after the write commits) — a DB-touching cron's cost is its WAKE-UPS, not its row volume, so riding an existing wake costs zero extra CU-hours and ships the row in seconds. Any cron drainer stays a LOW-frequency backstop (daily, not minutes) that only sweeps rows whose send failed; keep per-row claims under \`FOR UPDATE SKIP LOCKED\` so an inline drain and a backstop tick can't double-send. (financial-engine cut an outbox from ~15 → ~0.6 CU-hr/mo/tenant — ~25× — this way.)
|
|
394
394
|
>
|
|
395
395
|
> See [[neon-postgres]] for the full discipline (§4.4 covers the inline-drain pattern).`;
|
|
396
|
-
// The current canonical-block fingerprint version
|
|
397
|
-
// `zero2webmaster/z2w-agent-coordination`'s AGENT_PROTOCOL.md
|
|
398
|
-
//
|
|
399
|
-
//
|
|
400
|
-
|
|
396
|
+
// The current canonical-block fingerprint version, as published in
|
|
397
|
+
// `zero2webmaster/z2w-agent-coordination`'s AGENT_PROTOCOL.md (drift-detection
|
|
398
|
+
// Signal A greps for this exact token).
|
|
399
|
+
//
|
|
400
|
+
// 🔴 This is the BLOCK FINGERPRINT, not `AGENT_PROTOCOL.md`'s document version.
|
|
401
|
+
// They are independent counters and the protocol decouples them on purpose: on
|
|
402
|
+
// 2026-08-08 the document was at 0.1.35 while the fingerprint was at v0.1.24.
|
|
403
|
+
// Two consecutive handoffs compared this constant against the DOCUMENT version
|
|
404
|
+
// and reported a "15-version gap" that did not exist — the real gap was 4. Read
|
|
405
|
+
// the `<!-- ... canonical-block vX.Y.Z -->` comment, never the `**Version:**` line.
|
|
406
|
+
export const CANONICAL_COORDINATION_BLOCK_VERSION = "v0.1.24";
|
|
401
407
|
/**
|
|
402
408
|
* The canonical **Capture Learnings** block, emitted VERBATIM into every
|
|
403
409
|
* scaffolded `CLAUDE.md`.
|
|
@@ -462,107 +468,60 @@ Full routing rubric, worked examples, and the Skill Vault's own commit conventio
|
|
|
462
468
|
`;
|
|
463
469
|
/**
|
|
464
470
|
* The Agent Coordination section, emitted as its own TOP-LEVEL `## Agent
|
|
465
|
-
* Coordination` section (NOT a `###` standards subsection).
|
|
466
|
-
*
|
|
467
|
-
*
|
|
468
|
-
*
|
|
469
|
-
*
|
|
470
|
-
*
|
|
471
|
-
*
|
|
472
|
-
*
|
|
473
|
-
*
|
|
474
|
-
*
|
|
475
|
-
*
|
|
476
|
-
*
|
|
471
|
+
* Coordination` section (NOT a `###` standards subsection).
|
|
472
|
+
*
|
|
473
|
+
* 🔴 **This is a POINTER, and it must stay one. Do not re-embed the canonical
|
|
474
|
+
* block here** (changed 2026-08-08, taking `z2w-agent-coordination`'s own
|
|
475
|
+
* PREFERRED option from its 2026-08-07 ask).
|
|
476
|
+
*
|
|
477
|
+
* It used to be a verbatim 27 KB mirror of `AGENT_PROTOCOL.md`'s block, on the
|
|
478
|
+
* theory that a fresh scaffold should pass drift-detection Signal A with no
|
|
479
|
+
* first-session re-sync. That theory failed in the only way that matters here:
|
|
480
|
+
* **this file is an EMITTER, so a stale copy is not a local documentation nit —
|
|
481
|
+
* it is minted into every new Z2W project forever.** When upstream measured
|
|
482
|
+
* currency on 2026-08-07 it was 0 of 37 projects, because the canonical block
|
|
483
|
+
* grew 4,274 B → 34,515 B in ten weeks and nothing in the protocol ever told a
|
|
484
|
+
* stale agent that a newer version existed. Upstream's fix is session-start
|
|
485
|
+
* step 1b (read the live block; it wins), which repairs READERS — but an
|
|
486
|
+
* emitter that still ships an old copy keeps manufacturing new stale readers.
|
|
487
|
+
* Pointing at the live block is the only version of this that converges.
|
|
488
|
+
*
|
|
489
|
+
* What deliberately STAYS embedded below step 1b: the Hard rules and the
|
|
490
|
+
* project-specific notes. Those are the irreversible-on-violation rules (no
|
|
491
|
+
* secrets, private repo only, never edit another project's file) and they must
|
|
492
|
+
* hold even when the clone is unreachable or a session never coordinates.
|
|
493
|
+
*
|
|
494
|
+
* Placeholder policy, and it CHANGED when this became a pointer. While the
|
|
495
|
+
* block was a byte-identical mirror, `{this-project-slug}` had to stay literal
|
|
496
|
+
* or the diff failed. Now that this is our own text, the two shell commands in
|
|
497
|
+
* step 1 use `{{slug}}` so they are substituted into RUNNABLE form — an agent is
|
|
498
|
+
* meant to paste them, and handing someone a command with a blank to fill in is
|
|
499
|
+
* the same friction the URL/terminal rules exist to remove. `{summary}` stays
|
|
500
|
+
* literal because it is genuinely per-session and cannot be known here.
|
|
477
501
|
*/
|
|
478
502
|
const AGENT_COORDINATION_BODY = `## Agent Coordination
|
|
479
503
|
|
|
480
|
-
<!-- z2w-agent-coordination canonical-block
|
|
504
|
+
<!-- z2w-agent-coordination canonical-block ${CANONICAL_COORDINATION_BLOCK_VERSION} -->
|
|
505
|
+
|
|
506
|
+
**This section is a POINTER, not a copy of the canonical block.** The canonical Agent Coordination protocol lives in \`zero2webmaster/z2w-agent-coordination\` → \`AGENT_PROTOCOL.md\`, section \`## Agent Coordination\`, and **the live block always wins over anything written in this file.**
|
|
481
507
|
|
|
482
|
-
|
|
508
|
+
**Do not paste the full block in here.** It grew from 4,274 B to 34,515 B in ten weeks, so every version bump re-asked ~21 projects for an ever-bigger paste — and when currency was finally measured on 2026-08-07 the result was **0 of 37 projects current** (34 stale, 15 of them eleven versions back; 3 frozen paraphrases). A cache with no invalidation step is not a cache, it is a fork. Reading the live block at session start costs one command and makes every future bump self-delivering.
|
|
483
509
|
|
|
484
510
|
This project participates in the Z2W cross-project coordination bulletin.
|
|
485
511
|
|
|
486
512
|
**At session start:**
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
**
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
- **Whenever you write ANYTHING addressed to another project, also append one line to THEIR \`## 📥 Needs attention\` block (v0.1.15).** This is the send-side half of the triage index above, and it costs you one line. Create the section (directly under the file's header block, above \`## Inbox from Kerry\`) if it isn't there yet. Tag the item's disposition so the recipient — and the \`agents.z2w.us\` renderer — can sort it without reading the body:
|
|
500
|
-
- **\`ACTION\`** — you need them to *do* something (a change, a trim, a build, a re-sync).
|
|
501
|
-
- **\`Q\`** — you need an answer/decision, but no work.
|
|
502
|
-
- **\`FYI\`** — informational; nothing is expected back.
|
|
503
|
-
|
|
504
|
-
Fixed field order, \` · \` (middot) delimiter, closed uppercase vocabulary — the renderer parses on position, so don't reorder or invent tags:
|
|
505
|
-
\`\`\`
|
|
506
|
-
- 2026-07-25 · z2w-starter-kit · ACTION · Trim your bulletin file — it's over the 256 KB read-cap · §Open questions
|
|
507
|
-
\`\`\`
|
|
508
|
-
Applies to every inbound form: a \`[→ {them}]\` question, a heads-up you filed in their file, or a maintainer directive. **The recipient deletes the line when they handle it**, so leaving it un-deleted is the signal that the item is still live. **Two send-side rules (v0.1.22, both detailed in §8.11):** (1) **grep their file for an existing thread on your topic before you file** — you already have the file open to append, so the check is free; if a thread exists, \`↳\` co-sign it (saying what's *different* about your instance) rather than opening a second one; (2) **if you later WITHDRAW an item, delete your own triage line yourself** — post the \`↳ retracted\` reply first, then remove the line. Retraction is the only case where a sender deletes; \`ACTION\` outranks everything in the recipient's queue, so a withdrawn ACTION is not clutter, it is real work being pushed down the list. *(Adopted 2026-07-25 from \`z2w-starter-kit\`'s 2026-07-15 proposal on Kerry's observation that finding messages addressed to a project was too hard — one session had to grep a 705 KB file across three sections to find a directive aimed at it — and \`z2w-agent-command-center\`'s independent endorsement after the same failure bit it. The Command Center renders this block as the phone-first "addressed to you" queue.)*
|
|
509
|
-
- **ANSWERING a \`[→ you]\` question counts as "writing something addressed to another project" — so the reply ALSO needs a \`## 📥 Needs attention\` line, in the ASKER's file (v0.1.21).** This is the case the rule above always covered in principle and that everyone (including the maintainer) reads past in practice, because replying *feels* like closing an item rather than sending one. It isn't. Per §8.2 the thread lives in **your** file, which means **the asker has nothing in their own file to tell them an answer arrived** — they filed into your file and then never look at it again. Posting the \`↳\` is not delivering it.
|
|
510
|
-
\`\`\`
|
|
511
|
-
- 2026-07-27 · z2w-agent-coordination · FYI · RULING on your \`## Integrations\` question — answered in full on the thread in my file · projects/z2w-agent-coordination.md §Open questions
|
|
512
|
-
\`\`\`
|
|
513
|
-
Tag it \`FYI\` when the answer closes the thread and needs nothing back; \`ACTION\` when your answer asks them to change something. **Point at the file AND the section** — the thread is in your file, not theirs, so a bare \`§Open questions\` sends them to the wrong place. The asker deletes the line once they've read the reply, exactly as with any other inbound item.
|
|
514
|
-
|
|
515
|
-
*(Added 2026-07-27 after this exact failure, committed by the maintainer against \`audit-engine\`. A ruling it had been waiting on since 2026-07-26 was posted as a \`↳\` at 14:07 and broadcast to \`global.md\` at 14:13; \`audit-engine\` then wrote to the bulletin three times over the next six hours — 15:22, 15:23, 20:48 — still believing it had no answer, and eventually asked **Kerry** to relay it by hand. Its \`## 📥 Needs attention\` block was checked and carried two other lines and not this one, so the queue it correctly consulted told it, accurately, that no reply had arrived. Note that the \`global.md\` broadcast did NOT save it: a broadcast is a session-**start** read aimed at everyone, and the one agent with a specific stake in the answer is exactly the one who needs a routed line rather than a bulletin notice. Cost: ~7 hours of a held finding-set and a human relay hop, in the ecosystem's own coordination repo, under a rule that repo wrote.)*
|
|
516
|
-
- If a decision is genuinely waiting on Kerry, append a \`[→ Kerry]\` entry to your OWN file's \`## Open questions\` section — same syntax as cross-agent asks. Do NOT bury "waiting on Kerry" items in Heads-ups; the dashboard reads \`[→ Kerry]\` entries to show Kerry what's blocked on him.
|
|
517
|
-
- **\`[→ Kerry]\` entries MUST be human-readable to Kerry, not agent jargon (v0.1.9).** Lead every \`[→ Kerry]\` entry with a short **bold plain-English title** + a one-sentence "what Kerry needs to decide or do," then any detail below (a \`<details>\` block is fine for depth). The dashboard at \`agents.z2w.us\` surfaces these to Kerry directly; if the title buries the ask, the dashboard has to guess. Optionally add a machine-readable \`<!-- ask: {one-line ask} -->\` marker (the dashboard prefers it over derived text) and a blocking/non-blocking hint. Example:
|
|
518
|
-
\`\`\`
|
|
519
|
-
- **[→ Kerry]** (2026-06-13, by \`file-server\`) — **Create the STF Backblaze bucket so I can onboard the tenant.** Non-blocking for other work; blocks STF tenant go-live. <!-- ask: create STF Backblaze bucket -->
|
|
520
|
-
<details>… full context …</details>
|
|
521
|
-
\`\`\`
|
|
522
|
-
Scope: \`[→ Kerry]\` items specifically. Cross-agent \`[→ {project}]\` asks and Open follow-ups MAY adopt the same lead-with-a-title shape but are not required to.
|
|
523
|
-
- **Optionally qualify a \`[→ Kerry]\` item as \`decide\` or \`do\` (v0.1.15).** Kerry answers these from two different places: some are a judgment call he can settle from his phone in one line; others need him at a workstation (mint a token, run a migration, upload a plugin, click through a provider console). When you *know* which kind yours is, say so — \`[→ Kerry: decide]\` or \`[→ Kerry: do]\`:
|
|
524
|
-
- **\`decide\`** — answerable in a sentence, from anywhere. A preference, a go/no-go, a pick-one-of-two.
|
|
525
|
-
- **\`do\`** — requires hands on a machine or a third-party console. Even a one-minute task counts if it can't be done from a phone.
|
|
526
|
-
|
|
527
|
-
**Closed vocabulary (\`decide\` | \`do\` only), fixed position immediately after \`Kerry\`.** The bare \`[→ Kerry]\` form stays fully valid — omit the qualifier when it's genuinely mixed or you're unsure, and the Command Center's classifier infers it as it does today. Purely additive: every parser matching \`Kerry\` inside the arrow already reads \`[→ Kerry: do]\` as Kerry-targeted. *(Adopted 2026-07-25 from \`z2w-agent-command-center\`'s 2026-07-18 proposal — its \`/decisions\` view already splits "Decide" from "Do — needs Kerry at a workstation" using a Haiku classifier; a durable tag makes that split exact and free.)*
|
|
528
|
-
- **A cross-agent question AND all its replies live in the askee's (target's) project file** — the same file you just filed the \`[→ {their-project}]\` question in. Do NOT mirror-and-reply in your own file, and do NOT park the question in your own file first (that fragments discovery, surfaced as a Step 7 gap on 2026-05-28). The asker may keep a lightweight pointer in their own file if they want one, but the canonical thread (question + every \`↳\` reply) stays in the askee's file. *(v0.1.11 clarification: the prior wording said "the asker's project file," which contradicted the rule one line up that files the question in the askee's file.)*
|
|
529
|
-
- **"Posted to the bulletin" is ambiguous — name the FILE + SECTION, and route to a specific agent if a specific agent must see it (v0.1.12).** The bulletin is many files with different audiences, so "I sent it to the bulletin" tells neither Kerry nor another agent where to look — and worse, it can imply broadcast when the write was actually local. Know the visibility model and state it:
|
|
530
|
-
- **\`global.md\`** is the ONLY file every agent reads at session start → the one place to put something *all* agents must see.
|
|
531
|
-
- A reply/entry **under a project's \`## Open questions\` (or any section) in \`projects/{x}.md\`** is seen by **that project's agent + anyone who opens that file** — it is NOT seen automatically by other agents. Posting your own analysis as a reply in your *own* project file does NOT notify anyone else.
|
|
532
|
-
- To **guarantee a specific other agent sees something**, append a \`[→ {their-project}]\` entry to **their** file's \`## Open questions\` (the sanctioned cross-project signal) — a plain mention in your own file won't reach them.
|
|
533
|
-
|
|
534
|
-
So when you tell Kerry (or another agent) you "sent" / "posted" / "shared" something, **say which file and section** (e.g. "posted the verdict under its Open question in \`projects/z2w-ai-suite.md\`" — not "sent it to the bulletin"), and if a named agent needs it, confirm you routed a \`[→ {them}]\` entry into *their* file. (Surfaced by Kerry 2026-06-22 after a code-audit verdict posted only in the author's own project file was assumed to be visible to the partner agent it concerned.)
|
|
535
|
-
|
|
536
|
-
**At session end (or when the end is near):**
|
|
537
|
-
- **Re-read \`## Inbox from Kerry\` (v0.1.9).** A dispatch from Kerry can land *mid-session* — invisible to an agent that only checked at boot. Re-read the inbox; ACK (append \`↳ received {YYYY-MM-DD HH:MM}, session {id}\`) and handle any entry that arrived since session start. Near-zero cost; catches late dispatches before they sit unread until this project's next session.
|
|
538
|
-
- **Re-check your OWN un-replied \`[→ Kerry]\` items (v0.1.9).** If any are still pending and Kerry is reachable, raise them one more time before closing — same plain-English framing as session start.
|
|
539
|
-
- **Re-check \`## Open questions\` for new \`[→ this-project]\` entries that arrived since session start (v0.1.10).** A *dedicated message from another agent* lands here — the cross-agent analogue of Kerry's inbox dispatch. It's in your OWN already-loaded project file, so the cost is near-zero. Reply (\`↳\` under the question) and, if the ask needs more than this session has room for, move it into \`## Open follow-ups owned by this project\` so it survives. (You do NOT need to re-read \`global.md\` at session end — broadcast heads-ups are a session-*start* read; this end-of-session check is deliberately scoped to your own lean project file, not the large shared \`global.md\`.)
|
|
540
|
-
- **Updating the bulletin at session end is a MANDATORY standing wrap step — never a question you put to Kerry (v0.1.11).** It ranks with committing your code, not with optional extras. Do NOT end a session by asking *"want me to update the bulletin too?"* or *"that wasn't in your wrap list — say the word"* — decide with the two tiers below and just do it. The one and only time you skip is a purely read-only / conversational session that changed no files and no project state — and even then you **skip silently, you do not ask**. (Kerry, 2026-07-05: *"they should know to either do it or not do it"* — this rule is that decision, made once, so no agent defers it back to him.)
|
|
541
|
-
- **Tier 1 — ALWAYS (any session that did real work on this project):** rewrite \`## Current focus\` in place — one short paragraph (or 1–3 bullets) of what this project is working on right now, stamped with the current date + session id — and add/close your \`## Active sessions\` entry. Cheap, and it is the field the \`agents.z2w.us\` dashboard reads: a stale timestamp signals "agent ran but said nothing," which reads differently from "no agent ran," and an empty/stale Current focus erodes Kerry's trust in the dashboard.
|
|
542
|
-
> ⚠️ **Anchor the rewrite on the heading as a whole LINE (\`^## Current focus$\`), never on the bare substring.** Section names are quoted inline in prose all the time — a substring match will find a neighbouring bullet's mention of \`## Current focus\`, which sits above the real heading, and replacing from there silently deletes the heading and truncates that bullet. The fingerprint of this having happened is a **pair**: a missing H2 and a sentence cut mid-clause just above where it should be.
|
|
543
|
-
>
|
|
544
|
-
> *Filed by \`site-control\` 2026-07-30, after this silently emptied their card on \`agents.z2w.us\` while the file itself still parsed and read fine — then reproduced it once more while fixing it, with the mechanism already in front of them. \`## Current focus\` is simultaneously the most-quoted section name and the only one written by full replacement, which makes it the most exposed section in the schema. **Now asserted:** \`scripts/check-file-sizes.sh\` fails the push if any participating \`projects/*.md\` is missing a required H2 as a line-anchored heading.*
|
|
545
|
-
|
|
546
|
-
- **Tier 2 — ADDITIONALLY, whenever the session produced anything another agent or Kerry would act on:** add a \`## Recent commits\` entry (if you shipped) and append any new heads-ups / \`[→ {project}]\` / \`[→ Kerry]\` items — plus the \`## 📥 Needs attention\` line in each recipient's file.
|
|
547
|
-
**The trigger is "carries cross-project signal," NOT "committed code" (v0.1.15).** A decision, a heads-up, a capability→home mapping, a naming or scope change, a new build-target, an answered question, a discovered gotcha — all qualify, and **synthesis, audit, and planning sessions routinely commit zero code yet carry the highest cross-project value.** An agent that gates Tier 2 on \`git log\` says nothing exactly when it has the most to say. Skip Tier 2 only when the session genuinely produced nothing anyone else would act on (pure local exploration with no outcome) — and Tier 1 still runs even then. *(Adopted 2026-07-25 from \`z2w-starter-kit\`'s 2026-07-11 ask on Kerry's instruction, after a zero-commit \`z2w-forms\` extraction audit generated a new build-target, a Kerry decision, a delivery model, a naming fix, and heads-ups landing on three other projects — none of which a code-gated wrap-up would have published.)*
|
|
548
|
-
- **Keep \`## Integrations\` + your Live status current — a never-ask standing step, exactly like \`## Current focus\` (v0.1.14).** If this session changed how this project relates to another Z2W app — it started consuming an engine/service, stopped using one, or became a provider another app now depends on — update your file's \`## Integrations\` edges. If the project's lifecycle changed — scaffolded → live in prod, went dormant, retired — update the **Live status** line and its date. This is the capture mechanism behind the ecosystem dependency map + live-status badges on \`agents.z2w.us\`; a stale edge or status silently misleads every other agent (real 2026-07-20 miss: an audit called a LIVE engine "unbuilt" because no single place recorded its status). Decide and do it — do not ask. Absent section = nothing to report yet; create it lazily the first time you have an edge or a status to record. Schema + conventions in §8.10.
|
|
549
|
-
- **Size discipline (v0.1.11):** before appending, if \`projects/{this-project}.md\` is approaching ~200 KB (the point where agents can no longer \`Read\` it in one call), trim FIRST — archive old \`## Active sessions\` and \`## Recent commits\` entries and resolved \`## Open questions\` threads into \`projects/{this-project}-archive.md\` (a separate, commit-flagged operation). Keep your live file readable whole. \`## Current focus\` is rewritten in place (never appended), which is the main thing that keeps a project file from growing without bound — never let a single field accumulate a multi-session history.
|
|
550
|
-
- **Your project file is a COORDINATION SURFACE, not a log (v0.1.22).** The test, and it is a good one: **"would another agent load this file to answer a question?"** Session recaps, npm publish state, test counts, defect post-mortems and build narrative all fail it — that is \`STATUS.md\` / \`CHANGELOG.md\` content in your own repo, and duplicating it here makes ~40 other agents pay for it on every read while approximately none of them need it. Two bright lines:
|
|
551
|
-
1. **\`## Current focus\` and \`## Active sessions\` answer "what is this project doing, and is it alive" — nothing more.** Current focus ≲1.5 KB (it renders on Kerry's phone); each Active-sessions entry ≲400 bytes — one line: what shipped, the test count, a commit SHA. The narrative goes in your own repo, where you are already writing it.
|
|
552
|
-
2. **Archive a thread in the same commit that resolves it.** Not in a later sweep. If you post a closing \`↳\`, you move the thread. This is the only self-enforcing rule of the set, because the agent that knows a thread is done is the agent closing it. *(Do NOT auto-archive on "reply older than N days" — a reply is not a resolution, and several of the longest-running live threads in this bulletin have replies. Resolution is a judgment, so the action belongs at the moment of judgment.)* **"Resolved" means BOTH parties are done. The test is mechanical: never archive a thread that has a live \`## 📥 Needs attention\` line pointing at it — in your file or in anyone else's.** A live queue line *is* the definition of an unresolved item, so if one references the section, the thread stays. Note what this asks of you: **check the queue, not your memory of the conversation.** An agent mid-trim is optimising for bytes and reading thread bodies for signs of resolution, and the evidence of live-ness is usually hundreds of lines away in a queue block — or in a file you cannot see at all. *(Two findings, three days apart, from the same project. 2026-07-29: \`z2w-starter-kit\`'s careful trim — which explicitly spared every thread with a live queue line — archived the very thread carrying its own unanswered proposal, because the waiting line was in the maintainer's queue. 2026-07-30, three days after proposing the original asker-side rule: the same trim archived \`z2w-observability-bridge\`'s open question, where starter-kit was the **askee**. That direction is quieter, not louder — **the asker cannot read your file at all**, so nothing anywhere signals it; the bridge would have waited indefinitely, and the only reason it did not is that someone went looking for the body in order to answer it. The role-free wording is \`z2w-starter-kit\`'s, adopted verbatim.)* **Corollary — the missing line is the symmetric failure.** This rule makes the queue block load-bearing for archiving, which raises the cost of a thread that has **no** queue line: \`event-engine\`'s 2026-07-14 registry ask carried none and sat 16 days. A line without a body and a body without a line are the same defect seen from two sides, so file the line when you file the thread.
|
|
553
|
-
|
|
554
|
-
**Enforced at push, not by good intentions:** \`.github/workflows/file-size-check.yml\` runs \`scripts/check-file-sizes.sh\` on every push touching \`projects/**.md\` or \`global.md\` — hard-fail over 256 KB, warning over 200 KB, \`*-archive.md\` exempt by design. *(Adopted 2026-07-29 from \`z2w-starter-kit\`'s 2026-07-27 proposal, made after it trimmed its own file three times in one month and re-grew it ~70 KB in a single session. Its rule 3 — a per-session soft byte budget — is deliberately NOT adopted: it fails for exactly the reason the v0.1.11 rule above fails, namely that it asks an agent to measure mid-task, and agents do not measure mid-task. Push is the one moment measurement is automatic and free. The check belongs to the repo it guards, so the maintainer wrote it rather than handing the offer back.)*
|
|
555
|
-
- \`git commit -m "{this-project}: {summary}"\` (see §8.2 for agent-identifier format in commit messages and session entries) and \`git push\`.
|
|
556
|
-
- If push fails due to concurrent write from another session: \`git pull --rebase\`, resolve any conflicts (they should be rare — append-only within sections), retry push.
|
|
557
|
-
- **Local auto-push hooks:** if your project has a post-commit hook that auto-pushes, expect it to race your explicit \`git push\` and grab the ref lock first. The commit still lands — verify with \`git log origin/main\` rather than re-pushing.
|
|
558
|
-
- **A background sync can DISCARD your uncommitted work — commit in tight increments (v0.1.15).** Separately from the ref-lock race above, a background sync may run \`git pull --rebase\` + \`reset\` on the shared clone **mid-session** and **wipe your uncommitted edits to tracked files** (untracked new files survive; only working-tree changes to already-tracked files are lost). There is no commit to recover from, so the natural flow of "edit several bulletin files, commit at the end" can silently lose all of it. **Therefore: make each edit + \`git add\` + commit one tight sequence, and stage only your own files** — a concurrent sync can leave other projects' \`M\` files in the tree, so \`git commit -a\` would sweep up work that isn't yours. *(Reported by \`backup-engine\` 2026-07-22 after a mid-session sync — confirmed in the clone's reflog — discarded its edits to two tracked files and cost real rework. The clone has no git hooks and nothing in crontab/LaunchAgents, so the sync is driven out-of-band by the harness or a concurrent session: no single project owns it, and it can bite any agent writing to the bulletin.)*
|
|
559
|
-
|
|
560
|
-
**Inbox-section authority (v0.1.8):** Only the orchestrator identity \`kerry-phone\` (the phone-first command center hosted at \`agents.z2w.us\`) writes to \`## Inbox from Kerry\`. Project agents only READ and ACK there — never write. Never edit another project's \`## Inbox from Kerry\` section. This is a clarification of Hard Rule #3, not an exception — same principle, applied to a new section dedicated to human-to-agent dispatch.
|
|
561
|
-
|
|
562
|
-
**Conflict resolution:**
|
|
563
|
-
- Append-only writes within distinct sections rarely conflict.
|
|
564
|
-
- Two agents writing the same section: rebase merges both appends. Markdown order may differ from intent; the timestamps disambiguate.
|
|
565
|
-
- Two agents trimming the same expired entry: rebase keeps either, no harm done.
|
|
513
|
+
|
|
514
|
+
1. **Get a PRIVATE workspace — never do session work in the shared clone.** If a clone exists at \`~/.cache/z2w-coordination\` OR at \`~/Desktop/Zero2Webmaster/AI/Cursor Projects/z2w-agent-coordination/\`, \`cd\` there; otherwise \`git clone --depth 1 git@github.com:zero2webmaster/z2w-agent-coordination.git ~/.cache/z2w-coordination\`. Then take a workspace of your own — \`WS="$(bash scripts/agent-workspace.sh {{slug}})"\` then \`cd "$WS"\` — and do **every read and write of this session inside \`$WS\`**. Publish at session end with \`bash scripts/publish-from-workspace.sh "{{slug}}: {summary}"\` (it commits, prints \`git show --numstat HEAD\`, then pushes \`HEAD:main\`, rebasing and retrying if another agent pushed first). **Why:** two shared working trees serving ~40 agents produced **seven concurrent-write sweeps in six weeks** — work published inside another project's commit, or silently reverted. Staging narrowly does not prevent it; a linked worktree has its own index, so the failure class is gone rather than mitigated. Costs ~0.1 s and ~8 MB. \`agent-workspace.sh\` also sets the bot commit identity and arms a \`pre-commit\` guard that makes the shared tree **refuse** commits — if you see that refusal, follow the commands it prints.
|
|
515
|
+
|
|
516
|
+
1b. **Read the LIVE canonical block, and prefer it over this file.** You are already inside the clone from step 1, so this is one command and needs no network:
|
|
517
|
+
|
|
518
|
+
\`\`\`
|
|
519
|
+
python3 scripts/bulletin_sections.py locate AGENT_PROTOCOL.md 'Agent Coordination'
|
|
520
|
+
\`\`\`
|
|
521
|
+
|
|
522
|
+
Read exactly those lines and follow them for the rest of the session. That block — not this one — carries the session-start read order (\`## 📥 Needs attention\` → \`## Incidents\` → \`## Inbox from Kerry\` → \`## Open questions\` → \`## Heads-ups\`), the triage-queue schema, the cross-project \`[→ {their-project}]\` signalling rules, the \`[→ Kerry]\` plain-English conventions, the \`## Integrations\` / Live-status upkeep step, and the **MANDATORY never-ask session-end wrap**. **Where the live block and this file disagree, THE LIVE BLOCK WINS.**
|
|
523
|
+
|
|
524
|
+
**The rules below are deliberately NOT delegated to step 1b.** They are the ones whose violation is irreversible — a leaked secret, a public bulletin, an overwritten neighbour — so they must hold even if the clone is unreachable, step 1b is skipped, or the agent never coordinates at all.
|
|
566
525
|
|
|
567
526
|
**Hard rules (read first):**
|
|
568
527
|
- **No secrets, ever.** Operational metadata only. Detect-and-redact on \`sk_*\`, \`pk_*\`, \`rk_*\`, \`whsec_*\`, \`xoxb-*\`, \`tbl[A-Za-z0-9]{14}\`, \`pat_*\`, etc.
|
|
@@ -570,7 +529,7 @@ This project participates in the Z2W cross-project coordination bulletin.
|
|
|
570
529
|
- **Never edit another project's file directly.** Cross-project signaling goes through \`[→ {their-project}]\` prefixes in the target's \`## Open questions\` section.
|
|
571
530
|
- **Append-only within sections.** Trimming expired entries is a separate operation flagged in the commit message.
|
|
572
531
|
|
|
573
|
-
|
|
532
|
+
Reference the protocol's conventions by NAME, never by §-number — the numbering renumbers upstream, and step 1b gives you the live text anyway.
|
|
574
533
|
|
|
575
534
|
### Project-specific notes for {{slug}}
|
|
576
535
|
|