Skip to content

RPS V1 PR2: Wall Detective-pack — 5th status + confirm-gate Survey rule#147

Merged
jukka-matti merged 6 commits into
mainfrom
response-path-system-v1
May 9, 2026
Merged

RPS V1 PR2: Wall Detective-pack — 5th status + confirm-gate Survey rule#147
jukka-matti merged 6 commits into
mainfrom
response-path-system-v1

Conversation

@jukka-matti
Copy link
Copy Markdown
Owner

Summary

Implements PR-RPS-2 of the Response Path System V1 plan: the 5th hypothesis status needs-disconfirmation + confirm-gate Survey rule (per spec §6 row 3 + §5 categories 1+3).

  • Hypothesis.disconfirmationAttempts? field + Finding.evidenceType (required) + Finding.refutes? — closes the schema gap the plan's TDD code implicitly required.
  • deriveHypothesisStatus(h, findings) — pure 5-state derivation: refuted (any refuting finding) → proposed (no findings) → evidenced (<2 distinct evidence types) → needs-disconfirmation (≥2 types, no survived attempt) → confirmed (≥2 types + survived attempt).
  • surveyWallRules rule emits one "1 step away" hint per needs-disconfirmation hypothesis.
  • OneStepAwayBadge UI replaces openChecksLabel slot on HypothesisCard when status is needs-disconfirmation at full LOD.

Survey module now hosts two coexisting API surfaces:

  • existing data-affordance evaluateSurvey()SurveyEvaluation (Possibility/Power/Trust)
  • new cross-phase rule registry — domain modules emit SurveyHint[] per surface

A module-level doc comment in survey/index.ts makes the dual-surface coexistence explicit.

Plan-grounding extension (caught at task 7)

Plan §Task 7 / §Task 8 TDD code reads Finding.evidenceType and Finding.refutes which didn't exist on Finding (only on CausalLink). Per spec §5 row 396 ("H1 has data only — needs gemba walk to triangulate") + §6 row 3 ("≥2 evidence types"), evidence-type tagging belongs on Finding. Added both fields with sensible defaults; cascade is 46 mechanical fixture one-liners (evidenceType: 'data',) plus 3 substantive files: findings/types.ts, findings/factories.ts, apps/azure/src/services/merge.ts (3-way merge correctly carries the new fields per feedback_fix_absorbed_violations_at_seam).

Test plan

  • pnpm --filter @variscout/core test hypothesisEvidence — 10/10
  • pnpm --filter @variscout/core test survey — 16/16 (8 wall + 8 existing evaluator)
  • pnpm --filter @variscout/ui test HypothesisCard — 25/25 (3 files)
  • pnpm --filter @variscout/core build — clean
  • pnpm --filter @variscout/ui build — clean
  • bash scripts/pr-ready-check.sh — all 5 steps green (tests + lint + docs:check + pwa build + dist integrity)
  • Per-task spec compliance + code quality reviews (Sonnet)
  • Final independent code review (Opus) — READY TO MERGE
  • --chrome walk to verify badge renders correctly on a needs-disconfirmation hypothesis card (pending — UI change is small enough that visual is straightforward, but should be done before merge per feedback_verify_before_push)

Commits

  1. 0e2f842a feat(core): Hypothesis.disconfirmationAttempts + evidenceTypes/hasUnresolvedDisconfirmation helpers
  2. 24e8b77f fix(core,azure): export hypothesisEvidence helpers + handle Finding.refutes in 3-way merge
  3. fff1dd2e feat(core): Survey wall rules — deriveHypothesisStatus 5-state + 1-step-away hints
  4. 2e9f5dc6 fix(core): drop redundant evidence-type filter + duplicate inline comment in survey
  5. 21920548 feat(ui): HypothesisCard renders needs-disconfirmation status + 1-step-away badge
  6. 0d2ee6c2 fix(ui): badge replaces openChecksLabel for needs-disconfirmation — clear layout

Plan: docs/superpowers/plans/2026-05-09-response-path-system-v1.md §"PR-RPS-2"
Spec: docs/superpowers/specs/2026-05-09-response-path-system-v1-design.md §6 + §5

🤖 Generated with ruflo

jukka-matti and others added 6 commits May 9, 2026 15:25
…esolvedDisconfirmation helpers

Adds the data-model substrate for the Survey confirm-gate rule (PR-RPS-2 §5
category 1 + §6 row 3): Findings now carry an explicit `evidenceType` tag
('data' | 'gemba' | 'expert') and a `refutes?` boolean; Hypothesis tracks
`disconfirmationAttempts[]`. Helpers `evidenceTypesForHypothesis()` +
`hasUnresolvedDisconfirmation()` ride on top in `findings/hypothesisEvidence.ts`.

