fix(md040): tag Agent example fences as text; tighten allowed-tools test
This commit is contained in:
@@ -297,7 +297,7 @@ mkdir -p .planning/research
|
||||
Spawn 4 parallel gsd-project-researcher agents. Each uses this template with dimension-specific fields:
|
||||
|
||||
**Common structure for all 4 researchers:**
|
||||
```
|
||||
```text
|
||||
Agent(prompt="
|
||||
<research_type>Project Research — {DIMENSION} for [new features].</research_type>
|
||||
|
||||
@@ -461,7 +461,7 @@ gsd-sdk query commit "docs: define milestone v[X.Y] requirements" --files .plann
|
||||
- If `--reset-phase-numbers` is active, start at **Phase 1**
|
||||
- Otherwise, continue from the previous milestone's last phase number (v1.0 ended at phase 5 → v1.1 starts at phase 6)
|
||||
|
||||
```
|
||||
```text
|
||||
Agent(prompt="
|
||||
<planning_context>
|
||||
<files_to_read>
|
||||
|
||||
@@ -754,7 +754,7 @@ Display spawning indicator:
|
||||
|
||||
Spawn 4 parallel gsd-project-researcher agents with path references:
|
||||
|
||||
```
|
||||
```text
|
||||
Agent(prompt="<research_type>
|
||||
Project Research — Stack dimension for [domain].
|
||||
</research_type>
|
||||
@@ -1131,7 +1131,7 @@ Display stage banner:
|
||||
|
||||
Spawn gsd-roadmapper agent with path references:
|
||||
|
||||
```
|
||||
```text
|
||||
Agent(prompt="
|
||||
<planning_context>
|
||||
|
||||
@@ -1230,7 +1230,7 @@ Use AskUserQuestion:
|
||||
- Get user's adjustment notes
|
||||
- Re-spawn roadmapper with revision context:
|
||||
|
||||
```
|
||||
```text
|
||||
Agent(prompt="
|
||||
<revision>
|
||||
User feedback on roadmap:
|
||||
|
||||
@@ -14,6 +14,7 @@ const { describe, test } = require('node:test');
|
||||
const assert = require('node:assert/strict');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const { extractFrontmatter } = require('../get-shit-done/bin/lib/frontmatter.cjs');
|
||||
|
||||
const ROOT = path.join(__dirname, '..');
|
||||
const CMD_PATH = path.join(ROOT, 'commands', 'gsd', 'ingest-docs.md');
|
||||
@@ -61,8 +62,11 @@ describe('ingest-docs command frontmatter', () => {
|
||||
assert.ok(m[1].includes('--resolve'), 'argument-hint should mention --resolve');
|
||||
});
|
||||
test('allowed-tools include AskUserQuestion and Agent', () => {
|
||||
assert.ok(content.includes('AskUserQuestion'), 'command needs AskUserQuestion for gates');
|
||||
assert.ok(content.includes('- Agent'), 'command needs Agent for agent spawns');
|
||||
const frontmatter = extractFrontmatter(content);
|
||||
const allowedTools = frontmatter['allowed-tools'];
|
||||
assert.ok(Array.isArray(allowedTools), 'allowed-tools should be a frontmatter array');
|
||||
assert.ok(allowedTools.includes('AskUserQuestion'), 'command needs AskUserQuestion for gates');
|
||||
assert.ok(allowedTools.includes('Agent'), 'command needs Agent for agent spawns');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user