Skip to content

v1.0.16 - Bidirectional Reference Architecture

Choose a tag to compare

@khgs2411 khgs2411 released this 03 Oct 14:36
· 161 commits to master since this release

Release v1.0.16 - Bidirectional Reference Architecture

Released: 2025-10-03

🎉 Major Feature: Complete Bidirectional Reference System

This release implements a comprehensive three-layer bidirectional reference architecture that ensures AI agents always consult the framework before making structural changes to PLAN.md files.

Core Principle

DEVELOPMENT_FRAMEWORK.md is the single source of truth for all patterns, rules, and conventions. All other documents (PLAN.md headers, CLAUDE.md detection logic, slash commands) reference the framework rather than duplicating its content.


✨ New Features

1. PLAN.md Header Framework References

  • Files: All PLAN.md files created by /flow-blueprint and /flow-migrate
  • Impact: Every new plan file includes a prominent header warning AI agents to consult the framework
  • Benefit: Prevents structural mistakes before they happen

Example:

> **📖 Framework Guide**: See DEVELOPMENT_FRAMEWORK.md for methodology and patterns
>
> **⚠️ IMPORTANT**: Before making structural changes to this PLAN.md, consult DEVELOPMENT_FRAMEWORK.md to understand:
> - Plan file structure (phases → tasks → iterations)
> - Status markers (✅ ⏳ 🚧 🎨 ❌ 🔮)
> - Brainstorming patterns (subject resolution types A/B/C/D)
> - Implementation patterns (pre-tasks, iteration lifecycle)

2. CLAUDE.md Auto-Detection Rules

  • File: CLAUDE.md - Flow Framework Integration section (~126 lines)
  • Impact: AI agents automatically detect Flow usage and enforce framework consultation
  • Benefit: Works globally across all projects without user configuration

Features:

  • IF/THEN detection rules (if .flow/PLAN.md exists → read framework)
  • Section mapping table (9 common tasks → framework sections with line numbers)
  • AI behavior guidelines (DO/DON'T checklists)
  • Fast navigation with precise line numbers

3. Slash Command Framework References

  • Files: All 25 commands in framework/SLASH_COMMANDS.md
  • Impact: Every command points to its canonical framework pattern
  • Benefit: Command executors know exactly where to find relevant patterns

Command → Framework Mapping:

/flow-task-add → Task Structure Rules (lines 238-566)
/flow-brainstorm-start → Brainstorming Session Pattern (lines 1167-1797)
/flow-implement-start → Implementation Pattern (lines 1798-1836)
/flow-status → Progress Dashboard (lines 2015-2314) + Status Markers (lines 1872-1968)
... (21 more commands)

4. Build-Time Validation

  • File: build-standalone.sh - New validation function (~94 lines)
  • Impact: Build process validates all command→framework mappings before generating flow.sh
  • Benefit: Prevents distribution of invalid references

Validation Features:

  • ✅ Parses SLASH_COMMANDS.md for all 25 command definitions
  • ✅ Extracts Framework Reference lines from each command
  • ✅ Verifies line numbers are within DEVELOPMENT_FRAMEWORK.md bounds (3896 lines)
  • ✅ Blocks build with exit code 1 if validation fails
  • ✅ Clear error messages with actionable guidance

Example Output:

🔍 Validating command→framework references...

📋 Found 25 command definitions in SLASH_COMMANDS.md

✅ /flow-blueprint: Valid reference ((lines 2363-2560))
✅ /flow-migrate: Valid reference ((lines 2363-2560))
...
✅ All 25 commands have valid framework references!

5. Bidirectional Reference Documentation

  • File: framework/DEVELOPMENT_FRAMEWORK.md - New section (~275 lines)
  • Location: Between "Integration with Slash Commands" and "Command Usage Flow"
  • Impact: Framework documents its own reference architecture (self-documenting principle)

Section Contents:

  • The Three Reference Layers (PLAN header, CLAUDE detection, command references)
  • Benefits (prevents redundancy, self-documenting, better error recovery, enforces consistency)
  • Implementation Timeline (Iterations 1-6 progress tracker)
  • Usage Guidelines for AI Agents (3 scenario checklists)
  • Cross-References (6 major framework sections + 3 related files)

📊 Statistics

Total Changes:

  • ~495 lines of new documentation and validation code
  • 25 slash commands updated with Framework Reference sections
  • 1 new CLAUDE.md section (~126 lines)
  • 1 new DEVELOPMENT_FRAMEWORK.md section (~275 lines)
  • 1 new build validation function (~94 lines)

Files Modified:

  • build-standalone.sh - Added validation function
  • framework/DEVELOPMENT_FRAMEWORK.md - Added bidirectional reference section + version bump
  • framework/SLASH_COMMANDS.md - Added Framework Reference to all 25 commands
  • CLAUDE.md - Added Flow Framework Integration section
  • flow.sh - Regenerated with v1.0.16 (229KB, 7038 lines)

🎯 Benefits

1. Prevents Documentation Redundancy

  • ❌ Before: Commands duplicated framework patterns (inconsistency risk)
  • ✅ After: Commands reference framework (single source of truth)
  • Result: Framework updates propagate automatically (no sync needed)

2. Self-Documenting Architecture

  • ✅ PLAN.md headers explain what Flow is
  • ✅ CLAUDE.md detection shows how to use Flow
  • ✅ Commands point to canonical patterns
  • ✅ New contributors understand system by reading references

3. Better Error Recovery

  • AI agents can "recover" from mistakes by re-reading framework
  • Section mapping table provides fast navigation (line numbers!)
  • Precise lookup (no searching needed)

4. Enforces Consistency Across Sessions

  • Different AI agents always consult same framework
  • No "drift" in interpretation of Flow patterns
  • Framework version tracks with plan file

🔧 Breaking Changes

None - This release is fully backward compatible.

Existing PLAN.md files will continue to work. The new features enhance AI framework awareness but don't break existing workflows.


📝 Migration Notes

For Existing Projects:

  1. Run ./flow.sh --force to update .claude/commands/ with latest command definitions
  2. Framework references are now included in all commands (no action needed)
  3. Build validation automatically runs when rebuilding flow.sh

For New Projects:

  • Use /flow-blueprint to create new PLAN.md (automatically includes framework reference header)
  • All 25 commands now have Framework Reference sections built-in

🐛 Bug Fixes

None - This is a pure feature release.


🙏 Acknowledgments

This release represents 6 complete iterations of work (Task 12: AI Framework Awareness & Command Guidance):

  1. Iteration 1: Designed bidirectional reference system (Option E - three layers)
  2. Iteration 2: Added PLAN.md header framework references
  3. Iteration 3: Added CLAUDE.md detection rules
  4. Iteration 4: Added Framework Reference sections to all 25 commands
  5. Iteration 5: Documented bidirectional reference system
  6. Iteration 6: Added build validation for command-framework mappings

Special Thanks: This entire feature was planned and built using Flow itself! (Dogfooding FTW 🐕)


📦 Download

Direct Download:

wget https://raw.githubusercontent.com/khgs2411/flow/v1.0.16/flow.sh
chmod +x flow.sh
./flow.sh

From Release:

  • Download flow.sh from the v1.0.16 release page
  • Make it executable: chmod +x flow.sh
  • Run: ./flow.sh

🚀 What's Next?

Phase 3 Continues:

  • Advanced commands (visualize, export, compare, templates, checkpoints)
  • Platform capabilities (multi-plan, team features, model support)
  • Community building (GitHub Discussions, contribution channels)
  • Integration & tooling (GitHub Actions, VS Code extension)

Stay tuned for v1.1.x with advanced command features!


Full Changelog: v1.0.15...v1.0.16