pi-usereq 0.72.0 → 0.74.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 +1 -1
- package/package.json +1 -1
- package/src/core/prompts.ts +18 -5
- package/src/resources/pi-prompts-version.txt +1 -1
- package/src/resources/prompts/analyze.md +1 -1
- package/src/resources/prompts/change.md +1 -1
- package/src/resources/prompts/check.md +1 -1
- package/src/resources/prompts/cover.md +1 -1
- package/src/resources/prompts/create.md +1 -1
- package/src/resources/prompts/fix.md +1 -1
- package/src/resources/prompts/flowchart.md +1 -1
- package/src/resources/prompts/implement.md +1 -1
- package/src/resources/prompts/new.md +1 -1
- package/src/resources/prompts/readme.md +1 -1
- package/src/resources/prompts/recreate.md +1 -1
- package/src/resources/prompts/refactor.md +1 -1
- package/src/resources/prompts/renumber.md +1 -1
- package/src/resources/prompts/workflow.md +1 -1
- package/src/resources/prompts/write.md +1 -1
package/README.md
CHANGED
package/package.json
CHANGED
package/src/core/prompts.ts
CHANGED
|
@@ -195,6 +195,23 @@ function buildContextFilesBlock(projectBase: string, config: UseReqConfig): stri
|
|
|
195
195
|
return sections.join("\n\n");
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
+
/**
|
|
199
|
+
* @brief Injects the context-files block in place of the dedicated trailing `%%CONTEXT_FILES%%` placeholder.
|
|
200
|
+
* @details Replaces only the last occurrence of the `%%CONTEXT_FILES%%` token, which every bundled prompt places as the dedicated injection point at the end of its `## Context Files` section, so inline backticked references to the token inside prompt prose stay verbatim and no prompt content is overwritten by the injected block. Returns the input unchanged when the token is absent. Runs after every other prompt replacement so literal `%%...%%` tokens inside context-file content are never substituted. Time complexity O(n) in prompt length. No external state is mutated.
|
|
201
|
+
* @param[in] text {string} Prompt markdown after every other replacement, block injection, and tool-reference rewrite.
|
|
202
|
+
* @param[in] block {string} Rendered context-files markdown block, or the empty string when no enabled context file exists.
|
|
203
|
+
* @return {string} Prompt markdown whose dedicated trailing placeholder is replaced by the supplied block while all earlier occurrences of the token remain untouched.
|
|
204
|
+
* @satisfies REQ-329, REQ-331, REQ-332
|
|
205
|
+
*/
|
|
206
|
+
function injectContextFilesBlock(text: string, block: string): string {
|
|
207
|
+
const token = "%%CONTEXT_FILES%%";
|
|
208
|
+
const lastIndex = text.lastIndexOf(token);
|
|
209
|
+
if (lastIndex === -1) {
|
|
210
|
+
return text;
|
|
211
|
+
}
|
|
212
|
+
return text.slice(0, lastIndex) + block + text.slice(lastIndex + token.length);
|
|
213
|
+
}
|
|
214
|
+
|
|
198
215
|
/**
|
|
199
216
|
* @brief Rewrites bundled prompt tool references from legacy `req --...` syntax to internal tool names.
|
|
200
217
|
* @details Applies deterministic global regex replacements so prompt text matches the extension-registered tool surface instead of the standalone CLI spelling. Time complexity O(p*r) where p is pattern count and r is prompt length.
|
|
@@ -371,11 +388,7 @@ export function renderPrompt(
|
|
|
371
388
|
projectBase,
|
|
372
389
|
);
|
|
373
390
|
const adapted = adaptPromptForInternalTools(withPiDevConformance);
|
|
374
|
-
|
|
375
|
-
if (contextFilesBlock) {
|
|
376
|
-
return adapted.split("%%CONTEXT_FILES%%").join(contextFilesBlock);
|
|
377
|
-
}
|
|
378
|
-
return adapted.split("%%CONTEXT_FILES%%").join("");
|
|
391
|
+
return injectContextFilesBlock(adapted, buildContextFilesBlock(projectBase, config));
|
|
379
392
|
}
|
|
380
393
|
|
|
381
394
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
v0.
|
|
1
|
+
v0.9.0
|
|
@@ -18,7 +18,7 @@ In scope: read-only analysis of the above documents plus source under %%SRC_PATH
|
|
|
18
18
|
|
|
19
19
|
## Iteration and Context Economy
|
|
20
20
|
- **CRITICAL**: Plan every Step to complete in the minimum number of iterations; batch independent reads, searches, and edits into a single response and dispatch parallel tool calls whenever no dependency forces sequencing.
|
|
21
|
-
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected
|
|
21
|
+
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected context under the `## Context Files` section or already read in the current session; reuse prior tool-output evidence instead.
|
|
22
22
|
- **CRITICAL**: MUST NOT restate requirement text, prior tool output, or unchanged file contents into the context; cite them by file path, symbol, and line range, quoting only the minimal changed snippet.
|
|
23
23
|
- **CRITICAL**: MUST add only information required by the active Step, a requirement ID, or explicit user-request text; omit narration, filler, restatements, and speculative commentary.
|
|
24
24
|
- **CRITICAL**: MUST choose the most token-efficient evidence path in order: `%%DOC_PATH%%/REQUIREMENTS.md`, `%%DOC_PATH%%/WORKFLOW.md`, `%%DOC_PATH%%/REFERENCES.md`, then `search`/`files-search`, then `rg`/`grep` fallback, reading only targeted constructs and line ranges.
|
|
@@ -18,7 +18,7 @@ In scope: patch-style edits to `%%DOC_PATH%%/REQUIREMENTS.md`, an implementation
|
|
|
18
18
|
|
|
19
19
|
## Iteration and Context Economy
|
|
20
20
|
- **CRITICAL**: Plan every Step to complete in the minimum number of iterations; batch independent reads, searches, and edits into a single response and dispatch parallel tool calls whenever no dependency forces sequencing.
|
|
21
|
-
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected
|
|
21
|
+
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected context under the `## Context Files` section or already read in the current session; reuse prior tool-output evidence instead.
|
|
22
22
|
- **CRITICAL**: MUST NOT restate requirement text, prior tool output, or unchanged file contents into the context; cite them by file path, symbol, and line range, quoting only the minimal changed snippet.
|
|
23
23
|
- **CRITICAL**: MUST add only information required by the active Step, a requirement ID, or explicit user-request text; omit narration, filler, restatements, and speculative commentary.
|
|
24
24
|
- **CRITICAL**: MUST choose the most token-efficient evidence path in order: `%%DOC_PATH%%/REQUIREMENTS.md`, `%%DOC_PATH%%/WORKFLOW.md`, `%%DOC_PATH%%/REFERENCES.md`, then `search`/`files-search`, then `rg`/`grep` fallback, reading only targeted constructs and line ranges.
|
|
@@ -17,7 +17,7 @@ In scope: read `%%DOC_PATH%%/REQUIREMENTS.md` (and related docs), run static-ana
|
|
|
17
17
|
|
|
18
18
|
## Iteration and Context Economy
|
|
19
19
|
- **CRITICAL**: Plan every Step to complete in the minimum number of iterations; batch independent reads, searches, and edits into a single response and dispatch parallel tool calls whenever no dependency forces sequencing.
|
|
20
|
-
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected
|
|
20
|
+
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected context under the `## Context Files` section or already read in the current session; reuse prior tool-output evidence instead.
|
|
21
21
|
- **CRITICAL**: MUST NOT restate requirement text, prior tool output, or unchanged file contents into the context; cite them by file path, symbol, and line range, quoting only the minimal changed snippet.
|
|
22
22
|
- **CRITICAL**: MUST add only information required by the active Step, a requirement ID, or explicit user-request text; omit narration, filler, restatements, and speculative commentary.
|
|
23
23
|
- **CRITICAL**: MUST choose the most token-efficient evidence path in order: `%%DOC_PATH%%/REQUIREMENTS.md`, `%%DOC_PATH%%/WORKFLOW.md`, `%%DOC_PATH%%/REFERENCES.md`, then `search`/`files-search`, then `rg`/`grep` fallback, reading only targeted constructs and line ranges.
|
|
@@ -19,7 +19,7 @@ In scope: identify uncovered requirement IDs, implement minimal code changes und
|
|
|
19
19
|
|
|
20
20
|
## Iteration and Context Economy
|
|
21
21
|
- **CRITICAL**: Plan every Step to complete in the minimum number of iterations; batch independent reads, searches, and edits into a single response and dispatch parallel tool calls whenever no dependency forces sequencing.
|
|
22
|
-
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected
|
|
22
|
+
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected context under the `## Context Files` section or already read in the current session; reuse prior tool-output evidence instead.
|
|
23
23
|
- **CRITICAL**: MUST NOT restate requirement text, prior tool output, or unchanged file contents into the context; cite them by file path, symbol, and line range, quoting only the minimal changed snippet.
|
|
24
24
|
- **CRITICAL**: MUST add only information required by the active Step, a requirement ID, or explicit user-request text; omit narration, filler, restatements, and speculative commentary.
|
|
25
25
|
- **CRITICAL**: MUST choose the most token-efficient evidence path in order: `%%DOC_PATH%%/REQUIREMENTS.md`, `%%DOC_PATH%%/WORKFLOW.md`, `%%DOC_PATH%%/REFERENCES.md`, then `search`/`files-search`, then `rg`/`grep` fallback, reading only targeted constructs and line ranges.
|
|
@@ -16,7 +16,7 @@ In scope: static analysis of source under %%SRC_PATHS%% (and targeted tests only
|
|
|
16
16
|
|
|
17
17
|
## Iteration and Context Economy
|
|
18
18
|
- **CRITICAL**: Plan every Step to complete in the minimum number of iterations; batch independent reads, searches, and edits into a single response and dispatch parallel tool calls whenever no dependency forces sequencing.
|
|
19
|
-
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected
|
|
19
|
+
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected context under the `## Context Files` section or already read in the current session; reuse prior tool-output evidence instead.
|
|
20
20
|
- **CRITICAL**: MUST NOT restate requirement text, prior tool output, or unchanged file contents into the context; cite them by file path, symbol, and line range, quoting only the minimal changed snippet.
|
|
21
21
|
- **CRITICAL**: MUST add only information required by the active Step, a requirement ID, or explicit user-request text; omit narration, filler, restatements, and speculative commentary.
|
|
22
22
|
- **CRITICAL**: MUST choose the most token-efficient evidence path in order: `%%DOC_PATH%%/REQUIREMENTS.md`, `%%DOC_PATH%%/WORKFLOW.md`, `%%DOC_PATH%%/REFERENCES.md`, then `search`/`files-search`, then `rg`/`grep` fallback, reading only targeted constructs and line ranges.
|
|
@@ -18,7 +18,7 @@ In scope: reproduce/triage the defect with concrete evidence and prefer an evide
|
|
|
18
18
|
|
|
19
19
|
## Iteration and Context Economy
|
|
20
20
|
- **CRITICAL**: Plan every Step to complete in the minimum number of iterations; batch independent reads, searches, and edits into a single response and dispatch parallel tool calls whenever no dependency forces sequencing.
|
|
21
|
-
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected
|
|
21
|
+
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected context under the `## Context Files` section or already read in the current session; reuse prior tool-output evidence instead.
|
|
22
22
|
- **CRITICAL**: MUST NOT restate requirement text, prior tool output, or unchanged file contents into the context; cite them by file path, symbol, and line range, quoting only the minimal changed snippet.
|
|
23
23
|
- **CRITICAL**: MUST add only information required by the active Step, a requirement ID, or explicit user-request text; omit narration, filler, restatements, and speculative commentary.
|
|
24
24
|
- **CRITICAL**: MUST choose the most token-efficient evidence path in order: `%%DOC_PATH%%/REQUIREMENTS.md`, `%%DOC_PATH%%/WORKFLOW.md`, `%%DOC_PATH%%/REFERENCES.md`, then `search`/`files-search`, then `rg`/`grep` fallback, reading only targeted constructs and line ranges.
|
|
@@ -16,7 +16,7 @@ In scope: static analysis of source under %%SRC_PATHS%% to generate/overwrite on
|
|
|
16
16
|
|
|
17
17
|
## Iteration and Context Economy
|
|
18
18
|
- **CRITICAL**: Plan every Step to complete in the minimum number of iterations; batch independent reads, searches, and edits into a single response and dispatch parallel tool calls whenever no dependency forces sequencing.
|
|
19
|
-
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected
|
|
19
|
+
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected context under the `## Context Files` section or already read in the current session; reuse prior tool-output evidence instead.
|
|
20
20
|
- **CRITICAL**: MUST NOT restate requirement text, prior tool output, or unchanged file contents into the context; cite them by file path, symbol, and line range, quoting only the minimal changed snippet.
|
|
21
21
|
- **CRITICAL**: MUST add only information required by the active Step, a requirement ID, or explicit user-request text; omit narration, filler, restatements, and speculative commentary.
|
|
22
22
|
- **CRITICAL**: MUST choose the most token-efficient evidence path in order: `%%DOC_PATH%%/REQUIREMENTS.md`, `%%DOC_PATH%%/WORKFLOW.md`, `%%DOC_PATH%%/REFERENCES.md`, then `search`/`files-search`, then `rg`/`grep` fallback, reading only targeted constructs and line ranges.
|
|
@@ -19,7 +19,7 @@ In scope: read `%%DOC_PATH%%/REQUIREMENTS.md`, implement/introduce source under
|
|
|
19
19
|
|
|
20
20
|
## Iteration and Context Economy
|
|
21
21
|
- **CRITICAL**: Plan every Step to complete in the minimum number of iterations; batch independent reads, searches, and edits into a single response and dispatch parallel tool calls whenever no dependency forces sequencing.
|
|
22
|
-
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected
|
|
22
|
+
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected context under the `## Context Files` section or already read in the current session; reuse prior tool-output evidence instead.
|
|
23
23
|
- **CRITICAL**: MUST NOT restate requirement text, prior tool output, or unchanged file contents into the context; cite them by file path, symbol, and line range, quoting only the minimal changed snippet.
|
|
24
24
|
- **CRITICAL**: MUST add only information required by the active Step, a requirement ID, or explicit user-request text; omit narration, filler, restatements, and speculative commentary.
|
|
25
25
|
- **CRITICAL**: MUST choose the most token-efficient evidence path in order: `%%DOC_PATH%%/REQUIREMENTS.md`, `%%DOC_PATH%%/WORKFLOW.md`, `%%DOC_PATH%%/REFERENCES.md`, then `search`/`files-search`, then `rg`/`grep` fallback, reading only targeted constructs and line ranges.
|
|
@@ -18,7 +18,7 @@ In scope: patch-style updates to `%%DOC_PATH%%/REQUIREMENTS.md` that add the new
|
|
|
18
18
|
|
|
19
19
|
## Iteration and Context Economy
|
|
20
20
|
- **CRITICAL**: Plan every Step to complete in the minimum number of iterations; batch independent reads, searches, and edits into a single response and dispatch parallel tool calls whenever no dependency forces sequencing.
|
|
21
|
-
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected
|
|
21
|
+
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected context under the `## Context Files` section or already read in the current session; reuse prior tool-output evidence instead.
|
|
22
22
|
- **CRITICAL**: MUST NOT restate requirement text, prior tool output, or unchanged file contents into the context; cite them by file path, symbol, and line range, quoting only the minimal changed snippet.
|
|
23
23
|
- **CRITICAL**: MUST add only information required by the active Step, a requirement ID, or explicit user-request text; omit narration, filler, restatements, and speculative commentary.
|
|
24
24
|
- **CRITICAL**: MUST choose the most token-efficient evidence path in order: `%%DOC_PATH%%/REQUIREMENTS.md`, `%%DOC_PATH%%/WORKFLOW.md`, `%%DOC_PATH%%/REFERENCES.md`, then `search`/`files-search`, then `rg`/`grep` fallback, reading only targeted constructs and line ranges.
|
|
@@ -18,7 +18,7 @@ In scope: static analysis of user-visible behavior from %%SRC_PATHS%% and relate
|
|
|
18
18
|
|
|
19
19
|
## Iteration and Context Economy
|
|
20
20
|
- **CRITICAL**: Plan every Step to complete in the minimum number of iterations; batch independent reads, searches, and edits into a single response and dispatch parallel tool calls whenever no dependency forces sequencing.
|
|
21
|
-
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected
|
|
21
|
+
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected context under the `## Context Files` section or already read in the current session; reuse prior tool-output evidence instead.
|
|
22
22
|
- **CRITICAL**: MUST NOT restate requirement text, prior tool output, or unchanged file contents into the context; cite them by file path, symbol, and line range, quoting only the minimal changed snippet.
|
|
23
23
|
- **CRITICAL**: MUST add only information required by the active Step, a requirement ID, or explicit user-request text; omit narration, filler, restatements, and speculative commentary.
|
|
24
24
|
- **CRITICAL**: MUST choose the most token-efficient evidence path in order: `%%DOC_PATH%%/REQUIREMENTS.md`, `%%DOC_PATH%%/WORKFLOW.md`, `%%DOC_PATH%%/REFERENCES.md`, then `search`/`files-search`, then `rg`/`grep` fallback, reading only targeted constructs and line ranges.
|
|
@@ -17,7 +17,7 @@ In scope: static analysis of source under %%SRC_PATHS%% (and targeted tests only
|
|
|
17
17
|
|
|
18
18
|
## Iteration and Context Economy
|
|
19
19
|
- **CRITICAL**: Plan every Step to complete in the minimum number of iterations; batch independent reads, searches, and edits into a single response and dispatch parallel tool calls whenever no dependency forces sequencing.
|
|
20
|
-
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected
|
|
20
|
+
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected context under the `## Context Files` section or already read in the current session; reuse prior tool-output evidence instead.
|
|
21
21
|
- **CRITICAL**: MUST NOT restate requirement text, prior tool output, or unchanged file contents into the context; cite them by file path, symbol, and line range, quoting only the minimal changed snippet.
|
|
22
22
|
- **CRITICAL**: MUST add only information required by the active Step, a requirement ID, or explicit user-request text; omit narration, filler, restatements, and speculative commentary.
|
|
23
23
|
- **CRITICAL**: MUST choose the most token-efficient evidence path in order: `%%DOC_PATH%%/REQUIREMENTS.md`, `%%DOC_PATH%%/WORKFLOW.md`, `%%DOC_PATH%%/REFERENCES.md`, then `search`/`files-search`, then `rg`/`grep` fallback, reading only targeted constructs and line ranges.
|
|
@@ -18,7 +18,7 @@ In scope: internal refactors under %%SRC_PATHS%% (including private API reshapin
|
|
|
18
18
|
|
|
19
19
|
## Iteration and Context Economy
|
|
20
20
|
- **CRITICAL**: Plan every Step to complete in the minimum number of iterations; batch independent reads, searches, and edits into a single response and dispatch parallel tool calls whenever no dependency forces sequencing.
|
|
21
|
-
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected
|
|
21
|
+
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected context under the `## Context Files` section or already read in the current session; reuse prior tool-output evidence instead.
|
|
22
22
|
- **CRITICAL**: MUST NOT restate requirement text, prior tool output, or unchanged file contents into the context; cite them by file path, symbol, and line range, quoting only the minimal changed snippet.
|
|
23
23
|
- **CRITICAL**: MUST add only information required by the active Step, a requirement ID, or explicit user-request text; omit narration, filler, restatements, and speculative commentary.
|
|
24
24
|
- **CRITICAL**: MUST choose the most token-efficient evidence path in order: `%%DOC_PATH%%/REQUIREMENTS.md`, `%%DOC_PATH%%/WORKFLOW.md`, `%%DOC_PATH%%/REFERENCES.md`, then `search`/`files-search`, then `rg`/`grep` fallback, reading only targeted constructs and line ranges.
|
|
@@ -17,7 +17,7 @@ In scope: renumbering requirement identifiers in `%%DOC_PATH%%/REQUIREMENTS.md`
|
|
|
17
17
|
|
|
18
18
|
## Iteration and Context Economy
|
|
19
19
|
- **CRITICAL**: Plan every Step to complete in the minimum number of iterations; batch independent reads, searches, and edits into a single response and dispatch parallel tool calls whenever no dependency forces sequencing.
|
|
20
|
-
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected
|
|
20
|
+
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected context under the `## Context Files` section or already read in the current session; reuse prior tool-output evidence instead.
|
|
21
21
|
- **CRITICAL**: MUST NOT restate requirement text, prior tool output, or unchanged file contents into the context; cite them by file path, symbol, and line range, quoting only the minimal changed snippet.
|
|
22
22
|
- **CRITICAL**: MUST add only information required by the active Step, a requirement ID, or explicit user-request text; omit narration, filler, restatements, and speculative commentary.
|
|
23
23
|
- **CRITICAL**: MUST choose the most token-efficient evidence path in order: `%%DOC_PATH%%/REQUIREMENTS.md`, `%%DOC_PATH%%/WORKFLOW.md`, `%%DOC_PATH%%/REFERENCES.md`, then `search`/`files-search`, then `rg`/`grep` fallback, reading only targeted constructs and line ranges.
|
|
@@ -18,7 +18,7 @@ In scope: static analysis of source under %%SRC_PATHS%% to generate/overwrite on
|
|
|
18
18
|
|
|
19
19
|
## Iteration and Context Economy
|
|
20
20
|
- **CRITICAL**: Plan every Step to complete in the minimum number of iterations; batch independent reads, searches, and edits into a single response and dispatch parallel tool calls whenever no dependency forces sequencing.
|
|
21
|
-
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected
|
|
21
|
+
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected context under the `## Context Files` section or already read in the current session; reuse prior tool-output evidence instead.
|
|
22
22
|
- **CRITICAL**: MUST NOT restate requirement text, prior tool output, or unchanged file contents into the context; cite them by file path, symbol, and line range, quoting only the minimal changed snippet.
|
|
23
23
|
- **CRITICAL**: MUST add only information required by the active Step, a requirement ID, or explicit user-request text; omit narration, filler, restatements, and speculative commentary.
|
|
24
24
|
- **CRITICAL**: MUST choose the most token-efficient evidence path in order: `%%DOC_PATH%%/REQUIREMENTS.md`, `%%DOC_PATH%%/WORKFLOW.md`, `%%DOC_PATH%%/REFERENCES.md`, then `search`/`files-search`, then `rg`/`grep` fallback, reading only targeted constructs and line ranges.
|
|
@@ -17,7 +17,7 @@ In scope: author/update only `%%DOC_PATH%%/REQUIREMENTS.md` from [User Request](
|
|
|
17
17
|
|
|
18
18
|
## Iteration and Context Economy
|
|
19
19
|
- **CRITICAL**: Plan every Step to complete in the minimum number of iterations; batch independent reads, searches, and edits into a single response and dispatch parallel tool calls whenever no dependency forces sequencing.
|
|
20
|
-
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected
|
|
20
|
+
- **CRITICAL**: MUST NOT re-read, re-search, or re-fetch any file already provided as injected context under the `## Context Files` section or already read in the current session; reuse prior tool-output evidence instead.
|
|
21
21
|
- **CRITICAL**: MUST NOT restate requirement text, prior tool output, or unchanged file contents into the context; cite them by file path, symbol, and line range, quoting only the minimal changed snippet.
|
|
22
22
|
- **CRITICAL**: MUST add only information required by the active Step, a requirement ID, or explicit user-request text; omit narration, filler, restatements, and speculative commentary.
|
|
23
23
|
- **CRITICAL**: MUST choose the most token-efficient evidence path in order: `%%DOC_PATH%%/REQUIREMENTS.md`, `%%DOC_PATH%%/WORKFLOW.md`, `%%DOC_PATH%%/REFERENCES.md`, then `search`/`files-search`, then `rg`/`grep` fallback, reading only targeted constructs and line ranges.
|