{
  "schemaVersion": 1,
  "testExecution": {
    "runner": "harness/scripts/harness_test_runner.py",
    "defaultProfile": "safe",
    "maxWorkers": 2,
    "singleInstance": true,
    "processTreeCleanup": true,
    "detachedProcessPreflight": true,
    "confirmationFlag": "--confirm-resource-intensive",
    "confirmationRequiredProfiles": [
      "system",
      "full"
    ],
    "resourceIntensiveModules": [
      "test_harness_integration.py",
      "test_harness_service.py"
    ],
    "profiles": {
      "safe": {
        "description": "Default low-load profile; runs regular test modules sequentially in isolated processes.",
        "includesResourceIntensive": false,
        "moduleTimeoutSeconds": 300
      },
      "system": {
        "description": "Runs integration and service-lifecycle modules only after explicit confirmation.",
        "includesResourceIntensive": true,
        "moduleTimeoutSeconds": 600
      },
      "full": {
        "description": "Runs regular modules followed by resource-intensive modules after explicit confirmation.",
        "includesResourceIntensive": true,
        "moduleTimeoutSeconds": 600
      }
    }
  },
  "riskTiers": {
    "fast": {
      "description": "Low-risk docs/comments/non-behavioral config; no API/DB/security/concurrency. Policy notes: checkpointRules apply only when meta/implementation-checkpoints.json defines the entry for this change; missing file/entry = disabled (gate must not require --task).",
      "defaultPhases": [
        "plan",
        "execute",
        "archive"
      ],
      "requiredValidations": [
        "unitTest"
      ],
      "conditionalStages": [
        "review"
      ],
      "upgradeTriggers": [
        "api-change",
        "security",
        "migration",
        "concurrency",
        "breaking-contract"
      ]
    },
    "standard": {
      "description": "Ordinary production code and non-breaking API/features. Policy notes: requiredValidations may close DEGRADED when ledger status=NOT_RUN and evidence starts with 'DEGRADED: <reason>' (close code CLOSED_DEGRADED, phase status <= WARN); do not fake OK with unrelated tests.",
      "defaultPhases": [
        "plan",
        "execute",
        "submit",
        "archive"
      ],
      "requiredValidations": [
        "compile",
        "unitTest",
        "unitTestFull"
      ],
      "conditionalStages": [
        "review"
      ],
      "upgradeTriggers": [
        "auth",
        "security",
        "delete",
        "migration",
        "concurrency",
        "artifact-protocol",
        "shared-state",
        "contract-schema",
        "breaking-api"
      ]
    },
    "full": {
      "description": "Auth/security/delete/migration/concurrency/service protocol/shared state/breaking contracts. Policy notes: (1) DEGRADED close — ledger status=NOT_RUN and evidence 'DEGRADED: <reason>' → CLOSED_DEGRADED with phase <= WARN; never fake OK with unrelated tests. (2) checkpointRules — only when plan created meta/implementation-checkpoints.json entry; missing file/entry = not enabled, gate must not require --task.",
      "defaultPhases": [
        "plan",
        "execute",
        "review",
        "submit",
        "archive"
      ],
      "requiredValidations": [
        "compile",
        "unitTest",
        "unitTestFull",
        "apiTest"
      ],
      "conditionalStages": [],
      "upgradeTriggers": []
    }
  },
  "skills": {
    "harness-plan": {
      "phase": "plan",
      "inputs": [
        "requirements",
        "change-context"
      ],
      "artifacts": [
        "plans",
        "spec",
        "test-scenarios",
        "implementation-detail"
      ],
      "events": [
        "phase.start",
        "phase.end",
        "decision"
      ],
      "allowedInteractions": [],
      "capabilities": [
        "risk-classify-plan"
      ]
    },
    "harness-review": {
      "phase": "review",
      "inputs": [
        "diff",
        "verification-ledger",
        "test-reports"
      ],
      "artifacts": [
        "review-report"
      ],
      "events": [
        "phase.start",
        "phase.end",
        "issue",
        "artifact"
      ],
      "allowedInteractions": [],
      "capabilities": [
        "gate-begin",
        "gate-close"
      ]
    },
    "harness-submit": {
      "phase": "submit",
      "inputs": [
        "verification-ledger",
        "test-tracking"
      ],
      "artifacts": [
        "git-integration"
      ],
      "events": [
        "phase.start",
        "phase.end",
        "command",
        "artifact"
      ],
      "allowedInteractions": [
        "merge-conflict-resolution"
      ],
      "capabilities": [
        "gate-begin",
        "gate-close",
        "integration-lock",
        "test-guard-stage"
      ]
    },
    "harness-archive": {
      "phase": "archive",
      "inputs": [
        "events",
        "verification-ledger",
        "reports"
      ],
      "artifacts": [
        "summary-data",
        "archive-manifest"
      ],
      "events": [
        "phase.start",
        "phase.end",
        "artifact"
      ],
      "allowedInteractions": [],
      "capabilities": []
    },
    "harness-sync": {
      "phase": "sync",
      "inputs": [
        "canonical-harness"
      ],
      "artifacts": [
        "bundle-projection"
      ],
      "events": [
        "phase.start",
        "phase.end",
        "command"
      ],
      "allowedInteractions": [],
      "capabilities": []
    },
    "harness-codebase-map": {
      "phase": "codebase-map",
      "inputs": [
        "project-root"
      ],
      "artifacts": [
        "codebase-map"
      ],
      "events": [
        "phase.start",
        "phase.end"
      ],
      "allowedInteractions": [],
      "capabilities": []
    },
    "harness-knowledge-query": {
      "phase": "knowledge-query",
      "inputs": [
        "knowledge-index"
      ],
      "artifacts": [],
      "events": [
        "phase.start",
        "phase.end"
      ],
      "allowedInteractions": [],
      "capabilities": [
        "read-only"
      ]
    },
    "harness-knowledge-ingest": {
      "phase": "knowledge-ingest",
      "inputs": [
        "archive-evidence"
      ],
      "artifacts": [
        "knowledge-index"
      ],
      "events": [
        "phase.start",
        "phase.end",
        "command"
      ],
      "allowedInteractions": [],
      "capabilities": []
    },
    "harness-push": {
      "phase": "sync",
      "inputs": [
        "remote-baseline",
        "local-content"
      ],
      "artifacts": [
        "push-receipt"
      ],
      "events": [],
      "allowedInteractions": [
        "upload-confirmation"
      ],
      "capabilities": [
        "remote-sync-push@1"
      ]
    },
    "harness-pull": {
      "phase": "sync",
      "inputs": [
        "remote-snapshot"
      ],
      "artifacts": [
        "pull-receipt"
      ],
      "events": [],
      "allowedInteractions": [
        "conflict-decision"
      ],
      "capabilities": [
        "remote-sync-pull@1"
      ]
    },
    "harness-execute": {
      "phase": "execute",
      "inputs": [
        "implementation-detail",
        "state-snapshot",
        "test-scenarios",
        "verification-ledger"
      ],
      "artifacts": [
        "code",
        "test-reports",
        "verification-ledger"
      ],
      "events": [
        "command",
        "phase.end",
        "phase.start",
        "verification"
      ],
      "allowedInteractions": [
        "resource-intensive-test-confirmation"
      ],
      "capabilities": [
        "gate-begin",
        "gate-close",
        "ledger-record",
        "resource-safe-test-runner",
        "test-guard"
      ]
    }
  },
  "requiredArtifacts": {
    "plan": [
      "plans",
      "spec"
    ],
    "run": [],
    "test": [
      "tests/test-report-*.md"
    ],
    "review": [
      "reports/review/review-report-*.md"
    ],
    "submit": [],
    "archive": [
      "reports/final/summary-data.json"
    ]
  },
  "requiredValidations": {
    "execute": [
      "compile",
      "unitTest",
      "unitTestFull"
    ],
    "submit": []
  },
  "validationPhases": {
    "compile": "execute",
    "unitTest": "execute",
    "unitTestFull": "execute",
    "apiTest": "execute",
    "browserTest": "execute",
    "dbCompatibility": "execute"
  },
  "capabilityGates": {
    "database": {
      "signals": [
        "migration"
      ],
      "requiredStages": [],
      "requiredValidations": [
        "dbCompatibility"
      ]
    }
  },
  "conditionalStages": {
    "review": {
      "tiers": [
        "standard",
        "full"
      ],
      "signals": [
        "security",
        "auth",
        "breaking-api",
        "shared-state"
      ]
    }
  },
  "interactionWhitelist": {
    "global": [],
    "harness-test": [
      "resource-intensive-test-confirmation"
    ],
    "harness-submit": [
      "merge-conflict-resolution"
    ],
    "harness-plan": [
      "risk-confirmation"
    ],
    "harness-execute": [
      "resource-intensive-test-confirmation"
    ]
  },
  "checkpointRules": {
    "foundation-gate": {
      "afterTasks": [
        1,
        2,
        3,
        4
      ],
      "beforeTasks": [
        6,
        7,
        8,
        9,
        10
      ],
      "blocking": true,
      "requiredReport": "reports/review/foundation-gate-review.md",
      "reviewerTool": "codex"
    }
  }
}
