-
Notifications
You must be signed in to change notification settings - Fork 0
Add planning-service contracts for program induction, counterexample search, and backtracking #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c0b8f7c
4071d2a
66eae5c
9cb3b80
3765bab
1cf4551
0383072
00b936e
2081b72
7156514
694d606
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,66 @@ | ||||||
| # PlanningService contract v0.1 | ||||||
|
|
||||||
| ## Goal | ||||||
|
|
||||||
| Provide a typed planning surface for governed branch expansion and selection without collapsing planning into execution and without treating hidden prose reasoning as the canonical planning record. | ||||||
|
|
||||||
| ## Methods | ||||||
|
|
||||||
| - `CreatePlanningScope` | ||||||
| - `ExpandPlanNode` | ||||||
| - `ScorePlanNode` | ||||||
| - `SelectPlanBranch` | ||||||
| - `InduceProgramCandidate` | ||||||
| - `SearchCounterexample` | ||||||
| - `BacktrackPlanNode` | ||||||
| - `ValidateAbstractRule` | ||||||
|
|
||||||
| ## Input discipline | ||||||
|
|
||||||
| Planning methods MUST operate on stable references to: | ||||||
| - planning scope ids | ||||||
| - belief-state refs | ||||||
| - objective-vector refs | ||||||
| - policy refs | ||||||
| - plan-node refs | ||||||
|
|
||||||
| ## Output discipline | ||||||
|
|
||||||
| Planning methods SHOULD return: | ||||||
| - stable `scopeRef` | ||||||
| - stable `planNodeRef` values | ||||||
| - stable `objectiveVectorRef` values | ||||||
| - explicit admissibility results | ||||||
| - explicit review requirements when selection remains conditional | ||||||
|
|
||||||
| ## Rule | ||||||
|
|
||||||
| Planning methods SHOULD preserve stable references back to `scopeId`, `stateRef`, `planNodeId`, and `objectiveId`. | ||||||
|
||||||
| Planning methods SHOULD preserve stable references back to `scopeId`, `stateRef`, `planNodeId`, and `objectiveId`. | |
| Planning methods SHOULD preserve stable references back to `scopeRef`, `stateRef`, `planNodeRef`, and `objectiveVectorRef`. |
Copilot
AI
Apr 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The contract suggests attaching a counterexampleRef, but the fixture response uses counterexampleRefs (plural array). Please align the contract field naming with the intended wire shape (single ref vs list) to avoid incompatible implementations.
| - `counterexampleRef` | |
| - `counterexampleRefs` |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,16 @@ | ||||||
| # Planning fixtures placeholder | ||||||
|
|
||||||
| This directory holds deterministic example payloads for governed planning over TriTRPC. | ||||||
|
|
||||||
| Planned coverage: | ||||||
| - `CreatePlanningScope` request/response | ||||||
| - `ExpandPlanNode` request/response | ||||||
| - `ScorePlanNode` request/response | ||||||
| - `SelectPlanBranch` request/response | ||||||
| - `InduceProgramCandidate` request/response | ||||||
| - `SearchCounterexample` request/response | ||||||
| - `BacktrackPlanNode` request/response | ||||||
| - `ValidateAbstractRule` request/response | ||||||
|
|
||||||
| These fixtures preserve stable refs to scope, state, objective, and plan-node artifacts. | ||||||
|
||||||
| These fixtures preserve stable refs to scope, state, objective, and plan-node artifacts. | |
| These fixtures preserve stable refs to scope, plan-node, and target artifacts. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "scopeRef": "planning://scope/planning.scope.hdt.export.001", | ||
| "planNodeRef": "planning://plan-node/plan.node.hdt.repair-consent.001", | ||
| "reasoningClass": "PROGRAM_INDUCTION" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "scopeRef": "planning://scope/planning.scope.hdt.export.001", | ||
| "programCandidateRef": "semantic://program-candidate/progcand.hdt.export.001", | ||
| "status": "CREATED" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "scopeRef": "planning://scope/planning.scope.hdt.export.001", | ||
| "targetRef": "semantic://program-candidate/progcand.hdt.export.001", | ||
| "reasoningClass": "ABSTRACT" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "scopeRef": "planning://scope/planning.scope.hdt.export.001", | ||
| "counterexampleRefs": [ | ||
| "semantic://counterexample/counterexample.hdt.export.001" | ||
| ], | ||
| "result": "FOUND" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the “Input discipline” section you say planning methods must operate on “stable references”, but the first bullet is “planning scope ids” (and others are “refs”). This mixes identifier terms and could confuse implementers about whether values are expected to be
...Idor...Refstrings. Consider making all bullets consistently*Ref(or consistently*Id) and aligning the wording accordingly.