You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
core: move raw SQL out of CLI commands and keep one silent-edit query #1353
agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: corepackages/core: the brain CLI, indexer, hybrid search, config, taxonomy, skills.priority: p3Someday. Needs a driving use case before it starts.type: refactorStructure changes; behaviour does not. No changeset-visible effect.
Delivered prerequisite outputs: #1349. Their output references remain relevant, but they are no longer active blockers.
Five command files run SQL directly: packages/core/src/cli/commands/accept-mtime.ts:20-33, briefing.ts:220-295, doctor.ts:318, eval.ts, tags.ts. The silent-edit query exists twice with different column lists and ordering (packages/core/src/cli/commands/briefing.ts:286-295, silentEdits at packages/core/src/lib/hygiene.ts:383-392).
Scope
Move each statement into a named function under packages/core/src/lib/ (or queries/ where it is a supported read).
Briefing uses silentEdits (with a limit option) instead of its own query.
Out of scope
Row validation (E4).
Changing what briefing or doctor print.
Acceptance criteria
No file under packages/core/src/cli/commands/ calls .prepare(, .query( or .run( on a database handle; a lint or test enforces it.
One silent-edit query; briefing's output on the fixture corpus is unchanged.
Verification
bun run test packages/core
bun run lint
Contract impact
None.
2026-10-09: sequenced against the other code-quality issues to avoid overlapping edits; see the epic's planned-order comment.
Updated 2026-10-12: removed completed blocker declarations, retained delivered-output context and all remaining prerequisites; readiness and existing rulings preserved.
Claimed (claim-1341-1353-b6cc1a1f) as part of the #1341 integration lane. Branch refactor/1353-cli-sql-extraction, targeting the epic integration branch epic/1341-shared-core-ops; the epic branch merges into main in one go once every ready child has landed there. Collision report: open PR #3288 also edits packages/core/src/lib/hygiene.ts; whichever lands second rebases. #1352 also touches briefing.ts (different lines).
Delivered on main by the epic #1341 landing, #3505: merge commit 06473ef31, parents 559fe7b41 (main) and bd2decac7 (epic tip). This issue's change is #3293, squashed into the epic branch as 003576188 after passing ready proof on its exact head against the epic tip. The acceptance criteria and failing-first/mutation receipts are in that PR. Milestone 0.45.0. Closing manually: closing keywords do not fire for PRs that target a non-default branch.
agent-readyContext and acceptance criteria are complete enough for an agent to take this unattended.area: corepackages/core: the brain CLI, indexer, hybrid search, config, taxonomy, skills.priority: p3Someday. Needs a driving use case before it starts.type: refactorStructure changes; behaviour does not. No changeset-visible effect.
Activity
schlessera commentedon Oct 10, 2026
Unblocked: #1349 merged in #1468 (62cf4d6), its only listed blocker.
schlessera commentedon Nov 2, 2026
Claimed (claim-1341-1353-b6cc1a1f) as part of the #1341 integration lane. Branch
refactor/1353-cli-sql-extraction, targeting the epic integration branchepic/1341-shared-core-ops; the epic branch merges intomainin one go once every ready child has landed there. Collision report: open PR #3288 also editspackages/core/src/lib/hygiene.ts; whichever lands second rebases. #1352 also touchesbriefing.ts(different lines).refactor(core): move raw SQL out of CLI commands and keep one silent-…
chore(changeset): record the CLI SQL extraction as a patch
refactor(core): move raw SQL out of CLI commands and keep one silent-…
chore(changeset): record the CLI SQL extraction as a patch
refactor(core): move raw SQL out of CLI commands and keep one silent-…
Merge origin/main into epic/1341-shared-core-ops
schlessera commentedon Nov 3, 2026
Delivered on
mainby the epic #1341 landing, #3505: merge commit06473ef31, parents559fe7b41(main) andbd2decac7(epic tip). This issue's change is #3293, squashed into the epic branch as003576188after passing readyproofon its exact head against the epic tip. The acceptance criteria and failing-first/mutation receipts are in that PR. Milestone 0.45.0. Closing manually: closing keywords do not fire for PRs that target a non-default branch.