Skip to content

fix: statusline path resolution + audit report formalization#14

Merged
dean0x merged 5 commits intomainfrom
fix/statusline-path-and-refinements
Oct 18, 2025
Merged

fix: statusline path resolution + audit report formalization#14
dean0x merged 5 commits intomainfrom
fix/statusline-path-and-refinements

Conversation

@dean0x
Copy link
Copy Markdown
Owner

@dean0x dean0x commented Oct 18, 2025

Summary

This PR fixes the statusline script execution issue and formalizes the audit report storage structure across all agents. Additionally, it enhances the release agent with documentation verification and persistent release notes.

🔧 Bug Fixes

Statusline Path Resolution

Problem: Statusline script failed to execute because settings.json used ~/.devflow/scripts/statusline.sh but Claude Code doesn't expand tilde (~).

Solution: init.ts now reads the settings template and dynamically replaces ~ with the actual absolute path during installation.

Files Changed:

  • src/cli/commands/init.ts - Template processing with path replacement

Impact: Statusline now works correctly on all installations.

✨ Features

1. Release Agent Enhancements

Release Notes Persistence:

  • Saves comprehensive release notes to .docs/releases/RELEASE_NOTES_v<version>.md
  • Includes version bump, changelog, commit history, build/test results, and distribution links

Documentation Verification:

  • Checks ROADMAP.md for features to mark complete
  • Verifies version references across all READMEs (monorepo support)
  • Validates installation instruction consistency
  • Confirms CHANGELOG.md has proper version entries and links
  • Scans docs/ directories for outdated version references
  • Provides search-and-replace commands for fixing mismatches

Files Changed:

  • src/claude/agents/devflow/release.md - Added Steps 13-14
  • src/cli/commands/init.ts - Creates .docs/releases/ directory

2. Audit Report Formalization

Standardized Directory Structure:

.docs/audits/
├── <branch-name>/
│   ├── security-report.<timestamp>.md
│   ├── performance-report.<timestamp>.md
│   ├── architecture-report.<timestamp>.md
│   ├── tests-report.<timestamp>.md
│   ├── complexity-report.<timestamp>.md
│   ├── dependencies-report.<timestamp>.md
│   ├── documentation-report.<timestamp>.md
│   ├── typescript-report.<timestamp>.md (if applicable)
│   ├── database-report.<timestamp>.md (if applicable)
│   └── comprehensive-review.<timestamp>.md
└── standalone/
    └── <audit-type>-report.<timestamp>.md

Orchestration Updates:

  • /code-review command creates branch-specific audit directories
  • Passes CURRENT_BRANCH, AUDIT_BASE_DIR, TIMESTAMP to all sub-agents
  • Saves comprehensive review to branch directory
  • Lists all individual audit report paths in final summary

Agent Standardization (all 9 audit agents):

  • audit-security.md
  • audit-performance.md
  • audit-architecture.md
  • audit-complexity.md
  • audit-tests.md
  • audit-dependencies.md
  • audit-documentation.md
  • audit-typescript.md
  • audit-database.md

Each agent now:

  • Receives orchestrator variables
  • Saves to branch-specific location when invoked by /code-review
  • Falls back to .docs/audits/standalone/ for direct invocations
  • Uses consistent report structure with severity sections

Benefits:

  • ✅ Organized by branch for tracking multiple reviews
  • ✅ Timestamped for historical tracking and comparison
  • ✅ Consistent naming across all audit types
  • ✅ Supports both orchestrated and standalone invocations
  • ✅ Easy audit artifact discovery and archival

3. Production Build Standards

Added comprehensive production build and test safety standards to src/claude/CLAUDE.md:

  • Separate dev/prod build configurations
  • Test suite safety (sequential execution, memory limits)
  • Production artifact exclusion (no tests, sourcemaps, debug symbols)
  • Build optimization best practices

📊 Impact

Lines Changed: 1024 insertions, 40 deletions across 13 files

Token Efficiency:

  • Audit agents now have clear, consistent storage logic
  • Reduced duplication across agent implementations

Developer Experience:

  • Statusline works immediately after installation
  • Release process catches documentation drift
  • Audit reports are organized and discoverable
  • Historical audit comparison now possible

🧪 Testing

  • ✅ Built successfully (npm run build)
  • ✅ Verified statusline path replacement logic
  • ✅ Tested audit directory creation during init
  • ✅ Confirmed all 9 audit agents have consistent Report Storage sections
  • ✅ Validated release agent documentation verification steps

📝 Related Issues

  • Part of statusline refinements discussion
  • Addresses audit report organization needs
  • Resolves release notes persistence request

🚀 Next Steps After Merge

  1. Test installation with npx devflow-kit@latest init
  2. Verify statusline execution
  3. Run /code-review on a branch to test audit report organization
  4. Prepare v0.3.3 patch release

🤖 Generated with Claude Code

Dean Sharon and others added 5 commits October 18, 2025 20:59
- Release agent now saves comprehensive release notes to .docs/releases/<version>.md
- Verifies documentation alignment (ROADMAP, READMEs, CHANGELOG)
- Checks version references across all documentation files
- Detects monorepo subpackages and verifies installation instruction consistency
- Provides search-and-replace commands for fixing version mismatches
- Create .docs/releases/ directory during init
- Fix statusline path to use absolute path instead of tilde (~)

