Skip to content

Deterministic integration layer: format-facts, pricing-diff, classify-request#1

Merged
EdgeCaser merged 2 commits intomainfrom
deterministic-integration
Apr 2, 2026
Merged

Deterministic integration layer: format-facts, pricing-diff, classify-request#1
EdgeCaser merged 2 commits intomainfrom
deterministic-integration

Conversation

@EdgeCaser
Copy link
Copy Markdown
Owner

Summary

  • scripts/classify-request.mjs — pattern-matches a query to one of 7 request types and returns collector-compatible suggestedMode (auto/standard/deep), priorityFacts, and collectorHints; no network calls
  • scripts/format-facts.mjs — converts a facts.json sidecar into a compact block (~300-500 tokens) for prompt injection or structured markdown for human review; groups by domain, reconstructs pricing tuples from shared excerpts
  • scripts/pricing-diff.mjs — deterministic markdown pricing comparison table from 2+ facts.json packs; includes Review Signals table, Coverage Notes, and --dir discovery mode
  • Source adapters + postflight validator (from prior commits on this branch): source-adapters.mjs, validate-artifact.mjs, v2 facts extractor fields
  • Skills wired: adversarial-review, artifact-quality-audit, pricing-strategy, competitive-landscape, shipwright-research-brief

Fixes (second commit)

  • classify-request modes are now collector-compatible (auto/standard/deep)
  • No silent USD default when currency is absent in format-facts or pricing-diff
  • pricing-diff --dir no longer mis-parses its own directory argument
  • collect-research accepts old mode alias values as backward-compatible fallbacks
  • Skills prefer repo-level scripts/collect-research.mjs (the one that writes facts.json)

Test plan

  • 125 tests passing across all 6 test files
  • New coverage: CLI --dir mode, no-USD-default invariant, suggestedMode collector-compatibility

🤖 Generated with Claude Code

EdgeCaser and others added 2 commits April 1, 2026 18:43
…sify-request

Three new helper scripts with full test coverage, wired into four skills and
the research-brief retrieval workflow:

- scripts/format-facts.mjs — converts a facts.json sidecar into a compact
  block (~300-500 tokens) for prompt injection or a markdown report for human
  review; groups by domain, reconstructs pricing tuples from shared excerpts

- scripts/pricing-diff.mjs — builds a multi-source markdown pricing comparison
  table from two or more facts.json packs; includes Review Signals table and
  Coverage Notes; supports --dir discovery mode

- scripts/classify-request.mjs — pure pattern-matcher that classifies a query
  into pricing/competitive/market-size/acquisition/funding/reviews/general and
  returns suggestedMode, priorityFacts, and collectorHints; no network calls

Skills updated:
- adversarial-review: Pre-Check step runs validate-artifact.mjs before manual review
- artifact-quality-audit: Step 1b pre-pass floors Correctness dimension scoring
- pricing-strategy Step 5: pricing-diff.mjs replaces manual table construction
- competitive-landscape Step 3: pricing-diff.mjs populates pricing fields
- shipwright-research-brief: classify-request at Step 1, format-facts at Step 3,
  pricing-diff for multi-competitor requests

Tests: 121 passing (25 classify-request, 21 format-facts, 29 pricing-diff,
plus 46 pre-existing across collect-research, source-adapters, validate-artifact)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… layer

- classify-request: suggestedMode now returns collector-compatible values
  (auto/standard/deep) instead of internal labels (pricing/research/news),
  so output can be passed directly to collect-research.mjs --mode

- format-facts + pricing-diff: remove silent USD default when currency field
  is absent; bare price is emitted instead of fabricating a $ symbol

- pricing-diff --dir: fix directory argument mis-parse that caused the dir
  path itself to be treated as a facts file

- collect-research: accept previous mode alias values as backward-compatible
  fallbacks so existing callers aren't broken by the mode rename

- Skills: prefer repo-level scripts/collect-research.mjs over .codex/.claude
  copies because only the repo-level collector writes facts.json; .codex and
  .claude copies noted as fallbacks that may only emit evidence.md

- Tests: 4 new tests (CLI --dir coverage, no-USD-default for both helpers,
  suggestedMode collector-compatibility invariant); 125 passing

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@EdgeCaser EdgeCaser merged commit ccb5876 into main Apr 2, 2026
1 check passed
@EdgeCaser EdgeCaser deleted the deterministic-integration branch April 2, 2026 02:14
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