Cascade fixture updates apply `evidenceType: 'data'` defaults across packages
(data fixtures, hook tests, ui tests, app tests, azure 3-way merge) — required
by the no-back-compat / direct-refactor stance (spec D15, feedback memory).
…efutes in 3-way merge

Barrel-exports evidenceTypesForHypothesis + hasUnresolvedDisconfirmation from
packages/core/src/findings/index.ts so Task 8 (survey/wall.ts) can import via
the package boundary. Clarifies hasUnresolvedDisconfirmation JSDoc to make
explicit it covers only the "pending attempt" half of needs-disconfirmation.
Adds refutes to mergeSingleFinding() following the evidenceType pattern
(status-winner rule) so Finding.refutes is no longer silently dropped on
3-way merge in apps/azure/src/services/merge.ts.

Co-Authored-By: ruflo <ruv@ruv.net>
…ep-away hints

Extends packages/core/src/survey/ with the RPS V1 rule-layer API surface
(second coexisting surface alongside the existing data-affordance evaluator).

- survey/types.ts: append SurveyHintKind, SurveyHint, SurveyContext, SurveyRule
  types for the cross-phase rule registry. Existing SurveyStatus, SurveyEvaluation,
  etc. untouched.
- survey/wall.ts: pure deriveHypothesisStatus() 5-state logic (proposed→evidenced→
  needs-disconfirmation→confirmed; refuted wins immediately) + surveyWallRules
  SurveyRule emitting triangulation-readiness hints for needs-disconfirmation hypotheses.
- survey/index.ts: module-level doc comment explaining dual API surfaces; new exports
  appended; all existing exports preserved.
- survey/__tests__/wall.test.ts: 8 tests (5 from plan + 3 surveyWallRules cases), all green.

Co-Authored-By: ruflo <ruv@ruv.net>
…ment in survey

- evidenceTypesForHypothesis already returns Set<FindingEvidenceType> constrained
  to 'data' | 'gemba' | 'expert' — the inline filter was dead code that
  misled readers into thinking 'unvalidated' could appear.
- Removed inline comment that duplicated the JSDoc above SurveyContext.
- Switched wall.ts import to the findings barrel.

Co-Authored-By: ruflo <ruv@ruv.net>
…p-away badge

- Add OneStepAwayBadge component (foreignObject/HTML, amber contrast-paired)
- Render badge in HypothesisCard only at lod=full + displayStatus=needs-disconfirmation
- Add ONE_STEP_AWAY_Y=160 constant (body-rect bottom gap, avoids all existing text rows)
- Add i18n key wall.card.oneStepAway to MessageCatalog type + all 32 locale files
- TDD: HypothesisCard.statusDerivation.test.tsx covers full/glyph/medium LOD + non-matching status

Co-Authored-By: ruflo <ruv@ruv.net>
…lear layout

OneStepAwayBadge now occupies the open-checks row (y=168, h=20, span 168–188)
instead of the old overlapping y=160 position. openChecksLabel is suppressed
when isOneStepAway; rendered as before otherwise. nextMove text at y=204 has
4px clearance below badge bottom. Two new test cases assert mutual exclusion.

Co-Authored-By: ruflo <ruv@ruv.net>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mean-beoynd-lite-pwa Ready Ready Preview, Comment May 9, 2026 2:00pm
variscout_website Ready Ready Preview, Comment May 9, 2026 2:00pm

@jukka-matti jukka-matti merged commit 45e25c9 into main May 9, 2026
3 checks passed
@jukka-matti jukka-matti deleted the response-path-system-v1 branch May 9, 2026 14:03
jukka-matti added a commit that referenced this pull request May 13, 2026
…80, log shipment

All 10 PRs of Response Path System V1 merged on main 2026-05-09 → 2026-05-13
(#144 / #147 / #148 / #149 / #150 / #151 / #152 / #153 / #154 / #155). This
commit syncs tracking docs that the squash merges left stale:

- docs/roadmap.md: PR-RPS-9 + PR-RPS-10 SHIPPED rows; flip §3 to "10 of 10";
  free up ADR-080 slot from the 8f canvas viewport item (taken by Sustainment)
- docs/decision-log.md: pin "2026-05-13 — RPS V1 SHIPPED — full lifecycle live"
- docs/07-decisions/adr-080-sustainment-auto-fire-pattern.md (new): document
  the Sustainment-shaped lifecycle pattern (auto-fire + Inbox prompt +
  signoff tier gate) as a pattern reference for future response-path
  lifecycles, per plan §PR-RPS-9 ledger line 2231
- docs/07-decisions/index.md: add rows 078 / 079 / 080 (078+079 also weren't
  indexed when shipped)
- Spec + plan frontmatter: draft/active → delivered, last-reviewed 2026-05-13

Co-Authored-By: ruflo <ruv@ruv.net>
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