Orchestrator for the ingest pipeline (#2387): - commands/gsd/ingest-docs.md — /gsd-ingest-docs command with [path] [--mode] [--manifest] [--resolve] args; @-references the shared doc-conflict-engine so the BLOCKER gate semantics are inherited from the same contract /gsd-import consumes. - get-shit-done/workflows/ingest-docs.md — end-to-end flow: 1. parse + validate args (traversal guard on path + manifest) 2. init query + runtime detect + auto mode-detect (.planning/ presence) 3. discover docs via directory convention OR manifest YAML 4. 50-doc cap — forces --manifest for larger sets in v1 5. discovery approval gate 6. parallel spawn of gsd-doc-classifier per doc (fallback to sequential on non-Claude runtimes) 7. single gsd-doc-synthesizer spawn 8. conflict gate honoring doc-conflict-engine safety rule — BLOCKER count > 0 aborts without writing PROJECT/REQUIREMENTS/ ROADMAP/STATE 9. route to gsd-roadmapper (new) or append-to-milestone (merge), audits roadmapper's required PROJECT.md fields and only prompts for gaps 10. commit via gsd-sdk Updates ARCHITECTURE.md counts (commands 80→81, workflows 77→78, agents tree-count 31→33). --resolve interactive is reserved (explicit future-release reject). Refs #2387 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
43 lines
2.3 KiB
Markdown
43 lines
2.3 KiB
Markdown
---
|
|
name: gsd:ingest-docs
|
|
description: Scan a repo for mixed ADRs, PRDs, SPECs, and DOCs and bootstrap or merge the full .planning/ setup from them. Classifies each doc in parallel, synthesizes a consolidated context with a conflicts report, and routes to new-project or merge-milestone depending on whether .planning/ already exists.
|
|
argument-hint: "[path] [--mode new|merge] [--manifest <file>] [--resolve auto|interactive]"
|
|
allowed-tools:
|
|
- Read
|
|
- Write
|
|
- Edit
|
|
- Bash
|
|
- Glob
|
|
- Grep
|
|
- AskUserQuestion
|
|
- Task
|
|
---
|
|
|
|
<objective>
|
|
Build the full `.planning/` setup (or merge into an existing one) from multiple pre-existing planning documents — ADRs, PRDs, SPECs, DOCs — in one pass.
|
|
|
|
- **Net-new bootstrap** (`--mode new`, default when `.planning/` is absent): produces PROJECT.md + REQUIREMENTS.md + ROADMAP.md + STATE.md from synthesized doc content, delegating final generation to `gsd-roadmapper`.
|
|
- **Merge into existing** (`--mode merge`, default when `.planning/` is present): appends phases and requirements derived from the ingested docs; hard-blocks any contradiction with existing locked decisions.
|
|
|
|
Auto-synthesizes most conflicts using the precedence rule `ADR > SPEC > PRD > DOC` (overridable via manifest). Surfaces unresolved cases in `.planning/INGEST-CONFLICTS.md` with three buckets: auto-resolved, competing-variants, unresolved-blockers. The BLOCKER gate from the shared conflict engine prevents any destination file from being written when unresolved contradictions exist.
|
|
|
|
**Inputs:** directory-convention discovery (`docs/adr/`, `docs/prd/`, `docs/specs/`, `docs/rfc/`, root-level `{ADR,PRD,SPEC,RFC}-*.md`), or an explicit `--manifest <file>` YAML listing `{path, type, precedence?}` per doc.
|
|
|
|
**v1 constraints:** hard cap of 50 docs per invocation; `--resolve interactive` is reserved for a future release.
|
|
</objective>
|
|
|
|
<execution_context>
|
|
@~/.claude/get-shit-done/workflows/ingest-docs.md
|
|
@~/.claude/get-shit-done/references/ui-brand.md
|
|
@~/.claude/get-shit-done/references/gate-prompts.md
|
|
@~/.claude/get-shit-done/references/doc-conflict-engine.md
|
|
</execution_context>
|
|
|
|
<context>
|
|
$ARGUMENTS
|
|
</context>
|
|
|
|
<process>
|
|
Execute the ingest-docs workflow end-to-end. Preserve all approval gates (discovery, conflict report, routing) and the BLOCKER safety rule.
|
|
</process>
|