Skip to content

feat: add complete PR workflow commands and enhance audit system#17

Merged
dean0x merged 8 commits intomainfrom
feat/complete-workflow-commands
Nov 3, 2025
Merged

feat: add complete PR workflow commands and enhance audit system#17
dean0x merged 8 commits intomainfrom
feat/complete-workflow-commands

Conversation

@dean0x
Copy link
Owner

@dean0x dean0x commented Nov 2, 2025

Complete PR Workflow Commands and Enhanced Audit System

This PR adds a comprehensive set of workflow commands to streamline the entire pull request lifecycle, from planning to creation to review resolution. It also restructures the audit system to provide clearer, more actionable feedback focused on changes actually made in the PR.

Summary

DevFlow now provides a complete workflow from idea to merged PR:

  1. Plan tasks interactively with design decisions (/plan)
  2. Implement systematically with user guidance (/implement)
  3. Review code with focused audits (/code-review)
  4. Create PRs with smart descriptions (/pull-request)
  5. Resolve reviewer feedback systematically (/resolve-comments)

The audit system has been refactored to categorize findings into three clear priorities: blocking issues in your changes, issues in code you touched, and pre-existing informational issues.

Key Changes

New Workflow Commands

/plan - Interactive Planning with Design Decisions

  • Extracts actionable tasks from discussion
  • Presents tasks to user for selection via interactive UI
  • Saves chosen tasks to todo list
  • Enables focused, intentional work sessions

/pull-request - Smart PR Creation

  • Analyzes all commits and changes in branch
  • Generates comprehensive PR description automatically
  • Includes summary, key changes, and test plan
  • Supports --draft flag and custom base branch
  • Uses new pull-request sub-agent for deep analysis

/resolve-comments - Systematic Review Resolution

  • Fetches PR review comments via GitHub CLI
  • Triages comments with user (implement, respond, defer)
  • Implements changes and updates PR
  • Posts replies to reviewers
  • Tracks completion status

Refactored Audit System

Three-Category Reporting (all 9 audit agents updated):

  • 🔴 Issues in Your Changes - NEW vulnerabilities/problems introduced (BLOCKING)
  • ⚠️ Issues in Code You Touched - Problems near your changes (SHOULD FIX)
  • ℹ️ Pre-existing Issues - Legacy problems unrelated to PR (INFORMATIONAL)

Enhanced /code-review Command:

  • Orchestrates all audit sub-agents in parallel
  • Synthesizes findings from three-category reports
  • Generates actionable summary with clear priorities
  • Separates blocking issues from informational findings
  • Provides focused feedback on what actually needs fixing

Type Safety Improvements

Node.js Error Handling (src/cli/commands/init.ts):

  • Added NodeSystemError interface with proper typing
  • Created isNodeSystemError() type guard function
  • Replaced error: any with error: unknown (2 instances)
  • Safely checks error.code property with type guard
  • Maintains runtime behavior while improving type safety

Documentation Updates

README.md:

  • Added documentation for new workflow commands
  • Fixed CLI command examples (devflow → npx devflow-kit)
  • Reorganized command sections for better flow

Test Plan

New Commands

  • Run /plan after a discussion and verify task selection UI
  • Run /pull-request on a branch and verify PR creation
  • Run /resolve-comments on a PR with feedback
  • Run /code-review and verify three-category reporting

Type Safety

  • Run npm run build and verify no TypeScript errors
  • Run npx devflow-kit init when settings.json exists

Breaking Changes

None. All changes are additive.

Files Changed

  • Commands Added: /plan, /pull-request, /resolve-comments (3)
  • Agents Added: pull-request (1)
  • Agents Modified: All 9 audit agents refactored
  • CLI Modified: Type safety improvements in init.ts
  • Documentation: README updated with corrected examples

Total: 17 files, +3143/-2070 lines

🤖 Generated with Claude Code

Dean Sharon and others added 8 commits October 29, 2025 19:26
Add three new workflow commands to streamline PR creation and review:
- /plan: Extract and let user select tasks from discussion
- /pull-request: Create PR with auto-generated description
- /resolve-comments: Systematically address PR review feedback

