Skip to content

feat(solve): advisory baseline check + progress nudge + DIAG-02 fix#45

Open
jobordu wants to merge 9 commits intomainfrom
nf/quick-373-add-advisory-baseline-check-to-nf-solve-
Open

feat(solve): advisory baseline check + progress nudge + DIAG-02 fix#45
jobordu wants to merge 9 commits intomainfrom
nf/quick-373-add-advisory-baseline-check-to-nf-solve-

Conversation

@jobordu
Copy link
Copy Markdown

@jobordu jobordu commented Apr 4, 2026

Summary

  • Add checkBaselinePresence() to bin/nf-solve.cjs — warns when requirements.json has no baseline-sourced requirements (advisory stderr + baseline_advisory JSON field)
  • Add --require-baselines flag for CI hard-fail when baselines missing
  • Augment DIAG-02 residual: -1 detail objects with baseline_hint across 3 sweep functions (sweepRtoD, sweepCtoR, sweepDtoR)
  • Add baseline coverage nudge to core/workflows/progress.md — "run sync-baseline-requirements.cjs"
  • Enforce --require-baselines in both Phase 1 (fresh) and Phase 0.5 (--execute/--resume) paths
  • 6 new tests in bin/nf-solve-baseline-check.test.cjs (100% pass)

Motivation

nf:solve silently skips layers E and K when requirements.json has no baselines, producing a deflated residual. Users adopting nForma on existing projects never get prompted to run /nf:sync-baselines. This was identified via quorum consensus (codex-1 + copilot-1, 3 rounds → Option C advisory).

Test plan

  • node --test bin/nf-solve-baseline-check.test.cjs — 6/6 pass
  • node bin/nf-solve.cjs --json --report-only 2>&1 | grep baseline — advisory visible
  • grep require-baselines commands/nf/solve.md — flag documented
  • grep baseline core/workflows/progress.md — nudge present
  • diff core/workflows/progress.md ~/.claude/nf/workflows/progress.md — synced

🤖 Generated with Claude Code

jobordu and others added 9 commits April 4, 2026 07:50
…solve-state.json

Incorporate codex-1 quorum improvement: add verification that baseline_advisory is
absent from solve-state.json (direct negative check), not just present on jsonObj.
This closes the JSON-path concern with explicit path validation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Implement checkBaselinePresence() helper with fail-open JSON parsing
- Add --require-baselines flag for CI hard-fail when baselines missing
- Emit distinct stderr advisories for missing-file vs zero-baselines cases
- Add baseline_advisory field to jsonObj (--json output), not solveState
- Augment DIAG-02 layers (R->D, C->R, D->R) with baseline_hint in detail
- Update commands/nf/solve.md to document flag and forward in both phases
- Update core/workflows/progress.md with baseline check and nudge
- Sync installed workflow copy to ~/.claude/nf/workflows/
- Create 6-case test suite with 100% pass rate
- Update STATE.md with task completion

Resolves DIAG-02 requirement for baseline coverage signaling. Users now see
clear advisories when baselines are missing and can opt into hard-fail mode.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Includes updated solve-state, gates, model-registry, proximity-index,
TLA+/PRISM/Alloy specs, evidence files, and traceability matrix from
recent solve and pipeline executions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…reviews

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant