feat(implement-task): add description digest verification step#138
Conversation
Reviewer's GuideAdds a description digest verification step to the implement-task skill, including Jira comment retrieval with REST API fallback, protocol updates for digest selection, and new eval cases to cover no-digest, matching, and mismatched-digest scenarios. Sequence diagram for description digest verification in implement-tasksequenceDiagram
actor User
participant ImplementTaskSkill
participant Jira
User->>ImplementTaskSkill: run implement-task
ImplementTaskSkill->>Jira: jira.get_issue(<jira-issue-id>)
ImplementTaskSkill->>Jira: jira.get_issue_comments(<jira-issue-id>)
Jira-->>ImplementTaskSkill: comments
alt [no comment body starts with marker]
ImplementTaskSkill-->>ImplementTaskSkill: log warning "No description digest found"
ImplementTaskSkill-->>User: proceed with normal task implementation
else [one or more comments match marker]
ImplementTaskSkill-->>ImplementTaskSkill: select most recent by created
ImplementTaskSkill-->>ImplementTaskSkill: parse sha256 hex digest
ImplementTaskSkill-->>ImplementTaskSkill: compute SHA-256 of current description
alt [digests match]
ImplementTaskSkill-->>User: proceed silently with implementation
else [digests mismatch]
ImplementTaskSkill-->>User: display expected vs actual digest
ImplementTaskSkill-->>User: ask proceed or stop
Note over ImplementTaskSkill: stop execution until user responds
end
end
Flow diagram for Step 1.5 description integrity verificationflowchart TD
A[Start Step 1.5<br/>Verify Description Integrity] --> B[Retrieve issue comments<br/>jira.get_issue_comments]
B --> C[Filter comments whose body starts with marker]
C --> D{Any matching<br/>digest comments?}
D -- No --> E[Log warning<br/>"No description digest found"]
E --> F[Proceed with normal execution]
D -- Yes --> G[Select most recent comment<br/>by created timestamp]
G --> H{updated > created?}
H -- Yes --> I[Warn: digest comment was edited]
H -- No --> J[Skip edit warning]
I --> K[Extract sha256 hex digest]
J --> K
K --> L[Compute SHA-256 of current description]
L --> M{Digests match?}
M -- Yes --> F
M -- No --> N[Alert user with expected and actual digests]
N --> O[Ask user: Proceed or Stop]
O --> P[Stop execution until user responds]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In Step 1.5, please clarify how to handle multiple digest comments on the same Jira issue (e.g., choose the most recent, or one tied to a specific run) so the implementation is deterministic.
- The REST fallback command
jira.get_issue_comments(id) → python3 scripts/jira-client.py get_comments <id>should be checked to ensure the CLI output format matches what the MCP-based comment parsing logic expects (e.g., timestamps and body fields). - Consider explicitly specifying in Step 1.5 that the user-facing warnings/prompts (no digest, edited digest comment, mismatch decision) should use the same logging/prompt mechanisms as other steps, to keep UX consistent and avoid ad-hoc messaging in the implementation.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In Step 1.5, please clarify how to handle multiple digest comments on the same Jira issue (e.g., choose the most recent, or one tied to a specific run) so the implementation is deterministic.
- The REST fallback command `jira.get_issue_comments(id) → python3 scripts/jira-client.py get_comments <id>` should be checked to ensure the CLI output format matches what the MCP-based comment parsing logic expects (e.g., timestamps and body fields).
- Consider explicitly specifying in Step 1.5 that the user-facing warnings/prompts (no digest, edited digest comment, mismatch decision) should use the same logging/prompt mechanisms as other steps, to keep UX consistent and avoid ad-hoc messaging in the implementation.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Eval Results
Eval Results: implement-task
| Eval | Passed | Failed | Pass Rate |
|---|---|---|---|
| eval-1 | 10/10 | 0 | 100% |
| eval-2 | 5/5 | 0 | 100% |
| eval-3 | 6/6 | 0 | 100% |
| eval-4 | 6/6 | 0 | 100% |
| eval-5 | 7/7 | 0 | 100% |
| eval-6 | 4/4 | 0 | 100% |
| eval-7 | 5/5 | 0 | 100% |
Pass rate: 100% · Tokens: 40,085 · Duration: 101s
Baseline (0cdded7): 100% · 25,398 tokens · 91s
Delta from baseline
| Metric | Baseline | Current | Delta |
|---|---|---|---|
| Pass rate | 100% | 100% | — |
| Evals | 5 | 7 | +2 new |
| Assertions | 33 | 49 | +16 |
| Tokens (mean) | 25,398 | 40,085 | +57.8% |
| Duration (mean) | 91s | 101s | +10.9% |
New evals
- eval-6 (digest match): Tests Step 1.5 description digest verification when the digest matches — verifies the skill proceeds silently without user prompt (4 assertions, all pass)
- eval-7 (digest mismatch): Tests Step 1.5 description digest verification when the digest does not match — verifies the skill alerts the user, displays expected vs actual digests, and stops execution (5 assertions, all pass)
Notes
- Eval 1 gained 1 new assertion (10 vs baseline's 9): the description digest backward-compatibility check (Step 1.5 — no digest found, proceed with warning)
- Token increase is expected: 2 new evals added to the suite, and eval 6 includes a full implementation plan alongside the digest verification output
- Duration increase is modest (+10s mean) despite 40% more evals, indicating efficient parallel execution
Generated by sdlc-workflow/run-evals v0.9.1
Verification Report for TC-4286 (commit 8abcbf1)
Overall: PASSAll checks pass. The PR adds Step 1.5 (Verify Description Integrity) to implement-task with correct handling of all three digest scenarios, references the shared protocol, and includes eval coverage for each scenario. CI passes at 100% eval pass rate. This comment was AI-generated by sdlc-workflow/verify-pr v0.9.1. |
Body-Level Review Comment ClassificationThe previous Classified Comments
Classification ReasoningComment 1 — "please clarify" is directive language requesting a specific code change. Step 1.5 item 2 says "search for a comment" (singular) without specifying behavior when multiple digest comments exist. The Comment 2 — "should be checked" is advisory. The skill documents the semantic operation ( Comment 3 — "Consider" is explicit suggestion language. No other step in the skill prescribes exact logging/prompt mechanisms. The current approach (describe what to display, let the implementation handle formatting) is consistent with the rest of the skill. Supplemental body-level review classification by sdlc-workflow/verify-pr v0.9.1. |
|
@sourcery-ai review |
Add Step 1.5 to verify description integrity by checking the SHA-256 digest posted by plan-feature against the current description content. Handles three scenarios: no digest (warn and proceed), matching digest (proceed silently), and mismatched digest (alert user and pause). Also adds REST API fallback for comment retrieval and three new eval assertions covering all digest verification scenarios. Implements TC-4286 Assisted-by: Claude Code
Specify that when multiple digest comments match the marker string, the consumer selects the most recent one by created timestamp. Also document this edge case in the shared protocol. Implements TC-4566 Assisted-by: Claude Code
Summary
createdtimestamp (TC-4566)Implements TC-4286
Test plan
/sdlc-workflow:run-evals implement-task)/sdlc-workflow:implement-taskon a task with a digest comment🤖 Generated with Claude Code
Summary by Sourcery
Add a description digest integrity verification step to the implement-task workflow and document the digest consumption protocol, including handling of multiple digest comments and REST fallbacks for Jira access.
New Features:
Enhancements:
Tests: