{
  "expectations": [
    {
      "text": "Runs init_wiki.js to create directory scaffold under the project root",
      "passed": true,
      "evidence": "Ran `node skills/doc-wiki/scripts/init_wiki.js --path . --domain backend-services --name test-project`; output reports created_dirs [wiki, raw, graph, audit/open, audit/resolved, log, outputs/queries, .wiki-cache, ...]; the dirs exist on disk under work/."
    },
    {
      "text": "wiki.config.yaml is created with wiki.domain: 'backend-services'",
      "passed": true,
      "evidence": "work/wiki.config.yaml line 3 shows `domain: backend-services` under the `wiki:` block."
    },
    {
      "text": "Directory scaffold includes wiki/, raw/, graph/, audit/, log/, outputs/",
      "passed": true,
      "evidence": "All six directories present at work/{wiki,raw,graph,audit,log,outputs}; verified via ls."
    },
    {
      "text": "Source file is copied to raw/ (path preserved relative to the ingested root)",
      "passed": true,
      "evidence": "work/raw/architecture.md exists; matches docs/architecture.md byte-for-byte."
    },
    {
      "text": "Generated wiki page has frontmatter with non-empty title, type set to 'concept' (or one of concept|index|synthesis|claim|template), sources listing the ingested file, created + updated ISO dates, a non-empty summary, and 4-8 content-only tags",
      "passed": true,
      "evidence": "wiki/authentication.md frontmatter: title='Authentication and Session Management'; type='concept'; sources=[raw/architecture.md]; created=2026-05-03; updated=2026-05-03; summary present (244 chars); tags=[authentication, jwt, session-management, refresh-token, access-token, revocation] — 6 tags."
    },
    {
      "text": "Tags are content-only concepts (e.g., 'jwt', 'authentication', 'session-management') — no structural/temporal/metadata tags",
      "passed": true,
      "evidence": "All 6 tags are content concepts (authentication, jwt, session-management, refresh-token, access-token, revocation); no structural tags like 'wiki-meta' or temporal tags like 'q1-2026'."
    },
    {
      "text": "summaries.md has a non-stub entry (≥ 20 chars) for the new page",
      "passed": true,
      "evidence": "wiki/summaries.md line 23 has the entry: '[Authentication and Session Management](authentication.md) — JWT-based authentication backed by a sessions table holding revocable refresh tokens; access tokens are short-lived (15 min) and refresh tokens persist for 30 days. (tags: authentication, jwt, session-management, refresh-token, access-token, revocation)' — 244+ chars."
    },
    {
      "text": "Query answer includes at least two inline markdown links and each link resolves to a file that actually exists under wiki/",
      "passed": true,
      "evidence": "outputs/queries/2026-05-03-how-does-authentication-work.md contains 3 markdown links pointing to '../../wiki/authentication.md'; ls -la ../../wiki/authentication.md returns the real file (2314 bytes)."
    },
    {
      "text": "Query answer mentions at least two concrete facts from the source (e.g., JWT, sessions table, refresh endpoint) — hallucinated answers that cite nonexistent pages must fail",
      "passed": true,
      "evidence": "Archive body mentions JWT, HS256, sessions table, POST /auth/refresh, 15-minute lifetime, 30-day refresh, sha256 token_hash — at least 5 concrete facts pulled from the source."
    },
    {
      "text": "Answer is archived to outputs/queries/ as a dated .md file",
      "passed": true,
      "evidence": "work/outputs/queries/2026-05-03-how-does-authentication-work.md exists with frontmatter and the synthesis."
    },
    {
      "text": "events.jsonl records separate entries with op='init', op='ingest', and op='query' (one per operation), all with ISO timestamps",
      "passed": true,
      "evidence": "log/events.jsonl: line1 op=init (init_wiki side-effect), line2 op=init (manual log), line3 op=ingest, line4 op=query — all with ts in ISO-8601 (e.g. 2026-05-03T18:26:15.743000+00:00)."
    },
    {
      "text": "graph/edges.jsonl contains at least one edge with a valid provenance tag (EXTRACTED, INFERRED, or AMBIGUOUS)",
      "passed": true,
      "evidence": "graph/edges.jsonl: 3 edges; provenance values present: EXTRACTED (2 edges), INFERRED (1 edge); types: supports."
    }
  ],
  "summary": {"passed": 12, "failed": 0, "total": 12, "pass_rate": 1.0},
  "eval_feedback": {"overall": "All 12 expectations satisfied. init_wiki.js created the scaffold, the architecture doc compiled to wiki/authentication.md with valid frontmatter and content-only tags, and the query archive cites real wiki pages with concrete source facts."}
}
