waypoint-codex 0.10.10 → 0.10.12
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
|
@@ -37,7 +37,7 @@ The philosophy is simple:
|
|
|
37
37
|
- more markdown
|
|
38
38
|
- better continuity for the next agent
|
|
39
39
|
|
|
40
|
-
By default, Waypoint
|
|
40
|
+
By default, Waypoint keeps its `.gitignore` rules inside a comment-delimited `# Waypoint state` section. That section ignores the exact Waypoint-created skill directories and reviewer-agent config files, plus everything under `.waypoint/` except `.waypoint/docs/`, while still ignoring the scaffolded `.waypoint/docs/README.md` and `.waypoint/docs/code-guide.md` assets. User-authored durable docs stay trackable; workspace, context, indexes, and other operational state remain local.
|
|
41
41
|
|
|
42
42
|
## Best fit
|
|
43
43
|
|
package/dist/src/core.js
CHANGED
|
@@ -10,6 +10,42 @@ const DEFAULT_DOCS_INDEX = ".waypoint/DOCS_INDEX.md";
|
|
|
10
10
|
const DEFAULT_TRACK_DIR = ".waypoint/track";
|
|
11
11
|
const DEFAULT_TRACKS_INDEX = ".waypoint/TRACKS_INDEX.md";
|
|
12
12
|
const DEFAULT_WORKSPACE = ".waypoint/WORKSPACE.md";
|
|
13
|
+
const GITIGNORE_WAYPOINT_START = "# Waypoint state";
|
|
14
|
+
const GITIGNORE_WAYPOINT_END = "# End Waypoint state";
|
|
15
|
+
const LEGACY_WAYPOINT_GITIGNORE_RULES = new Set([
|
|
16
|
+
".codex/",
|
|
17
|
+
".codex/config.toml",
|
|
18
|
+
".codex/agents/",
|
|
19
|
+
".codex/agents/code-reviewer.toml",
|
|
20
|
+
".codex/agents/code-health-reviewer.toml",
|
|
21
|
+
".codex/agents/plan-reviewer.toml",
|
|
22
|
+
".agents/",
|
|
23
|
+
".agents/skills/",
|
|
24
|
+
".agents/skills/planning/",
|
|
25
|
+
".agents/skills/work-tracker/",
|
|
26
|
+
".agents/skills/docs-sync/",
|
|
27
|
+
".agents/skills/code-guide-audit/",
|
|
28
|
+
".agents/skills/adversarial-review/",
|
|
29
|
+
".agents/skills/visual-explanations/",
|
|
30
|
+
".agents/skills/break-it-qa/",
|
|
31
|
+
".agents/skills/frontend-context-interview/",
|
|
32
|
+
".agents/skills/backend-context-interview/",
|
|
33
|
+
".agents/skills/frontend-ship-audit/",
|
|
34
|
+
".agents/skills/backend-ship-audit/",
|
|
35
|
+
".agents/skills/conversation-retrospective/",
|
|
36
|
+
".agents/skills/workspace-compress/",
|
|
37
|
+
".agents/skills/pre-pr-hygiene/",
|
|
38
|
+
".agents/skills/pr-review/",
|
|
39
|
+
".waypoint/",
|
|
40
|
+
".waypoint/DOCS_INDEX.md",
|
|
41
|
+
".waypoint/state/",
|
|
42
|
+
".waypoint/context/",
|
|
43
|
+
".waypoint/*",
|
|
44
|
+
"!.waypoint/docs/",
|
|
45
|
+
"!.waypoint/docs/**",
|
|
46
|
+
".waypoint/docs/README.md",
|
|
47
|
+
".waypoint/docs/code-guide.md",
|
|
48
|
+
]);
|
|
13
49
|
const SHIPPED_SKILL_NAMES = [
|
|
14
50
|
"planning",
|
|
15
51
|
"work-tracker",
|
|
@@ -74,7 +110,8 @@ function appendGitignoreSnippet(projectRoot) {
|
|
|
74
110
|
const content = readFileSync(gitignorePath, "utf8");
|
|
75
111
|
const normalizedLines = content.split(/\r?\n/);
|
|
76
112
|
const normalizedContent = normalizedLines.join("\n");
|
|
77
|
-
|
|
113
|
+
const headerCount = normalizedLines.filter((line) => line === GITIGNORE_WAYPOINT_START).length;
|
|
114
|
+
if (normalizedContent.includes(snippet) && headerCount <= 1) {
|
|
78
115
|
return;
|
|
79
116
|
}
|
|
80
117
|
const startIndex = normalizedLines.findIndex((line) => line === snippetLines[0]);
|
|
@@ -83,31 +120,97 @@ function appendGitignoreSnippet(projectRoot) {
|
|
|
83
120
|
return;
|
|
84
121
|
}
|
|
85
122
|
const managedLineSet = new Set(snippetLines);
|
|
86
|
-
const
|
|
87
|
-
let endIndex = normalizedLines.findIndex((line, index) => index >= startIndex && line === managedEndLine);
|
|
123
|
+
const endIndex = findWaypointGitignoreBlockEnd(normalizedLines, startIndex);
|
|
88
124
|
if (endIndex === -1) {
|
|
89
125
|
writeText(gitignorePath, `${content.trimEnd()}\n\n${snippet}\n`);
|
|
90
126
|
return;
|
|
91
127
|
}
|
|
92
128
|
const hasForeignLineInsideBlock = normalizedLines
|
|
93
129
|
.slice(startIndex + 1, endIndex)
|
|
94
|
-
.some((line) => line.length > 0 && !
|
|
130
|
+
.some((line) => line.length > 0 && !isManagedWaypointGitignoreLine(line, managedLineSet));
|
|
131
|
+
const trailingLines = stripSubsequentWaypointGitignoreBlocks(normalizedLines.slice(endIndex + 1), managedLineSet);
|
|
95
132
|
if (hasForeignLineInsideBlock) {
|
|
96
133
|
const foreignLines = normalizedLines
|
|
97
134
|
.slice(startIndex + 1, endIndex)
|
|
98
|
-
.filter((line) => line.length > 0 && !
|
|
135
|
+
.filter((line) => line.length > 0 && !isManagedWaypointGitignoreLine(line, managedLineSet))
|
|
99
136
|
.join("\n");
|
|
100
137
|
const before = normalizedLines.slice(0, startIndex).join("\n").trimEnd();
|
|
101
|
-
const after =
|
|
138
|
+
const after = trailingLines.join("\n").trimStart();
|
|
102
139
|
const merged = [before, snippet, foreignLines, after].filter((piece) => piece.length > 0).join("\n\n");
|
|
103
140
|
writeText(gitignorePath, `${merged}\n`);
|
|
104
141
|
return;
|
|
105
142
|
}
|
|
106
143
|
const before = normalizedLines.slice(0, startIndex).join("\n").trimEnd();
|
|
107
|
-
const after =
|
|
144
|
+
const after = trailingLines.join("\n").trimStart();
|
|
108
145
|
const merged = [before, snippet, after].filter((piece) => piece.length > 0).join("\n\n");
|
|
109
146
|
writeText(gitignorePath, `${merged}\n`);
|
|
110
147
|
}
|
|
148
|
+
function findWaypointGitignoreBlockEnd(lines, startIndex) {
|
|
149
|
+
const explicitEndIndex = lines.findIndex((line, index) => index > startIndex && line === GITIGNORE_WAYPOINT_END);
|
|
150
|
+
if (explicitEndIndex !== -1) {
|
|
151
|
+
return explicitEndIndex;
|
|
152
|
+
}
|
|
153
|
+
return findLegacyWaypointGitignoreBlockEnd(lines, startIndex);
|
|
154
|
+
}
|
|
155
|
+
function findLegacyWaypointGitignoreBlockEnd(lines, startIndex) {
|
|
156
|
+
let scanEndExclusive = lines.length;
|
|
157
|
+
for (let index = startIndex + 1; index < lines.length; index += 1) {
|
|
158
|
+
const line = lines[index];
|
|
159
|
+
if (line.length === 0) {
|
|
160
|
+
scanEndExclusive = index;
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
if (line.startsWith("#") && line !== GITIGNORE_WAYPOINT_START) {
|
|
164
|
+
scanEndExclusive = index;
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
let endIndex = -1;
|
|
169
|
+
for (let index = startIndex + 1; index < scanEndExclusive; index += 1) {
|
|
170
|
+
if (isLegacyWaypointGitignoreRule(lines[index])) {
|
|
171
|
+
endIndex = index;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return endIndex;
|
|
175
|
+
}
|
|
176
|
+
function isLegacyWaypointGitignoreRule(line) {
|
|
177
|
+
const normalizedLine = line.startsWith("/") ? line.slice(1) : line;
|
|
178
|
+
return LEGACY_WAYPOINT_GITIGNORE_RULES.has(normalizedLine);
|
|
179
|
+
}
|
|
180
|
+
function isManagedWaypointGitignoreLine(line, managedLineSet) {
|
|
181
|
+
return managedLineSet.has(line) || isLegacyWaypointGitignoreRule(line);
|
|
182
|
+
}
|
|
183
|
+
function stripSubsequentWaypointGitignoreBlocks(lines, managedLineSet) {
|
|
184
|
+
const keptLines = [];
|
|
185
|
+
let index = 0;
|
|
186
|
+
while (index < lines.length) {
|
|
187
|
+
if (lines[index] !== GITIGNORE_WAYPOINT_START) {
|
|
188
|
+
keptLines.push(lines[index]);
|
|
189
|
+
index += 1;
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
const endIndex = findWaypointGitignoreBlockEnd(lines, index);
|
|
193
|
+
if (endIndex === -1) {
|
|
194
|
+
keptLines.push(lines[index]);
|
|
195
|
+
index += 1;
|
|
196
|
+
continue;
|
|
197
|
+
}
|
|
198
|
+
const foreignLines = lines
|
|
199
|
+
.slice(index + 1, endIndex)
|
|
200
|
+
.filter((line) => line.length > 0 && !isManagedWaypointGitignoreLine(line, managedLineSet));
|
|
201
|
+
if (foreignLines.length > 0) {
|
|
202
|
+
if (keptLines.length > 0 && keptLines[keptLines.length - 1] !== "") {
|
|
203
|
+
keptLines.push("");
|
|
204
|
+
}
|
|
205
|
+
keptLines.push(...foreignLines);
|
|
206
|
+
if (endIndex + 1 < lines.length && lines[endIndex + 1] !== "") {
|
|
207
|
+
keptLines.push("");
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
index = endIndex + 1;
|
|
211
|
+
}
|
|
212
|
+
return keptLines;
|
|
213
|
+
}
|
|
111
214
|
function upsertManagedBlock(filePath, block) {
|
|
112
215
|
if (!existsSync(filePath)) {
|
|
113
216
|
writeText(filePath, `${block.trim()}\n`);
|
package/package.json
CHANGED
|
@@ -51,6 +51,7 @@ If something important lives only in your head or in the chat transcript, the re
|
|
|
51
51
|
- Rebuild `.waypoint/TRACKS_INDEX.md` whenever tracker files change.
|
|
52
52
|
- When spawning reviewer agents or other subagents, explicitly set `fork_context: false`, `model` to `gpt-5.4`, and `reasoning_effort` to `high` unless the user explicitly requests a different model or lower reasoning.
|
|
53
53
|
- Use the repo-local skills and reviewer agents instead of improvising from scratch.
|
|
54
|
+
- If you created a PR earlier in the current session and need to push more work, first confirm that PR is still open. If it is closed, create a fresh branch from `origin/main` and open a fresh PR instead of pushing more commits to the old PR branch.
|
|
54
55
|
- Treat reviewer agents as one-shot workers: once a reviewer returns findings, read the result and close it. If another review pass is needed later, spawn a fresh reviewer instead of reusing the same thread.
|
|
55
56
|
- Do not kill long-running subagents or reviewer agents just because they are slow.
|
|
56
57
|
- When waiting on reviewers, subagents, CI, automated review, or external jobs, wait as long as required. There is no fixed timeout where waiting itself becomes the problem.
|
|
@@ -100,6 +100,7 @@ Working rules:
|
|
|
100
100
|
- Before presenting a non-trivial implementation plan to the user, run `plan-reviewer` and iterate on the plan until it has no meaningful review findings left
|
|
101
101
|
- Treat `plan-reviewer`, `code-reviewer`, and `code-health-reviewer` as one-shot agents: once a reviewer returns findings, close it; if another pass is needed later, spawn a fresh reviewer instead of reusing the old thread
|
|
102
102
|
- Before pushing or opening/updating a PR for substantial work, use `pre-pr-hygiene`
|
|
103
|
+
- If you created a PR earlier in the current session and need to push more work, first confirm that PR is still open. If it is closed, create a fresh branch from `origin/main` and open a fresh PR instead of pushing more commits to the old PR branch
|
|
103
104
|
- Use `pr-review` once a PR has active review comments or automated review in progress
|
|
104
105
|
- Treat the generated context bundle as required session bootstrap, not optional reference material
|
|
105
106
|
- After plan approval, own the execution through implementation, verification, review, and repo-memory updates before surfacing a final completion report
|