Contracts

runtime-safety-followups.md

Contract: Autonomous Runtime Safety Follow-ups

Retrospect Synthesize

Command:

spec-kitty agent retrospect synthesize --mission <slug> [--apply] [--json]

Contract:

classifications.

  • Accepts every top-level field written by spec-kitty retrospect create.
  • Default mode remains dry-run/non-mutating.
  • --apply retains existing proposal application behavior.
  • Missing record, malformed YAML, and OS I/O errors retain existing error

Decision Closure

Command:

spec-kitty agent decision resolve <decision_id> --mission <slug> --final-answer "<answer>"

Contract:

is provided.

marker has been removed.

unchanged.

  • Resolving a deferred decision succeeds when an explicit final/default answer
  • Closed decisions are not reported as DEFERRED_WITHOUT_MARKER if their inline
  • decision open, decision defer, and decision cancel public contracts are

Finalize Tasks Ownership Validation

Command:

spec-kitty agent mission finalize-tasks --mission <slug> --validate-only --json
spec-kitty agent mission finalize-tasks --mission <slug> --json

Contract:

explicit mission-branch routing model is implemented.

  • A WP owned_files entry under kitty-specs/ fails validation unless an
  • JSON errors include a stable code plus offending wp_id and path.
  • Full finalization and validate-only mode enforce the same rule.

Bulk-edit Planning Pre-flight

Command:

spec-kitty agent action implement WP## --mission <slug> --agent <agent>

Contract:

occurrence_map.yaml or a mission planning artifact path, the warning is informational for that WP.

map coverage.

  • If spec text triggers bulk-edit inference and the claimed WP owns
  • Active rewrite WPs still require the existing bulk-edit state and occurrence
  • --acknowledge-not-bulk-edit remains available for true non-bulk-edit cases.

Lane Computation

Command:

spec-kitty agent mission finalize-tasks --mission <slug> --json

Contract:

required for safety.

downstream fan-in WP.

  • WPs with overlapping owned_files collapse into the same execution lane when
  • Disjoint upstream workstreams are not collapsed solely because they feed a
  • Fan-in synchronization is represented by lane dependencies.
  • lanes.json remains consumable by existing merge flow.

Focused-PR Documentation

Trigger:

TARGET_BRANCH_NOT_SYNCHRONIZED

Docs must describe:

git switch -c kitty/pr/<slug>-to-main kitty/mission-<slug>

git push -u origin kitty/pr/<slug>-to-main

has the lane merge.

  • Runtime-suggested focused branch command:
  • Push command:
  • PR into main.
  • Direct mission-branch PR as the simpler path when the mission branch already
  • Do not reset, rebase, or force-push as remediation.
  • Prefer squash-merge for autonomous orchestration commit piles.