CUST-WP-0061-T06: retire suggestions to read-only legacy
Founder-reviewed decision (WorkOrchestrationArchitectureDraft.md v0.2 section 8 item 6): the fresh intake work-record entity replaces suggestions, not a rename-bridge. All 5 mutation endpoints (create, vet, decline, promote, bump-relevance) now 410 with a pointer to POST /intakes/ and the migration doc; GET/list stay live for the historical record (10 rows migrated to file-backed intake records in the-custodian, see that repo's intake-legacy-suggestions-migration.md and CUST-IN-0001 through CUST-IN-0010). Removed dead code the retirement makes unreachable: Task/TaskPriority/ TaskStatus/normalize_task_status imports (only used by the deleted promote body), the suggestion_relevance.bump_relevance import, and the _ALLOWED_*_FROM stage-guard sets + _reject_stage helper (only used by the deleted vet/decline/promote bodies). WSJF ranking (compute_wsjf, cost_of_delay, suggestion_sort_key) stays -- still exercised by the surviving GET /suggestions/?rank=wsjf read path. MCP tool docstrings (create_suggestion, vet_suggestion, decline_suggestion, promote_suggestion_to_task, bump_suggestion_relevance) updated to point at the replacement (create_intake/route_intake/close_intake) rather than silently 410ing with no guidance. tests/test_suggestions.py rewritten: verifies all 5 mutations 410, GET/list still work for historical rows (seeded directly via the DB session since creation is retired -- there's no other way to get historical data into the table anymore), 404 still behaves normally on unknown ids. Live-verified against the running dev API: POST 410s, GET with include_terminal=true still returns all 10 migrated-and-declined historical rows. No regressions: full repo suite green (563 tests). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
b564ac7046
commit
6c4fc64ef3
3 changed files with 136 additions and 257 deletions
|
|
@ -1269,7 +1269,10 @@ def create_suggestion(
|
|||
base_value: float = 3.0,
|
||||
job_size: float = 3.0,
|
||||
) -> str:
|
||||
"""Record a gated need as a relevance-accruing suggestion."""
|
||||
"""Retired (CUST-WP-0061-T06, 2026-07-21): suggestions are read-only
|
||||
legacy. Use create_intake instead (kind: intake per canon/standards/
|
||||
work-record-types_v0.1.md). This call now 410s server-side; kept only
|
||||
so old callers get a clear error instead of a missing tool."""
|
||||
return json.dumps(_post("/suggestions", {
|
||||
"domain": domain,
|
||||
"title": title,
|
||||
|
|
@ -1283,7 +1286,9 @@ def create_suggestion(
|
|||
|
||||
@mcp.tool()
|
||||
def vet_suggestion(suggestion_id: str, note: str, author: str | None = None) -> str:
|
||||
"""Promote a suggestion to a vetted requirement with an append-only note."""
|
||||
"""Retired (CUST-WP-0061-T06, 2026-07-21): suggestions are read-only
|
||||
legacy. There is no vet/route equivalent needed for intake — use
|
||||
route_intake directly. This call now 410s server-side."""
|
||||
return json.dumps(_post(f"/suggestions/{suggestion_id}/vet", {
|
||||
"note": note,
|
||||
"author": author,
|
||||
|
|
@ -1292,7 +1297,9 @@ def vet_suggestion(suggestion_id: str, note: str, author: str | None = None) ->
|
|||
|
||||
@mcp.tool()
|
||||
def decline_suggestion(suggestion_id: str, note: str, author: str | None = None) -> str:
|
||||
"""Decline a suggestion or requirement."""
|
||||
"""Retired (CUST-WP-0061-T06, 2026-07-21): suggestions are read-only
|
||||
legacy. Use close_intake(outcome="declined") instead. This call now
|
||||
410s server-side."""
|
||||
return json.dumps(_post(f"/suggestions/{suggestion_id}/decline", {
|
||||
"note": note,
|
||||
"author": author,
|
||||
|
|
@ -1306,7 +1313,10 @@ def promote_suggestion_to_task(
|
|||
task_title: str | None = None,
|
||||
author: str | None = None,
|
||||
) -> str:
|
||||
"""Promote a vetted requirement into a real Task."""
|
||||
"""Retired (CUST-WP-0061-T06, 2026-07-21): suggestions are read-only
|
||||
legacy. Use route_intake then the promote-intake CLI
|
||||
(scripts/promote_intake.py --to task) instead. This call now 410s
|
||||
server-side."""
|
||||
return json.dumps(_post(f"/suggestions/{suggestion_id}/promote", {
|
||||
"note": note,
|
||||
"task_title": task_title,
|
||||
|
|
@ -1320,7 +1330,10 @@ def bump_suggestion_relevance(
|
|||
reason: str | None = None,
|
||||
author: str | None = None,
|
||||
) -> str:
|
||||
"""Explicitly bump demand relevance when an agent hits an unmet gated need."""
|
||||
"""Retired (CUST-WP-0061-T06, 2026-07-21): suggestions are read-only
|
||||
legacy — relevance/WSJF scoring has no intake equivalent yet (ordering
|
||||
is lane+priority+age per the founder-reviewed architecture draft).
|
||||
This call now 410s server-side."""
|
||||
return json.dumps(_post(f"/suggestions/{suggestion_id}/bump-relevance", {
|
||||
"reason": reason,
|
||||
"author": author,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue