SpecPrism — AI Product & QA Co-Architect

v1.8.0
io.github.orphik/specprism Checked 8 hours ago Published 16 hours ago

Stateless 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.

ParameterTypeDescription
ideaPrompt *string1-3 sentence feature or product idea (minimum 5 characters).
answersarraySelected option IDs or custom user overrides for each Socratic question in Round 2.
draftTriageobjectDraft SocraticTriage object returned in MRTR Round 1; pass back in Round 2 to lock answers.
requestStateobjectHMAC-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.

ParameterTypeDescription
projectIdstringOptional synced cloud project UUID when loading the specification from SpecPrism.
specobjectFull 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.

ParameterTypeDescription
baseSpec *objectBaseline SpecIterationDocument JSON (e.g. v1).
targetSpec *objectUpdated SpecIterationDocument JSON (e.g. v2).
changePromptstringOptional 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).

ParameterTypeDescription
dialectIdstringTarget dialect profile ID (defaults to spec.targetDialectId or anthropic-claude).
projectIdstringOptional synced cloud project UUID if spec is omitted.
specobjectVerified 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.

ParameterTypeDescription
projectIdstringOptional synced cloud project UUID if spec is omitted.
specobjectSpecIterationDocument 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.

ParameterTypeDescription
report *object | stringVitest JSON object, Playwright JSON object, JUnit XML string, or native { results: [...] } payload.
dialectIdstringOptional target LLM dialect ID for formatting the Engineer Repair Prompt.
projectIdstringOptional cloud project UUID to load the spec from and persist the UAT run onto.
specobjectSpecIterationDocument 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.

ParameterTypeDescription
surface *objectJSON object produced by scan-repo.mjs (.specprism/surface.json) with frameworks, orms, testRunners, codeFileCount, and samplePaths.
projectIdstringOptional 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.

ParameterTypeDescription
gitDiff *stringUnified git diff output (e.g. from git diff or git diff --cached) to audit against the specification.
baseSpecobjectOptional baseline SpecIterationDocument JSON used to compute Regression Shields when spec.delta is absent.
projectIdstringOptional synced cloud project UUID to load the specification from if spec is omitted.
specobjectSpecIterationDocument JSON defining US-* touchpoints, REQ-* criteria, and TC-* Regression Shields.
strictScopebooleanWhen 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.

ParameterTypeDescription
markdown *stringRaw Markdown contents of a spec-kit spec.md, OpenSpec spec/change file, or Linear/Notion/GitHub PRD (max 256 KB).
persistToCloudbooleanWhen true on an authenticated sp_pat_* session, persists the upgraded spec to spec-prism.app and returns workbenchUrl.
projectTitlestringOptional explicit project title override (defaults to the Markdown H1 heading).
targetDialectIdstringOptional 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.

ParameterTypeDescription
files *arrayArray of brownfield { path, content } source, schema, and test files (1 to 60 files, <= 512 KB total).
persistToCloudbooleanWhen true on an authenticated sp_pat_* session, persists the baseline spec to spec-prism.app and returns workbenchUrl.
projectTitlestringOptional baseline project title override (defaults to primary extracted route).
targetDialectIdstringOptional 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.

ParameterTypeDescription
adversaryDialectOverridestringOptional explicit rival dialect profile ID (defaults to orthogonal family via selectRivalAdversaryDialect).
applyHardeningPatchesbooleanWhen true, returns hardenedSpec (vN+1) with proposed REQ-* and TC-* shields merged and Stage 5 Regression Shields preserved.
projectIdstringOptional synced cloud project UUID to load the specification from if spec is omitted.
specobjectSpecIterationDocument JSON to stress-test for literal-agent compliance loopholes.