waypoint-codex 1.0.12 → 1.0.14

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/dist/src/core.js CHANGED
@@ -9,6 +9,7 @@ const DEFAULT_DOCS_INDEX = ".waypoint/DOCS_INDEX.md";
9
9
  const DEFAULT_PLANS_DIR = ".waypoint/plans";
10
10
  const DEFAULT_WORKSPACE = ".waypoint/WORKSPACE.md";
11
11
  const DEFAULT_ACTIVE_PLANS = ".waypoint/ACTIVE_PLANS.md";
12
+ const ENABLE_MANAGED_GITIGNORE = false;
12
13
  const GITIGNORE_WAYPOINT_START = "# Waypoint state";
13
14
  const GITIGNORE_WAYPOINT_END = "# End Waypoint state";
14
15
  const GITIGNORE_SKILLS_PLACEHOLDER = "__WAYPOINT_SKILL_IGNORES__";
@@ -25,8 +26,6 @@ const LEGACY_WAYPOINT_GITIGNORE_RULES = new Set([
25
26
  ".agents/skills/planning/",
26
27
  ".agents/skills/foundational-redesign/",
27
28
  ".agents/skills/verify-completeness/",
28
- ".agents/skills/code-guide-audit/",
29
- ".agents/skills/adversarial-review/",
30
29
  ".agents/skills/visual-explanations/",
31
30
  ".agents/skills/frontend-context-interview/",
32
31
  ".agents/skills/backend-context-interview/",
@@ -54,8 +53,6 @@ const SHIPPED_SKILL_NAMES = [
54
53
  "planning",
55
54
  "foundational-redesign",
56
55
  "verify-completeness",
57
- "code-guide-audit",
58
- "adversarial-review",
59
56
  "pr-review",
60
57
  "agi-help",
61
58
  "frontend-context-interview",
@@ -403,7 +400,9 @@ export function initRepository(projectRoot, options) {
403
400
  upsertManagedBlock(path.join(projectRoot, "AGENTS.md"), readTemplate("managed-agents-block.md"));
404
401
  scaffoldSkills(projectRoot);
405
402
  scaffoldOptionalCodex(projectRoot);
406
- appendGitignoreSnippet(projectRoot);
403
+ if (ENABLE_MANAGED_GITIGNORE) {
404
+ appendGitignoreSnippet(projectRoot);
405
+ }
407
406
  const docsIndexPath = path.join(projectRoot, config.docs_index_file ?? DEFAULT_DOCS_INDEX);
408
407
  const docsIndex = renderDocsIndex(projectRoot, docsIndexSections(projectRoot, config));
409
408
  writeText(docsIndexPath, `${docsIndex.content}\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waypoint-codex",
3
- "version": "1.0.12",
3
+ "version": "1.0.14",
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,26 @@
1
+ ---
2
+ name: edit-at-the-right-layer
3
+ description: Make changes at the true ownership layer instead of patching nearby call sites. Use when implementing features, bug fixes, or refactors where behavior should be corrected at its source of truth rather than through wrappers, flags, or duplicated logic.
4
+ ---
5
+
6
+ Identify where this behavior is actually owned, then edit there.
7
+
8
+ ## Goal
9
+
10
+ Fix or extend behavior at the layer that owns the contract so future changes stay local and coherent.
11
+
12
+ ## Workflow
13
+
14
+ 1. Trace the path from entry point to ownership.
15
+ 2. Identify the contract owner (domain/service/model/state boundary) for the requested behavior.
16
+ 3. Prefer changing that owner over adding patches in callers, controllers, views, adapters, or wrappers.
17
+ 4. Remove compensating logic that became unnecessary after the ownership-layer fix.
18
+ 5. Update boundary tests at the owning layer and only add higher/lower-layer tests when they cover a distinct risk.
19
+
20
+ ## Rules
21
+
22
+ - Do not patch symptoms in outer layers when the source-of-truth layer can be fixed directly.
23
+ - Do not add pass-through wrappers or compatibility branches as a default response.
24
+ - Do not duplicate the same rule across multiple layers.
25
+ - If a temporary cross-layer patch is unavoidable, mark it as transitional and remove it in the same phase whenever possible.
26
+ - Prefer one clear owner per rule.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Edit At The Right Layer"
3
+ short_description: "Apply changes at the true ownership layer"
4
+ default_prompt: "Use $edit-at-the-right-layer to locate the source-of-truth ownership layer, implement the change there, and remove outer-layer patches or duplicated logic."
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: legibility-pass
3
+ description: Improve code legibility within a defined scope without changing intended behavior. Use when code is correct but hard to read, reason about, or safely modify. Focus on making intent, control flow, state, boundaries, and important behavior easier to see through better naming, clearer structure, reduced indirection, and simpler local reasoning.
4
+ ---
5
+
6
+ Refactor the given scope to make the current truth easier to see.
7
+
8
+ Preserve behavior unless the user asked for functional change.
9
+
10
+ Focus on:
11
+ - clearer names for modules, functions, variables, and states
12
+ - making the main flow easy to follow
13
+ - making failure paths and edge conditions explicit
14
+ - reducing indirection that hides important behavior
15
+ - making state, contracts, and boundaries easier to understand
16
+ - collapsing unnecessary wrappers or pass-through helpers
17
+ - improving local reasoning so a reader needs less cross-referencing
18
+
19
+ Within the requested scope:
20
+ 1. Identify the parts that are hardest to understand or easiest to misread.
21
+ 2. Improve naming so intent is obvious.
22
+ 3. Restructure code so the main path is visible and important branches are easy to spot.
23
+ 4. Make hidden assumptions, state transitions, and invariants more explicit.
24
+ 5. Remove low-value indirection that makes behavior harder to trace.
25
+ 6. Keep comments rare; prefer making the code itself explain the behavior.
26
+ 7. Add a brief clarifying comment only when the underlying rule or constraint is not obvious from the code alone.
27
+
28
+ Rules:
29
+ - Do not preserve confusing structure just because it already exists.
30
+ - Do not add abstractions that make reading harder.
31
+ - Do not replace clear code with clever code.
32
+ - Do not rely on comments to explain code that should be rewritten instead.
33
+ - Prefer fewer mental hops.
34
+ - Prefer one obvious reading of the code over multiple plausible interpretations.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Legibility Pass"
3
+ short_description: "Improve readability without changing behavior"
4
+ default_prompt: "Use $legibility-pass on the current scope to improve naming, control-flow clarity, and local reasoning while preserving intended behavior."
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: make-invariants-explicit
3
+ description: Surface and enforce critical invariants directly in code so invalid states are hard to represent and easy to detect. Use when behavior depends on assumptions about data shape, ordering, state transitions, permissions, or lifecycle constraints.
4
+ ---
5
+
6
+ Review the requested scope and identify assumptions that correctness depends on.
7
+
8
+ Look for assumptions such as:
9
+ - a value is always present
10
+ - operations happen in a specific order
11
+ - a transition cannot occur from a certain state
12
+ - a record is unique
13
+ - a side effect only happens once
14
+ - retries or duplicate delivery cannot happen
15
+ - a caller already validated something important
16
+ - a user or actor is authorized because an earlier layer checked it
17
+ - external data already has the expected shape
18
+
19
+ If an important invariant is only implied, make it explicit.
20
+
21
+ Make invariants explicit using the strongest fitting mechanism:
22
+ - boundary validation
23
+ - state modeling
24
+ - type constraints
25
+ - schema constraints
26
+ - uniqueness or foreign-key rules
27
+ - idempotency guards
28
+ - explicit transition checks
29
+ - assertions or defensive guards at the true correctness boundary
30
+
31
+ When correcting violations:
32
+ - encode the invariant where it is naturally enforced
33
+ - remove duplicate or scattered half-checks when one authoritative check is better
34
+ - keep the invariant visible in the code structure
35
+ - preserve intended behavior unless the user asked for a change in behavior
36
+
37
+ Rules:
38
+ - Do not rely on hidden assumptions for correctness.
39
+ - Do not assume earlier layers already enforced critical invariants unless that contract is explicit and stable.
40
+ - Do not scatter partial checks across many places when one authoritative enforcement point exists.
41
+ - Prefer explicit invalid-state rejection over ambiguous normalization.
42
+ - If the invariant matters for correctness, make it visible in code, types, schema, or state transitions.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Make Invariants Explicit"
3
+ short_description: "Expose and enforce critical invariants"
4
+ default_prompt: "Use $make-invariants-explicit to identify hidden assumptions, encode them as explicit invariants at boundaries, and add focused validation/tests for high-risk rules."
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: verify-codebase-coherence
3
+ description: Verify that completed work fits the existing codebase instead of introducing unnecessary parallel patterns. Use after implementation within a defined scope to detect avoidable new components, utilities, abstractions, state paths, design patterns, or conventions that should have reused or extended existing ones. Correct the work so it integrates coherently with the repo's existing architecture, components, naming, contracts, and design language.
4
+ ---
5
+
6
+ Review the completed work in the requested scope and check whether it fits the existing codebase.
7
+
8
+ Look for unnecessary parallel patterns such as:
9
+ - new frontend components where an existing component should have been reused or extended
10
+ - new helpers, hooks, utilities, or adapters that duplicate an existing pattern
11
+ - new state paths or data flows that bypass the established architecture
12
+ - new naming, file structure, or API shapes that do not match nearby conventions
13
+ - one-off design, styling, or interaction patterns that do not fit the app
14
+ - local abstractions that solve a problem the codebase already has a standard way to solve
15
+
16
+ Before keeping a new construct, check whether the repo already has:
17
+ - a reusable component or composition pattern
18
+ - an established state or data-fetching pattern
19
+ - a standard boundary for validation, formatting, permissions, or persistence
20
+ - an existing utility or shared contract
21
+ - a nearby feature that should be extended instead of bypassed
22
+
23
+ If the work introduced a parallel pattern without a clear reason, fix it. Do not just report it.
24
+
25
+ When correcting violations:
26
+ - reuse or extend existing components, utilities, and patterns where appropriate
27
+ - remove unnecessary one-off abstractions or duplicate paths
28
+ - align naming, structure, and interfaces with nearby code
29
+ - preserve intended behavior unless the user asked for a behavioral change
30
+
31
+ Rules:
32
+ - Do not create a new component, utility, hook, adapter, or pattern if the repo already has one that should be reused or extended.
33
+ - Do not fork the design language or architecture for a local feature without a clear reason.
34
+ - Do not bypass established patterns just because creating a new path is faster.
35
+ - Prefer extending the existing system over creating a parallel mini-system.
36
+ - If divergence is necessary, it must be justified by a real requirement, not convenience.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Verify Codebase Coherence"
3
+ short_description: "Check architectural and structural coherence"
4
+ default_prompt: "Use $verify-codebase-coherence to audit the current scope for architectural coherence, boundary consistency, duplication, and drift before final handoff."
@@ -16,10 +16,11 @@ Use this skill at final closeout, right before you would report the work complet
16
16
  5. Compare expected scope vs actual outcome and list any missing or partially completed items.
17
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
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. Run a file-footprint sanity pass: collapse avoidable tiny-file fragmentation and keep code that changes together in the same place when boundary/reuse/size reasons are weak.
20
- 9. Run a test-signal sanity pass: remove redundant or brittle tests and keep the smallest high-signal set that still protects the contract.
21
- 10. Before commit/final handoff, run the full checks required by the plan (for example full typecheck/test/build sweep) once, unless explicitly blocked or the user asks for a different cadence.
22
- 11. 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.
19
+ 8. If changed code is still hard to read or reason about, run `legibility-pass` before completion and apply the resulting readability cleanup.
20
+ 9. Run a file-footprint sanity pass: collapse avoidable tiny-file fragmentation and keep code that changes together in the same place when boundary/reuse/size reasons are weak.
21
+ 10. Run a test-signal sanity pass: remove redundant or brittle tests and keep the smallest high-signal set that still protects the contract.
22
+ 11. Before commit/final handoff, run the full checks required by the plan (for example full typecheck/test/build sweep) once, unless explicitly blocked or the user asks for a different cadence.
23
+ 12. 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.
23
24
 
24
25
  ## Completion gate
25
26
 
@@ -42,6 +43,7 @@ Before final status, summarize briefly:
42
43
  - files re-read for final verification
43
44
  - completed items
44
45
  - removed unapproved extras or bloat cleanup applied
46
+ - legibility cleanup applied (if run)
45
47
  - file-collapsing or test-pruning done during sanity passes
46
48
  - remaining gaps (if any)
47
49
  - next action (continue execution or complete)
@@ -1,86 +0,0 @@
1
- ---
2
- name: adversarial-review
3
- description: Second-pass closeout review for a non-trivial implementation slice. Use when risky work needs a deliberate final review before being called done. This skill scopes the slice, runs the right reviewer agents and code-guide checks, fixes meaningful findings, and repeats until only optional polish remains.
4
- ---
5
-
6
- # Adversarial Review
7
-
8
- Use this skill when you explicitly want a closeout-grade second pass before calling a non-trivial slice done or ready to ship.
9
-
10
- This skill coordinates the specialist reviewers, keeps the scope tight, waits as long as needed, fixes meaningful findings, and reruns fresh review rounds until the remaining feedback is only optional polish or no findings at all.
11
-
12
- ## When To Skip This Skill
13
-
14
- - Skip it for tiny obvious edits where launching the full closeout loop would be noise.
15
- - Skip it for normal debugging or investigation where the user needs diagnosis and forward motion more than formal ship-readiness.
16
- - Skip it for pre-implementation planning; that is `plan-reviewer` territory.
17
- - Skip it for active PR comment back-and-forth; use `pr-review` for that workflow.
18
- - Skip it when the user wants a one-off targeted coding-guide check and not the full closeout loop; use `code-guide-audit` directly in that case.
19
-
20
- ## Step 1: Define The Reviewable Slice
21
-
22
- - Resolve the exact slice you are trying to close out before launching reviewers.
23
- - Prefer a recent self-authored commit when one cleanly represents the slice.
24
- - Otherwise use the current changed files, diff, or feature path.
25
- - Pass the reviewers the same concrete scope anchor, plus a short plain-English summary of what changed.
26
- - If the scope is muddy, tighten it before review instead of asking the reviewers to figure it out from an entire worktree.
27
-
28
- ## Step 2: Launch The Required Reviewers
29
-
30
- - Spawn `code-reviewer` for every non-trivial implementation slice.
31
- - Spawn `code-health-reviewer` when the change is medium or large, especially when it adds structure, duplicates logic, or introduces new abstractions.
32
- - Run `code-guide-audit` on the same scoped slice as part of the closeout loop.
33
- - Launch the reviewer agents with `fork_context: false`, `model: gpt-5.4`, and `reasoning_effort: high` unless the user explicitly asked for something else.
34
- - Tell the reviewer agents what changed, what scope anchor to use, and which files or feature area represent the slice under review.
35
- - When both reviewer agents apply, launch them in parallel.
36
-
37
- ## Step 3: Wait For The Round To Finish
38
-
39
- - Wait for every required reviewer result, no matter how long it takes.
40
- - Do not interrupt slow reviewer agents just because they are still running.
41
- - Do not call the work done while a required reviewer round is still in flight.
42
- - Read the full reviewer outputs before deciding what to fix.
43
-
44
- ## Step 4: Fix Meaningful Findings
45
-
46
- - Fix real correctness, regression, maintainability, and code-guide issues.
47
- - Rerun the most relevant verification for the changed area after the fixes.
48
- - If a reviewer comment is only a nit or clearly optional polish, note that distinction and do not keep reopening the loop just to satisfy minor taste differences.
49
- - If a finding changes durable behavior or repo memory, update the relevant docs and workspace state before the next round.
50
-
51
- ## Step 5: Close The Old Review Round
52
-
53
- - Treat `code-reviewer` and `code-health-reviewer` as one-shot reviewer agents.
54
- - After you have read a reviewer result, close that reviewer thread.
55
- - If another pass is needed later, spawn a fresh reviewer instead of reusing the old thread.
56
-
57
- ## Step 6: Repeat Until The Slice Is Actually Clear
58
-
59
- - Start a fresh round whenever you made meaningful fixes in response to the previous round.
60
- - Reuse the same scope anchor when it still represents the slice cleanly; otherwise hand the new round the updated changed-file set or follow-up commit.
61
- - Rerun `code-guide-audit` when the fixes materially changed guide-relevant behavior or when the previous round surfaced guide-related issues.
62
- - Stop only when no meaningful findings remain. Optional polish and obvious nitpicks do not block closeout.
63
-
64
- ## Step 7: Report The Closeout State
65
-
66
- Summarize:
67
-
68
- - what scope was reviewed
69
- - which reviewers ran
70
- - what meaningful issues were fixed
71
- - what verification ran
72
- - whether the slice is now clear or what still blocks it
73
-
74
- ## Gotchas
75
-
76
- - Fresh reviewer rounds matter. If you make meaningful fixes, do not treat older reviewer findings as if they still describe the current code.
77
- - Green local tests are not enough if required reviewer threads are still running. Wait for the actual reviewer outputs before calling the slice done.
78
- - Close reviewer agents after each round. Reusing a stale reviewer thread weakens the signal and blurs which code state the findings apply to.
79
- - When this loop changes repo-health or upgrade behavior, test real old-repo edge cases, not just fresh-init cases.
80
- - If a reviewer result is clean, it should still name the key paths and related files it checked. A "looks fine" skim is not a real closeout pass.
81
-
82
- ## Keep This Skill Sharp
83
-
84
- - After meaningful runs, add new gotchas when the same review-loop failure, stale-review mistake, or repo-upgrade edge case is likely to happen again.
85
- - Tighten the description if the skill fires too broadly or misses real prompts like "final review pass" or "before we call this done."
86
- - If the loop keeps re-creating the same helper logic or review instructions, move that reusable logic into the skill or its supporting resources instead of leaving it in chat.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "Adversarial Review"
3
- short_description: "Run a deliberate second-pass closeout review"
4
- default_prompt: "Use $adversarial-review when this non-trivial implementation slice needs a deliberate final review loop with reviewer agents and code-guide checks before we call it done."
@@ -1,86 +0,0 @@
1
- ---
2
- name: code-guide-audit
3
- description: Audit a scoped implementation slice against the code guide and report only guide-related violations or risks. Use for coding-guide compliance checks on explicit behavior, root-cause fixes, boundary validation, security, concurrency, accessibility, performance, and future legibility.
4
- ---
5
-
6
- # Code Guide Audit
7
-
8
- Use this skill for a targeted audit against the coding guide, not for a whole-repo hygiene sweep.
9
-
10
- This skill owns one job: inspect the specific code the user points at, map it against the coding guide, and report only guide-related findings in that scope.
11
-
12
- ## When Not To Use This Skill
13
-
14
- - Skip it for broad ship-readiness review; use a ship-audit workflow for that.
15
- - Skip it for generic bug finding or regression review that is not specifically about the coding guide.
16
- - Skip it for active PR comment triage; use `pr-review` for that loop.
17
- - Skip it for repo-wide cleanup unless the user explicitly asked for a repo-wide coding-guide audit.
18
-
19
- ## Step 1: Load The Right Scope
20
-
21
- - Read the repo's routed code guide.
22
- - In standard Waypoint repos, use `.waypoint/docs/code-guide.md`.
23
- - If the repo routes the code guide somewhere else, follow the repo's own docs and routing instead of assuming another fixed path.
24
- - Read only the files, routes, tests, contracts, and nearby docs needed to understand the specific feature or slice under review.
25
- - If the scope is ambiguous, resolve it to a concrete file set, feature path, or commit-sized change surface before auditing.
26
-
27
- Do not expand into a whole-repo audit unless the user explicitly asks for that.
28
-
29
- ## Step 2: Translate The Guide Into Checks
30
-
31
- Audit only for rules that actually apply to the scoped code.
32
-
33
- Look for:
34
-
35
- - stale compatibility layers, shims, aliases, or migration-only branches
36
- - weak typing, avoidable `any`, recreated shared types, or unsafe casts
37
- - silent fallbacks, swallowed errors, degraded paths, or missing required-config failures
38
- - missing validation at input, config, API, file, queue, or database boundaries
39
- - speculative abstractions that hide the actual behavior
40
- - unclear state transitions, weak transaction boundaries, missing idempotency, or weak persistence invariants
41
- - frontend code that ignored reusable components or broke the existing design language
42
- - missing loading, empty, or error states
43
- - optimistic UI without rollback or invalidation
44
- - missing observability at important failure or state boundaries
45
- - regression tests that assert implementation details instead of behavior
46
-
47
- Skip rules that genuinely do not apply, but say that you skipped them.
48
-
49
- ## Step 3: Keep The Audit Narrow
50
-
51
- - Report only coding-guide findings for the requested scope.
52
- - Do not drift into generic architecture advice, repo-wide cleanup, docs sync, or PR readiness unless the finding is directly required by the guide.
53
- - If you notice issues outside scope, mention them only if they are severe enough that ignoring them would mislead the user about this audit.
54
-
55
- ## Step 4: Verify Evidence
56
-
57
- Ground each finding in the actual code.
58
-
59
- - Read the real implementation before calling something a violation.
60
- - When relevant, inspect the nearest tests, contracts, schemas, or reused components to confirm the gap.
61
- - Do not invent verification that you did not run.
62
-
63
- If the user asked for a pure audit, stop at findings. If they asked for fixes too, fix the clear issues and then verify the changed area.
64
-
65
- ## Step 5: Report The Result
66
-
67
- Summarize the scoped result in review style:
68
-
69
- - findings first, ordered by severity
70
- - each finding tied back to the relevant coding-guide rule
71
- - include exact file references
72
- - then note any skipped guide areas or residual uncertainty
73
-
74
- ## Gotchas
75
-
76
- - Do not turn this into generic code review. Every finding should tie back to a specific coding-guide rule.
77
- - Do not audit the whole repo by accident. Resolve the narrow slice first, then stay inside it unless an out-of-scope issue would seriously mislead the user.
78
- - Do not report a guide violation from a grep hit alone. Read the real implementation and the nearby evidence before calling it a problem.
79
- - Do not force every coding-guide rule onto every change. Skip non-applicable rules explicitly instead of inventing weak findings.
80
- - If you notice a broader ship-risk issue that is not really a coding-guide issue, say it is outside this skill's scope instead of quietly drifting into another audit.
81
-
82
- ## Keep This Skill Sharp
83
-
84
- - After meaningful runs, add new gotchas when the same guide-specific failure mode or scope-drift mistake keeps recurring.
85
- - Tighten the description if the skill fires on generic review requests or misses real prompts like "check this against the code guide."
86
- - If the same guide-rule translation logic keeps repeating, move that reusable detail into a supporting reference instead of expanding the hub file.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "Code Guide Audit"
3
- short_description: "Audit code-guide compliance on a scoped slice"
4
- default_prompt: "Use $code-guide-audit to audit this specific feature, file set, or implementation slice against the coding guide."