Skip to content

ai-forge maintenance: evidence and test hygiene #63

Description

@dsmcewan

Scope

Canonical bounded maintenance sweep for the deferred ai-forge product. This consolidates issues #37 and #46 plus the mechanical evidence-hygiene items formerly tracked in #30. These are non-blocking defects and diagnostics improvements; the current tests and gate remain green.

ai-forge remains AM-40-deferred. Implementation must use a newly authorized bounded maintenance plan rather than borrowing the completed Clotho authz-008 scope.

Checklist

  • Bind the stored RAG scorecard to the executable evaluation. In ai-forge/patterns/rag.mjs, generated rag/evals/run.mjs must read scorecard.json and fail if stored precision, faithfulness, dataset size, topK, or thresholds differ from recomputed/configured values beyond a documented epsilon.
  • Guard all four FC2 DESIGN parsers. Replace direct md.match(...)[1] access in test-{telos,multiagent,eval,serving}-forge.mjs with an explicit missing-block failure carrying a stable, legible message.
  • Replace the tautological eval assertion. In ai-forge/patterns/eval.mjs, replace a.length === DATASET.length with a discriminator that can fail, such as proving every prediction belongs to the closed output set.
  • Clean generated TELOS self-test temporary directories. Wrap both mkdtempSync uses in ai-forge/patterns/telos.mjs with deterministic finally cleanup using rmSync(..., { recursive: true, force: true }).
  • Pin the design heading contract locally. In ai-forge/scripts/test-design.mjs, require the exact ## heading level enforced by design-verify.mjs.
  • Make design workstream signatures consistent. Declare render(ctx) and checks(ctx) even though the closed-over implementation does not consume ctx yet.
  • Make generated index bytes deterministic. Align rag/index.build.mjs with the renderer by writing the same trailing newline to index.json.

Acceptance

  • Each behavioral fix is introduced test-first and observed failing for the intended reason.
  • npm --prefix ai-forge test exits 0.
  • node docs/institutional-memory/verify-contracts.mjs exits 0.
  • git diff --check is clean.
  • No dependency, shared-package, spine, enrollment, or mythology change.

Out of scope

The shared forge-kit/ extraction remains separately tracked in #30 because it is an architectural/package-boundary decision, not a mechanical maintenance fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-forgeChanges scoped to the ai-forge productmaintenanceBounded maintenance and test hygiene

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions