ai-spector
Core AI Spector skill: setup, upgrade, adopt, check, docops CLI, work sessions (resume/route/pause), course link, and onboarding help. Use when the user says help, I'm stuck, where am I, or what's next about project setup; project init/setup, upgrade, adopting existing docs, workspace check, Writer contract bootstrap (docops init/migrate), resuming or managing active work sessions, or learning via the course. Do not use when the user clearly wants generation, graph ops, or contract review/comments — use the matching skill instead.
- License 许可
- MIT
- 最近更新
- 2026-07-08
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- ai-spector
- paths
- [ "package.json", ".ai-spector/**", ".cursor/**", ".claude/**", ".docops/**" ]
- description
- Core AI Spector skill: setup, upgrade, adopt, check, docops CLI, work sessions (resume/route/pause), course link, and onboarding help. Use when the user says help, I'm stuck, where am I, or what's next about project setup; project init/setup, upgrade, adopting existing docs, workspace check, Writer contract bootstrap (docops init/migrate), resuming or managing active work sessions, or learning via the course. Do not use when the user clearly wants generation, graph ops, or contract review/comments — use the matching skill instead.
02 资源文件 21
- 参考文档references/clarify.md3.9 KB
- 参考文档references/cli-failures.md5.5 KB
- 参考文档references/cli-reference.md19.1 KB
- 参考文档references/context-management.md5.6 KB
- 参考文档references/context-readiness.md11.7 KB
- 参考文档references/context-store.md1.9 KB
- 参考文档references/docops-migrate.md3.5 KB
- 参考文档references/extract-specs.md2.7 KB
- 参考文档references/feedback-report.md2.7 KB
- 参考文档references/generate-graph.md7.6 KB
- 参考文档references/generate-workflow.md12.3 KB
- 参考文档references/graph.md2.6 KB
- 参考文档references/help.md6.9 KB
- 参考文档references/incremental-continuation.md2.9 KB
- 参考文档references/language-picker.md3.7 KB
- 参考文档references/output-compliance.md3.7 KB
- 参考文档references/plan-and-briefing.md5.7 KB
- 参考文档references/prerequisites.md2.3 KB
- 参考文档references/project-conventions.md1.9 KB
- 参考文档references/runbook.md11.6 KB
- 参考文档references/workspace-check.md2.9 KB
03 SKILL.md 正文
AI Spector (core)
Router: ../_skill-router.md · Workflow: ../../WORKFLOW.md
When to use
- Onboarding help — help, I'm stuck, where am I, what's next (project setup progress) → references/help.md
- Setup, upgrade, adopt, check, docops, course, work sessions → runbook sections below
Route by intent
| Intent | Runbook section |
|---|---|
| Help / stuck / where am I / what's next | references/help.md |
| Setup / bootstrap project | references/runbook.md — Setup |
| Upgrade ai-spector package | references/runbook.md — Upgrade |
| Adopt / migrate existing docs | references/runbook.md — Adopt |
| Migrate docops / Writer / legacy layout (migrate) | references/docops-migrate.md |
| Check workspace / clarifications | references/runbook.md — Check |
| Docops / Writer contract bootstrap | references/docops-migrate.md · npx ai-spector docops guide --json |
| Learn / open course | references/runbook.md — Course |
| Resume / pause / manage work sessions | references/runbook.md — Work-Sessions |
Route to another skill
| Intent | Skill |
|---|---|
| Generate SRS, basic design, detail design, prototype, incremental change, template import | ai-spector-generate |
| Analyze, index, validate, impact, visualize, search, sync-audit | ai-spector-graph |
| Review queue, approve doc, comment threads, translations | ai-spector-contract |
MCP invocation rule
When the ai-spector MCP server is configured, call MCP tools instead of npx ai-spector. MCP returns structured JSON and is the preferred channel.
| Operation | MCP tool | CLI fallback |
|---|---|---|
| Route ambiguous intent | workflow_route({ message }) |
(no CLI equivalent) |
| Workspace check | workspace_check({ fix?: boolean }) |
npx ai-spector check [--fix] [--json] |
| Resume work session | work_resume({ workId }) |
npx ai-spector work resume <id> |
| List work sessions | work_list({ status }) |
npx ai-spector work list --json |
| Docops status | docops_status({}) |
npx ai-spector docops status --json |
| Lifecycle sync / onboarding progress | lifecycle_sync({ dryRun?: boolean }) |
npx ai-spector lifecycle sync [--json] |
| Translation queue status | lang_queue({}) |
npx ai-spector lang queue pending --json |
CLI failure rule (non-negotiable)
When npx ai-spector exits non-zero or MCP returns an error:
- Pause — no generation, no bulk reads, no silent workarounds.
- Report per references/cli-failures.md.
- Offer recovery — fix and retry, bounded workaround, or pause.
- Continue from the failed step after fix.
Project anchors
| Item | Path |
|---|---|
| Contract config | .docops/docops.config.json |
| Engine config | .ai-spector/engine.json |
| Graph | .ai-spector/graph/traceability.graph.json |
| Work sessions | .ai-spector/.docflow/tasks/ |
| Templates | .ai-spector/templates/ |
| Doc output | docs/srs/{lang}/ · docs/basic-design/{lang}/ · docs/detail-design/{lang}/ |
After any batch of doc edits
index({ cocoindexSync: true }) # preferred: refreshes graph + embeddings
Or index({}) if CocoIndex is not configured. Never skip embedding refresh when CocoIndex is set up.
More
04 同仓库更多 Skills
ai-spector
暂无简介
ai-spector-graph
Traceability graph operations: analyze data-source, index refresh, graph validate, impact, visualize, semantic search (CocoIndex), natural language graph lookup, doc summaries, and layer sync audit (design drift since baseline). Use when the user asks to analyze sources, refresh or validate the graph, see impact, visualize traceability, find docs by concept, or check doc drift since baseline. Do not use for writing SRS, basic design, HTML prototype, or formal document sign-off.
ai-spector-generate
All document generation: SRS, basic design, detail design, HTML prototype; incremental feature/section changes (resolve-task); and template pack import. Use for "generate SRS/basic design/detail design", "write chapter N", "add feature", "update section", "I want to add…", "HTML prototype", Capability-gated for Writer cloud UI only — local adapter (`.ai-spector/engine.json`) uses MCP/CLI work sessions even when `capabilities.generate` is false.
ai-spector-contract
Writer contract operations: document sign-off (review_approve), comment resolution (doc threads C-NNN and prototype batches B-NNN), translation sync, and language status. Use for review queue, approve doc by logical path (srs/01-overview), pending client review, resolve C-NNN threads, B-NNN prototype batches, resolve translations, or check language status. NOT for graph, generate, or setup — use the matching skill instead.
ai-spector
Core AI Spector skill: setup, upgrade, adopt, check, docops CLI, work sessions (resume/route/pause), course link, and onboarding help. Use when the user says help, I'm stuck, where am I, or what's next about project setup; project init/setup, upgrade, adopting existing docs, workspace check, Writer contract bootstrap (docops init/migrate), resuming or managing active work sessions, or learning via the course. Do not use when the user clearly wants generation, graph ops, or contract review/comments — use the matching skill instead.
ai-spector-graph
Traceability graph operations: analyze data-source, index refresh, graph validate, impact, visualize, semantic search (CocoIndex), natural language graph lookup, doc summaries, and layer sync audit (design drift since baseline). Use when the user asks to analyze sources, refresh or validate the graph, see impact, visualize traceability, find docs by concept, or check doc drift since baseline. Do not use for writing SRS, basic design, HTML prototype, or formal document sign-off.