feat(swarm): configurable base branch and auto-generate vBRIEFs from GitHub issues (#373)#374
Conversation
…GitHub issues (#373) - Add configurable base branch support in Phase 0, Phase 2, Phase 6, prompt template, and crash recovery - Add auto-generate vBRIEFs from GitHub issues as alternative work-item source in Phase 0 - Fix broken See also link to deft-directive-review-cycle - Add tests for new swarm skill features
Greptile SummaryThis PR adds configurable base branch support (replacing hardcoded Confidence Score: 5/5Safe to merge — all prior P0/P1 schema-field bugs are resolved and task check passes at 1414 tests. All three previously-flagged blocking issues are fixed. Only two P2 style suggestions remain: a redundant local re import and missing regression assertions for the fixed schema field names. Neither affects runtime correctness. tests/content/test_skills.py — minor style nit (redundant import) and a coverage gap for the schema-field regression tests. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A([Phase 0 Start]) --> S0{Step 0: Work-Item Source?}
S0 -->|Option A: existing vBRIEFs| S1[Step 1: Read Project State]
S0 -->|Option B: GitHub issue numbers| GH[gh issue view N --json ...]
GH --> GEN[Generate minimal vBRIEF scaffold\nvbrief/active/YYYY-MM-DD-slug.vbrief.json\nstatus=running, plan.narratives, plan.references]
GEN --> S1
S1 --> BB[Ask user: configured base branch\ndefault: master]
BB --> S2[Step 2: Surface Blockers]
S2 --> S3[Step 3: Plan Allocation]
S3 --> S4[Step 4: Present Analysis]
S4 --> S5{Step 5: User Approval}
S5 -->|approved| P1([Phase 1 - Select])
S5 -->|changes requested| S3
P1 --> P2_S1[Phase 2 Step 1: git worktree add using configured-base-branch]
P2_S1 --> P6_S1[Phase 6 Step 1: Rebase cascade onto configured base branch]
P6_S1 --> P6_S3[Phase 6 Step 3: git pull origin configured-base-branch]
Prompt To Fix All With AIThis is a comment left during a code review.
Path: tests/content/test_skills.py
Line: 1523-1524
Comment:
**Redundant local `import re` shadows module-level import**
`re` is already imported at the module level (line 15). The `import re as _re` inside the function body is unnecessary and adds confusion about why a different alias is used.
```suggestion
old_refs = re.findall(r'(?<!directive-)deft-review-cycle/SKILL\.md', text)
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: tests/content/test_skills.py
Line: 1553-1561
Comment:
**No regression tests for the three previously fixed schema field names**
The three issues addressed in the follow-up fix commit (`"id": "#<N>"` prefix, `plan.narratives` plural, and `plan.references` prefix) have no automated coverage in section 37. A future edit to the scaffold spec could silently re-introduce any of these without a failing test. Consider extending `test_deft_directive_swarm_auto_generate_vbriefs_from_issues` with assertions like:
```python
assert 'plan.narratives' in text, ...
assert 'plan.references' in text, ...
assert '"#' in text, ... # id requires '#' prefix
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (4): Last reviewed commit: "fix: address Greptile review findings (b..." | Re-trigger Greptile |
5a0eeb4 to
372d48c
Compare
- Fix reference id format: use '#<N>' prefix to match reconcile_issues.py ISSUE_ID_PATTERN - Fix 7 stale skills/deft-review-cycle/SKILL.md paths to skills/deft-directive-review-cycle/SKILL.md - Fix See also link display text: deft-review-cycle -> deft-directive-review-cycle - Add root-relative path assertion to See also link test
372d48c to
2dc341c
Compare
Summary
Configurable base branch and auto-generate vBRIEFs from GitHub issues for deft-directive-swarm skill.
Closes #373
Parent: #338
Changes
Task A -- Fix broken See also link (pre-existing failure)
../deft-review-cycle/SKILL.mdto../deft-directive-review-cycle/SKILL.mdon line 16 -- fixes the one failing test intask checkTask B -- Configurable base branch (#373 item 1)
<configured-base-branch>instead of hardcodedmastergit pull origin <configured-base-branch>origin/<configured-base-branch>referencesmasterTask C -- Auto-generate vBRIEFs from GitHub issues (#373 item 2)
gh issue view, generates minimal vBRIEF scaffolds invbrief/active/conforming to v0.5 schema withgithub-issuereference provenanceTests
tests/content/test_skills.pyChecklist
task checkpasses (1414 passed, 2 xfailed)