Also add pull-request sub-agent for comprehensive PR analysis.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Restructure all 9 audit sub-agents to categorize findings into:
- 🔴 Issues in your changes (BLOCKING)
- ⚠️ Issues in code you touched (SHOULD FIX)
- ℹ️ Pre-existing issues (INFORMATIONAL)

This provides clearer focus on what must be fixed before merge
vs. what can be deferred to separate PRs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Completely rewrite /code-review to:
- Orchestrate all audit sub-agents in parallel
- Synthesize findings from new three-category reports
- Generate actionable summary with clear priorities
- Separate blocking issues from informational findings

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Update init.ts to install new workflow commands.
Update plan-next-steps to remove unused tool references.
Update README.md with documentation for new commands.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix README CLI examples (devflow → npx devflow-kit)
- Add Prerequisites section to /resolve-comments (gh CLI dependency)
- Add Edge Cases section to /plan (cancellation, empty selection)
- Add Troubleshooting section to /pull-request (error recovery)

Addresses critical documentation gaps identified in code review.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Update CLI examples to use correct npx invocation:
- devflow init → npx devflow-kit init
- devflow uninstall → npx devflow-kit uninstall

Package is published as devflow-kit, so users need npx prefix.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add NodeSystemError interface and type guard function to safely
check error.code property instead of using unsafe 'any' type.

Changes:
- Add isNodeSystemError() type guard function
- Replace error: any with error: unknown (2 instances)
- Use type guard before accessing error.code property

Improves type safety without changing runtime behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@dean0x dean0x merged commit 08d8cb6 into main Nov 3, 2025
@dean0x dean0x deleted the feat/complete-workflow-commands branch December 3, 2025 08:34
dean0x pushed a commit that referenced this pull request Mar 14, 2026
Batch 1 — Mechanical fixes:
- Fix duplicate step 5→6 in 4 explorer prompts (implement-teams.md)
- Fix fractional 2.5→3 renumbering in 4 reviewer prompts (code-review-teams.md)
- Fix fractional 1.5→2 renumbering in reviewer.md responsibilities
- Update stale counts: 24→31 skills, 8→17 plugins (file-organization.md)
- Add missing ambient-prompt.sh to hooks listing (file-organization.md)

Batch 2 — DRY extraction via knowledge-persistence skill:
- Create shared/skills/knowledge-persistence/SKILL.md with canonical procedure
  (ADR/PF formats, lock protocol, capacity cap, dedup, TL;DR update)
- Replace 8 inline extraction procedures with skill references in
  implement, code-review, debug, resolve (base + teams variants)
- Register skill in 4 plugin manifests (plugin.json + plugins.ts)

Batch 3 — Hook improvements:
- Collapse head+sed+grep into single sed -n for TL;DR extraction
- Guard section joins to prevent leading newlines when Section 1 skipped

Batch 4 — Quick fixes:
- Add TL;DR-only rationale comment to skimmer.md step 6
- Log createMemoryDir errors in verbose mode instead of silent catch
- Add 3 hook integration tests (TL;DR injection, no leading newlines,
  no knowledge section when files absent)

Issues dismissed: #9 (TL;DR sanitization — trust model), #10 (integrity
verification — instruction-enforced), #17 (mkdir failure test — low value),
#18 (phase ordering cosmetic), #19 (intentional scope exclusion)
dean0x pushed a commit that referenced this pull request Mar 14, 2026
…eMemoryDir failure test

- /specify: Add Phase 2.5 to read decisions.md + pitfalls.md before
  exploration. Constraints and Failure Modes explorers now receive
  prior decisions and known pitfalls as context.
- /self-review: Phase 0 reads knowledge files. Simplifier and
  Scrutinizer receive KNOWLEDGE_CONTEXT to check for reintroduced
  pitfall patterns and verify architectural consistency.
- Add createMemoryDir failure test (file blocking mkdir path).

Resolves review issues #17 and #19 from PR #140.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant