feat(core): IM-2 — Measurement-Plan-as-DCP fields#252
Merged
Conversation
Rename factor→primaryFactor, drop msaRequired, add outcome/neededFactors[]/ scope:ConditionLeaf[]/processLocation/opDef?/msaNote? per spec §7.1. ConditionLeaf imported from findings/hypothesisCondition (not redefined). Reducer in actions.ts is unchanged (pure spread-merge auto-widens). Update types.test.ts to assert the DCP shape + hypothesisId immutability guard. Update actions.test.ts basePlan fixture to the new shape. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…Form DCP fields Task 2 (mechanical rename): factor→primaryFactor in AddPlanForm, MeasurementPlanChip, and all test fixtures (HypothesisCardWithPlans, WallCanvas, MeasurementPlanChip, both apps' applyAction makeMeasurementPlan helpers). Task 3 (AddPlanForm DCP rework): remove msaRequired checkbox/state; add outcome, neededFactors[] (comma-split), processLocation (select from stepOptions), opDef?, msaNote? textareas; new props defaultScope?/defaultOutcome?/stepOptions?. Update AddPlanForm.test.tsx with 15 tests covering all new fields + scope/stepOptions/outcome prop threading. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…Canvas→HypothesisCardWithPlans→AddPlanForm WallCanvasPlanningProps gains optional defaultScope?/defaultOutcome? fields. WallCanvas derives stepOptions (StepOption[]) from processMap via deriveProcessSteps at render time (useMemo); passes undefined when processMap absent (AddPlanForm hides the step picker). defaultScope + defaultOutcome forwarded as-is — call sites that cannot source them cheaply pass undefined (form defaults to []/''). Thread through DraggableHypothesisCard automatically via the existing Omit<> type derivation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Create docs/03-features/workflows/measurement-plan-dcp.md — full DCP field reference (neededFactors[]=column-names contract, processLocation non-strict join, scope=snapshot/not-ProblemStatementScope, opDef+msaNote informational notes not gates, persistence spread-through / no IDB bump, UI threading diagram). Inbound link added in specifications.md (updates the stale "factor + msaRequired" sentence to the IM-2 DCP shape). Log the §11 #2 hypothesisId-exclusive resolution to decision-log.md (hypothesisId required + immutable; neededFactors[]=dataset-column-names contract pinned for IM-3). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…te/neededFactors (review) BLOCKER 1: raise FORM_H 280→660 to cover 8-field + 2-textarea form; add overflow:visible on plans-section foreignObject (mirrors LinkFindingPicker) so textareas + Save/Cancel are not clipped and remain interactive in the real SVG canvas. MINOR 5: fix outcome-reclear regression — stop re-substituting defaultOutcome in handleSave (outcome.trim() || defaultOutcome would prevent user from clearing a prefilled outcome). State is already seeded from defaultOutcome at mount; trimmed value is now used directly. MAJOR 2: add two WallCanvas planningProps tests — (a) renders step select with derived 'Fill' option when processMap present; (b) hides step select when processMap absent (undefined fallback path). MAJOR 3: add msaNote save/omit tests mirroring the opDef pair. MINOR 4: add neededFactors comma-parse tests — whitespace/empty-segment happy path + blank-input empty-array assertion. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
IM-2 (ADR-085/087, spec §7.1). Extends
MeasurementPlanto the Data-Collection-Plan shape.What changed
factor→primaryFactor; droppedmsaRequired.outcome,neededFactors[](= dataset column names, the IM-3 join contract),scope: ConditionLeaf[](a copy of the WHERE leaves, distinct fromProblemStatementScope),processLocation(ProcessMap node id; '' allowed),opDef?,msaNote?.AddPlanFormreworked (new inputs; msaRequired checkbox removed);stepOptions/defaultScope/defaultOutcomethreaded through WallCanvas→HypothesisCardWithPlans→AddPlanForm (app-level sourcing of scope/outcome deferred — call sites pass undefined).hypothesisIdstays required+immutable; no IDB version bump (no table/index change);ConditionLeafreused (not redefined).measurement-plan-dcp.md; decision-log entry for hypothesisId-exclusivity (§11 chore(deps): bump actions/upload-artifact from 4.6.2 to 7.0.0 #2).Verification
pr-ready-checkgreen (re-confirmed after review fixes).FORM_HforeignObject clip (form was unsubmittable — raised to 660 +overflow:visiblematching LinkFindingPicker) and closed the WallCanvas-planningProps / msaNote / neededFactors test-coverage gaps. Data layer was clean (no rename orphans, ConditionLeaf reused, L3 doc with inbound links).🤖 Generated with Claude Code