specpack

v0.1.0
io.github.THE-KIPDEV/specpack Checked 1 hour ago Published 2 months ago

Audit and write CLAUDE.md / AGENTS.md / Cursor rules; generate full build specs for new projects.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

audit_agent_file Audit an agent memory file

Score CLAUDE.md, AGENTS.md, .cursorrules, .windsurfrules, copilot-instructions.md or a Cursor .mdc rule for bloat: the share of its tokens that change nothing about what the agent does. Returns each line to cut (role-play preamble, generic advice, restated manifests, duplicates, emphasis inflation) or to offload (file trees, schema dumps, endpoint lists, long code blocks, situational sections) with the reason, plus a trimmed copy. Runs locally, nothing is sent. Pass `path` or `content`; with neither, audits every agent file found in the working directory. Use it before editing an agent file, o…

ParameterTypeDescription
contentstringFile content to audit, when it is not on disk.
include_trimmedbooleanAppend the trimmed file. Default true.
pathstringFile to audit, relative to the working directory (e.g. CLAUDE.md).

draft_agent_file Draft a lean AGENTS.md / CLAUDE.md from the repository

Scan the project's manifests (package.json scripts and lockfile, framework, tsconfig, Prisma schema, pyproject/requirements, composer.json, go.mod, Cargo.toml, Gemfile, Makefile, Docker Compose, .nvmrc, .env.example) and return a lean agent file: stack, commands with their real scripts, and the constraints those files state. Nothing is guessed and nothing is written to disk: review it, add the project rules only the user knows (the ones the code cannot tell), then write it. Runs locally.

ParameterTypeDescription
formatstringagents → AGENTS.md (default); claude → CLAUDE.md (imports @AGENTS.md when it exists); cursor → .cursor/rules/project.mdc.
pathstringProject directory, relative to the working directory. Default: the working directory.

list_project_types List project types

The project types a build spec can be generated for (saas, ecommerce, business, marketplace, blog, webapp, landing). Next: get_questionnaire.

get_questionnaire Get the questionnaire for a project type

Returns every question behind a build spec for one project type: id, label, type (text, textarea, select, radio, multiselect, boolean, number), options, and conditions (ask only when another answer matches). Fill the answers yourself from the conversation and the repository, ask the user only what you cannot infer, then call generate_spec with {type, answers}. Answer values: option `value` for select/radio, array of values for multiselect, true/false for boolean. Only project_name and project_description are required.

ParameterTypeDescription
type *stringProject type id.

generate_spec Generate a build spec and agent files

Generates the complete specification for a new project (stack, database schema, authentication, type-specific features, pages, design, SEO, security, legal, deployment, file structure, rules) and the agent files that go with it: AGENTS.md, CLAUDE.md (imports @AGENTS.md), .cursor/rules/project.mdc, .cursorrules, .windsurfrules, .github/copilot-instructions.md, README.md. Deterministic (same answers → same spec), no AI involved. Counts one spec (2 free without a key). With `output_dir`, writes spec.md and the pack there (or only `files`) and returns the paths; without it, returns spec.md plus…

ParameterTypeDescription
answers *objectAnswers keyed by question id (see get_questionnaire). project_name and project_description are required.
type *stringProject type id.
filesarrayPack files to write (with output_dir; default: all) or to return inline (default: none), e.g. ["AGENTS.md","CLAUDE.md"]. spec.md is always included.
output_dirstringDirectory to write the files into, relative to the working directory.
overwritebooleanOverwrite existing files in output_dir. Default false: nothing is written if one exists.

get_usage Plan and usage

The current plan (free, pass, pro), its end date, and how many specs and AI drafts are left — for the API key in SPECPACK_API_KEY, or for this IP when anonymous. Call it before generate_spec or draft_answers when unsure a call will fit the quota.

draft_answers Draft questionnaire answers with AI

Turns a plain-language project description into a complete answer set for generate_spec, using AI on prompt-generator-website.com (10–40 s). Spends one AI draft (3 free without a key) — prefer filling get_questionnaire yourself when you have the context. Returns the answers and the assumptions the description did not settle: show those to the user before calling generate_spec.

ParameterTypeDescription
description *stringWhat the project is, who it is for, what it must do.
typestringProject type id, when known.