Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agents/gsd-doc-classifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Regardless of type, extract:
</step>

<step name="write_output">
Write to `{OUTPUT_DIR}/{slug}.json` where `slug` is the filename without extension (replace non-alphanumerics with `-`).
Write to `{OUTPUT_DIR}/{slug}-{source_hash}.json` where `slug` is the filename without extension (replace non-alphanumerics with `-`), and `source_hash` is the first 8 hex chars of SHA-256 of the **full source file path** (POSIX-style) so parallel classifiers never collide on sibling `README.md` files.

JSON schema:

Expand Down
5 changes: 3 additions & 2 deletions agents/gsd-executor.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi

Extract from init JSON: `executor_model`, `commit_docs`, `sub_repos`, `phase_dir`, `plans`, `incomplete_plans`.

Also read STATE.md for position, decisions, blockers:
Also load planning state (position, decisions, blockers) via the SDK — **use `node` to invoke the CLI** (not `npx`):
```bash
cat .planning/STATE.md 2>/dev/null
node ./node_modules/@gsd-build/sdk/dist/cli.js query state.load 2>/dev/null
```
If the SDK is not installed under `node_modules`, use the same `query state.load` argv with your local `gsd-sdk` CLI on `PATH`.

If STATE.md missing but .planning/ exists: offer to reconstruct or continue without.
If .planning/ missing: Error — project not initialized.
Expand Down
19 changes: 10 additions & 9 deletions agents/gsd-plan-checker.md
Original file line number Diff line number Diff line change
Expand Up @@ -639,11 +639,11 @@ Extract from init JSON: `phase_dir`, `phase_number`, `has_plans`, `plan_count`.
Orchestrator provides CONTEXT.md content in the verification prompt. If provided, parse for locked decisions, discretion areas, deferred ideas.

```bash
ls "$phase_dir"/*-PLAN.md 2>/dev/null
# Read research for Nyquist validation data
cat "$phase_dir"/*-RESEARCH.md 2>/dev/null
gsd-sdk query roadmap.get-phase "$phase_number"
ls "$phase_dir"/*-BRIEF.md 2>/dev/null
node ./node_modules/@gsd-build/sdk/dist/cli.js query phase.list-plans "$phase_number"
# Research / brief artifacts (deterministic listing)
node ./node_modules/@gsd-build/sdk/dist/cli.js query phase.list-artifacts "$phase_number" --type research
node ./node_modules/@gsd-build/sdk/dist/cli.js query roadmap.get-phase "$phase_number"
node ./node_modules/@gsd-build/sdk/dist/cli.js query phase.list-artifacts "$phase_number" --type summary
```

**Extract:** Phase goal, requirements (decompose goal), locked decisions, deferred ideas.
Expand Down Expand Up @@ -729,10 +729,11 @@ The `tasks` array in the result shows each task's completeness:

**Check:** valid task type (auto, checkpoint:*, tdd), auto tasks have files/action/verify/done, action is specific, verify is runnable, done is measurable.

**For manual validation of specificity** (`verify.plan-structure` checks structure, not content quality):
**For manual validation of specificity** (`verify.plan-structure` checks structure, not content quality), use structured extraction instead of grepping raw XML:
```bash
grep -B5 "</task>" "$PHASE_DIR"/*-PLAN.md | grep -v "<verify>"
node ./node_modules/@gsd-build/sdk/dist/cli.js query plan.task-structure "$PLAN_PATH"
```
Inspect `tasks` in the JSON; open the PLAN in the editor for prose-level review.

## Step 6: Verify Dependency Graph

Expand All @@ -757,8 +758,8 @@ Missing: No mention of fetch/API call → Issue: Key link not planned
## Step 8: Assess Scope

```bash
grep -c "<task" "$PHASE_DIR"/$PHASE-01-PLAN.md
grep "files_modified:" "$PHASE_DIR"/$PHASE-01-PLAN.md
node ./node_modules/@gsd-build/sdk/dist/cli.js query plan.task-structure "$PHASE_DIR/$PHASE-01-PLAN.md"
node ./node_modules/@gsd-build/sdk/dist/cli.js query frontmatter.get "$PHASE_DIR/$PHASE-01-PLAN.md" files_modified
```

Thresholds: 2-3 tasks/plan good, 4 warning, 5+ blocker (split required).
Expand Down
5 changes: 3 additions & 2 deletions agents/gsd-planner.md
Original file line number Diff line number Diff line change
Expand Up @@ -812,10 +812,11 @@ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi

Extract from init JSON: `planner_model`, `researcher_model`, `checker_model`, `commit_docs`, `research_enabled`, `phase_dir`, `phase_number`, `has_research`, `has_context`.

Also read STATE.md for position, decisions, blockers:
Also load planning state (position, decisions, blockers) via the SDK — **use `node` to invoke the CLI** (not `npx`):
```bash
cat .planning/STATE.md 2>/dev/null
node ./node_modules/@gsd-build/sdk/dist/cli.js query state.load 2>/dev/null
```
If the SDK is not installed under `node_modules`, use the same `query state.load` argv with your local `gsd-sdk` CLI on `PATH`.

If STATE.md missing but .planning/ exists, offer to reconstruct or continue without.
</step>
Expand Down
4 changes: 1 addition & 3 deletions agents/gsd-roadmapper.md
Original file line number Diff line number Diff line change
Expand Up @@ -560,9 +560,7 @@ When files are written and returning to orchestrator:

### Files Ready for Review

User can review actual files:
- `cat .planning/ROADMAP.md`
- `cat .planning/STATE.md`
User can review actual files in the editor or via SDK queries (e.g. `node ./node_modules/@gsd-build/sdk/dist/cli.js query roadmap.analyze` and `query state.load`) instead of ad-hoc shell `cat`.

{If gaps found during creation:}

Expand Down
5 changes: 3 additions & 2 deletions get-shit-done/bin/lib/state.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ process.on('exit', () => {

// Shared helper: extract a field value from STATE.md content.
// Supports both **Field:** bold and plain Field: format.
// Horizontal whitespace only after ':' so YAML keys like `progress:` do not match as `Progress:` (parity with sdk/helpers stateExtractField).
function stateExtractField(content, fieldName) {
const escaped = escapeRegex(fieldName);
const boldPattern = new RegExp(`\\*\\*${escaped}:\\*\\*\\s*(.+)`, 'i');
const boldPattern = new RegExp(`\\*\\*${escaped}:\\*\\*[ \\t]*(.+)`, 'i');
const boldMatch = content.match(boldPattern);
if (boldMatch) return boldMatch[1].trim();
const plainPattern = new RegExp(`^${escaped}:\\s*(.+)`, 'im');
const plainPattern = new RegExp(`^${escaped}:[ \\t]*(.+)`, 'im');
const plainMatch = content.match(plainPattern);
return plainMatch ? plainMatch[1].trim() : null;
}
Expand Down
2 changes: 2 additions & 0 deletions get-shit-done/workflows/ingest-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ if [ -n "{MANIFEST_PATH}" ]; then
fi
```

**Containment (required):** After resolving `SCAN_PATH` and `MANIFEST_PATH` relative to the repo root, canonicalize each with `realpath` (or platform equivalent) and assert the result is under `realpath("$REPO_ROOT")`. Reject absolute paths outside the repo (e.g. `/tmp`, `C:\Windows`) even when they do not contain `..`.

If `PATH_NOT_FOUND` or `MANIFEST_NOT_FOUND`: display error and exit.

</step>
Expand Down
Loading
Loading