active/specy/SKILL.md
Create structured specs and code exploration docs.
npx skillsauth add kevinslin/skills specyInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill creates structured research artifacts for codebase exploration and feature work.
Use this skill when:
If the request mentions any flow-doc intent (for example: flow doc, flow docs, flowdoc, call path doc, or execution flow doc), you must run this skill and follow the flow-doc workflow before drafting or revising content.
Only the flow-doc doc type is supported for flow docs. Do not route to old phase-based flow-doc material or alternate flow-doc doc-type names.
All filepaths in this skill are relative to $DOCS_ROOT unless noted otherwise.
Default $DOCS_ROOT is ./docs (relative to the project root directory).
When creating or updating a durable artifact such as a spec, flow doc, design doc, architecture doc, validation doc, recipe, runbook, or long-lived project note, invoke $mem before choosing $DOCS_ROOT. Use the selected $mem base root, schemas, optional base skill, and path style when the artifact belongs in persistent knowledge. Do this by artifact intent, not by whether the path contains .mem; memory roots may be any configured folder. Only use the default ./docs root when the artifact is repo-owned documentation or the user names a concrete non-memory destination.
When $mem selects a schema node, that node owns the destination path and required file shape. specy may adapt its document content to fit that node, but it must not override the chosen filename, folder layout, or template because a doc type would normally live somewhere else.
Document types are listed here. Use the parenthesized doc-type key with the common workflow/template paths below.
architecture): System-level architecture docs covering boundaries, components, interfaces, and key decisions.research-brief): Structured technology/approach research with comparisons and recommendations.flow-doc): Balanced flow documentation for specified code logic, combining a general-flow diagram, an execution trace, and targeted implementation details.state-doc): Terminal-output mapping with predicates, required state, and derivation paths.service-design-doc): Staff-level service/system proposals covering architecture, APIs, reliability, and risks.design-spec): Implementation-ready feature or migration designs with rollout/rollback planning.feature-spec): Milestone-based implementation plans with dependencies, risks, and verification.investigation-spec): Structured debugging plans for competing root-cause hypotheses and evidence capture.validation-spec): Validation coverage docs for automated and manual checks tied to specs.report-note): Concise report sidecars for source-backed findings, status, and open questions.recipe): Reproducible step-by-step change instructions derived from conversation or PR context.faq-doc): Reusable Q&A docs with concise answers and source citations.faq-spec): In-place FAQ additions that append a focused Q&A to the most recent research document type mentioned in the conversation.vendor-doc): Project-focused third-party library documentation summaries and topic references.Before creating, revising, or reviewing an architecture,
service-design-doc, design-spec, or feature-spec, invoke $docy and inject
ref/spec.
Docy owns specification prose, decision completeness, ownership and interface clarity, example and diagram semantics, and review style. Specy owns doc-type selection, source gathering, output paths, template shape, required sections, execution details, preservation and lifecycle, and handoff artifacts. For feature specs, retain repository touchpoints, tasks, and validation detail needed to make each phase executable and verifiable; omit only incidental implementation detail.
Do not copy Docy style rules into Specy workflows or templates. Keep Specy instructions limited to artifact-specific requirements and mechanics.
$mem first and report the selected base name, resolved root, and concrete output path. If no $mem base clearly matches and the user did not name a concrete non-memory destination, ask instead of guessing.
0a. If $mem resolves an existing folder-based spec unit (for example specs specs/{NN}-{topic}/) and the user asks to place a report "under spec 30" or similar, treat that folder as the target container. Do not create a new numbered spec just because the requested doc type is a research brief.
0b. If $mem resolves a sidecar node such as specs/reports/{{report}}, recast the content into that node's required shape. For research output, adapt findings into the selected schema template instead of copying the default research-brief headings verbatim../references/[doc-type]/workflow.md.Instructions header in that workflow to do the implementation../references/[doc-type]/template.md to the requested output location before filling in content.$dev.llm-session and replace the changelog timestamp and session placeholders. Changelog timestamps must include date, hour, and minute in YYYY-MM-DD HH:MM format./Users/... or similar machine-local link targets under $DOCS_ROOT unless the document is intentionally pointing outside the repo.Before editing an existing document, search for a ## Manual Notes section and any preservation marker such as [keep this for the user to add notes. do not change between edits].
When such a section exists:
## Manual Notes section body as user-owned content.## Manual Notes heading and preserved marker/body are unchanged. If the diff touches that section, revert that part before handoff unless the user explicitly asked to edit manual notes.Flow docs in this skill are often intentionally isolated by lifecycle or domain (for example core.init vs topic.orchestration vs ref.new-task-kickoff).
Do not force all phases into one document. Instead, each isolated flow doc must capture boundary contracts in ## Overview, ## Entry Points, ## Notes, or ## Related docs:
Use flow-doc when the goal is to give a developer a balanced understanding
of specified code logic with pointers for deeper investigation. Flow docs are
not line-by-line code descriptions. They combine:
$dev.diagram.ref/execution-trace.Use ./references/flow-doc/workflow.md and
./references/flow-doc/template.md for this doc type.
$sudocode.$dev.diagram to draft or revise flow diagrams.$docy ref/execution-trace before writing flow-doc execution traces.$sudocode as the source path for this workspace.Before finalizing any flow doc, run the validator from this skill root:
python3 ./scripts/validate_flow_doc.py --kind flow-doc --doc "<flow-doc-path>"
Resolve validator errors before handoff. Do not skip this check.
Every document created or revised using this skill must end with the following sections, verbatim and in this order, unless the doc-type template specifies a different changelog shape. Keep the Manual Notes content unchanged across edits.
## Manual Notes
[keep this for the user to add notes. do not change between edits]
## Changelog
- [YYYY-MM-DD HH:MM]: [description of update] ([agent session id] - (current git sha))
For the changelog timestamp, use the current local date and time to the minute. For the session id, use dev.llm-session to find the current conversation session id. Choose the lookup strategy that matches the active thread, and do not leave placeholder text such as [agent session id] or [codex session id] in a completed document.
Shortcuts are self-contained workflows triggered only when the user explicitly asks to use one. When invoked, follow the mapped workflow section exactly.
./references/architecture/workflow.md section Instructions../references/research-brief/workflow.md section Instructions../references/flow-doc/workflow.md section Instructions../references/state-doc/workflow.md section Instructions../references/service-design-doc/workflow.md section Instructions../references/design-spec/workflow.md section Instructions../references/feature-spec/workflow.md section Instructions../references/investigation-spec/workflow.md section Instructions../references/report-note/workflow.md section Instructions.When updating existing flow docs, use a preservation-first revision style.
## Manual Notes and its content unchanged across revisions../references/flow-doc/workflow.md section Revision Instructions../references/recipe/workflow.md section Instructions../references/faq-spec/workflow.md section Instructions../references/vendor-doc/workflow.md section Instructions.$DOCS_ROOT and avoid absolute local filesystem paths in generated docs.Research documentation lives in the project's docs folder:
$DOCS_ROOT/
architecture/ # System architecture docs
{YYYY-MM-DD}-architecture-{system}.md
research/ # Research briefs
{date}-research-{topic}.md
design/ # Service design docs
{date}-design-{topic}.md
specs/ # Active and archived specs
.archive/ # Completed specs moved here
{NN}-{topic}.md
flows/ # Flow documentation
core.init.md
core.exit.md
topic.{name}.md
ref.{name}.md
reports/ # Concise report notes
{report-name}.md
state/ # State docs
{state-name}.md
recipes/ # Change recipes
{recipe-name}.md
faq/
{date}-{topic}.md
vendor/ # Vendor documentation
{library}/
README.md
reference/
{docs}.md
topics/
{name}.md
Active feature specs live directly under $DOCS_ROOT/specs/ with a monotonic two-digit integer prefix starting at 01; choose the next prefix by scanning active and archived specs and do not reuse gaps. When a single-file spec is complete, move it to $DOCS_ROOT/specs/.archive/ and keep the same filename.
When a workspace explicitly uses a folder-based schema such as specs, each active spec folder lives directly under $DOCS_ROOT/specs/{NN}-{topic}/ and may contain sidecars such as milestones/, flows/, reports/, cook/, or proof artifacts. Treat the folder as the spec unit: update the selected schema sidecar, preserve siblings, and archive the whole folder to $DOCS_ROOT/specs/.archive/{NN}-{topic}/ when complete.
If multiple spec types exist for the same topic, keep the filename format and distinguish them in the {topic} slug, for example 01-payments-design.md or 02-payments-validation.md.
FAQ Specs do not create standalone files. They update the target research document in place.
Throughout this skill, bundled paths prefixed with ./ are relative to this skill root.
./references/architecture/workflow.md -> ./references/architecture/workflow.md./references/architecture/template.md -> ./references/architecture/template.md./references/research-brief/workflow.md -> ./references/research-brief/workflow.md./references/research-brief/template.md -> ./references/research-brief/template.md./references/flow-doc/workflow.md -> ./references/flow-doc/workflow.md./references/flow-doc/template.md -> ./references/flow-doc/template.md./references/state-doc/workflow.md -> ./references/state-doc/workflow.md./references/state-doc/template.md -> ./references/state-doc/template.md./references/service-design-doc/workflow.md -> ./references/service-design-doc/workflow.md./references/service-design-doc/template.md -> ./references/service-design-doc/template.md./references/design-spec/workflow.md -> ./references/design-spec/workflow.md./references/design-spec/template.md -> ./references/design-spec/template.md./references/feature-spec/workflow.md -> ./references/feature-spec/workflow.md./references/feature-spec/template.md -> ./references/feature-spec/template.md./references/feature-spec/effective-planning.md -> ./references/feature-spec/effective-planning.md./references/feature-spec/beads.md -> ./references/feature-spec/beads.md./references/investigation-spec/workflow.md -> ./references/investigation-spec/workflow.md./references/investigation-spec/template.md -> ./references/investigation-spec/template.md./references/validation-spec/workflow.md -> ./references/validation-spec/workflow.md./references/validation-spec/template.md -> ./references/validation-spec/template.md./references/report-note/workflow.md -> ./references/report-note/workflow.md./references/report-note/template.md -> ./references/report-note/template.md./references/recipe/workflow.md -> ./references/recipe/workflow.md./references/recipe/template.md -> ./references/recipe/template.md./references/faq-doc/workflow.md -> ./references/faq-doc/workflow.md./references/faq-doc/template.md -> ./references/faq-doc/template.md./references/faq-spec/workflow.md -> ./references/faq-spec/workflow.md./references/faq-spec/template.md -> ./references/faq-spec/template.md./references/vendor-doc/workflow.md -> ./references/vendor-doc/workflow.md./references/vendor-doc/template.md -> ./references/vendor-doc/template.mdWhen you see $DOCS_ROOT/, resolve paths relative to the project root directory.
development
Create, rename, audit, or close a tracked Codex task whose turns and status are persisted in the local thread ledger. Only use when directly invoked.
testing
Manage Git preflight, branch and worktree creation, and completed-work cleanup. Use when explicitly invoked.
databases
Automatically use for durable knowledge, configured project-context lookup, and schema-backed artifact layouts.
content-media
Create, update, or optimize skills and SKILL.md content.