SpecPrism — AI Product & QA Co-Architect
v1.8.0Stateless Socratic spec triage, EARS acceptance criteria, and REQ-to-TC test traceability.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
specprism_triage_idea
Run Stage 1 Socratic Scope & Boundary Triage before writing code. Round 1 takes ideaPrompt and returns 3-4 paired PM/Engineer Decision Cards plus an HMAC-signed requestState handle; Round 2 takes ideaPrompt, draftTriage, requestState, and answers to lock canonical ASM-* scope assumptions.
| Parameter | Type | Description |
|---|---|---|
ideaPrompt * | string | 1-3 sentence feature or product idea (minimum 5 characters). |
answers | array | Selected option IDs or custom user overrides for each Socratic question in Round 2. |
draftTriage | object | Draft SocraticTriage object returned in MRTR Round 1; pass back in Round 2 to lock answers. |
requestState | object | HMAC-SHA256 signed stateless MRTR state handle returned in Round 1. |
specprism_verify_traceability
Audit a SpecPrism spec.json document (or synced cloud projectId) read-only for vertical story touchpoints (entrySurface, domainLogic, persistenceOrExternal), canonical EARS SHALL clauses, and zero-orphan REQ-to-TC test coverage. Returns a deterministic pass/fail report with actionable violation messages.
| Parameter | Type | Description |
|---|---|---|
projectId | string | Optional synced cloud project UUID when loading the specification from SpecPrism. |
spec | object | Full SpecIterationDocument JSON object to audit locally. |
specprism_compute_delta
Compute deterministic Stage 5 ADDED, MODIFIED, and REMOVED requirement deltas (DLT-*) between baseSpec and targetSpec, classifying every TC-* test case as regression_shield, requires_update, new_test_required, or obsolete. Read-only and side-effect free.
| Parameter | Type | Description |
|---|---|---|
baseSpec * | object | Baseline SpecIterationDocument JSON (e.g. v1). |
targetSpec * | object | Updated SpecIterationDocument JSON (e.g. v2). |
changePrompt | string | Optional human summary of why the specification evolved. |
specprism_compile_dialect
Compile a verified SpecIterationDocument read-only into an implementation handoff prompt tuned for one of the 9 frontier LLM dialects (anthropic-claude, openai-gpt-reasoning, google-gemini, deepseek-reasoning, qwen-coder, xai-grok, mistral-codestral, meta-llama, local-ollama-default).
| Parameter | Type | Description |
|---|---|---|
dialectId | string | Target dialect profile ID (defaults to spec.targetDialectId or anthropic-claude). |
projectId | string | Optional synced cloud project UUID if spec is omitted. |
spec | object | Verified SpecIterationDocument JSON to compile. |
specprism_export_issues
Convert Vertical User Stories (US-*) from a SpecIterationDocument read-only into Linear/GitHub Issues Markdown tickets and a POSIX-escaped gh issue create shell script preserving REQ-* EARS clauses and TC-* test targets.
| Parameter | Type | Description |
|---|---|---|
projectId | string | Optional synced cloud project UUID if spec is omitted. |
spec | object | SpecIterationDocument JSON containing US-*, REQ-*, and TC-* items. |
specprism_ingest_uat
Ingest a post-code Vitest JSON, Playwright JSON, JUnit XML string, or native test report against a SpecIterationDocument (or cloud projectId). Computes Release Readiness %, Category Breakdown (Happy Path vs Negative Edge Cases vs Guardrails), a dialect-tuned Engineer Repair Prompt, and failing Bug Tickets, optionally persisting the run when projectId is authenticated.
| Parameter | Type | Description |
|---|---|---|
report * | object | string | Vitest JSON object, Playwright JSON object, JUnit XML string, or native { results: [...] } payload. |
dialectId | string | Optional target LLM dialect ID for formatting the Engineer Repair Prompt. |
projectId | string | Optional cloud project UUID to load the spec from and persist the UAT run onto. |
spec | object | SpecIterationDocument JSON defining REQ-* and TC-* mappings. |
specprism_push_surface
Normalize and optionally attach a local .specprism/surface.json brownfield repository scan (detected frameworks, ORMs, testRunners, samplePaths) onto a cloud projectId so Stages 1-4 ground malicious-compliance checks and TC-* file paths in the real codebase without requiring GitHub repo OAuth.
| Parameter | Type | Description |
|---|---|---|
surface * | object | JSON object produced by scan-repo.mjs (.specprism/surface.json) with frameworks, orms, testRunners, codeFileCount, and samplePaths. |
projectId | string | Optional cloud project UUID to persist the normalized repoSurface onto. |
specprism_audit_diff
Audit a unified git diff read-only against a SpecIterationDocument (or synced cloud projectId) before committing or opening a PR. Blocks edits to Stage 5 regression_shield test files, catches skipped/tautological/mock-only fake tests and NODE_ENV test backdoors, flags out-of-scope file touchpoints, and returns a 0-100 contractHonestyScore.
| Parameter | Type | Description |
|---|---|---|
gitDiff * | string | Unified git diff output (e.g. from git diff or git diff --cached) to audit against the specification. |
baseSpec | object | Optional baseline SpecIterationDocument JSON used to compute Regression Shields when spec.delta is absent. |
projectId | string | Optional synced cloud project UUID to load the specification from if spec is omitted. |
spec | object | SpecIterationDocument JSON defining US-* touchpoints, REQ-* criteria, and TC-* Regression Shields. |
strictScope | boolean | When true, treats out-of-scope blast-radius file edits as critical blocking violations instead of warnings. |
specprism_import_spec
Import an external GitHub spec-kit (.specify/), Fission OpenSpec (openspec/), or generic Markdown PRD document, score its 0-100 Loophole Immunity across SpecPrism's 6 malicious compliance exploit classes, and upgrade it into a schema-valid Stage 4 SpecIterationDocument with synthesized negative/guardrail shields and zero-orphan REQ-to-TC coverage.
| Parameter | Type | Description |
|---|---|---|
markdown * | string | Raw Markdown contents of a spec-kit spec.md, OpenSpec spec/change file, or Linear/Notion/GitHub PRD (max 256 KB). |
persistToCloud | boolean | When true on an authenticated sp_pat_* session, persists the upgraded spec to spec-prism.app and returns workbenchUrl. |
projectTitle | string | Optional explicit project title override (defaults to the Markdown H1 heading). |
targetDialectId | string | Optional target LLM dialect profile ID (defaults to anthropic-claude). |
specprism_reverse_spec
Reverse-extract a locked baseline SpecIterationDocument from existing brownfield route handlers (Next.js, Express/Hono, FastAPI), Drizzle/Prisma/Zod schemas, and .test.* files (max 60 files / 512 KB). Locks existing tests as Stage 5 regression_shields and reports uncovered 6-class production loopholes.
| Parameter | Type | Description |
|---|---|---|
files * | array | Array of brownfield { path, content } source, schema, and test files (1 to 60 files, <= 512 KB total). |
persistToCloud | boolean | When true on an authenticated sp_pat_* session, persists the baseline spec to spec-prism.app and returns workbenchUrl. |
projectTitle | string | Optional baseline project title override (defaults to primary extracted route). |
targetDialectId | string | Optional target LLM dialect profile ID (defaults to anthropic-claude). |
specprism_redteam_spec
Run an Adversarial Malicious-Compliance Red-Team Jury against a SpecIterationDocument (or synced cloud projectId). Selects an orthogonal rival LLM dialect family, pairs deterministic 6-class probes with optional rival-model critique to compute a 0-100 loopholeImmunityScore, and optionally compiles 1-click hardening REQ/TC patches preserving Stage 5 Regression Shields.
| Parameter | Type | Description |
|---|---|---|
adversaryDialectOverride | string | Optional explicit rival dialect profile ID (defaults to orthogonal family via selectRivalAdversaryDialect). |
applyHardeningPatches | boolean | When true, returns hardenedSpec (vN+1) with proposed REQ-* and TC-* shields merged and Stage 5 Regression Shields preserved. |
projectId | string | Optional synced cloud project UUID to load the specification from if spec is omitted. |
spec | object | SpecIterationDocument JSON to stress-test for literal-agent compliance loopholes. |