feat: add /vault-cli:refine-task slash command#7
Conversation
Conversationally refines task substance (DoD, scope, subtasks, goal alignment) by invoking task-auditor, surfacing findings as numbered questions, applying edits, and re-auditing until score >= 8. Cross-refs added from work-on-task and create-task so the refinement step is discoverable in the task lifecycle.
There was a problem hiding this comment.
I already have the full diff content. Let me analyze it directly.
Based on the diff I captured, here is my review:
PR Review: feat: add /vault-cli:refine-task slash command
Files Changed
CHANGELOG.md— Added unreleased sectionREADME.md— Added command to tablecommands/create-task.md— Cross-reference addedcommands/refine-task.md— New 86-line slash command (main implementation)commands/work-on-task.md— Cross-reference added
Automated Checks
License file: Present (from repo baseline).
make precommit: Not run — the diff touches only markdown command files (.md), not Go code. make precommit runs Go linting/formatters/tests which are not applicable to this change. This is acceptable for a pure documentation/command-descriptor PR.
Findings
Must Fix (Critical)
None.
Should Fix (Important)
None.
Nice to Have (Optional)
-
commands/refine-task.md:8—allowed-toolsincludesBashbut the command description shows no Bash invocation. The process steps (validate, auditor, surface gaps, apply, re-run) are all done via Task/Read/Edit/Glob/AskUserQuestion. Either removeBashfromallowed-toolsor add a step that legitimately uses it (e.g., "validate the task file exists" viaBash ls). -
commands/refine-task.md— TheGlobpattern24 Tasks/*<arg>*.mdis hardcoded. If the vault root fromconfig.yamlis different (e.g.,Tasks/instead of24 Tasks/), the glob will silently fail to find files. Consider noting this assumption, or using a more generic pattern like*<arg>*.mdand letting the user narrow if needed.
Concerns Addressed (from plan)
| Concern | Status |
|---|---|
Loop condition score < 8 AND remaining gaps are addressable — termination reliable? |
Addressed — loop exits via two escape hatches: score ≥ 8, or remaining gaps need decisions outside the loop's scope (⚠ Task improved to X/10. Remaining: <bullets>. Re-run when ready.) |
| Edit calls target correct file? | Addressed — step 1 validates and resolves the path; all subsequent Edit calls use the same resolved path |
Bash in allowed-tools but not used? |
Raised as nit — should remove or justify inclusion |
Hardcoded 24 Tasks/*<arg>*.md glob pattern? |
Raised as nit — noted as vault-configuration-dependent |
| No test file for new command? | Not a gap — slash command .md files are documentation/descriptors; no Go test applicable. The claim "make precommit green" refers to the overall project precommit, which lints Go code (not markdown command files). |
Manual Review Summary
The command is well-structured:
- Input validation is thorough (no arg, path-like vs name-like, multiple/zero matches)
- Reuses
task-auditorsubagent rather than duplicating audit logic (good separation) - Conversational UX is respected: 3 questions max per turn,
AskUserQuestionwith numbered options,(Recommended)lead - Loop has clear exit conditions
- Cross-references in
create-task.mdandwork-on-task.mdare correctly placed
Verdict: approve — no critical or important issues found.
{
"verdict": "approve",
"summary": "New slash command adds solid task-refinement workflow reusing the existing task-auditor subagent. No critical or important issues found; two nits raised around Bash being listed in allowed-tools without being used, and the hardcoded Glob pattern being vault-configuration-dependent.",
"comments": [
{
"file": "commands/refine-task.md",
"line": 8,
"severity": "nit",
"message": "allowed-tools includes 'Bash' but the command process shows no Bash invocation (only Task, Read, Edit, Glob, AskUserQuestion). Either remove Bash or document where it's used."
},
{
"file": "commands/refine-task.md",
"line": 23,
"severity": "nit",
"message": "Glob pattern '24 Tasks/*<arg>*.md' is hardcoded and vault-configuration-dependent. If the vault root from config.yaml differs, the glob will silently fail to find tasks."
}
],
"concerns_addressed": [
"correctness: Loop exit conditions (score ≥ 8 OR unresolvable gaps) provide reliable termination per commands/refine-task.md:68-72",
"correctness: Edit calls target the resolved task file path from step 1, not other files",
"security: Bash is listed in allowed-tools but not invoked — raised as nit rather than security issue since no execution occurs",
"correctness: Glob pattern '24 Tasks/*<arg>*.md' is hardcoded — raised as nit; command does respect config.yaml vault root",
"tests: Slash command .md files are documentation/descriptors, not Go code requiring unit tests"
]
}
Summary
/vault-cli:refine-task <id>slash command that conversationally refines task substance: invokestask-auditor, translates findings into numbered questions (max 3/turn, no either/or), applies user answers, re-audits, loops until score ≥ 8.task-auditoragent for read-only judgment; refine-task is the write-back wrapper.work-on-taskandcreate-taskso the refinement step is discoverable in the task lifecycle.Why
Today
/vault-cli:work-on-taskis content-agnostic by design — it sets status and finds guides, it does not question task substance. When a task isn't ready (weak DoD, vague subtasks, scope creep, goal-orphan), there's no purpose-built path to fix it:audit-taskis read-only; noimprove-taskskill in vault-cli;grill-meis generic without write-back.refine-taskfills the gap betweencreate-task(first draft) andwork-on-task(start work).Test plan
# Items→# Tasks, add Definition of Done)make precommitgreen (mods, format, tests, lint, vet, vulnerability scans, license headers)commands/work-on-task.md+commands/create-task.md(verifiable via grep)