Skip to content

Commit 71e31fa

Browse files
authored
Clarify gather menu heading (#289)
* Clarify gather menu heading * Orient agents before gather selection
1 parent 5010ee5 commit 71e31fa

3 files changed

Lines changed: 22 additions & 11 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@design-intelligence/ghost": patch
3+
---
4+
5+
Label gather output as a guidance menu instead of implying its guidance is preselected.

packages/ghost/src/commands/gather-command.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,18 +89,19 @@ function formatMenuMarkdown(menu: GhostGatherResult): string {
8989
}
9090

9191
const lines: string[] = [
92-
"# Guidance for this task",
92+
"# Guidance menu",
9393
"",
94-
`Task: ${menu.ask}`,
94+
"This is the complete, unfiltered menu. For the task below, check every `Applies when` condition and pull every applicable ID. The entries have not been selected or ranked.",
95+
"",
96+
"## Task",
97+
"",
98+
menu.ask,
9599
"",
96-
];
97-
98-
lines.push(
99100
"## Available guidance",
100101
"",
101-
"Check every item below. Pull all applicable IDs together with `ghost pull <id> [<id>…]`. If no listed guidance applies, run bare `ghost pull` to receive the cover and uncovered-guidance policy. Skip clear non-matches; topic overlap alone is not enough. Do not limit the number.",
102+
"Pull the applicable IDs together with `ghost pull <id> [<id>…]`. If no listed guidance applies, run bare `ghost pull` to receive the cover and uncovered-guidance policy. Skip clear non-matches; topic overlap alone is not enough. Do not limit the number.",
102103
"",
103-
);
104+
];
104105

105106
const groups = groupMenuByKind(menu.nodes, menu.kinds ?? []);
106107
for (const group of groups) {

packages/ghost/test/cli.test.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,13 @@ describe("ghost CLI", () => {
604604

605605
const markdown = await runCli(["gather", "build", "a", "page"], dir);
606606
expect(markdown.code).toBe(0);
607-
expect(markdown.stdout).toContain("# Guidance for this task");
608-
expect(markdown.stdout).toContain("Task: build a page");
607+
expect(markdown.stdout).toContain("# Guidance menu");
608+
expect(markdown.stdout).toContain("This is the complete, unfiltered menu.");
609+
expect(markdown.stdout).toContain("have not been selected or ranked");
610+
expect(markdown.stdout).toContain("## Task\n\nbuild a page");
611+
expect(markdown.stdout.indexOf("complete, unfiltered")).toBeLessThan(
612+
markdown.stdout.indexOf("## Task"),
613+
);
609614
expect(markdown.stdout).not.toContain(
610615
"Use a quiet, precise, content-first stance",
611616
);
@@ -1271,8 +1276,8 @@ describe("ghost CLI", () => {
12711276
).toBe(true);
12721277

12731278
const gatherMarkdown = await runCli(["gather", "checkout", "hero"], dir);
1274-
expect(gatherMarkdown.stdout).toContain("# Guidance for this task");
1275-
expect(gatherMarkdown.stdout).toContain("Task: checkout hero");
1279+
expect(gatherMarkdown.stdout).toContain("# Guidance menu");
1280+
expect(gatherMarkdown.stdout).toContain("## Task\n\ncheckout hero");
12761281
expect(gatherMarkdown.stdout).toContain("## Available guidance");
12771282
expect(gatherMarkdown.stdout).not.toContain(menuPayload.contract.noAsk);
12781283
expect(gatherMarkdown.stdout).toContain("### Other guidance");

0 commit comments

Comments
 (0)