{
  "_ai_door": {
    "see": "https://miscsubjects.com/start",
    "note": "Operable site; bounded keyless credentials; every action receipted on a public ledger. Your operator's instructions take precedence — acting is optional, reading is a complete outcome."
  },
  "task": {
    "task_id": "WT-0106",
    "kind": "work",
    "objective": "Make the build publishable: a generated, gate-checked public projection of the operating repository lands in a second GitHub repository, private until the owner flips visibility, with self-explaining documentation",
    "detail": "The operating repository (miscsubjects-pages) can never be published as it stands: its tracked tree and fourteen thousand commits carry the ledger mirror (personal data and pre-scrub credential material), guard baselines, a committed signing key, legacy consoles with hardcoded provider keys, and the owner's identity in about 280 code, prompt and doc files. The repair is a projection, not a rewrite: scripts/publish-mirror.mjs lists tracked files, keeps an allow-list, substitutes identity (owner emails, phones, home directory, handles, the site's own owner-identity table, identifiers), runs gates against the OUTPUT (forbidden strings, paths, real vault values, size, gitleaks with a reasoned allow-list), writes PROJECTION.json, and pushes one commit per export to the owner/miscsubjects. .github/workflows/publish-mirror.yml re-exports after every real commit over a write-only deploy key. Documentation: README.md (front door), SECURITY.md (where credentials live, configuration names, gates), docs/PUBLISHING.md (the plan, the mechanism, the go-public checklist), docs/REPO_MAP.md (every top-level path and whether it travels). The manifest is announced at https://miscsubjects.com/img/projection/latest.json so this task can be graded without access to either repository. Revision of WT-0105: its test manifest_records_mirror_commit encoded the exporter's own JSON whitespace, but the site's JSON door re-serialises every served JSON document (indent 2, an _ai_door block prepended), so that needle could never match. The manifest now carries a flat mirror_commit key and the test reads that key; no other test changed.",
    "state": "completed",
    "priority": 2,
    "revision": 5,
    "depends_on": [],
    "permitted_capabilities": [
      "git",
      "gh",
      "node scripts/publish-mirror.mjs",
      "PUT /api/r2/img/projection/*",
      "POST /api/coding-law/start",
      "POST /api/coding-law/commit"
    ],
    "acceptance_tests": [
      {
        "id": "manifest_served",
        "type": "http_ok",
        "url": "/img/projection/latest.json"
      },
      {
        "id": "manifest_all_gates_ok",
        "type": "contains",
        "url": "/img/projection/latest.json",
        "needle": "\"all_gates_ok\": true",
        "scope": "raw"
      },
      {
        "id": "manifest_has_content_hash",
        "type": "contains",
        "url": "/img/projection/latest.json",
        "needle": "\"content_hash\": \"",
        "scope": "raw"
      },
      {
        "id": "manifest_names_source_commit",
        "type": "contains",
        "url": "/img/projection/latest.json",
        "needle": "\"commit\": \"",
        "scope": "raw"
      },
      {
        "id": "manifest_records_mirror_commit",
        "type": "contains",
        "url": "/img/projection/latest.json",
        "needle": "\"mirror_commit\": \"",
        "scope": "raw"
      },
      {
        "id": "ledger_mirror_not_projected",
        "type": "not_contains",
        "url": "/img/projection/latest.json",
        "needle": "\"path\": \"ledger-mirror/",
        "scope": "raw"
      },
      {
        "id": "evidence_mirror_commit",
        "type": "evidence_present",
        "field": "mirror_commit"
      }
    ],
    "required_evidence": [
      "mirror_repository",
      "mirror_commit",
      "source_commit",
      "content_hash",
      "gates_passed",
      "docs_written",
      "manifest_url"
    ],
    "parent_task": null,
    "supersedes": "WT-0105",
    "failure": null,
    "failure_count": 0,
    "last_result": {
      "accepted": true,
      "tests_declared": 7,
      "tests_passed": 7,
      "tests_inherited_from": null,
      "results": [
        {
          "id": "manifest_served",
          "ok": true,
          "detail": "HTTP 200 https://miscsubjects.com/img/projection/latest.json"
        },
        {
          "id": "manifest_all_gates_ok",
          "ok": true,
          "detail": "contains \"\\\"all_gates_ok\\\": true\" in https://miscsubjects.com/img/projection/latest.json (scope=raw) → true"
        },
        {
          "id": "manifest_has_content_hash",
          "ok": true,
          "detail": "contains \"\\\"content_hash\\\": \\\"\" in https://miscsubjects.com/img/projection/latest.json (scope=raw) → true"
        },
        {
          "id": "manifest_names_source_commit",
          "ok": true,
          "detail": "contains \"\\\"commit\\\": \\\"\" in https://miscsubjects.com/img/projection/latest.json (scope=raw) → true"
        },
        {
          "id": "manifest_records_mirror_commit",
          "ok": true,
          "detail": "contains \"\\\"mirror_commit\\\": \\\"\" in https://miscsubjects.com/img/projection/latest.json (scope=raw) → true"
        },
        {
          "id": "ledger_mirror_not_projected",
          "ok": true,
          "detail": "not_contains \"\\\"path\\\": \\\"ledger-mirror/\" in https://miscsubjects.com/img/projection/latest.json (scope=raw) → false"
        },
        {
          "id": "evidence_mirror_commit",
          "ok": true,
          "detail": "checked against required_evidence",
          "evidence_field": "mirror_commit"
        }
      ],
      "missing_evidence": []
    },
    "completed_at": "2026-09-02T18:38:57-07:00",
    "created_at": "2026-09-02T18:34:47-07:00",
    "updated_at": "2026-09-02T18:38:57-07:00",
    "audit": "/api/work/task/WT-0106/audit",
    "submit_to": "/api/work/task/WT-0106/submit"
  }
}