Skip to content

Feature/query orchestrator#123

Open
sezeryavuz wants to merge 18 commits into
ericbuess:mainfrom
sezeryavuz:feature/query-orchestrator
Open

Feature/query orchestrator#123
sezeryavuz wants to merge 18 commits into
ericbuess:mainfrom
sezeryavuz:feature/query-orchestrator

Conversation

@sezeryavuz
Copy link
Copy Markdown

No description provided.

sezeryavuz and others added 18 commits May 11, 2026 21:50
Brainstormed design for a multi-question research feature: /query slash
command parses input into sub-questions, dispatches a query-researcher
subagent per question in batches of 3 parallel, and assembles answers
into a single output file per task.

Spec covers script (build_docs_map.py), DOCS_MAP.md format, slash
command, orchestrator skill (7-step procedure), subagent definition,
install.sh / uninstall.sh changes, GitHub workflow integration, test
plan, risks, and acceptance criteria.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
13-task plan with TDD where applicable. Each task is bite-sized with
exact file paths, complete code, and concrete commands.

Tasks 1-4: build_docs_map.py + tests + initial map + workflow
Tasks 5-7: claude-files (command, agent, skill)
Tasks 8-11: install.sh, uninstall.sh, README, CLAUDE.md updates
Task 12: end-to-end manual validation
Task 13: final review and push

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add brace-depth JSX tracking to both strip_markdown() and extract_summary()
to eliminate Mintlify-pattern export const blocks from polluting summaries and
TF-IDF keywords in the 7 affected docs (amazon-bedrock, mcp, google-vertex-ai, etc.).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
User-generated /query outputs accumulate at $INSTALL_DIR/query.
This directory should never be committed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Final review noted two issues:
- Batching table omitted N=6 (between N=5 and N=7); a literal reader
  would have no explicit guidance. Added the row plus a general
  ceil(N/3) formula as fallback.
- "Independent parts joined by and/ve" used an unclear non-English token.
  Replaced with "a coordinating conjunction (e.g., and, or)".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Upstream main added 5 new docs (agent-view, agents, claude-platform-on-aws,
goal, worktrees) and updated many existing docs. Regenerated the map to
reflect current docs/ contents — 126 → 131 entries.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sezeryavuz
Copy link
Copy Markdown
Author


Add /query multi-question research command

Adds a new /query slash command that decomposes multi-part questions into independent sub-questions, dispatches a specialized subagent per question in batches of 3 in parallel, and assembles all answers into a single structured output file. The existing /docs command is unchanged.

How it works

/query
└─ query-orchestrator skill (~/.claude/skills/query-orchestrator/SKILL.md)
├─ parses input → N sub-questions
├─ creates ~/.claude-code-docs/query/QUERY-TASK--/
├─ writes query.md template with N answer slots
├─ dispatches query-researcher subagents (3 parallel per batch)
│ └─ each reads docs/DOCS_MAP.md, picks ≤5 docs, writes QUERY-N.md
└─ assembles all answers into the final query.md

Examples

/query What is a hook?
/query Explain hooks and MCP, then compare them
/query 1. What is a skill? 2. How do plugins work? 3. What is MCP?

Each query produces a folder under ~/.claude-code-docs/query/ containing a structured answer file with citations.

New pieces

  • scripts/build_docs_map.py — deterministic generator that builds docs/DOCS_MAP.md with title, summary (max 200 chars), and 8 TF-IDF keywords per doc. Python stdlib only.
  • .github/workflows/build-docs-map.yml — auto-regenerates the map after every successful Update Claude Code Documentation run.
  • claude-files/commands/query.md — slash command (/query)
  • claude-files/agents/query-researcher.md — research subagent
  • claude-files/skills/query-orchestrator/SKILL.md — 7-step orchestration skill
  • install.sh / uninstall.sh — additive blocks deploying / removing the above into ~/.claude/

Tests

13 pytest cases in scripts/test_build_docs_map.py covering title extraction, summary extraction (with frontmatter / code blocks / JSX stripping), TF-IDF keyword separation, and integration output. All pass.

Notes for review

  • Additive only — no existing /docs behavior is touched.
  • User data protection — uninstall.sh asks before deleting ~/.claude-code-docs/query/ history.
  • JSX stripping — Mintlify-sourced docs (amazon-bedrock, mcp, google-vertex-ai, etc.) contain inline JSX components that previously polluted summaries and keywords; the generator now strips them via brace-depth tracking.
  • PR is broken into 18 atomic commits for easier review (test → script → workflow → command/agent/skill → install/uninstall → docs).

Closes: N/A (new feature)


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant