waypoint-codex 0.1.11 → 0.2.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,8 +5,8 @@ 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
11
  - repo-local skills for planning and audits
12
12
 
@@ -69,6 +69,8 @@ If you initialize with `--with-roles`, Waypoint scaffolds:
69
69
  - `docs-researcher`
70
70
  - `plan-reviewer`
71
71
 
72
+ 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.
73
+
72
74
  ## Update
73
75
 
74
76
  ```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
  }
@@ -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.2.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",
@@ -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
6
  max_threads = 4
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,8 +42,8 @@ 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
49
 
@@ -76,6 +76,15 @@ If the repo was initialized with Waypoint roles enabled, use them as focused sec
76
76
  - `docs-researcher` for external dependency research
77
77
  - `plan-reviewer` to challenge weak implementation plans before execution
78
78
 
79
+ ## Post-Commit Review Loop
80
+
81
+ If Waypoint's optional roles are enabled and you authored a commit, immediately after that commit:
82
+
83
+ 1. Launch `code-reviewer` and `code-health-reviewer` in parallel as background, read-only reviewers.
84
+ 2. Scope them to the commit you just made, then widen only when surrounding files are needed to validate a finding.
85
+ 3. Do not call the work finished before you read both reviewer results.
86
+ 4. Fix real findings, rerun the relevant verification, update workspace/docs if needed, and make a follow-up commit when fixes change the repo.
87
+
79
88
  ## Quality bar
80
89
 
81
90
  - 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,5 +1,6 @@
1
1
  ---
2
2
  summary: Opinionated rules for writing and changing Waypoint code so behavior stays explicit, strict, observable, and easy to evolve.
3
+ last_updated: "2026-03-05 21:27 PST"
3
4
  read_when:
4
5
  - writing new code
5
6
  - changing existing behavior
@@ -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,9 @@ 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
37
38
  - Treat the generated context bundle as required session bootstrap, not optional reference material
38
39
  <!-- waypoint:end -->