Skip to content

feat(claude): C7-C11 checks + watch daemon (v7.13.0)#475

Merged
Data-Wise merged 3 commits into
devfrom
feature/flow-claude-v2
Jun 19, 2026
Merged

feat(claude): C7-C11 checks + watch daemon (v7.13.0)#475
Data-Wise merged 3 commits into
devfrom
feature/flow-claude-v2

Conversation

@Data-Wise

Copy link
Copy Markdown
Owner

Summary

  • C4 two-tier threshold: >100 lines → WARN "approaching limit"; >180 → ERROR "exceeds hard limit" (was a single >100 WARN)
  • C7 per-project CLAUDE.md audit: scans $FLOW_CLAUDE_PROJECTS_ROOT (depth 4); warns on overlength files or stale version refs
  • C8 orphaned memory dirs: slug-decodes ~/.claude/projects/ entries; warns on dirs whose decoded path no longer exists
  • C9 rules drift: warns on any ~/.claude/rules/*.md stem not referenced in the main CLAUDE.md
  • C10 missing hook files: errors on absolute-path hook scripts listed in settings.json that aren't on disk
  • C11 plugin health: warns on ~/.claude/plugins/*/plugin.json that's missing or invalid JSON
  • flow claude watch [--interval N] [--stop] [--status]: background daemon writing state JSON, firing terminal-notifier desktop notifications on status transitions; gracefully absent on Linux

All injectable via FLOW_CLAUDE_HOME / FLOW_CLAUDE_ZSHRC / FLOW_CLAUDE_PROJECTS_ROOT for test isolation.

Test plan

  • ./tests/run-all.sh — 66 passed, 0 failed, 0 timeout, 1 skipped (67/67 suites)
  • tests/test-flow-claude.zsh — 39 passed, 6 skipped (tool-absent), 0 failed
  • C4 two-tier: 95-line file → pass; 150-line → WARN; 200-line → ERROR
  • Watch notify: PATH-based mock verifies terminal-notifier called on state change
  • Watch stop: pid file created and removed correctly, HOME restored after test
  • C3 memory test: slug encoded from _TC_TMP path to avoid spurious C8 WARN

🤖 Generated with Claude Code

Test User and others added 3 commits June 19, 2026 11:39
C4 two-tier fix + C7-C11 new checks + flow claude watch daemon.
5-wave implementation plan with test list and verification steps.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Extends `flow claude check` with:
- C4 two-tier threshold: >100 lines → WARN, >180 → ERROR
- C7 per-project CLAUDE.md audit (line count + version drift)
- C8 orphaned memory dir detection (slug decode)
- C9 rules drift (unreferenced rules in CLAUDE.md)
- C10 missing hook file detection from settings.json
- C11 plugin.json health check
- `flow claude watch [--interval N] [--stop] [--status]`
  background daemon with desktop notifications on state change

Tests: 39 passed, 6 skipped (tool-absent), 0 failed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- CHANGELOG.md + docs/CHANGELOG.md: [Unreleased] section documenting
  C4 two-tier, C7-C11 checks, and flow claude watch daemon
- CLAUDE.md: 218→219 test files, 66/66→67/67 suites
- docs/guides/TESTING.md: 218→219 test files (table + footer)
- completions/_flow: watch subcommand + options (--interval, --stop, --status)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Data-Wise Data-Wise merged commit 30760d4 into dev Jun 19, 2026
2 checks passed
@Data-Wise Data-Wise deleted the feature/flow-claude-v2 branch June 19, 2026 18:29
Data-Wise added a commit that referenced this pull request Jun 19, 2026
* chore: mark v7.12.0 released in .STATUS

* docs(spec): flow claude v2 — C7-C11 checks + watch daemon

Adds SPEC-flow-claude-v2.md covering:
- C4 two-tier threshold (warn >100, error >180)
- C7: per-project CLAUDE.md line count + version drift
- C8: orphaned ~/.claude/projects/ memory dirs
- C9: unreferenced rules in ~/.claude/rules/
- C10: hooks in settings.json pointing to missing scripts
- C11: plugin dirs missing valid plugin.json
- flow claude watch: 30-min background daemon, terminal-notifier on
  WARN/ERROR state change, --stop/--status subcommands

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(.STATUS): add feature/flow-claude-v2 worktree entry

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(claude): C7-C11 checks + watch daemon (v7.13.0) (#475)

* chore: add ORCHESTRATE plan for flow claude v2

C4 two-tier fix + C7-C11 new checks + flow claude watch daemon.
5-wave implementation plan with test list and verification steps.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(claude): C4 two-tier + C7-C11 checks + watch daemon

Extends `flow claude check` with:
- C4 two-tier threshold: >100 lines → WARN, >180 → ERROR
- C7 per-project CLAUDE.md audit (line count + version drift)
- C8 orphaned memory dir detection (slug decode)
- C9 rules drift (unreferenced rules in CLAUDE.md)
- C10 missing hook file detection from settings.json
- C11 plugin.json health check
- `flow claude watch [--interval N] [--stop] [--status]`
  background daemon with desktop notifications on state change

Tests: 39 passed, 6 skipped (tool-absent), 0 failed

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs(claude): Wave 5 — CHANGELOG, test counts, completions for v7.13.0

- CHANGELOG.md + docs/CHANGELOG.md: [Unreleased] section documenting
  C4 two-tier, C7-C11 checks, and flow claude watch daemon
- CLAUDE.md: 218→219 test files, 66/66→67/67 suites
- docs/guides/TESTING.md: 218→219 test files (table + footer)
- completions/_flow: watch subcommand + options (--interval, --stop, --status)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Test User <test@example.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs(claude): document C4 two-tier threshold, C7-C11 checks, and watch daemon

Add C7-C11 rows to the checks table (per-project CLAUDE.md, orphaned
memory dirs, rules drift, missing hook files, plugin health), update C4
to show the two-tier threshold (>100 WARN, >180 ERROR), and add Watch
Daemon section covering flow claude watch --interval/--stop/--status.
Mirror all changes in tutorial 49. Bump both to v7.13.0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(docs): add text language to bare code fences in claude docs

Fixes MD040 markdownlint errors introduced by the C7-C11/watch daemon
doc update — 14 output blocks in tutorial 49 and 1 in the commands
page were missing the text language specifier. Also fixes MD049
underscore emphasis → asterisk.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: bump version to v7.13.0

- flow.plugin.zsh, package.json, CLAUDE.md, man pages → 7.13.0
- CHANGELOG.md + docs/CHANGELOG.md: 7.13.0 date stamped (2026-06-19)
- docs/CHANGELOG.md: inserted missing 7.12.0 entry
- MASTER-DISPATCHER-GUIDE.md: version footer → v7.13.0
- .STATUS: phase → Release Pending (v7.13.0)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Test User <test@example.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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