waypoint-codex 1.0.9 → 1.0.10
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/package.json +1 -1
- package/templates/.agents/skills/collapse-fragmented-modules/SKILL.md +56 -0
- package/templates/.agents/skills/collapse-fragmented-modules/agents/openai.yaml +0 -0
- package/templates/.agents/skills/plan-swarm-audit/SKILL.md +77 -0
- package/templates/.agents/skills/plan-swarm-audit/agents/openai.yaml +4 -0
- package/templates/.agents/skills/planning/SKILL.md +4 -0
- package/templates/.agents/skills/verify-completeness/SKILL.md +8 -2
- package/templates/.waypoint/docs/code-guide.md +13 -2
- package/templates/managed-agents-block.md +2 -0
package/package.json
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: collapse-fragmented-modules
|
|
3
|
+
description: Consolidate over-fragmented existing code within a defined scope. Use when a feature, module, or directory has been split into too many tiny files, thin wrappers, pass-through layers, single-use helpers, local-only types, local-only constants, or other low-value fragments that make future changes harder. Reduce file count by merging code that changes together, removing unnecessary indirection, and reorganizing the scope into a smaller number of cohesive files without changing intended behavior.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Refactor the given scope to reduce unnecessary file fragmentation.
|
|
7
|
+
|
|
8
|
+
Treat this as consolidation work, not feature work. Preserve behavior while making the code easier to change.
|
|
9
|
+
|
|
10
|
+
Within the requested scope:
|
|
11
|
+
|
|
12
|
+
1. Identify files that should be merged, removed, or kept.
|
|
13
|
+
Target especially:
|
|
14
|
+
- tiny files with little logic
|
|
15
|
+
- single-use helpers
|
|
16
|
+
- local-only types
|
|
17
|
+
- local-only constants
|
|
18
|
+
- thin wrappers
|
|
19
|
+
- pass-through adapters
|
|
20
|
+
- split files that always change together
|
|
21
|
+
|
|
22
|
+
2. Merge code that belongs to the same feature or responsibility into a smaller number of cohesive files.
|
|
23
|
+
|
|
24
|
+
3. Remove low-value indirection.
|
|
25
|
+
Collapse wrappers, adapters, and helper layers that do not enforce a real boundary or protect meaningful complexity.
|
|
26
|
+
|
|
27
|
+
4. Keep splits only when they are justified by one of these:
|
|
28
|
+
- real shared reuse
|
|
29
|
+
- clear architectural boundary
|
|
30
|
+
- meaningful file size
|
|
31
|
+
- clearly separate responsibility that does not usually change with neighboring code
|
|
32
|
+
|
|
33
|
+
5. Prefer edit locality over theoretical separation.
|
|
34
|
+
A routine change in this scope should touch as few files as reasonably possible.
|
|
35
|
+
|
|
36
|
+
6. Preserve external behavior and stable public contracts unless the user asked for behavioral change.
|
|
37
|
+
|
|
38
|
+
7. Update imports, exports, and tests to match the new structure.
|
|
39
|
+
|
|
40
|
+
8. Delete obsolete files as part of the same work. Do not leave dead fragments behind.
|
|
41
|
+
|
|
42
|
+
Rules:
|
|
43
|
+
- Do not keep tiny files just because they already exist.
|
|
44
|
+
- Do not preserve thin wrappers, pass-through hooks, local-only type files, or local-only constants files unless they provide real value.
|
|
45
|
+
- Do not split by category alone.
|
|
46
|
+
- Do not create a new abstraction while trying to remove fragmentation.
|
|
47
|
+
- Prefer one cohesive file over several microscopic files when the code changes together.
|
|
48
|
+
- Keep public boundaries clean, but aggressively collapse internal fragmentation.
|
|
49
|
+
- If unsure whether two files should be merged, merge them unless there is a clear boundary reason not to.
|
|
50
|
+
|
|
51
|
+
Before finishing, do a consolidation pass:
|
|
52
|
+
- remove newly obsolete files
|
|
53
|
+
- collapse redundant exports
|
|
54
|
+
- simplify import paths
|
|
55
|
+
- check whether the same feature is still spread across too many files
|
|
56
|
+
- reduce file count further if behavior and clarity allow
|
|
File without changes
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-swarm-audit
|
|
3
|
+
description: Use during execution of an approved multi-phase plan when a second-pass audit is needed. Spawn five parallel subagents with distinct audit scopes, consolidate findings, fix blockers, and repeat in bounded rounds until the phase or plan meets acceptance criteria.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Plan Swarm Audit
|
|
7
|
+
|
|
8
|
+
Use this skill while implementing an approved plan when you want an independent multi-agent audit loop before calling work complete.
|
|
9
|
+
|
|
10
|
+
## Required inputs
|
|
11
|
+
|
|
12
|
+
- plan path (for example `.waypoint/plans/<plan>.md`)
|
|
13
|
+
- active phase
|
|
14
|
+
- current changed-file scope (or scope anchor commit)
|
|
15
|
+
|
|
16
|
+
## Swarm setup (5 agents, disjoint scopes)
|
|
17
|
+
|
|
18
|
+
Spawn exactly five subagents in parallel, each with one owned audit lens:
|
|
19
|
+
|
|
20
|
+
1. Plan-scope compliance
|
|
21
|
+
2. Correctness and regression risk
|
|
22
|
+
3. Maintainability, duplication, and bloat
|
|
23
|
+
4. Verification and test coverage gaps
|
|
24
|
+
5. Docs and state drift (`ACTIVE_PLANS.md`, `WORKSPACE.md`, and relevant durable docs)
|
|
25
|
+
|
|
26
|
+
Each subagent must return:
|
|
27
|
+
|
|
28
|
+
- findings with severity
|
|
29
|
+
- exact file/line references
|
|
30
|
+
- whether each finding blocks phase completion
|
|
31
|
+
- recommended fix
|
|
32
|
+
- a final status suitable for immediate closeout
|
|
33
|
+
|
|
34
|
+
## Consolidation pass
|
|
35
|
+
|
|
36
|
+
After all five return:
|
|
37
|
+
|
|
38
|
+
1. Merge findings into one deduplicated list.
|
|
39
|
+
2. Group by severity and execution order.
|
|
40
|
+
3. Identify blockers vs optional polish.
|
|
41
|
+
4. Keep only findings within approved scope unless a scope-risk must be escalated to the user.
|
|
42
|
+
5. Close all swarm subagents after their outputs are captured. Do not leave audit agents running across rounds.
|
|
43
|
+
|
|
44
|
+
## Fix loop
|
|
45
|
+
|
|
46
|
+
1. Fix blocking findings first.
|
|
47
|
+
2. Run targeted verification for the changed area.
|
|
48
|
+
3. Re-check plan checklist and acceptance criteria.
|
|
49
|
+
4. Update `ACTIVE_PLANS.md` / `WORKSPACE.md` when state materially changes.
|
|
50
|
+
5. If blockers remain, run another swarm round.
|
|
51
|
+
|
|
52
|
+
## Stop condition
|
|
53
|
+
|
|
54
|
+
You may stop only when all are true:
|
|
55
|
+
|
|
56
|
+
- no blocking findings remain across the five audit lenses
|
|
57
|
+
- active phase acceptance criteria are satisfied
|
|
58
|
+
- `verify-completeness` closeout is clean
|
|
59
|
+
|
|
60
|
+
## Guardrails
|
|
61
|
+
|
|
62
|
+
- Use at most 3 swarm rounds per phase by default.
|
|
63
|
+
- Do not let subagents overlap ownership; keep scopes distinct.
|
|
64
|
+
- Always close every swarm subagent thread after consolidation for that round.
|
|
65
|
+
- Do not run full repo typecheck/test/build after every tiny fix. Use targeted checks during the loop, then full checks at pre-commit/final handoff.
|
|
66
|
+
- If the same finding repeats in 2 rounds, treat it as a structural blocker and change approach instead of micro-patching.
|
|
67
|
+
- Do not silently widen scope; escalate scope changes to the user.
|
|
68
|
+
|
|
69
|
+
## Output contract
|
|
70
|
+
|
|
71
|
+
Report:
|
|
72
|
+
|
|
73
|
+
- swarm round number
|
|
74
|
+
- consolidated blockers (with file/line refs)
|
|
75
|
+
- fixes applied
|
|
76
|
+
- verification run
|
|
77
|
+
- remaining blockers or confirmation that stop condition is met
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Plan Swarm Audit"
|
|
3
|
+
short_description: "Run a 5-agent audit loop against the active plan phase"
|
|
4
|
+
default_prompt: "Use $plan-swarm-audit with the current plan path and active phase. Spawn five parallel audit agents with distinct scopes, consolidate blockers, fix them, and repeat in bounded rounds until phase acceptance criteria are satisfied."
|
|
@@ -106,6 +106,8 @@ Plans document your understanding. Include what matters for this task:
|
|
|
106
106
|
- **Scope checklist**: Concrete implementation items that can be marked done or not done
|
|
107
107
|
- **Acceptance criteria**: What must be true when each phase is "done"
|
|
108
108
|
- **Phase checkpoints**: What verification, reviewer passes, tests, typechecks, builds, or manual QA must pass before moving to the next phase, with explicit cadence (targeted checks during implementation, full sweeps at phase-complete or pre-commit checkpoints unless the user asks otherwise)
|
|
109
|
+
- **File strategy**: Why each new file is necessary, how edit locality is preserved, and which splits are intentionally avoided
|
|
110
|
+
- **Test strategy**: The smallest durable test set that gives confidence for this change, plus why additional tests are not needed right now
|
|
109
111
|
- **Grep gates**: Exact searches that must return clean before a phase is review-ready or complete
|
|
110
112
|
- **Cleanup expectations**: What legacy or replaced paths must be removed before the work can be called complete
|
|
111
113
|
- **Test cases**: For behavioral changes, include input -> expected output examples
|
|
@@ -135,6 +137,8 @@ Before presenting the plan, verify against real code:
|
|
|
135
137
|
- Migration and refactor plans should include a legacy seam inventory before implementation starts
|
|
136
138
|
- Migration and refactor phases should include exact grep gates for the legacy symbols being removed
|
|
137
139
|
- Refactor and replacement plans should explicitly call out what legacy or obsolete code will be removed instead of preserving it by default
|
|
140
|
+
- Do not split files by concern labels alone. A new file requires a clear boundary, reuse need, or size reason.
|
|
141
|
+
- Do not inflate tests by default. Start from a small high-signal set and expand only when risk justifies it.
|
|
138
142
|
- If the user approves the plan, do not silently defer or drop checklist items later; discuss any proposed scope change first
|
|
139
143
|
|
|
140
144
|
If the change touches durable project behavior, include docs/workspace updates in the plan.
|
|
@@ -16,8 +16,10 @@ 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.
|
|
20
|
-
9.
|
|
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.
|
|
21
23
|
|
|
22
24
|
## Completion gate
|
|
23
25
|
|
|
@@ -29,6 +31,8 @@ You can report complete only when all are true:
|
|
|
29
31
|
- no hidden scope reduction occurred
|
|
30
32
|
- no unapproved scope expansion remains
|
|
31
33
|
- no obvious duplication or avoidable bloat remains in touched files
|
|
34
|
+
- no avoidable file fragmentation remains in touched feature areas
|
|
35
|
+
- test set remains high-signal and non-redundant for the risk level
|
|
32
36
|
|
|
33
37
|
## Output contract
|
|
34
38
|
|
|
@@ -38,6 +42,7 @@ Before final status, summarize briefly:
|
|
|
38
42
|
- files re-read for final verification
|
|
39
43
|
- completed items
|
|
40
44
|
- removed unapproved extras or bloat cleanup applied
|
|
45
|
+
- file-collapsing or test-pruning done during sanity passes
|
|
41
46
|
- remaining gaps (if any)
|
|
42
47
|
- next action (continue execution or complete)
|
|
43
48
|
|
|
@@ -47,3 +52,4 @@ Before final status, summarize briefly:
|
|
|
47
52
|
- Do not treat partial completion as done.
|
|
48
53
|
- Do not skip plan checkpoints just because code compiles.
|
|
49
54
|
- Do not keep speculative extras "for future-proofing" unless the user approved them.
|
|
55
|
+
- Do not keep fragmented tiny files or low-signal tests as evidence theater.
|
|
@@ -78,6 +78,8 @@ Security and privacy work is part of normal engineering, not a later hardening p
|
|
|
78
78
|
Do not invent complexity for hypothetical future needs.
|
|
79
79
|
|
|
80
80
|
- Add abstractions only when multiple concrete cases already demand the same shape.
|
|
81
|
+
- Do not introduce a new abstraction unless at least two concrete call sites already need the same contract, or a documented architectural boundary requires it.
|
|
82
|
+
- Do not add a thin wrapper, adapter, or pass-through layer unless it enforces a real contract, boundary, or migration transition.
|
|
81
83
|
- Prefer straightforward code and small duplication over the wrong generic layer.
|
|
82
84
|
- If a helper hides critical validation, state changes, or failure modes, it is probably hurting clarity.
|
|
83
85
|
|
|
@@ -106,6 +108,7 @@ Frontend changes should extend the app, not fork its design language.
|
|
|
106
108
|
|
|
107
109
|
- Before creating a new component, check whether the app already has a component or pattern that should be reused.
|
|
108
110
|
- Reuse existing components when they satisfy the need, even if minor adaptation is required.
|
|
111
|
+
- Do not create a thin wrapper component when a direct edit to the existing component is the cleaner path.
|
|
109
112
|
- 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.
|
|
110
113
|
- Handle all states for async and data-driven UI: loading, success, empty, error.
|
|
111
114
|
- Optimistic UI must have an explicit rollback or invalidation strategy. Never leave optimistic state hanging without a recovery path.
|
|
@@ -124,6 +127,7 @@ UI work is not correct if important users cannot operate it.
|
|
|
124
127
|
If you cannot see the failure path, you have not finished the work.
|
|
125
128
|
|
|
126
129
|
- Emit structured logs, metrics, or events at important boundaries and state transitions.
|
|
130
|
+
- Instrument important boundaries and state transitions, not every internal hop.
|
|
127
131
|
- Include enough context to reproduce issues without logging secrets or sensitive data.
|
|
128
132
|
- Failed async work, retries, degraded paths, and rejected inputs must leave a useful trace.
|
|
129
133
|
- Do not use noisy logging to compensate for unclear control flow.
|
|
@@ -142,6 +146,10 @@ Optimize based on real impact, not superstition, but do not ignore performance f
|
|
|
142
146
|
Tests should protect the contract users depend on.
|
|
143
147
|
|
|
144
148
|
- Test observable behavior and boundary cases, not implementation trivia.
|
|
149
|
+
- Start with the smallest test set that gives strong confidence.
|
|
150
|
+
- Default budget for a normal feature: one main-path test, one key edge or failure-path test, plus unit tests only for non-trivial pure logic.
|
|
151
|
+
- Do not duplicate confidence across layers unless a distinct risk justifies it.
|
|
152
|
+
- Do not add tests for trivial helpers, thin wrappers, pass-through glue, or refactor-sensitive internals unless they protect a meaningful rule.
|
|
145
153
|
- 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.
|
|
146
154
|
- Regression tests must focus on the behavior that was broken and the behavior that is now guaranteed.
|
|
147
155
|
- For backend bugs, prefer behavior-focused regression tests by default.
|
|
@@ -153,7 +161,10 @@ Tests should protect the contract users depend on.
|
|
|
153
161
|
Code should be easy to navigate under pressure.
|
|
154
162
|
|
|
155
163
|
- Use names that describe intent, not cleverness, incidental mechanics, or historical accidents.
|
|
156
|
-
-
|
|
164
|
+
- Do not split by default. Keep code that changes together in the same file or module unless there is a clear boundary, reuse need, or size problem.
|
|
165
|
+
- Before creating a new file, decide whether it reduces or increases the number of files touched by a routine future change.
|
|
166
|
+
- Do not create standalone files for helpers, types, constants, hooks, adapters, or mappers unless they are shared, large enough to justify extraction, or represent a real architectural boundary.
|
|
167
|
+
- Keep functions, modules, and APIs understandable without cross-referencing half the repo, but do not split cohesive feature code only to make files shorter.
|
|
157
168
|
- Prefer one obvious place for a behavior over scattering it across thin wrappers and pass-through layers.
|
|
158
169
|
- Group code by responsibility and boundary, not by vague convenience buckets.
|
|
159
170
|
- If a file or API has grown hard to name clearly, it is probably doing too much.
|
|
@@ -162,7 +173,7 @@ Code should be easy to navigate under pressure.
|
|
|
162
173
|
|
|
163
174
|
Write code for the next engineer or agent who has to change it under pressure.
|
|
164
175
|
|
|
165
|
-
- Keep
|
|
176
|
+
- Keep responsibilities cohesive and data flow obvious, but do not create additional modules unless they reduce routine edit spread or establish a real boundary.
|
|
166
177
|
- Remove stale branches, half-migrations, dead code, and obsolete docs around the change.
|
|
167
178
|
- Keep docs and shipped behavior aligned.
|
|
168
179
|
- 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.
|
|
@@ -39,12 +39,14 @@ Once the user approves a plan or tells you to proceed, that approved scope is th
|
|
|
39
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.
|
|
40
40
|
|
|
41
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.
|
|
42
|
+
Do not widen a local change into a broader rewrite unless the current structure directly blocks the approved change or the user approves the expansion.
|
|
42
43
|
|
|
43
44
|
Use reviewer passes when the work is non-trivial or risky, before PR-ready handoff, and before final closeout when helpful.
|
|
44
45
|
|
|
45
46
|
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.
|
|
46
47
|
|
|
47
48
|
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.
|
|
49
|
+
Choose the smallest high-signal verification that proves the changed contract.
|
|
48
50
|
Do not run full repo typecheck/test/build loops after every small edit by default. Use targeted checks during implementation and run full checks before commit or when the user explicitly asks.
|
|
49
51
|
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.
|
|
50
52
|
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.
|