{
  "version": "2026-09-28",
  "product": "warestack",
  "docs_base": "https://documentation.warestack.com",
  "purpose": "Single catalog for docs crawlers, org Claude/Codex, and the Warestack MCP. Propose a pack unless the MCP is connected. Do not invent IDs.",
  "availability_statuses": {
    "available": "Shipped product surface or authorable template.",
    "available_when_installed": "Shipped capability that requires its workspace integration or agent installation.",
    "week_one": "Recommended for a bounded first enablement.",
    "later": "Shipped and available, but left off the recommended first enablement.",
    "candidate_only": "Name eligible people; the individual must enable it.",
    "not_generally_available": "Not a generally available self-serve control. Do not claim it is enabled.",
    "unknown": "Evidence or readiness cannot be established without guessing."
  },
  "honesty": [
    "A ticket key in a branch, title, body, or Refs: is only a candidate reference. Warestack can resolve known identifiers against the connected Linear workspace; report a link only after the persisted association is returned.",
    "A Linear parent does not cover child issues or sibling PRs. Associate each PR with the issue that describes its diff.",
    "Bot reviews and the pull-request author do not count toward human approvals.",
    "GitHub login is not a Slack handle. An owner for Review SLA is a person who can receive a Slack DM.",
    "Merge-blocking stays off until the team asks to require the Warestack Rules check in branch protection.",
    "Run now revalidates and executes saved report SQL. A stale reviewed definition must be regenerated. Slack announce is the scheduled_report chain calendar.",
    "Production changelog fires on GitHub deployment_succeeded in production or prod, not on merge or waiting.",
    "Personal digest is opt-in per person. An admin cannot enable it for someone else.",
    "Linear agent is mention-only and must not invent owner/repo#n when no PR is linked.",
    "The console calls the live queue Overview > Needs attention. Digest copy may say Today and opens Overview.",
    "Pull-request stacks stay inside one repository. Cross-repository guards are not generally available.",
    "A chain marked later can still be shipped and authorable. Later is rollout guidance, not product unavailability.",
    "A reason-required blocking-finding acknowledgement is audited and bound to one pull-request revision and finding. Dedicated SOC 2 period export and a complete exception register with owner and expiry remain maturity items.",
    "Write unknown instead of guessing an owner, channel, ticket, or environment.",
    "Do not invent a seventh funnel, a new card shape, or a second scheduler.",
    "Do not assume the catalog is only the original thirteen console chips. Cite every catalog rule by name and rule_key; enable_rules takes the integer id from list_rules. Console Quality is API home scope.",
    "Do not assume the catalog is only pull requests. Catalog rules also run on GitHub issues, workflow runs, deployment reviews, and deployments.",
    "Space-local custom rows, including canaries, are not catalog IDs. Cite the four documented custom.* slugs or a rule list_rules returns."
  ],
  "week_one": {
    "cite_as": "name and rule_key",
    "id_warning": "Cite the catalog name and rule_key. Console chips Rule 1-13 are aliases, not a second catalog. Linear-in-store is custom.linear_issue_required, not Require concise pull requests (pull_request.size_limit). enable_rules takes the integer id from list_rules, not the rule_key.",
    "rules": [
      "custom.linear_issue_required",
      "pull_request.linked_ticket_assignee",
      "pull_request.linked_ticket_state",
      "pull_request.scope_alignment",
      "custom.conventions",
      "custom.feature_test_evidence",
      "pull_request.branch_approval_policy",
      "custom.evidence_in_approval_body"
    ],
    "chains": [
      "pull_request_slack_live_card",
      "pull_request_review_sla",
      "scheduled_report",
      "production_rollout_changelog"
    ],
    "personal_digest": "candidate_only",
    "merge_blocking": false,
    "scope": "prefer_1_or_2_production_repos"
  },
  "surfaces": [
    {
      "route": "/overview",
      "name": "Overview and Needs attention",
      "status": "available",
      "jobs": ["for_me_attention", "for_space_attention", "personal_digest_customize"]
    },
    {
      "route": "/events",
      "name": "Events and timelines",
      "status": "available",
      "jobs": ["activity_feed", "attention_filter", "event_detail", "timeline", "rule_findings"]
    },
    {
      "route": "/events/stacks",
      "name": "Pull-request stacks",
      "status": "available",
      "boundary": "same_repository_only",
      "identity_sources": ["github_native", "warestack_detected"]
    },
    {
      "route": "/rules",
      "name": "Rules",
      "status": "available"
    },
    {
      "route": "/chains",
      "name": "Chains",
      "status": "available",
      "jobs": ["author", "enable", "pause", "dry_run", "activity"]
    },
    {
      "route": "/slack",
      "name": "Slack",
      "status": "available",
      "jobs": ["live_card", "request_update", "review_sla", "commands", "digests", "changelog"]
    },
    {
      "route": "/linear",
      "name": "Linear association and workspace agent",
      "status": "available_when_installed",
      "default_agent_mode": "read_only_governance"
    },
    {
      "route": "/reports",
      "name": "Reports",
      "status": "available",
      "jobs": ["natural_language_to_reviewable_sql", "preview", "run_history", "csv"]
    },
    {
      "route": "/metrics",
      "name": "Metrics",
      "status": "available"
    },
    {
      "route": "/people",
      "name": "People",
      "status": "available",
      "jobs": ["members", "identities", "requests"]
    },
    {
      "route": "/repositories",
      "name": "Repositories",
      "status": "available",
      "jobs": ["monitoring_scope", "individual_owner", "branch_protection_visibility"]
    },
    {
      "route": "/model-context-protocol",
      "name": "Warestack MCP",
      "status": "available",
      "url": "https://mcp.warestack.com/mcp",
      "api": "https://api.warestack.com",
      "auth": "GitHub OAuth, same account as the console"
    }
  ],
  "propose": {
    "inspect": [
      "Open and merged PRs in the last 14 days on production-path repos",
      "Linear attachments vs ticket-string-only vs none",
      "Who requested review, who approved, whether the body cites a named check/command/result",
      "CODEOWNERS and GitHub teams vs who actually reviewed",
      "Slack channels that already get deploy or review noise",
      "GitHub deployments: environment names, success vs failure, associated PRs",
      "Default-branch workflow failures and waiting deployment reviews",
      "Same-repository pull-request stacks and their blocked layers",
      "Repo pairs that moved together",
      "People with a plausible Slack identity for DMs or a digest",
      "Closed GitHub implementation issues without a merged PR, or assigned issues without acceptance criteria",
      "Release workflow jobs and workflow duration against the configured budget",
      "Production deployments: PR traceability, independent approval, verification evidence, and failure diagnostics",
      "Open actionable review-bot findings and sensitive-path changes without owner approval"
    ],
    "output": [
      "status_per_proposal",
      "in_scope_repos_or_team",
      "individual_owner_per_repo",
      "reviewer_pool",
      "rules_on_with_pr_examples",
      "chains_on",
      "report_definitions",
      "live_card_channel",
      "digest_and_changelog_channels",
      "personal_digest_candidates",
      "production_environment_name",
      "linear_active_states",
      "cross_repo_pairs",
      "open_questions"
    ],
    "status_values": ["week_one", "on", "off", "later", "candidate_only", "not_generally_available", "unknown"],
    "needs_to_objects": [
      {
        "observe": "PRs with no persisted Linear association, including unresolved keys in the title/branch/Refs",
        "propose": ["custom.linear_issue_required", 7, 8, 12]
      },
      {
        "observe": "feat/ or refactor/ merged or open with fewer than two human APPROVEs",
        "propose": [13, "custom.evidence_in_approval_body"]
      },
      {
        "observe": "APPROVE bodies that are LGTM, looks good, or tested with no named result",
        "propose": ["custom.evidence_in_approval_body"]
      },
      {
        "observe": "feat/ source changes with no test file and no concrete Testing section",
        "propose": ["custom.feature_test_evidence"]
      },
      {
        "observe": "Requested reviews sitting in GitHub with no human review",
        "propose": ["pull_request_review_sla", "identities.individual_owner"]
      },
      {
        "observe": "Successful GitHub deployments in production or prod",
        "propose": ["production_rollout_changelog"]
      },
      {
        "observe": "Need a weekly sample for Vanta or engineering ops",
        "propose": ["scheduled_report", "rule_violations"]
      },
      {
        "observe": "One GitHub team owns many production repos",
        "propose": ["scope.team_for_rules_and_live_card", "identities.individual_owner_still_required"]
      },
      {
        "observe": "Two repos must stay isolated (separate owners, channels, or blast radius)",
        "propose": ["scope.repository"]
      },
      {
        "observe": "API and frontend or schema and migrations moved in the same window",
        "propose": ["cross_repo.named_pair_draft"]
      },
      {
        "observe": "Reviewers or owners already live in Slack and miss GitHub noise",
        "propose": ["personal_digest.candidates_only"]
      },
      {
        "observe": "Large PRs without tests, stale PRs, failed main CI, bot-only approval",
        "propose": ["later_chain_kinds"]
      },
      {
        "observe": "Several dependent pull requests form one same-repository branch chain",
        "propose": ["/events/stacks"]
      },
      {
        "observe": "Operators need to prove whether a chain delivered, skipped, or failed",
        "propose": ["/chains/activity"]
      },
      {
        "observe": "A GitHub-writing chain needs evidence before enablement",
        "propose": ["/chains/dry-run"]
      },
      {
        "observe": "Actionable review-bot findings still open on the PR",
        "propose": ["pull_request.review_findings_resolved"]
      },
      {
        "observe": "Sensitive path changes without an independent code-owner approval",
        "propose": ["pull_request.sensitive_change_approval"]
      },
      {
        "observe": "Urgent Linear fixes without observable failure evidence on the issue",
        "propose": ["pull_request.urgent_fix_failure_evidence"]
      },
      {
        "observe": "Production deployments not traced to a pull request",
        "propose": ["deployment.production_change_traceability"]
      },
      {
        "observe": "Successful production deployments without health or smoke evidence",
        "propose": ["deployment.production_verification"]
      },
      {
        "observe": "Production deployment reviews approved only by the requestor",
        "propose": ["deployment_review.independent_approval"]
      },
      {
        "observe": "Closed GitHub implementation issues with no linked merged pull request",
        "propose": ["issue.implementation_evidence"]
      },
      {
        "observe": "Assigned GitHub issues without verifiable acceptance criteria",
        "propose": ["issue.acceptance_criteria"]
      },
      {
        "observe": "Release workflows with a required job that did not succeed",
        "propose": ["workflow_run.release_jobs_successful"]
      },
      {
        "observe": "Workflow runs over the configured duration budget",
        "propose": ["workflow_run.duration_budget"]
      },
      {
        "observe": "Failed production deployments without a diagnostic description or log URL",
        "propose": ["deployment.production_failure_diagnostics"]
      }
    ]
  },
  "rules": {
    "catalog": [
      {
        "id": 1,
        "rule_key": "pull_request.size_limit",
        "label": "Rule 1",
        "href": "/rules/catalog#rule-1",
        "name": "Require concise pull requests",
        "description": "Flag pull requests that exceed the configured maximum lines of code, excluding changes to lock files.",
        "event_type": "pull_request",
        "home": "scope",
        "console_home": "Quality",
        "rollout": "later",
        "propose_when": "PRs are routinely huge and reviews stall.",
        "do_not": "Treat lockfile-only diffs as the same size cap without excluding them."
      },
      {
        "id": 2,
        "rule_key": "pull_request.commit_size_limit",
        "label": "Rule 2",
        "href": "/rules/catalog#rule-2",
        "name": "Require atomic commits",
        "description": "Flag commits that exceed the configured lines of code per commit, regardless of the pull request size.",
        "event_type": "pull_request",
        "home": "scope",
        "console_home": "Quality",
        "rollout": "later",
        "propose_when": "Commits mix unrelated work and the audit trail is unreadable.",
        "typical_parameter": "lines_per_commit"
      },
      {
        "id": 3,
        "rule_key": "pull_request.branch_reviewer_routing",
        "label": "Rule 3",
        "href": "/rules/catalog#rule-3",
        "name": "Route review requests based on branch prefixes",
        "description": "Route review requests to specific team members based on configurable pull request branch prefixes.",
        "event_type": "pull_request",
        "home": "review",
        "console_home": "Review",
        "rollout": "later",
        "propose_when": "feat/ should always request a named reviewer pool."
      },
      {
        "id": 4,
        "rule_key": "pull_request.path_reviewer_routing",
        "label": "Rule 4",
        "href": "/rules/catalog#rule-4",
        "name": "Route review requests based on file paths",
        "description": "Route review requests to specific team members based on configurable file paths.",
        "event_type": "pull_request",
        "home": "review",
        "console_home": "Review",
        "rollout": "later",
        "propose_when": "Path ownership exists (CODEOWNERS or a stable directory map)."
      },
      {
        "id": 5,
        "rule_key": "pull_request.reviewer_capacity",
        "label": "Rule 5",
        "href": "/rules/catalog#rule-5",
        "name": "Detect review fatigue",
        "description": "Flag reviewers who receive more review requests than the configured threshold.",
        "event_type": "pull_request",
        "home": "review",
        "console_home": "Review",
        "rollout": "later",
        "propose_when": "A few people hold most open review requests."
      },
      {
        "id": 6,
        "rule_key": "pull_request.linked_ticket",
        "label": "Rule 6",
        "href": "/rules/catalog#rule-6",
        "name": "Require a linked ticket",
        "description": "Flag pull requests that are not linked to a Linear or GitHub issue.",
        "event_type": "pull_request",
        "home": "tickets",
        "console_home": "Tickets",
        "rollout": "later",
        "note": "Accepts Linear or GitHub issue in Warestack's store. The recommended Linear-first set uses custom.linear_issue_required instead."
      },
      {
        "id": 7,
        "rule_key": "pull_request.linked_ticket_assignee",
        "label": "Rule 7",
        "href": "/rules/catalog#rule-7",
        "name": "Require linked ticket to be assigned",
        "description": "Flag pull requests with a linked Linear or GitHub issue without an assignee.",
        "event_type": "pull_request",
        "home": "tickets",
        "console_home": "Tickets",
        "rollout": "week_one",
        "propose_when": "Tickets exist but nobody owns the work."
      },
      {
        "id": 8,
        "rule_key": "pull_request.linked_ticket_state",
        "label": "Rule 8",
        "href": "/rules/catalog#rule-8",
        "name": "Require active linked ticket",
        "description": "Flag pull requests with a linked Linear or GitHub issue that is inactive or not in progress.",
        "event_type": "pull_request",
        "home": "tickets",
        "console_home": "Tickets",
        "rollout": "week_one",
        "propose_when": "PRs link Done/Backlog issues. Confirm which workflow states count as active."
      },
      {
        "id": 9,
        "rule_key": "pull_request.review_acknowledgment_sla",
        "label": "Rule 9",
        "href": "/rules/catalog#rule-9",
        "name": "Require timely acknowledgment of review requests",
        "description": "Flag pull requests that do not receive reviews or acknowledgments within the configured time limit.",
        "event_type": "pull_request",
        "home": "timing",
        "console_home": "Timing",
        "rollout": "later",
        "note": "This is a finding. Review SLA DMs are chain pull_request_review_sla."
      },
      {
        "id": 10,
        "rule_key": "pull_request.draft_staleness",
        "label": "Rule 10",
        "href": "/rules/catalog#rule-10",
        "name": "Require timely updates for draft pull requests",
        "description": "Flag draft pull requests as stale when they have no updates within the configured time limit.",
        "event_type": "pull_request",
        "home": "timing",
        "console_home": "Timing",
        "rollout": "later",
        "propose_when": "Drafts sit idle for days."
      },
      {
        "id": 11,
        "rule_key": "pull_request.urgent_ticket_review_sla",
        "label": "Rule 11",
        "href": "/rules/catalog#rule-11",
        "name": "Require timely acknowledgment of high-priority linked tickets",
        "description": "Flag pull requests that do not receive reviews or acknowledgments within the configured time limit when the linked Linear task is marked as Urgent or the linked GitHub issue is tagged as Critical/Urgent.",
        "event_type": "pull_request",
        "home": "tickets",
        "console_home": "Tickets",
        "rollout": "later",
        "propose_when": "Urgent Linear or Critical GitHub issues are ignored."
      },
      {
        "id": 12,
        "rule_key": "pull_request.scope_alignment",
        "label": "Rule 12",
        "href": "/rules/catalog#rule-12",
        "name": "Detect pull request scope drift",
        "description": "Flag pull requests that introduce changes unrelated to the linked Linear or GitHub issue.",
        "event_type": "pull_request",
        "home": "scope",
        "console_home": "Quality",
        "rollout": "week_one",
        "propose_when": "Diffs do not match the linked issue."
      },
      {
        "id": 13,
        "rule_key": "pull_request.branch_approval_policy",
        "label": "Rule 13",
        "href": "/rules/catalog#rule-13",
        "name": "Require approvals by branch prefix",
        "description": "Marks pull requests that reach merge with fewer human approvals than their branch prefix requires. Bot approvals never count.",
        "event_type": "pull_request",
        "home": "review",
        "console_home": "Review",
        "rollout": "week_one",
        "propose_when": "feat/ and refactor/ need two humans. Bots and author do not count.",
        "default_params": {
          "feat/": 2,
          "refactor/": 2,
          "fix/": 1,
          "test/": 1,
          "chore/": 1,
          "docs/": 1,
          "ci/": 1
        }
      },
      {
        "id": "pull_request.urgent_fix_failure_evidence",
        "rule_key": "pull_request.urgent_fix_failure_evidence",
        "label": "Require failure evidence for urgent fixes",
        "href": "/rules/catalog#pull-request-urgent-fix-failure-evidence",
        "name": "Require failure evidence for urgent fixes",
        "description": "Flag corrective pull requests linked to an urgent Linear issue when the issue does not document observable evidence of the broken behavior.",
        "event_type": "pull_request",
        "home": "tickets",
        "console_home": "Tickets",
        "rollout": "later",
        "propose_when": "Urgent Linear fixes whose issue does not record an observable symptom."
      },
      {
        "id": "issue.implementation_evidence",
        "rule_key": "issue.implementation_evidence",
        "label": "Close implementation issues after delivery",
        "href": "/rules/catalog#issue-implementation-evidence",
        "name": "Close implementation issues after delivery",
        "description": "Flag closed GitHub implementation issues that have no linked merged pull request.",
        "event_type": "issue",
        "home": "tickets",
        "console_home": "Tickets",
        "rollout": "later",
        "propose_when": "Closed GitHub implementation issues with no linked merged pull request."
      },
      {
        "id": "issue.acceptance_criteria",
        "rule_key": "issue.acceptance_criteria",
        "label": "Require acceptance criteria before assignment",
        "href": "/rules/catalog#issue-acceptance-criteria",
        "name": "Require acceptance criteria before assignment",
        "description": "Flag assigned GitHub issues whose description does not define verifiable acceptance criteria.",
        "event_type": "issue",
        "home": "tickets",
        "console_home": "Tickets",
        "rollout": "later",
        "propose_when": "Assigned GitHub issues whose body has no verifiable acceptance criteria."
      },
      {
        "id": "deployment.production_change_traceability",
        "rule_key": "deployment.production_change_traceability",
        "label": "Require production deployment traceability",
        "href": "/rules/catalog#deployment-production-change-traceability",
        "name": "Require production deployment traceability",
        "description": "Flag production deployments that cannot be traced to an observed pull request.",
        "event_type": "deployment",
        "home": "tickets",
        "console_home": "Tickets",
        "rollout": "later",
        "propose_when": "Production deployments that cannot be traced to an observed pull request."
      },
      {
        "id": "pull_request.review_findings_resolved",
        "rule_key": "pull_request.review_findings_resolved",
        "label": "Resolve automated review findings",
        "href": "/rules/catalog#pull-request-review-findings-resolved",
        "name": "Resolve automated review findings",
        "description": "Flag pull requests with current actionable review-bot findings that have not been resolved or addressed.",
        "event_type": "pull_request",
        "home": "review",
        "console_home": "Review",
        "rollout": "later",
        "propose_when": "Actionable review-bot findings still open on the pull request."
      },
      {
        "id": "pull_request.sensitive_change_approval",
        "rule_key": "pull_request.sensitive_change_approval",
        "label": "Require owner approval for sensitive changes",
        "href": "/rules/catalog#pull-request-sensitive-change-approval",
        "name": "Require owner approval for sensitive changes",
        "description": "Flag sensitive-path changes without an independent approval from an observed code owner.",
        "event_type": "pull_request",
        "home": "review",
        "console_home": "Review",
        "rollout": "later",
        "propose_when": "Sensitive-path changes without an independent code-owner approval."
      },
      {
        "id": "deployment_review.independent_approval",
        "rule_key": "deployment_review.independent_approval",
        "label": "Require independent production approval",
        "href": "/rules/catalog#deployment-review-independent-approval",
        "name": "Require independent production approval",
        "description": "Flag production deployment reviews without an observed approval from someone other than the requestor.",
        "event_type": "deployment_review",
        "home": "review",
        "console_home": "Review",
        "rollout": "later",
        "propose_when": "Production deployment reviews approved only by the requestor."
      },
      {
        "id": "deployment.production_verification",
        "rule_key": "deployment.production_verification",
        "label": "Require production verification evidence",
        "href": "/rules/catalog#deployment-production-verification",
        "name": "Require production verification evidence",
        "description": "Flag successful production deployments without observed health, smoke, or verification evidence.",
        "event_type": "deployment",
        "home": "review",
        "console_home": "Review",
        "rollout": "later",
        "propose_when": "Successful production deployments without health, smoke, or verification evidence."
      },
      {
        "id": "workflow_run.release_jobs_successful",
        "rule_key": "workflow_run.release_jobs_successful",
        "label": "Require successful release jobs",
        "href": "/rules/catalog#workflow-run-release-jobs-successful",
        "name": "Require successful release jobs",
        "description": "Flag release workflows when an observed required job does not complete successfully.",
        "event_type": "workflow_run",
        "home": "scope",
        "console_home": "Quality",
        "rollout": "later",
        "propose_when": "Release workflows where a required job did not complete successfully."
      },
      {
        "id": "deployment.production_failure_diagnostics",
        "rule_key": "deployment.production_failure_diagnostics",
        "label": "Require diagnostics for failed production deployments",
        "href": "/rules/catalog#deployment-production-failure-diagnostics",
        "name": "Require diagnostics for failed production deployments",
        "description": "Flag failed production deployments whose status history does not expose actionable diagnostic evidence.",
        "event_type": "deployment",
        "home": "scope",
        "console_home": "Quality",
        "rollout": "later",
        "propose_when": "Failed production deployments without a diagnostic description or log URL."
      },
      {
        "id": "workflow_run.duration_budget",
        "rule_key": "workflow_run.duration_budget",
        "label": "Keep workflow runs within budget",
        "href": "/rules/catalog#workflow-run-duration-budget",
        "name": "Keep workflow runs within budget",
        "description": "Flag workflow runs whose observed elapsed time exceeds the configured duration budget.",
        "event_type": "workflow_run",
        "home": "timing",
        "console_home": "Timing",
        "rollout": "later",
        "propose_when": "Workflow runs whose elapsed time exceeds the configured duration budget.",
        "typical_parameter": "max_duration_minutes"
      }
    ],
    "custom": [
      {
        "id": "custom.linear_issue_required",
        "href": "/rules/catalog#custom-linear-issue-required",
        "name": "Require a Linear issue in Warestack's store",
        "tightens": "pull_request.linked_ticket"
      },
      {
        "id": "custom.conventions",
        "href": "/rules/catalog#custom-conventions",
        "name": "Branch, PR, and commit conventions",
        "requires": [
          "<type>/<linear-issue>-<imperative-description>",
          "Conventional Commit title",
          "body summary and bullets",
          "Testing section",
          "Refs:",
          "matching commit trail"
        ]
      },
      {
        "id": "custom.feature_test_evidence",
        "href": "/rules/catalog#custom-feature-test-evidence",
        "name": "Feature test evidence",
        "requires": "Relevant tests, or a Testing section naming the behavior and a concrete reason.",
        "rejects": ["generic N/A", "not tested"],
        "does_not_claim": "coverage percentage"
      },
      {
        "id": "custom.evidence_in_approval_body",
        "href": "/rules/catalog#custom-evidence-in-approval-body",
        "name": "Evidence in the approval body"
      }
    ],
    "citation": "Cite every catalog rule by name and rule_key with href from this file. Console chips Rule 1-13 are aliases; keep href /rules/catalog#rule-{id} for those rows. Newer managed rules use href /rules/catalog#{rule_key with dots as hyphens}. Integer ids for enable_rules come from list_rules, never from the rule_key. Console jobs are Tickets, Review, Quality, Timing; MCP home for Quality is scope. Cite custom rules by slug. Do not cite space-local custom or canary rows as catalog IDs. Linear-in-store is custom.linear_issue_required, not Require concise pull requests.",
    "reeval": "Pull-request rules re-run on pull_request opened, synchronized, and edited, and when a review is submitted, a review comment is added, or a review thread is resolved. Those review events rebuild the PR evidence snapshot and re-run the check. The Slack live card also updates immediately. Issue, workflow, and deployment rules run on their own event types.",
    "evaluation_contract": {
      "source": "persisted_checks_only",
      "per_check_outcomes": ["passed", "failed", "not_applicable", "not_evaluated"],
      "validation": "Server validates complete selector, alternative, and applicability coverage for every pinned check and derives the overall rule result.",
      "unpinned": "not_evaluated",
      "merge_blocking_incomplete": "fail_closed"
    },
    "acknowledgement": {
      "eligibility": "blocking_finding",
      "actor": "space_admin",
      "reason_required": true,
      "audited": true,
      "scope": "exact_evaluated_pull_request_head_and_finding",
      "invalidated_by": ["new_head_revision", "materially_changed_finding"],
      "effect": "refresh_github_check"
    },
    "homes": {
      "tickets": {
        "console": "Tickets",
        "api": "tickets"
      },
      "review": {
        "console": "Review",
        "api": "review"
      },
      "scope": {
        "console": "Quality",
        "api": "scope"
      },
      "timing": {
        "console": "Timing",
        "api": "timing"
      }
    },
    "event_types": ["pull_request", "issue", "workflow_run", "deployment_review", "deployment"]
  },
  "chain_kinds": [
    {
      "id": "pull_request_slack_live_card",
      "when": "subscribed_triggers on pull_request events",
      "then": "notify live_card on Slack; optional 12h no-review reminder",
      "availability": "available",
      "rollout": "week_one",
      "week_one": true,
      "docs": "/slack"
    },
    {
      "id": "pull_request_review_sla",
      "when": "review_requested",
      "then": "DM reviewer at 4h, then individual repository_owner at 24h by default",
      "availability": "available",
      "rollout": "week_one_if_ready",
      "week_one": true,
      "docs": "/slack/review-sla",
      "requires": "confirmed Slack identities"
    },
    {
      "id": "production_rollout_changelog",
      "when": "deployment_succeeded",
      "condition": "environment is production (matches GitHub prod)",
      "then": "wait pull_requests_associated <=300s, then Slack announce rollout_changelog with PRs or unassociated commit and monitoring link",
      "availability": "available",
      "rollout": "week_one",
      "week_one": true,
      "docs": "/slack/changelog",
      "scope": "deploy-producing repository"
    },
    {
      "id": "scheduled_report",
      "when": "schedule",
      "then": "run_report then Slack announce",
      "availability": "available",
      "rollout": "week_one",
      "week_one": true,
      "docs": "/slack/digests",
      "note": "Run now is not the announce step"
    },
    {
      "id": "personal_digest",
      "when": "schedule weekday local time",
      "then": "private Overview Needs attention For me snapshot",
      "availability": "candidate_only",
      "rollout": "candidate_only",
      "week_one": "candidate_only",
      "available_in_create": false,
      "docs": "/slack/digests",
      "owner_only": true,
      "history_limit_in_console": 7,
      "delivery_attempts_max": 2,
      "retry_minutes": 10,
      "empty_behavior": "skip without message"
    },
    {
      "id": "urgent_pr_needs_reviewer",
      "availability": "available",
      "rollout": "later",
      "week_one": false,
      "note": "Default template includes block_merge. Do not enable as a gate in the first enablement."
    },
    {
      "id": "reviewer_at_capacity",
      "availability": "available",
      "rollout": "later",
      "week_one": false
    },
    {
      "id": "breaking_schema_change",
      "availability": "available",
      "rollout": "later",
      "week_one": false,
      "note": "Default includes block_merge and evaluates one repository. Cross-repository counterpart enforcement is not_generally_available."
    },
    {
      "id": "cicd_change_without_owner_review",
      "availability": "available",
      "rollout": "later",
      "week_one": false,
      "note": "Default includes block_merge."
    },
    {
      "id": "from_scratch",
      "availability": "available",
      "rollout": "later",
      "week_one": false,
      "note": "Shown separately after the opinionated templates. Use only if no named kind fits; do not invent unsupported events or steps."
    },
    {
      "id": "rule_fired_act",
      "availability": "available",
      "rollout": "later",
      "week_one": false,
      "note": "Default includes fail_check."
    },
    {
      "id": "stale_pull_request",
      "availability": "available",
      "rollout": "later",
      "week_one": false,
      "note": "Waits in configured business hours, then nudges the author and team lead."
    },
    {
      "id": "deployment_review_waiting",
      "availability": "available",
      "rollout": "later",
      "week_one": false
    },
    {
      "id": "failed_workflow_default_branch",
      "availability": "available",
      "rollout": "later",
      "week_one": false,
      "note": "Can announce and optionally create a deduplicated Linear issue."
    },
    {
      "id": "large_pr_without_tests",
      "availability": "available",
      "rollout": "later",
      "week_one": false,
      "note": "Default comments and adds needs-tests."
    },
    {
      "id": "issue_live_card",
      "availability": "available",
      "rollout": "later",
      "week_one": false
    },
    {
      "id": "deployment_review_live_card",
      "availability": "available",
      "rollout": "later",
      "week_one": false
    },
    {
      "id": "review_feedback_follow_up",
      "availability": "available",
      "rollout": "later",
      "week_one": false
    },
    {
      "id": "bot_approval_needs_human",
      "availability": "available",
      "rollout": "later",
      "week_one": false
    },
    {
      "id": "repository_without_owner",
      "availability": "available",
      "rollout": "later",
      "week_one": false
    }
  ],
  "reports": {
    "object": "Scoped saved SQL with run history. Reviewed definitions are versioned. Delivery is always a scheduled_report chain.",
    "status": "available",
    "authoring": ["reviewed_definition_or_natural_language_ask", "review_sql", "preview_rows", "commit_server_owned_draft_revision", "run_history", "csv"],
    "draft": {
      "ownership": "authenticated_user_space_and_scope",
      "revision_checked": true,
      "ttl_hours": 24,
      "client_supplied_sql_or_rows": false
    },
    "scope": "Every definition is space-scoped. All except urgent_issues_without_pr additionally support team or repository scope.",
    "run_now": "Revalidates saved SQL. A saved built-in whose definition version is stale must be regenerated.",
    "briefs": {
      "execution": "asynchronous",
      "statuses": ["queued", "generating", "generated", "failed"],
      "binding": "exact_report_result_snapshot",
      "equivalent_requests": "coalesced",
      "regeneration": "new_version_with_lineage",
      "failures": "persisted"
    },
    "honesty": "Optional AI analysis does not replace saved SQL, rows, timestamps, definition version, scope, or delivery history.",
    "definitions": [
      {
        "id": "production_changes",
        "title": "What shipped to production?",
        "version": 2,
        "scope_policy": "repository"
      },
      {
        "id": "failed_ci_jobs",
        "title": "Where is CI failing?",
        "version": 1,
        "scope_policy": "repository"
      },
      {
        "id": "changes_requested",
        "title": "What needs review follow-up?",
        "version": 1,
        "scope_policy": "repository"
      },
      {
        "id": "review_bot_comments",
        "title": "Unresolved review-bot feedback",
        "version": 1,
        "scope_policy": "repository"
      },
      {
        "id": "urgent_issues_without_pr",
        "title": "Urgent work without a pull request",
        "version": 1,
        "scope_policy": "space"
      },
      {
        "id": "stale_pull_requests",
        "title": "Stale pull requests",
        "version": 1,
        "scope_policy": "repository"
      },
      {
        "id": "rule_violations",
        "title": "Rule violations by rule",
        "version": 1,
        "scope_policy": "repository"
      },
      {
        "id": "deployments_without_review_record",
        "title": "Missing deployment-review evidence",
        "version": 2,
        "scope_policy": "repository"
      },
      {
        "id": "deployment_review_decisions",
        "title": "Deployment approval evidence",
        "version": 2,
        "scope_policy": "repository"
      },
      {
        "id": "repository_protection",
        "title": "Branch-protection evidence snapshot",
        "version": 2,
        "scope_policy": "repository"
      }
    ]
  },
  "dry_run": {
    "status": "available",
    "docs": "/chains/dry-run",
    "effect": "none",
    "supported_evidence": ["pull_request", "review", "rule_event"],
    "unsupported_triggers": ["deployment", "workflow", "issue", "repository_ownership", "schedule"],
    "required_before_enable": "Current definition of a chain with a GitHub-writing step.",
    "enable_is_not_backfill": true
  },
  "automation_activity": {
    "status": "available",
    "docs": "/chains/activity",
    "person_delivery_statuses": ["delivered", "skipped", "failed"],
    "terminal_outcomes": ["completed", "reminded", "escalated", "condition_met", "skipped", "cancelled", "failed"]
  },
  "events": {
    "status": "available",
    "docs": "/events",
    "jobs": ["activity_feed", "attention_filter", "event_detail", "timeline", "findings"],
    "pull_request_stacks": {
      "status": "available",
      "docs": "/events/stacks",
      "boundary": "same_repository_only",
      "identity_sources": ["github_native", "warestack_detected"],
      "cross_repository": false
    }
  },
  "metrics": {
    "status": "available",
    "docs": "/metrics",
    "analytics": [
      "deployment_frequency",
      "failed_deployments",
      "lead_time_for_changes",
      "review_turnaround_time",
      "stale_and_aging_prs",
      "prs_merged_without_proper_review"
    ],
    "overview": [
      "prs_merged",
      "prs_opened",
      "prs_shipped_rate",
      "deployments_total",
      "deployments_failed",
      "time_to_first_review_median",
      "review_comments_total",
      "review_comments_unresolved",
      "actionable_review_threads"
    ]
  },
  "scope": {
    "types": ["repository", "team", "path", "space"],
    "week_one": "repository unless one team clearly owns the in-scope repos",
    "owner": "individual person with GitHub plus Slack. A team cannot receive a Slack DM.",
    "path": "Changed-file boundary inside authorized repositories; only where the event/condition supports paths.",
    "cross_repo_guards": {
      "status": "not_generally_available",
      "self_serve": false,
      "contract": "Explicit repository IDs in one space, bounded counterpart evidence, unknown when unavailable.",
      "families": ["schema_contract", "database_migrations", "frontend_backend_compatibility"]
    }
  },
  "people_and_repositories": {
    "status": "available",
    "people_docs": "/people",
    "repository_docs": "/repositories",
    "people_jobs": ["members", "github_slack_identities", "access_requests", "team_invitations"],
    "repository_jobs": ["monitoring_scope", "individual_owner", "branch_protection_visibility"],
    "branch_protection_managed_in": "github"
  },
  "soc2": {
    "vanta_role": "GRC system of record",
    "warestack_role": "Operate and preserve engineering change-management evidence.",
    "available": [
      "saved_report_runs",
      "csv",
      "event_timelines",
      "production_changelog",
      "identity_and_owner_evidence"
    ],
    "not_generally_available": ["dedicated_period_export", "complete_exception_register_ui", "self_serve_cross_repository_guards"]
  },
  "mcp": {
    "status": "available",
    "docs": "/model-context-protocol",
    "url": "https://mcp.warestack.com/mcp",
    "install": "https://mcp.warestack.com/",
    "skills": "npx skills add https://mcp.warestack.com",
    "api": "https://api.warestack.com",
    "auth": "GitHub OAuth, same account as the console",
    "shared_payload": "/catalog.json",
    "tools": [
      "list_spaces",
      "space_status",
      "list_attention",
      "list_rules",
      "enable_rules",
      "disable_rules",
      "set_repositories",
      "list_identities",
      "list_repository_roles",
      "set_repository_owner",
      "list_slack_channels",
      "add_slack_address",
      "list_chains",
      "list_chain_kinds",
      "create_chain",
      "set_chain_slack_destination",
      "enable_chain",
      "pause_chain",
      "list_reports",
      "draft_report",
      "finish_report",
      "analyze_rule",
      "create_rule"
    ],
    "constraints": [
      "Call space_status before recommending Slack, Linear, rules, or chains.",
      "The live catalog is list_rules. Cite the name and rule_key that tool returns. enable_rules takes the integer id from that list, not the rule_key, and accepts user-confirmed values in parameter_values_by_rule. Never invent required values. Do not invent warestack.catalog or warestack.propose_pack.",
      "create_chain and create_rule save drafts and do not enable them.",
      "Ask before enable_rules or enable_chain. enable_rules sets block_merge false.",
      "GitHub-writing chains need a dry-run first. Leave merge-blocking off.",
      "draft_report accepts a reviewed report_definition_id or a custom question. finish_report takes confirmed_query after needs_confirmation or expected_revision after a completed preview, then commits the authenticated server-owned draft; never submit generated SQL or rows as trusted input.",
      "Trusted rule results require complete outcomes for every persisted check. Incomplete merge-blocking evaluation fails closed; acknowledgement requires a reason and is bound to the exact pull-request revision and finding.",
      "list_attention is the current Overview queue, not complete per-pull-request evaluation history. The MCP does not acknowledge findings.",
      "personal_digest is self-serve. Do not create it.",
      "Slack and Linear OAuth stay in the console."
    ]
  }
}
