Skip to content

Commit 19e5b86

Browse files
committed
Prompt: reflect project-doc hydration in the Linear addendum (no-MCP audit)
Auditing the agent system prompts against this session's changes: the Linear channel addendum still told the agent a "project wiki doc" was something it CAN'T see and should flag in the PR — but the doc-content hydration added this session folds project wiki documents (with content) into the task description under `## Project documents`. Left as-is, the agent could flag "I couldn't see the wiki doc" when the content is right there. Fixes (prompt text + its docstring only — no logic): - "Context is already here" now lists project wiki-document CONTENT alongside title/description/comments/attachments, and points at the `## Project documents` / `## Recent comments` sections. - The "material that ISN'T in your context" line now says a doc noted as present-but-not-included (empty/over-cap), not "a project wiki doc" flatly. Audited the other prompt files (new_task, pr_iteration, base, pr_review, restack, decompose): none make Linear/attachment/MCP claims that this session made stale — no changes needed there. The core "you have no Linear tools, don't call any" guidance remains correct. Prompt tests (49) + agent gate (1374) green.
1 parent dcec12a commit 19e5b86

1 file changed

Lines changed: 15 additions & 12 deletions

File tree

agent/src/prompt_builder.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,12 @@ def _channel_prompt_addendum(config: TaskConfig) -> str:
276276
Linear-origin tasks (ADR-016 "Linear is fully deterministic"): the agent has
277277
NO Linear MCP and NO Linear write access. All Linear I/O is handled by the
278278
platform, not the agent:
279-
* inbound context — the issue title/description, recent human comments, and
280-
attachments are ALREADY pre-hydrated into the task description +
281-
``attachments`` at admission time (linear-webhook-processor +
282-
linear-attachments.ts + linear-feedback.fetchRecentComments). There is
283-
nothing to fetch at runtime.
279+
* inbound context — the issue title/description, recent human comments,
280+
project wiki-document CONTENT, and attachments are ALREADY pre-hydrated
281+
into the task description + ``attachments`` at admission time
282+
(linear-webhook-processor + linear-attachments.ts +
283+
linear-feedback.fetchRecentComments + linear-issue-context-probe's doc
284+
fetch). There is nothing to fetch at runtime.
284285
* outbound status — 👀/✅/❌ reactions and Backlog→In Progress→In Review
285286
state transitions are posted deterministically by ``linear_reactions.py``;
286287
the "🤖 Starting" and PR-opened comments are posted at the Lambda tier;
@@ -310,13 +311,15 @@ def _channel_prompt_addendum(config: TaskConfig) -> str:
310311
"manages ALL Linear interaction for you — you have no Linear tools and "
311312
"must not try to call any:\n\n"
312313
"- **Context is already here.** The issue title, description, recent "
313-
"human comments, and the reporter's uploaded files (both inline images "
314-
"and paperclip attachments) have been pre-fetched and included in your "
315-
"task description + attachments. You have no way to fetch more from "
316-
"Linear, so work from what you've been given. If the task clearly "
317-
"references material that ISN'T in your context (an external link, a "
318-
"project wiki doc, a file you can't see), don't guess — say so in the "
319-
"PR and proceed with best effort on what you have.\n"
314+
"human comments, the reporter's uploaded files (inline images and "
315+
"paperclip attachments), and the content of any project wiki documents "
316+
"have been pre-fetched and included in your task description (see the "
317+
"`## Project documents` and `## Recent comments` sections if present) + "
318+
"attachments. You have no way to fetch more from Linear, so work from "
319+
"what you've been given. If the task clearly references material that "
320+
"ISN'T in your context (an external link, a file you can't see, or a doc "
321+
"noted as present-but-not-included), don't guess — say so in the PR and "
322+
"proceed with best effort on what you have.\n"
320323
"- **Status is automatic.** The platform posts the issue reactions "
321324
"(👀 on start, ✅/❌ on finish), moves the issue through its workflow "
322325
"states (In Progress → In Review), posts the start + PR-opened comments, "

0 commit comments

Comments
 (0)