Skip to content

Conversation

@Eliran79
Copy link
Contributor

Summary

  • Causality tracking: Every task must have dependencies to form semantic cause-effect chains
  • CAUTION enforcement: taskguard create fails without --dependencies, shows clear guidance
  • Orphan detection: taskguard validate --orphans identifies isolated tasks
  • --allow-orphan-task flag: Escape hatch for spikes/research tasks
  • Archive protection: Improved messaging when tasks can't be archived due to dependents

Key Changes

  • setup-001 is auto-created by taskguard init as the universal root
  • All new tasks require --dependencies or --allow-orphan-task
  • validate --orphans shows detailed orphan task list
  • AI guides updated with causality workflow

Test plan

  • All 222 tests pass (including previously ignored GitHub integration tests)
  • Zero clippy warnings
  • Manual verification of CAUTION message
  • Manual verification of orphan detection
  • Manual verification of --allow-orphan-task flag

🤖 Generated with Claude Code

Eliran79 and others added 8 commits December 21, 2025 11:47
Create task breakdown for v0.4.0 causality tracking feature:

- causality-001: Parent feature task with full spec
- causality-002: Add --allow-orphan-task flag and CAUTION to create
- causality-003: Add --orphans flag to validate command
- causality-004: Strengthen archive reverse dependency check
- causality-005: Update import-md with orphan detection
- causality-006: Update AI_IMPORT_MD_GUIDE.md
- causality-007: Update AGENTIC_AI_TASKGUARD_GUIDE.md

Key design decisions:
- setup-001 is root anchor (like Java's Object)
- Keep existing --dependencies flag (backward compatible)
- CAUTION message for AI agent attention
- Soft enforcement for import-md (warn, don't fail)
- Hard enforcement for create (fail without --allow-orphan-task)

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

Co-Authored-By: Claude <noreply@anthropic.com>
Complete the causality tracking task chain:

- causality-008: Run all tests (zero warnings/errors)
- causality-009: Update all documentation for v0.4.0
- causality-010: Build and install locally for verification
- causality-011: Verify CI/CD pipeline passes
- causality-012: Merge to main and tag v0.4.0 release
- causality-013: Install TaskGuard globally on system
- causality-014: Propagate AGENTIC guide to all /data/ projects (level 3)
- causality-015: Final verification and project completion

Full chain: causality-001 → causality-015 (15 sequential tasks)

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

Co-Authored-By: Claude <noreply@anthropic.com>
Implementation of causality-002 through causality-005:

create command (causality-002):
- Add --allow-orphan-task flag for edge cases
- Show CAUTION message and exit 1 when no dependencies specified
- Show note when orphan created with explicit flag

validate command (causality-003):
- Add --orphans flag to show orphan task details
- Find orphan tasks (no deps AND nothing depends on them)
- setup-001 is exempt as root task
- Show orphan count in summary even without flag

archive command (causality-004):
- Improve blocked message to show causality protection
- Show specific dependent task IDs for blocked tasks
- Refactor to use find_dependents() helper

import-md command (causality-005):
- Add orphan detection after successful import
- Show CAUTION with orphan list (but don't fail)
- Show dependency info for each created task
- Include orphan count in summary

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix validate::run calls to include new orphans parameter
- Fix create::run calls to include allow_orphan_task parameter
- Add --allow-orphan-task to CLI integration tests
- Fix clippy warnings (borrowed expressions) in test files
- Update AGENTIC_AI_TASKGUARD_GUIDE.md (keep concise)
- Update AI_IMPORT_MD_GUIDE.md with causality section

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Updated mutations.rs test to use Guard8-ai/TaskGuard repo
- Updated queries.rs test to use existing issue #95
- Updated setup.rs test to use real config values
- Removed destructive test_auto_create_project (creates new projects)
- All 222 tests now pass with zero ignored

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- CHANGELOG.md: Add v0.4.0 section with causality tracking features
- README.md: Update Core Concept section and Phase 6 implementation status
- Cargo.toml: Bump version to 0.4.0
- docs/api-reference/commands.md: Add --allow-orphan-task and --orphans flags

Key v0.4.0 features documented:
- Mandatory dependencies for all tasks
- Orphan detection with validate --orphans
- --allow-orphan-task escape hatch
- CAUTION messaging for AI agents

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- README.md: Updated example workflow and key principles
- CHANGELOG.md: Clarified root task is auto-created
- AGENTIC_AI_TASKGUARD_GUIDE.md: Updated causality section

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Eliran79 Eliran79 merged commit 8ceae97 into master Dec 21, 2025
4 checks passed
@Eliran79 Eliran79 deleted the feature/0.4.0-causality-tracking branch December 21, 2025 11:02
Eliran79 added a commit that referenced this pull request Dec 21, 2025
All 15 causality tasks marked done with detailed session handoffs:
- causality-008: Tests - 222 pass, 0 ignored
- causality-009: Docs - 12 files updated
- causality-010: Build - v0.4.0 verified
- causality-011: CI - All platforms pass
- causality-012: Release - PR #174, tag v0.4.0
- causality-013: Install - Global PATH working
- causality-014: Propagate - 12 projects updated
- causality-015: Final - All checklists complete

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

Co-Authored-By: Claude Opus 4.5 <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.

2 participants