waypoint-codex 1.0.5 → 1.0.7

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
@@ -255,6 +255,8 @@ docs_dirs = [
255
255
  Waypoint ships a strong default skill pack for real coding work:
256
256
 
257
257
  - `planning`
258
+ - `foundational-redesign`
259
+ - `verify-completeness`
258
260
  - `code-guide-audit`
259
261
  - `adversarial-review`
260
262
  - `frontend-ship-audit`
@@ -280,6 +282,8 @@ be used deliberately when the moment calls for them.
280
282
 
281
283
  The most important ones are:
282
284
 
285
+ - `foundational-redesign` when the right move is a cleaner replacement that deletes legacy seams instead of patching around them
286
+ - `verify-completeness` when you think implementation is done and need a strict final pass against approved scope, planned file changes, and completion gates
283
287
  - `code-guide-audit` when you want a code quality pass against your repo's
284
288
  standards and working rules
285
289
  - `backend-ship-audit` when backend work needs a deeper production-readiness
package/dist/src/core.js CHANGED
@@ -22,6 +22,8 @@ const LEGACY_WAYPOINT_GITIGNORE_RULES = new Set([
22
22
  ".agents/",
23
23
  ".agents/skills/",
24
24
  ".agents/skills/planning/",
25
+ ".agents/skills/foundational-redesign/",
26
+ ".agents/skills/verify-completeness/",
25
27
  ".agents/skills/code-guide-audit/",
26
28
  ".agents/skills/adversarial-review/",
27
29
  ".agents/skills/visual-explanations/",
@@ -49,6 +51,8 @@ const LEGACY_WAYPOINT_GITIGNORE_RULES = new Set([
49
51
  ]);
50
52
  const SHIPPED_SKILL_NAMES = [
51
53
  "planning",
54
+ "foundational-redesign",
55
+ "verify-completeness",
52
56
  "code-guide-audit",
53
57
  "adversarial-review",
54
58
  "pr-review",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waypoint-codex",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "Make Codex better by default with stronger planning, code quality, reviews, tracking, and repo guidance.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: foundational-redesign
3
+ description: Use for code changes, refactors, and migrations when quality matters. Treat the request as if it had been a foundational assumption from day one: inspect the current system, choose the clean target shape, implement direct replacement, and aggressively delete obsolete legacy code unless coexistence is explicitly required.
4
+ ---
5
+
6
+ # Foundational Redesign
7
+
8
+ Apply this skill when the change should leave the system cleaner, not just patched.
9
+
10
+ ## Core rule
11
+
12
+ For each change, examine the existing system and redesign it into the most elegant solution that would have emerged if the change had been a foundational assumption from the start.
13
+
14
+ ## Execution loop
15
+
16
+ 1. Inspect the real current shape first: code paths, constraints, routed docs, and approved scope.
17
+ 2. Define the clean target shape that would exist if this requirement had always been true.
18
+ 3. Pick the smallest coherent redesign that reaches that target.
19
+ 4. If the redesign is non-trivial (architecture/interface/data-model impact), explain the redesign decision to the user and get agreement before executing it.
20
+ 5. Implement with direct replacement and aggressively delete legacy seams or compatibility scaffolding unless coexistence is explicitly required.
21
+ 6. Before stopping, re-read every changed file (mandatory), compare against the current plan and agreed scope, and continue working if any gap remains.
22
+
23
+ ## Output contract for non-trivial changes
24
+
25
+ Summarize:
26
+
27
+ - current shape
28
+ - target shape
29
+ - redesign decision confirmed with user (for non-trivial redesign)
30
+ - what legacy code was deleted
31
+ - what verification was run
32
+ - any remaining gap to close
33
+
34
+ ## Gotchas
35
+
36
+ - Do not preserve legacy branches by default "just in case".
37
+ - Do not call work complete before the mandatory final file re-read.
38
+ - Do not stop at partial scope; continue until approved scope is actually satisfied.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Foundational Redesign"
3
+ short_description: "Redesign from first principles and delete legacy seams"
4
+ default_prompt: "Use $foundational-redesign for this change: inspect the existing system, design the clean target shape as if this requirement were foundational from the start, replace directly, and aggressively remove obsolete legacy code unless coexistence is explicitly required."
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: verify-completeness
3
+ description: Use when implementation appears done and before reporting completion. Re-read the original plan and agreed scope, re-read files that were supposed to be created or changed, verify no approved scope was reduced or skipped, and continue working until the scope is truly complete.
4
+ ---
5
+
6
+ # Verify Completeness
7
+
8
+ Use this skill at final closeout, right before you would report the work complete.
9
+
10
+ ## Required verification loop
11
+
12
+ 1. Re-read the original plan and the latest agreed scope before deciding status.
13
+ 2. Re-read `ACTIVE_PLANS.md` and `WORKSPACE.md` for current checklist, phase, blockers, and verification state.
14
+ 3. Build the expected file set from plan/scope: files that were supposed to be created, modified, or deleted.
15
+ 4. Re-read those files directly. This final re-read is mandatory even if they were read earlier in the session.
16
+ 5. Compare expected scope vs actual outcome and list any missing or partially completed items.
17
+ 6. Run a scope-discipline pass: identify additions that were not requested or approved. Remove/simplify them before completion, or explicitly ask the user to approve keeping them.
18
+ 7. Run a cleanup pass on changed files: remove duplicated logic, unnecessary abstractions/files, and low-value comments that create maintenance bloat.
19
+ 8. If any approved item is missing, incomplete, or silently deferred, do not report completion. Continue working until the agreed scope is fully satisfied or discuss a scope change explicitly.
20
+
21
+ ## Completion gate
22
+
23
+ You can report complete only when all are true:
24
+
25
+ - approved scope items are done
26
+ - planned file changes match reality
27
+ - verification/checkpoints required by the plan were run (or explicitly called out as blocked)
28
+ - no hidden scope reduction occurred
29
+ - no unapproved scope expansion remains
30
+ - no obvious duplication or avoidable bloat remains in touched files
31
+
32
+ ## Output contract
33
+
34
+ Before final status, summarize briefly:
35
+
36
+ - scope reviewed
37
+ - files re-read for final verification
38
+ - completed items
39
+ - removed unapproved extras or bloat cleanup applied
40
+ - remaining gaps (if any)
41
+ - next action (continue execution or complete)
42
+
43
+ ## Gotchas
44
+
45
+ - Do not mark complete from memory; verify by re-reading files.
46
+ - Do not treat partial completion as done.
47
+ - Do not skip plan checkpoints just because code compiles.
48
+ - Do not keep speculative extras "for future-proofing" unless the user approved them.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Verify Completeness"
3
+ short_description: "Run a strict final scope and file verification pass"
4
+ default_prompt: "Use $verify-completeness now: re-read the approved plan and scope, re-read all files that were supposed to change, remove unapproved extras and obvious bloat, verify nothing was dropped, and keep working if any approved scope item is still incomplete."
@@ -4,6 +4,8 @@
4
4
  .codex/agents/code-health-reviewer.toml
5
5
  .codex/agents/plan-reviewer.toml
6
6
  .agents/skills/planning/
7
+ .agents/skills/foundational-redesign/
8
+ .agents/skills/verify-completeness/
7
9
  .agents/skills/work-tracker/
8
10
  .agents/skills/docs-sync/
9
11
  .agents/skills/code-guide-audit/
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { existsSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
3
+ import { existsSync, readFileSync, readdirSync, realpathSync, writeFileSync } from "node:fs";
4
4
  import path from "node:path";
5
5
  import { fileURLToPath } from "node:url";
6
6
 
@@ -101,19 +101,28 @@ function parseFrontmatter(filePath) {
101
101
  return { summary, readWhen };
102
102
  }
103
103
 
104
- function walkDocs(projectRoot, currentDir, output) {
105
- for (const entry of readdirSync(currentDir)) {
106
- const fullPath = path.join(currentDir, entry);
107
- const stat = statSync(fullPath);
108
- if (stat.isDirectory()) {
109
- if (SKIP_DIRS.has(entry)) {
104
+ function walkDocs(projectRoot, currentDir, output, visitedDirs) {
105
+ const resolvedCurrentDir = realpathSync(currentDir);
106
+ if (visitedDirs.has(resolvedCurrentDir)) {
107
+ return;
108
+ }
109
+ visitedDirs.add(resolvedCurrentDir);
110
+
111
+ for (const entry of readdirSync(currentDir, { withFileTypes: true })) {
112
+ if (entry.isSymbolicLink()) {
113
+ continue;
114
+ }
115
+
116
+ const fullPath = path.join(currentDir, entry.name);
117
+ if (entry.isDirectory()) {
118
+ if (SKIP_DIRS.has(entry.name)) {
110
119
  continue;
111
120
  }
112
- walkDocs(projectRoot, fullPath, output);
121
+ walkDocs(projectRoot, fullPath, output, visitedDirs);
113
122
  continue;
114
123
  }
115
124
 
116
- if (!entry.endsWith(".md") || SKIP_NAMES.has(entry)) {
125
+ if (!entry.isFile() || !entry.name.endsWith(".md") || SKIP_NAMES.has(entry.name)) {
117
126
  continue;
118
127
  }
119
128
 
@@ -134,7 +143,7 @@ function collectDocEntries(projectRoot, docsDir) {
134
143
  const entries = [];
135
144
 
136
145
  if (existsSync(docsDir)) {
137
- walkDocs(projectRoot, docsDir, entries);
146
+ walkDocs(projectRoot, docsDir, entries, new Set());
138
147
  }
139
148
 
140
149
  return entries;
@@ -3,6 +3,8 @@
3
3
 
4
4
  These instructions are mandatory in this repo and override weaker generic guidance unless the user says otherwise.
5
5
 
6
+ The most important rule: For each change, examine the existing system and redesign it into the most elegant solution that would have emerged if the change had been a foundational assumption from the start.
7
+
6
8
  Waypoint owns only the text inside these `waypoint:start/end` markers.
7
9
  If you need repo-specific AGENTS instructions, write them outside this managed block.
8
10
  Do not put durable repo guidance inside the managed block, because `waypoint init` may replace it during upgrades.
@@ -19,13 +21,12 @@ This repo's default artifact flow is:
19
21
 
20
22
  Run the Waypoint bootstrap only at session start, after compaction, or when the user explicitly asks for it:
21
23
  1. Run `node .waypoint/scripts/prepare-context.mjs`
22
- 2. Read `AGENTS.md`
23
- 3. Read `.waypoint/WORKSPACE.md`
24
- 4. Read `.waypoint/ACTIVE_PLANS.md`
25
- 5. Read `.waypoint/docs/code-guide.md`
26
- 6. Read `.waypoint/DOCS_INDEX.md`
27
- 7. Read `.waypoint/context/SNAPSHOT.md`
28
- 8. Read `.waypoint/context/RECENT_THREAD.md`
24
+ 2. Read `.waypoint/WORKSPACE.md`
25
+ 3. Read `.waypoint/ACTIVE_PLANS.md`
26
+ 4. Read `.waypoint/docs/code-guide.md`
27
+ 5. Read `.waypoint/DOCS_INDEX.md`
28
+ 6. Read `.waypoint/context/SNAPSHOT.md`
29
+ 7. Read `.waypoint/context/RECENT_THREAD.md`
29
30
 
30
31
  Investigate the actual code, docs, and routed context before you answer detailed questions or start implementation.
31
32
  Prefer visible repo state over hidden assumptions or chat-only memory.
@@ -37,12 +38,13 @@ Once the user approves a plan or tells you to proceed, that approved scope is th
37
38
  `WORKSPACE.md` is the live state file. `ACTIVE_PLANS.md` is the active execution checklist. Keep them current when state, blockers, or verification materially change.
38
39
  When durable behavior changes, update the relevant docs during the work. When live execution state changes, update `WORKSPACE.md` or `ACTIVE_PLANS.md` during the work, not only at the end.
39
40
 
40
- Refactor and migration default: use direct replacement, not compatibility scaffolding, unless the user or project docs explicitly require coexistence. Delete obsolete code aggressively and finish the phase back to green. Large destructive edits are allowed when they are the clearest path to the approved target state.
41
+ When changing code, do not hesitate to aggressively delete legacy code and rebuild the system when that is the clearest path to accomplishing the goal. Prefer clean replacement over compatibility scaffolding unless the user or project docs explicitly require coexistence.
41
42
 
42
43
  Use reviewer passes when the work is non-trivial or risky, before PR-ready handoff, and before final closeout when helpful.
43
44
 
44
45
  Keep communication concise. Lead with the answer, diagnosis, decision, or next step. Explain the diagnosis before implementation when the cause, tradeoffs, or solution shape are not already obvious.
45
46
 
46
47
  Verification should match the real risk surface. Inspect real UI for UI work when practical, and run code or inspect real output for backend or script work when practical.
47
- Before reporting completion, verify the result yourself when reasonably possible, reread `ACTIVE_PLANS.md` and `WORKSPACE.md`, and compare reality against the approved scope. If the work is not actually complete, keep going.
48
+ Before stopping, check the current plan and agreed scope, then re-read the files you changed to confirm they match the intended result. This final file re-read is mandatory even if you already read them earlier in the session. If the goal is not achieved, continue working.
49
+ When work is non-trivial and you are about to report completion, run `verify-completeness` for a final scope-and-files closeout pass, including unapproved-scope and bloat cleanup checks.
48
50
  <!-- waypoint:end -->