Addresses:
- Release notes persistence for historical tracking
- Documentation drift detection
- Monorepo documentation consistency
- Statusline execution issues with tilde expansion

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

Co-Authored-By: Claude <noreply@anthropic.com>
…ctions

- Add Production Build Optimization section
  - Never ship test files, debug symbols, or sourcemaps to production
  - Separate dev/prod build configurations
  - Build script structure guidelines

- Add Test Suite Safety section
  - Configure tests to run sequentially to prevent crashes
  - Memory limits and resource cleanup requirements
  - Framework-specific configuration flags

- Reorganize test quality standards under new Testing & Build Standards section

These additions prevent common production and testing issues across all projects.

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

Co-Authored-By: Claude <noreply@anthropic.com>
…rsion>.md)

Changed release notes filename from:
  .docs/releases/0.3.0.md

To standardized format:
  .docs/releases/RELEASE_NOTES_v0.3.0.md

This makes release notes files more identifiable and follows common conventions.

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

Co-Authored-By: Claude <noreply@anthropic.com>
Standardized audit report storage for better organization and tracking:

**Directory Structure:**
```
.docs/audits/
├── <branch-name>/
│   ├── security-report.<timestamp>.md
│   ├── performance-report.<timestamp>.md
│   ├── architecture-report.<timestamp>.md
│   ├── tests-report.<timestamp>.md
│   ├── complexity-report.<timestamp>.md
│   ├── dependencies-report.<timestamp>.md
│   ├── documentation-report.<timestamp>.md
│   ├── typescript-report.<timestamp>.md (if applicable)
│   ├── database-report.<timestamp>.md (if applicable)
│   └── comprehensive-review.<timestamp>.md
└── standalone/
    └── <audit-type>-report.<timestamp>.md
```

**Changes:**

1. **code-review command:**
   - Sets up audit directory per branch
   - Passes AUDIT_BASE_DIR and TIMESTAMP to all sub-agents
   - Saves comprehensive review to branch-specific directory
   - Lists all individual audit report paths in final summary

2. **audit-security agent (template):**
   - Standardized report storage section
   - Expects variables from orchestrator
   - Structured report template
   - Fallback to standalone path if invoked directly

3. **init command:**
   - Creates .docs/audits/standalone/ directory
   - Ready for both orchestrated and standalone audits

**Benefits:**
- Organized by branch (easier to track multiple reviews)
- Timestamped for historical tracking
- Consistent naming across all audit types
- Supports both orchestrated and standalone invocations

**Next:** Apply same pattern to other audit-* agents

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

Co-Authored-By: Claude <noreply@anthropic.com>
Apply consistent Report Storage pattern to all 9 audit agents:
- audit-security.md
- audit-performance.md
- audit-architecture.md
- audit-complexity.md
- audit-tests.md
- audit-dependencies.md
- audit-documentation.md
- audit-typescript.md
- audit-database.md

Each agent now:
- Receives CURRENT_BRANCH, AUDIT_BASE_DIR, TIMESTAMP from /code-review
- Saves to .docs/audits/<branch>/<type>-report.<timestamp>.md
- Falls back to .docs/audits/standalone/ for standalone runs
- Uses consistent report structure with severity sections
- Provides specific score and merge recommendation

This enables:
- Branch-specific audit history
- Timestamped audit reports for tracking over time
- Easy comparison of audits across commits
- Organized audit artifacts separate from code

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

Co-Authored-By: Claude <noreply@anthropic.com>
@dean0x dean0x merged commit 6622056 into main Oct 18, 2025
@dean0x dean0x deleted the fix/statusline-path-and-refinements branch October 18, 2025 22:39
dean0x pushed a commit that referenced this pull request Apr 16, 2026
Review walkthrough across 4 sessions resolved all 31 issues from the
2026-04-15_1022 code review (19 fixed, 5 rejected, 1 deferred, 6
pre-resolved).

Blocking fixes (sessions 1-2):
- CHANGELOG contradiction rewritten (#1)
- Worktree placeholder unified on "{worktree}" across 11 sites (#3)
- /debug migrated to index pattern (#4)
- KNOWLEDGE_CONTEXT quoting standardized, no inline fallback (#6)
- apply-knowledge skill defers to footer for paths (#7)
- Simplifier dropped from knowledge consumers; 4 agents canonicalized (#8)
- lstat+isFile guard on legacy-knowledge-purge unlink (#9)

Architecture + consistency fixes (session 2):
- Bare-form CLI removed, dispatch simplified to index-only (#10)
- code-review-teams template+table extraction (#12)
- Designer Apply Knowledge H2 added (#13)
- Teams phase numbering aligned (#14)
- loadKnowledgeContext + full subcommand removed entirely (#16)

Complexity + performance + testing + docs fixes (sessions 3-4):
- D-A filter extracted to isDeprecatedOrSuperseded predicate (#18)
- formatAdrLine/formatPfLine merged into formatEntryLine (#19)
- Shared test fixtures extracted to tests/knowledge/fixtures.ts (#21)
- Token claim "~250 tokens" dropped from 12 sites (#22)
- tmpdir cleanup added to test fixtures (#25)
- self-learning.md example and footer paths corrected (#28, #29)

28 files changed, 333 insertions, 524 deletions. 1021/1021 tests passing.
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