Skip to content
ContractSpec
Start here
AI index

Build

Contract Intelligence turns codebase discovery into reviewable contract adoption plans.

Use the first slice for repo-default analyze, export, import, reconcile, and adopt dry-runs. It is intentionally script-safe and does not apply code changes.

CLI workflow

bash
contractspec intelligence analyze --json
contractspec intelligence export --output .contractspec/intelligence/bundle.json --json
contractspec intelligence import .contractspec/intelligence/bundle.json --json
contractspec intelligence reconcile .contractspec/intelligence/bundle.json --json
contractspec intelligence adopt .contractspec/intelligence/bundle.json --dry-run --json
contractspec portfolio index --bundles .contractspec/intelligence/bundle.json --json

Workflow contract

  • Analyze a repository into candidate contracts, implementation anchors, and integrity diagnostics.

  • Export machine-readable JSON or Mermaid without mixing diagnostics into stdout.

  • Import external findings in dry-run mode with path-line-hash redaction as the default safety posture.

  • Reconcile candidates into adoption plans without applying writes automatically.

  • Adopt only after a future Connect-reviewed apply path has review and replay evidence.

Safety boundaries

  • Import and adoption are dry-run only in this first slice.

  • Raw source bodies must not leak into adoption plans; use stable path, line, and hash references.

  • Discovery should ignore prompt/template false positives and unresolved template keys.

  • Portfolio centralization commands are documentation surfaces only when their CLI options exist and pass JSON checks.