Repository navigation
vscode: backlog → architect reference should include the issue title alongside the id #808
Description
Problem
Clicking the "Reference Issue in Architect" inline action on a backlog row (codev.referenceIssueInArchitect) injects only #<id> into the architect's prompt buffer (packages/vscode/src/extension.ts:496–507). The user then has to remember or look up the title to give the architect enough context — or send the prompt with only the bare id, which forces the architect AI to fetch and parse the issue before it can respond meaningfully.
Including the title in the injected reference puts the working context in front of the user (and the model) immediately.
Current state
extension.ts:500–503:
const issueId = extractIssueId(arg);
if (!issueId) { return; }
await vscode.commands.executeCommand('codev.openArchitectTerminal');
const ok = terminalManager?.injectArchitectText(`#${issueId} `);The arg is the tree item (BacklogTreeItem from views/backlog-tree-item.ts), which already carries the title (the tree row renders it visibly). The title isn't currently threaded through into the injection.
Proposed behavior
Inject the issue id followed by the title in quotes, with a trailing space so the user can keep typing:
#1234 "Build feature X "
(Note the trailing space inside the quoted string is intentional — the cursor lands right after the closing quote with whitespace separation ready for the next word.)
Quoted form picked because titles routinely contain colons, brackets, hashes, and other characters that could otherwise confuse downstream parsing or read as model-side syntax.
Implementation
- Add
extractIssueTitle(arg)alongside the existingextractIssueId(arg)(both read fromBacklogTreeItem's known fields). - In
codev.referenceIssueInArchitecthandler, build the injection string:`#${issueId} "${title}" `when title is present; fall back to current`#${issueId} `if for some reason the title isn't available. - Quote-escape: if the title contains a literal
", replace with\"so the quoted form stays valid.
Acceptance criteria
- Clicking the backlog inline-reference action injects
#<id> "<title>"into the architect terminal prompt (no Enter sent). - Titles containing double-quote characters are escaped (
"→\"). - If the title is unexpectedly missing/empty, the fallback
#<id>injection is used (no regression). - Trailing space preserved so the user can keep typing.
Out of scope
- Re-formatting other inject sites (architect-reference is the only one with an id+title shape today; the diff-codelens path from vscode: inject file/hunk reference into builder PTY from the unified-diff editor (codelens) #789 injects a file/hunk reference, distinct semantics).
- A user-facing preference to switch formats (locked to
#id "title").
Activity
amrmelsayed commentedon May 28, 2026
On it! Working on this with the PIR protocol (plan + dev-approval gates before PR).
[PIR #808] Plan draft
[PIR #808] Inject issue title into architect reference
[PIR #808] Update thread for implement phase
[PIR #808] Review + retrospective
[PIR #808] Update thread for review phase
Merge pull request #899 from cluesmith/builder/pir-808
docs(vscode-changelog): add #808 architect-inject include-title under…
Merge docs/vscode-changelog: vscode CHANGELOG entries for #793, #799, #…