Skip to content

feat: project search command with pre-processing hook#143

Closed
DavidROliverBA wants to merge 1 commit intotractorjuice:mainfrom
DavidROliverBA:feat/project-search
Closed

feat: project search command with pre-processing hook#143
DavidROliverBA wants to merge 1 commit intotractorjuice:mainfrom
DavidROliverBA:feat/project-search

Conversation

@DavidROliverBA
Copy link
Contributor

Summary

Adds /arckit:search — keyword, type, and requirement ID search across all project artifacts. Fills the gap of having no search capability across 34+ document types.

  • search-scan.mjs — UserPromptSubmit hook that indexes all ARC documents (metadata, content preview, requirement IDs)
  • search.md — Command with ranked results, filter syntax, and handoffs
  • Supports --type=ADR, --project=001, --id=BR-003 filters and combinations
  • Scoring: title match (10pts), control fields (5pts), content (3pts), filename (2pts)

Files Changed

File Change
arckit-claude/hooks/search-scan.mjs New — UserPromptSubmit pre-processing hook
arckit-claude/commands/search.md New — search command
arckit-claude/hooks/hooks.json Register search hook
docs/guides/search.md New — usage guide

Design Decisions

  • No persistent index — scans fresh on each invocation for accuracy. Projects typically have <100 documents, so scan time is negligible.
  • Hook does I/O, command does reasoning — follows the pattern established by health-scan.mjs and traceability-scan.mjs
  • Content preview — extracts first 500 chars after document control table, giving Claude enough context to rank and excerpt results

Test plan

  • JSON validation of hooks.json
  • ESM import validation
  • Search in a project with multiple document types
  • Filter by type, project, and requirement ID
  • Empty query shows usage help

🤖 Generated with Claude Code

Add /arckit:search for keyword, type, and requirement ID search across
all project artifacts. Includes pre-processing hook that builds a
search index on invocation — no persistent index needed.

- search-scan.mjs: UserPromptSubmit hook extracts document metadata
- search.md: Command with ranked results and filter syntax
- Supports --type, --project, --id filters and combinations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tractorjuice
Copy link
Owner

Superseded by #146, which includes your original search command, hook, and guide plus the missing deliverables:

  • Converter output for Codex, OpenCode, and Gemini extensions
  • Command count 57→58 across 44 files (READMEs, guides, HTML pages, plugin.json, extension manifests, CLAUDE.md)
  • DEPENDENCY-MATRIX.md, CHANGELOG.md, docs/README.md updates
  • Guide copied to plugin directory (arckit-claude/docs/guides/search.md)
  • commands.html and index.html table rows

Your original commit is preserved as-is in #146. Thanks for the contribution!

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.

2 participants