waypoint-codex 0.1.11 → 0.3.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 CHANGED
@@ -5,10 +5,10 @@ Waypoint is a docs-first repository operating system for Codex.
5
5
  It helps the next agent pick up your repo with full context by keeping the important things in markdown files inside the repo:
6
6
 
7
7
  - `AGENTS.md` for startup instructions
8
- - `.waypoint/WORKSPACE.md` for live state
9
- - `.waypoint/docs/` for durable project memory
8
+ - `.waypoint/WORKSPACE.md` for live state, with timestamped multi-topic entries
9
+ - `.waypoint/docs/` for durable project memory, with `summary`, `last_updated`, and `read_when` frontmatter on routable docs
10
10
  - `.waypoint/DOCS_INDEX.md` for docs routing
11
- - repo-local skills for planning and audits
11
+ - repo-local skills for planning, audits, verification, workspace compression, and review closure
12
12
 
13
13
  ## Install
14
14
 
@@ -59,6 +59,10 @@ repo/
59
59
  - `error-audit`
60
60
  - `observability-audit`
61
61
  - `ux-states-audit`
62
+ - `workspace-compress`
63
+ - `pre-pr-hygiene`
64
+ - `pr-review`
65
+ - `e2e-verify`
62
66
 
63
67
  ## Optional reviewer roles
64
68
 
@@ -69,6 +73,8 @@ If you initialize with `--with-roles`, Waypoint scaffolds:
69
73
  - `docs-researcher`
70
74
  - `plan-reviewer`
71
75
 
76
+ The intended workflow is post-commit: after your own commit lands, run `code-reviewer` and `code-health-reviewer` in parallel in the background, then fix real findings before you call the work finished.
77
+
72
78
  ## Update
73
79
 
74
80
  ```bash
package/dist/src/core.js CHANGED
@@ -11,6 +11,14 @@ const DEFAULT_DOCS_INDEX = ".waypoint/DOCS_INDEX.md";
11
11
  const DEFAULT_WORKSPACE = ".waypoint/WORKSPACE.md";
12
12
  const STATE_DIR = ".waypoint/state";
13
13
  const SYNC_RECORDS_FILE = ".waypoint/state/sync-records.json";
14
+ const TIMESTAMPED_WORKSPACE_SECTIONS = new Set([
15
+ "## Current State",
16
+ "## In Progress",
17
+ "## Next",
18
+ "## Parked",
19
+ "## Done Recently",
20
+ ]);
21
+ const TIMESTAMPED_ENTRY_PATTERN = /^(?:[-*]|\d+\.)\s+\[\d{4}-\d{2}-\d{2} \d{2}:\d{2} [A-Z]{2,5}\]/;
14
22
  function ensureDir(dirPath) {
15
23
  mkdirSync(dirPath, { recursive: true });
16
24
  }
@@ -183,6 +191,27 @@ function hashFile(filePath) {
183
191
  function codexHome() {
184
192
  return process.env.CODEX_HOME ?? path.join(os.homedir(), ".codex");
185
193
  }
194
+ function findWorkspaceTimestampViolations(workspaceText) {
195
+ let currentSection = "";
196
+ const violations = new Set();
197
+ for (const rawLine of workspaceText.split("\n")) {
198
+ const line = rawLine.trim();
199
+ if (line.startsWith("## ")) {
200
+ currentSection = line;
201
+ continue;
202
+ }
203
+ if (!TIMESTAMPED_WORKSPACE_SECTIONS.has(currentSection) || line.length === 0) {
204
+ continue;
205
+ }
206
+ if (!/^(?:[-*]|\d+\.)\s+/.test(line)) {
207
+ continue;
208
+ }
209
+ if (!TIMESTAMPED_ENTRY_PATTERN.test(line)) {
210
+ violations.add(currentSection);
211
+ }
212
+ }
213
+ return [...violations];
214
+ }
186
215
  function renderCodexAutomation(spec, cwd) {
187
216
  const now = Date.now();
188
217
  const rrule = spec.rrule?.startsWith("RRULE:") ? spec.rrule : `RRULE:${spec.rrule}`;
@@ -353,6 +382,16 @@ export function doctorRepository(projectRoot) {
353
382
  });
354
383
  }
355
384
  }
385
+ const timestampViolations = findWorkspaceTimestampViolations(workspaceText);
386
+ if (timestampViolations.length > 0) {
387
+ findings.push({
388
+ severity: "warn",
389
+ category: "workspace",
390
+ message: `Workspace has untimestamped entries in ${timestampViolations.join(", ")}.`,
391
+ remediation: "Prefix new or materially revised workspace bullets with `[YYYY-MM-DD HH:MM TZ]`.",
392
+ paths: [workspacePath],
393
+ });
394
+ }
356
395
  }
357
396
  for (const requiredFile of [
358
397
  path.join(projectRoot, ".waypoint", "SOUL.md"),
@@ -387,7 +426,7 @@ export function doctorRepository(projectRoot) {
387
426
  severity: "warn",
388
427
  category: "docs",
389
428
  message: `Doc is missing valid frontmatter: ${relPath}`,
390
- remediation: "Add `summary` and `read_when` frontmatter.",
429
+ remediation: "Add `summary`, `last_updated`, and `read_when` frontmatter.",
391
430
  paths: [path.join(projectRoot, relPath)],
392
431
  });
393
432
  }
@@ -414,6 +453,10 @@ export function doctorRepository(projectRoot) {
414
453
  "error-audit",
415
454
  "observability-audit",
416
455
  "ux-states-audit",
456
+ "workspace-compress",
457
+ "pre-pr-hygiene",
458
+ "pr-review",
459
+ "e2e-verify",
417
460
  ]) {
418
461
  const skillPath = path.join(projectRoot, ".agents/skills", skillName, "SKILL.md");
419
462
  if (!existsSync(skillPath)) {
@@ -13,14 +13,15 @@ const SKIP_NAMES = new Set(["README.md", "CHANGELOG.md", "LICENSE.md"]);
13
13
  function parseFrontmatter(filePath) {
14
14
  const text = readFileSync(filePath, "utf8");
15
15
  if (!text.startsWith("---\n")) {
16
- return { summary: "", readWhen: [] };
16
+ return { summary: "", lastUpdated: "", readWhen: [] };
17
17
  }
18
18
  const endIndex = text.indexOf("\n---\n", 4);
19
19
  if (endIndex === -1) {
20
- return { summary: "", readWhen: [] };
20
+ return { summary: "", lastUpdated: "", readWhen: [] };
21
21
  }
22
22
  const frontmatter = text.slice(4, endIndex);
23
23
  let summary = "";
24
+ let lastUpdated = "";
24
25
  const readWhen = [];
25
26
  let collectingReadWhen = false;
26
27
  for (const rawLine of frontmatter.split("\n")) {
@@ -30,6 +31,11 @@ function parseFrontmatter(filePath) {
30
31
  collectingReadWhen = false;
31
32
  continue;
32
33
  }
34
+ if (line.startsWith("last_updated:")) {
35
+ lastUpdated = line.slice("last_updated:".length).trim().replace(/^['"]|['"]$/g, "");
36
+ collectingReadWhen = false;
37
+ continue;
38
+ }
33
39
  if (line.startsWith("read_when:")) {
34
40
  collectingReadWhen = true;
35
41
  continue;
@@ -42,7 +48,7 @@ function parseFrontmatter(filePath) {
42
48
  collectingReadWhen = false;
43
49
  }
44
50
  }
45
- return { summary, readWhen };
51
+ return { summary, lastUpdated, readWhen };
46
52
  }
47
53
  function walkDocs(projectRoot, currentDir, output, invalid) {
48
54
  for (const entry of readdirSync(currentDir)) {
@@ -58,9 +64,9 @@ function walkDocs(projectRoot, currentDir, output, invalid) {
58
64
  if (!entry.endsWith(".md") || SKIP_NAMES.has(entry)) {
59
65
  continue;
60
66
  }
61
- const { summary, readWhen } = parseFrontmatter(fullPath);
67
+ const { summary, lastUpdated, readWhen } = parseFrontmatter(fullPath);
62
68
  const relPath = path.relative(projectRoot, fullPath);
63
- if (!summary || readWhen.length === 0) {
69
+ if (!summary || !lastUpdated || readWhen.length === 0) {
64
70
  invalid.push(relPath);
65
71
  continue;
66
72
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waypoint-codex",
3
- "version": "0.1.11",
3
+ "version": "0.3.0",
4
4
  "description": "Codex-native repository operating system: scaffolding, docs routing, repo-local skills, doctor, and sync.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: e2e-verify
3
+ description: Perform manual end-to-end verification for a shipped feature or major change. Use when frontend and backend behavior must be verified together, when a feature needs a realistic walkthrough, or when the agent should manually exercise the flow, inspect logs and persisted state, document issues, fix them, and repeat until no meaningful end-to-end issues remain.
4
+ ---
5
+
6
+ # E2E Verify
7
+
8
+ Use this skill when "it should work" is not enough and the flow needs to be proven end to end.
9
+
10
+ ## Read First
11
+
12
+ Before verification:
13
+
14
+ 1. Read `.waypoint/SOUL.md`
15
+ 2. Read `.waypoint/agent-operating-manual.md`
16
+ 3. Read `.waypoint/WORKSPACE.md`
17
+ 4. Read `.waypoint/context/MANIFEST.md`
18
+ 5. Read every file listed in that manifest
19
+ 6. Read the routed docs that define the feature, flow, or contract being verified
20
+
21
+ ## Step 1: Exercise The Real Flow
22
+
23
+ - For browser-facing paths, manually exercise the feature through the real UI.
24
+ - For backend-only or service flows, drive the real API or runtime path directly.
25
+ - Follow the feature from entry point to persistence to user-visible outcome.
26
+
27
+ ## Step 2: Inspect End-To-End State
28
+
29
+ Check the surfaces that prove the system actually behaved correctly:
30
+
31
+ - UI state
32
+ - server responses
33
+ - logs
34
+ - background-job state if relevant
35
+ - database or persisted records when relevant
36
+
37
+ Do not stop at "the page looked okay."
38
+
39
+ ## Step 3: Record And Fix Issues
40
+
41
+ - Document each meaningful issue you find.
42
+ - Fix the issue when the remediation is clear.
43
+ - Update docs or contracts if verification exposes stale assumptions.
44
+
45
+ ## Step 4: Repeat Until Clean
46
+
47
+ Re-run the end-to-end flow after fixes.
48
+
49
+ The skill is complete only when:
50
+
51
+ - the intended flow works
52
+ - the persisted state is correct
53
+ - the logs tell a truthful story
54
+ - no meaningful issues remain
55
+
56
+ ## Step 5: Report Verification Truthfully
57
+
58
+ Summarize:
59
+
60
+ - the flows exercised
61
+ - the state surfaces inspected
62
+ - the issues found and fixed
63
+ - any residual risks or unverified edges
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "E2E Verify"
3
+ short_description: "Manually verify a feature end to end"
4
+ default_prompt: "Use this skill for manual end-to-end verification of a feature or major change. Exercise the real flow, inspect UI plus logs and persisted state, document issues, fix them, and repeat until no meaningful end-to-end issues remain."
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: pr-review
3
+ description: Triage and close the review loop on an open PR after automated or human review has started. Use when a PR has review comments pending, when automated reviewers are still running, or when you need to wait for review completion, answer every inline comment, fix meaningful issues, push follow-up commits, and keep repeating until no new meaningful review findings remain.
4
+ ---
5
+
6
+ # PR Review
7
+
8
+ Use this skill to drive the PR through review instead of treating review as a one-shot comment sweep.
9
+
10
+ ## Step 1: Wait For Review To Settle
11
+
12
+ - Check the PR's current review and CI status.
13
+ - If automated review is still running, wait for it to finish instead of racing it.
14
+ - If comments are still arriving, do not prematurely declare the loop complete.
15
+
16
+ ## Step 2: Read Every Review Comment
17
+
18
+ - Read all open review comments, especially inline comments.
19
+ - Group duplicates, but do not ignore any comment.
20
+ - Distinguish between meaningful issues, optional suggestions, and comments that should be explicitly declined.
21
+
22
+ ## Step 3: Triage And Respond Inline
23
+
24
+ For every comment:
25
+
26
+ - fix it if it is correct and in scope
27
+ - explain clearly if you are declining it
28
+ - reply inline where the comment lives instead of posting a disconnected summary comment
29
+
30
+ Do not leave comments unanswered.
31
+
32
+ ## Step 4: Push The Next Round
33
+
34
+ - Make the needed fixes.
35
+ - rerun the relevant verification
36
+ - push follow-up commit(s)
37
+ - return to the PR and continue the loop
38
+
39
+ Stay in the loop until no new meaningful issues remain.
40
+
41
+ ## Step 5: Close With A Crisp State Summary
42
+
43
+ Summarize:
44
+
45
+ - what was fixed
46
+ - what was intentionally declined
47
+ - what verification ran
48
+ - whether the PR is clear or still waiting on reviewer response
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "PR Review"
3
+ short_description: "Close the review loop on an active PR"
4
+ default_prompt: "Use this skill when a PR has active review comments or automated review in progress. Wait for review to settle, triage every comment, reply inline, fix meaningful issues, push follow-up commits, and repeat until no new meaningful findings remain."
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: pre-pr-hygiene
3
+ description: Run a broad final hygiene pass before pushing, before opening or updating a PR, or after a large implementation chunk when the diff is substantial and needs a deeper audit than per-commit review. Verify code-guide compliance, docs-to-behavior alignment, shared contract/schema drift, typing gaps, optimistic UI rollback or invalidation strategy, persistence correctness risks, and any other cross-cutting quality issues that would make the next review painful.
4
+ ---
5
+
6
+ # Pre-PR Hygiene
7
+
8
+ Use this skill for the larger final audit before code leaves the machine.
9
+
10
+ ## Read First
11
+
12
+ Before the hygiene pass:
13
+
14
+ 1. Read `.waypoint/SOUL.md`
15
+ 2. Read `.waypoint/agent-operating-manual.md`
16
+ 3. Read `.waypoint/WORKSPACE.md`
17
+ 4. Read `.waypoint/context/MANIFEST.md`
18
+ 5. Read every file listed in that manifest
19
+ 6. Read `.waypoint/docs/code-guide.md` and the routed docs relevant to the area being shipped
20
+
21
+ ## Step 1: Audit The Whole Change Surface
22
+
23
+ Inspect the code and docs that are about to ship.
24
+
25
+ Look for:
26
+
27
+ - code-guide violations such as silent fallbacks, swallowed errors, weak boundary validation, unsafe typing, or stale compatibility layers
28
+ - stale docs, stale routes, or workspace notes that no longer match real behavior
29
+ - shared schema, fixture, or API-contract drift
30
+ - typing gaps such as avoidable `any`, weak narrowing, or unnecessary casts
31
+ - optimistic UI without rollback or invalidation
32
+ - persistence risks such as missing provenance, missing idempotency protection, weak uniqueness, or missing foreign-key style invariants
33
+
34
+ Skip checks that truly do not apply, but say that you skipped them.
35
+
36
+ ## Step 2: Fix Or Stage Findings
37
+
38
+ - Fix meaningful issues directly when the right remediation is clear.
39
+ - Update `.waypoint/docs/` when shipped behavior or routes changed.
40
+ - If the live handoff has become bloated or stale, use `workspace-compress`.
41
+
42
+ Do not stop at reporting obvious fixable issues.
43
+
44
+ ## Step 3: Verify Before Ship
45
+
46
+ Run the most relevant verification for the area:
47
+
48
+ - tests
49
+ - typecheck
50
+ - lint
51
+ - build
52
+ - targeted manual QA
53
+
54
+ ## Step 4: Report The Gate Result
55
+
56
+ Summarize:
57
+
58
+ - what you checked
59
+ - what you fixed
60
+ - what verification ran
61
+ - what residual risks remain, if any
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Pre-PR Hygiene"
3
+ short_description: "Run the final cross-cutting ship audit"
4
+ default_prompt: "Use this skill before pushing or opening/updating a PR for substantial work to do a broader hygiene pass across code, docs, contracts, typing, UI rollback, persistence correctness, and code-guide compliance."
@@ -0,0 +1,90 @@
1
+ ---
2
+ name: workspace-compress
3
+ description: Compress and refresh the repository's live workspace handoff so `WORKSPACE.md` stays short, current, and useful to the next agent. Use after finishing a meaningful chunk of work, before stopping for the session, before asking for review, before opening or updating a PR, or whenever the workspace has started accumulating stale history, repeated status logs, or resolved context that should no longer stay in the live handoff. Keep the minimum current operational state, collapse old resolved entries, and move durable detail into existing routed docs instead of duplicating it in the workspace.
4
+ ---
5
+
6
+ # Workspace Compress
7
+
8
+ Keep `WORKSPACE.md` as a live handoff, not a project diary.
9
+
10
+ This skill is for compression, not for erasing context. Preserve what the next agent needs in the first few minutes of a resume, and push durable detail into the docs layer that already exists in the repo.
11
+
12
+ ## Read First
13
+
14
+ Before compressing:
15
+
16
+ 1. Read `.waypoint/SOUL.md`
17
+ 2. Read `.waypoint/agent-operating-manual.md`
18
+ 3. Read `.waypoint/WORKSPACE.md`
19
+ 4. Read `.waypoint/context/MANIFEST.md`
20
+ 5. Read every file listed in that manifest
21
+ 6. Read the routed docs relevant to the active workspace sections
22
+
23
+ ## Step 1: Build Context From Routing, Not From Git Diff
24
+
25
+ This skill must work even in a dirty tree or an arbitrary session state.
26
+
27
+ - Read the workspace file in full.
28
+ - Read `.waypoint/DOCS_INDEX.md` and the workspace's obvious routing pointers.
29
+ - Read the project or domain docs directly linked from the active sections you may compress.
30
+ - If the workspace references a progress, status, architecture, or release doc, treat that as the durable home for details before removing anything from the live handoff.
31
+
32
+ Do not rely on `git diff` as the primary signal for what matters.
33
+
34
+ ## Step 2: Apply The Handoff Test
35
+
36
+ Ask one question:
37
+
38
+ **What does the next agent need in the first 10 minutes to resume effectively?**
39
+
40
+ Keep only the answer to that question in the workspace. Usually that means:
41
+
42
+ - current focus
43
+ - latest verified state
44
+ - open blockers or risks
45
+ - immediate next steps
46
+ - only the last few meaningful timestamped updates
47
+
48
+ Usually remove or collapse:
49
+
50
+ - resolved implementation logs
51
+ - repeated status updates that say the same thing
52
+ - validation transcripts
53
+ - old milestone history
54
+ - duplicated durable documentation
55
+
56
+ Compression is documentation quality, not data loss.
57
+
58
+ ## Step 3: Compress Safely
59
+
60
+ When editing the workspace:
61
+
62
+ 1. Preserve the active operational truth.
63
+ 2. Collapse stale resolved bullets into one short summary when history still matters.
64
+ 3. Remove entries that are already preserved elsewhere and no longer affect immediate execution.
65
+ 4. Keep timestamp discipline for new or materially revised bullets.
66
+ 5. Do not turn the workspace into an archive, changelog, or debug notebook.
67
+
68
+ If durable context is missing from `.waypoint/docs/`, add or refresh the smallest coherent routed doc before removing it from the workspace.
69
+
70
+ ## Step 4: Protect User-Owned State
71
+
72
+ - Never overwrite or revert unrelated user changes.
73
+ - If a workspace or doc already has in-flight edits you did not make, read carefully and work around them.
74
+ - Prefer surgical edits over broad rewrites.
75
+ - Do not delete project memory just because live state is being compressed.
76
+
77
+ ## Step 5: Refresh Routing
78
+
79
+ After changing routed docs or the workspace:
80
+
81
+ - Run `node .waypoint/scripts/prepare-context.mjs` so the docs index and generated context match the edited sources.
82
+
83
+ ## Step 6: Report The Result
84
+
85
+ Summarize:
86
+
87
+ - what stayed in the live handoff
88
+ - what was collapsed or removed
89
+ - which durable docs now hold the preserved detail
90
+ - any remaining risk that still belongs in the workspace
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Workspace Compress"
3
+ short_description: "Compress the live workspace handoff"
4
+ default_prompt: "Use this skill after a meaningful chunk of work, before stopping, before review, or before opening or updating a PR to keep WORKSPACE.md short, current, and useful to the next agent."
@@ -4,11 +4,10 @@ developer_instructions = """
4
4
  Read these files in order before doing anything else:
5
5
  1. .waypoint/SOUL.md
6
6
  2. .waypoint/agent-operating-manual.md
7
- 3. WORKSPACE.md
7
+ 3. .waypoint/WORKSPACE.md
8
8
  4. .waypoint/context/MANIFEST.md
9
9
  5. every file listed in that manifest
10
10
  6. .waypoint/agents/code-health-reviewer.md
11
11
 
12
12
  After reading them, follow .waypoint/agents/code-health-reviewer.md as your operating instructions.
13
13
  """
14
-
@@ -4,11 +4,10 @@ developer_instructions = """
4
4
  Read these files in order before doing anything else:
5
5
  1. .waypoint/SOUL.md
6
6
  2. .waypoint/agent-operating-manual.md
7
- 3. WORKSPACE.md
7
+ 3. .waypoint/WORKSPACE.md
8
8
  4. .waypoint/context/MANIFEST.md
9
9
  5. every file listed in that manifest
10
10
  6. .waypoint/agents/code-reviewer.md
11
11
 
12
12
  After reading them, follow .waypoint/agents/code-reviewer.md as your operating instructions.
13
13
  """
14
-
@@ -1,13 +1,16 @@
1
+ [features]
2
+ multi_agent = true
3
+
1
4
  [agents]
2
5
  max_depth = 1
3
- max_threads = 4
6
+ max_threads = 24
4
7
 
5
8
  [agents."code-health-reviewer"]
6
- description = "Read-only reviewer focused on maintainability drift, dead code, duplication, and refactoring opportunities worth fixing."
9
+ description = "Read-only background reviewer for post-commit maintainability drift, dead code, duplication, and refactoring opportunities worth fixing."
7
10
  config_file = "agents/code-health-reviewer.toml"
8
11
 
9
12
  [agents."code-reviewer"]
10
- description = "Read-only deep code reviewer focused on real bugs, regressions, and integration mistakes."
13
+ description = "Read-only background reviewer for post-commit bugs, regressions, and integration mistakes."
11
14
  config_file = "agents/code-reviewer.toml"
12
15
 
13
16
  [agents."docs-researcher"]
@@ -3,11 +3,11 @@
3
3
  Repo-local Waypoint configuration and optional integration sources.
4
4
 
5
5
  - `config.toml` — Waypoint feature toggles and file locations
6
- - `WORKSPACE.md` — live operational state
6
+ - `WORKSPACE.md` — live operational state; new or materially revised entries in multi-topic sections are timestamped
7
7
  - `DOCS_INDEX.md` — generated docs routing map
8
8
  - `SOUL.md` — agent identity and working values
9
9
  - `agent-operating-manual.md` — required session workflow
10
- - `docs/` — Waypoint-managed project memory (architecture, decisions, debugging knowledge, durable plans)
10
+ - `docs/` — Waypoint-managed project memory (architecture, decisions, debugging knowledge, durable plans); routable docs use `summary`, `last_updated`, and `read_when` frontmatter
11
11
  - `agents/` — agent prompt files that optional Codex roles can read and follow
12
12
  - `automations/` — optional automation source specs
13
13
  - `context/` — generated session context bundle
@@ -30,6 +30,8 @@ You're direct, opinionated, and evidence-driven. You read before you write. You
30
30
 
31
31
  **Update the durable record.** When behavior changes, update docs. When state changes, update `WORKSPACE.md`. When a better pattern emerges, encode it in the repo contract instead of rediscovering it later.
32
32
 
33
+ **Close the loop after commits.** If Waypoint's reviewer roles are available, launch `code-reviewer` and `code-health-reviewer` after your own commits and address the real findings before you call the work finished.
34
+
33
35
  **Prefer small, reviewable changes.** Keep work scoped and comprehensible.
34
36
 
35
37
  ## What Matters Most
@@ -42,10 +42,11 @@ If something important lives only in your head or in the chat transcript, the re
42
42
 
43
43
  - Read code before editing it.
44
44
  - Follow the repo's documented patterns when they are healthy.
45
- - Update `.waypoint/WORKSPACE.md` as live execution state when progress meaningfully changes.
46
- - Update `.waypoint/docs/` when durable knowledge changes.
45
+ - Update `.waypoint/WORKSPACE.md` as live execution state when progress meaningfully changes. In multi-topic sections, prefix new or materially revised bullets with a local timestamp like `[2026-03-06 20:10 PST]`.
46
+ - Update `.waypoint/docs/` when durable knowledge changes, and refresh each changed routable doc's `last_updated` field.
47
47
  - Rebuild `.waypoint/DOCS_INDEX.md` whenever routable docs change.
48
48
  - Use the repo-local skills and optional reviewer agents instead of improvising from scratch.
49
+ - Do not kill long-running subagents or reviewer agents just because they are slow. Wait unless they are clearly stuck, failed, or the user redirects the work.
49
50
 
50
51
  ## Documentation expectations
51
52
 
@@ -66,6 +67,10 @@ Do not document every trivial implementation detail. Document the non-obvious, d
66
67
  - `error-audit` when failures are being swallowed or degraded invisibly
67
68
  - `observability-audit` when production debugging signals look weak
68
69
  - `ux-states-audit` when async/data-driven UI likely lacks loading, empty, or error states
70
+ - `workspace-compress` after meaningful chunks, before stopping, and before review when the live handoff needs compression
71
+ - `pre-pr-hygiene` before pushing or opening/updating a PR for substantial work
72
+ - `pr-review` once a PR has active review comments or automated review in progress
73
+ - `e2e-verify` for major user-facing or cross-system changes that need manual end-to-end verification
69
74
 
70
75
  ## When to use the optional reviewer agents
71
76
 
@@ -76,6 +81,15 @@ If the repo was initialized with Waypoint roles enabled, use them as focused sec
76
81
  - `docs-researcher` for external dependency research
77
82
  - `plan-reviewer` to challenge weak implementation plans before execution
78
83
 
84
+ ## Post-Commit Review Loop
85
+
86
+ If Waypoint's optional roles are enabled and you authored a commit, immediately after that commit:
87
+
88
+ 1. Launch `code-reviewer` and `code-health-reviewer` in parallel as background, read-only reviewers.
89
+ 2. Scope them to the commit you just made, then widen only when surrounding files are needed to validate a finding.
90
+ 3. Do not call the work finished before you read both reviewer results.
91
+ 4. Fix real findings, rerun the relevant verification, update workspace/docs if needed, and make a follow-up commit when fixes change the repo.
92
+
79
93
  ## Quality bar
80
94
 
81
95
  - No silent assumptions
@@ -9,7 +9,7 @@ You are a Code Health specialist. You find maintainability issues and technical
9
9
 
10
10
  1. Read `.waypoint/SOUL.md`
11
11
  2. Read `.waypoint/agent-operating-manual.md`
12
- 3. Read `WORKSPACE.md`
12
+ 3. Read `.waypoint/WORKSPACE.md`
13
13
  4. Read `.waypoint/context/MANIFEST.md`
14
14
  5. Read every file listed in the manifest
15
15
  6. Read the docs relevant to the area under review
@@ -59,7 +59,7 @@ Do not create findings for:
59
59
 
60
60
  ## Scope
61
61
 
62
- Check recent commits and changes to determine scope. Focus on:
62
+ In Waypoint's default post-commit review loop, start with the latest self-authored commit, then widen only when related files are needed to validate a maintainability issue. Focus on:
63
63
 
64
64
  - recently changed files
65
65
  - their importers
@@ -84,4 +84,3 @@ Each finding needs:
84
84
  ## Return
85
85
 
86
86
  Files analyzed, findings, brief overall assessment.
87
-
@@ -9,7 +9,7 @@ You are a code reviewer. Find bugs that matter — logic errors, data flow issue
9
9
 
10
10
  1. Read `.waypoint/SOUL.md`
11
11
  2. Read `.waypoint/agent-operating-manual.md`
12
- 3. Read `WORKSPACE.md`
12
+ 3. Read `.waypoint/WORKSPACE.md`
13
13
  4. Read `.waypoint/context/MANIFEST.md`
14
14
  5. Read every file listed in the manifest
15
15
  6. Read the docs relevant to the changed area
@@ -41,7 +41,7 @@ Not:
41
41
 
42
42
  ### 1. Get the Changes
43
43
 
44
- Review the actual diff or recent changed files first.
44
+ In Waypoint's default post-commit review loop, start with the latest self-authored commit. Review the actual diff or recent changed files first, then widen only as needed.
45
45
 
46
46
  ### 2. Deep Research
47
47
 
@@ -99,4 +99,3 @@ Do not report:
99
99
  - theoretical problems you can't demonstrate
100
100
  - style preferences
101
101
  - vague "could be cleaner" commentary without concrete benefit
102
-
@@ -18,10 +18,10 @@ Every routable doc needs YAML frontmatter:
18
18
  ```yaml
19
19
  ---
20
20
  summary: One-line description
21
+ last_updated: "2026-03-06 20:10 PST"
21
22
  read_when:
22
23
  - task cue
23
24
  ---
24
25
  ```
25
26
 
26
- `DOCS_INDEX.md` is generated from the docs here.
27
-
27
+ Refresh `last_updated` whenever you materially change a doc. `DOCS_INDEX.md` is generated from the docs here.
@@ -1,95 +1,113 @@
1
1
  ---
2
- summary: Opinionated rules for writing and changing Waypoint code so behavior stays explicit, strict, observable, and easy to evolve.
2
+ summary: Universal coding conventions explicit behavior, type safety, frontend consistency, reliability, and behavior-focused verification
3
+ last_updated: "2026-03-10 10:05 PDT"
3
4
  read_when:
4
- - writing new code
5
- - changing existing behavior
6
- - introducing or removing configuration
7
- - handling external input or external systems
8
- - adding tests, logging, or state transitions
5
+ - writing code
6
+ - coding standards
7
+ - code conventions
8
+ - TypeScript
9
+ - frontend
10
+ - backend
11
+ - error handling patterns
12
+ - testing
9
13
  ---
10
14
 
11
15
  # Code Guide
12
16
 
13
- Waypoint favors explicitness over convenience, correctness over compatibility theater, and deletion over accumulation. Code should make the system easier to reason about after the change, not merely pass today.
17
+ Write code that keeps behavior explicit, failure visible, and the next change easier than the last one.
14
18
 
15
19
  ## 1. Compatibility is opt-in, not ambient
16
20
 
17
21
  Do not preserve old behavior unless a user-facing requirement explicitly asks for it.
18
22
 
19
- When replacing a path, remove the old one instead of leaving a shim, alias, translation layer, or silent compatibility branch. If compatibility must be preserved, document the exact contract being preserved and the planned removal condition.
23
+ - Remove replaced paths instead of leaving shims, aliases, or silent compatibility branches.
24
+ - Do not keep dead fields, dual formats, or migration-only logic "just in case."
25
+ - If compatibility must stay, document the exact contract being preserved and the removal condition.
20
26
 
21
- Do not keep dead fields, dead parameters, dual formats, or migration-only logic "just in case". Every compatibility layer becomes part of the design whether intended or not.
27
+ ## 2. Type safety is non-negotiable
22
28
 
23
- ## 2. Fail clearly, never quietly
29
+ The compiler is part of the design, not an afterthought.
24
30
 
25
- Errors are part of the contract. Surface them early and with enough context to diagnose the cause.
31
+ - Write as if strict mode is enabled. Type errors are build blockers.
32
+ - Never use `any` when `unknown`, narrowing, generics, or better shared types can express the real contract.
33
+ - Reuse exported library or app types instead of recreating them locally.
34
+ - Be explicit at boundaries: function params, returns, public interfaces, API payloads, DB rows, and shared contracts.
35
+ - Validate external data at boundaries with schema validation and convert it into trusted internal shapes once.
36
+ - Avoid cross-package type casts unless there is no better contract available; fix the shared types instead when practical.
26
37
 
27
- Do not swallow errors, downgrade them to logs, or return partial success unless partial success is the explicit API. If an operation can fail in distinct ways, preserve those distinctions. Do not replace a specific failure with a generic one that destroys meaning.
38
+ ## 3. Fail clearly, never quietly
28
39
 
29
- Error messages should identify what failed, at which boundary, and why the system refused to proceed. They should not force readers to infer missing state from generic text.
40
+ Errors are part of the contract.
30
41
 
31
- ## 3. No silent fallback paths
42
+ - Fail explicitly. No silent fallbacks, empty catches, or degraded behavior that pretends everything is fine.
43
+ - Every caught exception must propagate, crash, or be surfaced truthfully to the user or operator.
44
+ - Do not silently switch to worse models, stale cache, inferred defaults, empty values, or best-effort modes unless that degradation is an intentional product behavior.
45
+ - Required configuration has no silent defaults. Missing required config is a startup or boundary failure.
46
+ - Error messages should identify what failed, where, and why.
32
47
 
33
- Fallbacks are allowed only when they are deliberate product behavior, not a coding reflex.
48
+ ## 4. Validate at boundaries
34
49
 
35
- Do not silently retry with weaker behavior, alternate providers, cached data, inferred defaults, empty values, or best-effort modes unless the user asked for degraded operation and the degraded result remains truthful.
50
+ Anything crossing a boundary is untrusted until proven otherwise.
36
51
 
37
- If degradation exists, it must be explicit in code, testable, and observable. Hidden fallback logic makes the system look healthy while it is already off-contract.
52
+ - Validate user input, config, files, HTTP responses, generated content, database reads, queue payloads, and external API data at the boundary.
53
+ - Reject invalid data instead of "normalizing" it into something ambiguous.
54
+ - Keep validation near the boundary instead of scattering half-validation deep inside the system.
38
55
 
39
- ## 4. Validate at boundaries, not deep inside
56
+ ## 5. Prefer direct code over speculative abstraction
40
57
 
41
- Anything that crosses a boundary must be treated as untrusted: user input, config, environment, files, network responses, database reads, queue payloads, generated content, and data from other modules.
58
+ Do not invent complexity for hypothetical future needs.
42
59
 
43
- Validate structure, required fields, allowed values, and invariants at the boundary. Convert external data into a trusted internal shape once. Do not pass loosely-typed or half-validated data deeper into the system and hope downstream code copes.
60
+ - Add abstractions only when multiple concrete cases already demand the same shape.
61
+ - Prefer straightforward code and small duplication over the wrong generic layer.
62
+ - If a helper hides critical validation, state changes, or failure modes, it is probably hurting clarity.
44
63
 
45
- Boundary validation should reject invalid data, not "normalize" it into something ambiguous.
64
+ ## 6. Make state, contracts, and provenance explicit
46
65
 
47
- ## 5. Configuration must be strict
66
+ Readers should be able to tell what states exist, what transitions are legal, and what data can be trusted.
48
67
 
49
- Missing or invalid configuration should stop the system at startup or at the feature boundary where it becomes required.
68
+ - Use explicit state representations and enforce invariants at the boundary of the operation.
69
+ - Multi-step writes must have clear transaction boundaries.
70
+ - Retryable operations must be idempotent or guarded against duplicate effects.
71
+ - New schema and persistence work should make provenance obvious and protect against duplication with the right uniqueness constraints, foreign keys, or equivalent invariants.
72
+ - Shared schemas, fixtures, and contract types must match the real API and stored data shape.
50
73
 
51
- Do not hide absent configuration behind guessed defaults, environment-dependent behavior, or implicit no-op modes. Defaults are acceptable only when they are safe, intentional, and documented as part of the product contract.
74
+ ## 7. Frontend must reuse and fit the existing system
52
75
 
53
- Configuration should be centralized enough to audit. A reader should be able to tell which settings matter, what values are valid, and what happens when they are wrong.
76
+ Frontend changes should extend the app, not fork its design language.
54
77
 
55
- ## 6. Prefer direct code over speculative abstraction
78
+ - Before creating a new component, check whether the app already has a component or pattern that should be reused.
79
+ - Reuse existing components when they satisfy the need, even if minor adaptation is required.
80
+ - When a new component is necessary, make it match the design language, interaction model, spacing, states, and compositional patterns of the rest of the app.
81
+ - Handle all states for async and data-driven UI: loading, success, empty, error.
82
+ - Optimistic UI must have an explicit rollback or invalidation strategy. Never leave optimistic state hanging without a recovery path.
56
83
 
57
- Do not introduce abstractions for imagined future use. Add them only when multiple concrete cases already demand the same shape.
84
+ ## 8. Observability is part of correctness
58
85
 
59
- A small amount of duplication is cheaper than the wrong abstraction. Prefer code that exposes the current domain plainly over generic layers, plugin systems, factories, wrappers, or strategy trees created before the need is real.
86
+ If you cannot see the failure path, you have not finished the work.
60
87
 
61
- Abstractions must remove real complexity, not relocate it. If a helper hides critical behavior, state changes, validation, or failure modes, it is making the system harder to read.
88
+ - Emit structured logs, metrics, or events at important boundaries and state transitions.
89
+ - Include enough context to reproduce issues without logging secrets or sensitive data.
90
+ - Failed async work, retries, degraded paths, and rejected inputs must leave a useful trace.
91
+ - Do not use noisy logging to compensate for unclear control flow.
62
92
 
63
- ## 7. Make state and invariants explicit
93
+ ## 9. Test behavior, not implementation
64
94
 
65
- State transitions should be visible in code. Readers should be able to answer: what states exist, what moves the system between them, and what must always be true.
95
+ Tests should protect the contract users depend on.
66
96
 
67
- Do not encode important transitions as scattered flag mutations, ordering assumptions, optional fields, or side effects hidden in utility calls. Avoid representations where invalid states are easy to create and hard to detect.
68
-
69
- When a function changes state, make the transition obvious. When a module depends on an invariant, assert it at the boundary of the operation instead of relying on folklore.
70
-
71
- ## 8. Tests define behavior changes, not just regressions
72
-
73
- Any behavior change must update tests to describe the new contract. If the old behavior mattered, remove or rewrite the old tests instead of making them weaker.
74
-
75
- Test observable behavior and boundary cases, not implementation trivia. Cover failure modes, validation rules, configuration strictness, and any intentional degradation path. If a bug fix closes a previously possible bad state, add a test that proves the bad state is now rejected.
76
-
77
- Do not merge code whose behavior changed without leaving behind executable evidence of the new rules.
78
-
79
- ## 9. Observability is part of correctness
80
-
81
- Code is not complete if production failures cannot be understood from its signals.
82
-
83
- Emit structured logs, metrics, or events at important boundaries and state transitions, especially around input rejection, external calls, retries, and degraded modes. Observability should explain which path executed and why.
84
-
85
- Do not log noise to compensate for poor design. Prefer a small number of high-value signals tied to decisions, failures, and contract edges.
97
+ - Test observable behavior and boundary cases, not implementation trivia.
98
+ - Never write brittle regression tests that assert exact class strings, styling internals, private helper calls, incidental DOM structure, internal schema representations, or other implementation-detail artifacts.
99
+ - Regression tests must focus on the behavior that was broken and the behavior that is now guaranteed.
100
+ - For backend bugs, prefer behavior-focused regression tests by default.
101
+ - For frontend bugs, prefer manual QA by default; add automated regression coverage only when there is a stable user-visible behavior worth protecting.
102
+ - Do not merge behavior changes without leaving behind executable or clearly documented evidence of the new contract.
86
103
 
87
104
  ## 10. Optimize for future legibility
88
105
 
89
- Write code for the next person who must change it under pressure.
90
-
91
- Keep modules narrow in responsibility. Keep data flow obvious. Keep control flow boring. Prefer designs where the main path is easy to follow and unusual behavior is explicitly named.
106
+ Write code for the next engineer or agent who has to change it under pressure.
92
107
 
93
- When changing code, improve the shape around the change if needed. Do not leave behind half-migrated designs, obsolete branches, commented-out code, or placeholders for imagined follow-ups.
108
+ - Keep modules narrow in responsibility and data flow obvious.
109
+ - Remove stale branches, half-migrations, dead code, and obsolete docs around the change.
110
+ - Keep docs and shipped behavior aligned.
111
+ - Before pushing or opening a PR, do a hygiene pass for stale docs, drifting contracts, typing gaps, missing rollback strategies, and new persistence correctness risks.
94
112
 
95
- The best code is not code that can handle every possible future. It is code whose current truth is obvious, whose failures are visible, and whose wrong parts can be deleted without fear.
113
+ The best code is not the most flexible code. It is the code whose current truth is obvious, whose failures are visible, and whose wrong parts can be deleted without fear.
@@ -1,5 +1,7 @@
1
1
  # Workspace
2
2
 
3
+ Timestamp discipline: Prefix new or materially revised bullets in `Current State`, `In Progress`, `Next`, `Parked`, and `Done Recently` with `[YYYY-MM-DD HH:MM TZ]`.
4
+
3
5
  ## Active Goal
4
6
 
5
7
  Describe the main thing currently being built or changed.
@@ -23,4 +25,3 @@ What is intentionally deferred?
23
25
  ## Done Recently
24
26
 
25
27
  What meaningful progress just landed?
26
-
@@ -31,8 +31,12 @@ This is mandatory, not optional.
31
31
  - Do not skip the context refresh or skip files in the manifest.
32
32
 
33
33
  Working rules:
34
- - Keep `.waypoint/WORKSPACE.md` current as the live execution state
35
- - Update `.waypoint/docs/` when behavior or durable project knowledge changes
34
+ - Keep `.waypoint/WORKSPACE.md` current as the live execution state, with timestamped new or materially revised entries in multi-topic sections
35
+ - Update `.waypoint/docs/` when behavior or durable project knowledge changes, and refresh `last_updated` on touched routable docs
36
36
  - Use the repo-local skills Waypoint ships for structured workflows when relevant
37
+ - If optional reviewer roles are present and you make a commit, run `code-reviewer` and `code-health-reviewer` in parallel before calling the work done
38
+ - Before pushing or opening/updating a PR for substantial work, use `pre-pr-hygiene`
39
+ - Use `pr-review` once a PR has active review comments or automated review in progress
40
+ - Use `e2e-verify` for major user-facing or cross-system changes that need manual end-to-end verification
37
41
  - Treat the generated context bundle as required session bootstrap, not optional reference material
38
42
  <!-- waypoint:end -->