Skip to content

feat: Add distributed tracking for team coordination#4

Open
johnsonfamily1234 wants to merge 10 commits intocoreyepstein:mainfrom
johnsonfamily1234:feature/distributed-tracking
Open

feat: Add distributed tracking for team coordination#4
johnsonfamily1234 wants to merge 10 commits intocoreyepstein:mainfrom
johnsonfamily1234:feature/distributed-tracking

Conversation

@johnsonfamily1234
Copy link
Contributor

Summary

Adds distributed tracking system so teams can share PRD/task status via git, preventing duplicate work and enabling coordination across contributors.

  • Define .hq/ directory structure for tracking files (prd.json, claims.json, sync-log.json)
  • Add push/pull functions to sync PRD status between HQ and target repos
  • Add conflict detection with task-level merge (newer updated_at wins)
  • Add duplicate work detection when creating PRDs
  • Add task claim mechanism with 24h expiration to prevent conflicts
  • Integrate sync workflow into pure-ralph loop (auto pull/push/claim)
  • Add /sync-tasks slash command for manual sync operations
  • Add prompt templating - copies prompt to .hq/prompt.md in target repo
  • Comprehensive documentation in knowledge/distributed-tracking/

Test plan

  • Verify .hq/ directory structure documentation is complete
  • Verify push/pull instructions in pure-ralph-base.md
  • Verify /sync-tasks command exists and has correct flags
  • Verify pure-ralph-loop scripts handle .hq/ initialization
  • Verify workflow documentation covers sync lifecycle

🤖 Generated with Claude Code

johnsonfamily1234 and others added 10 commits January 27, 2026 08:37
Add structure.md documenting:
- .hq/ directory layout with prd.json, claims.json, sync-log.json
- JSON schemas for all three files
- .gitignore recommendations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Added 'Distributed Tracking - Pull from Repo' section to pure-ralph-base.md
- Documents pull_from_repo function with: check if exists, read both files,
  compare by task ID, generate diff summary
- Includes diff detection logic and field comparison table
- Explicit no-auto-overwrite policy to prevent data loss
- Added .hq/prd.json for distributed tracking sync

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added 'Distributed Tracking - Conflict Resolution' section to pure-ralph-base.md:
- Task-level diff display format
- Merge strategy: per-task, newer updated_at wins
- User confirmation prompt with y/n/manual options
- Manual resolution flow for ambiguous conflicts
- Write-to-both-locations process
- Conflict states table

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Step 2.5 to check for existing .hq/prd.json in target repo
- Show existing tasks table when distributed tracking found
- Fuzzy match user's description against existing task titles
- Prompt user: add to existing, create separate, or cancel

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add claim instructions to pure-ralph-base.md including:
- check_claim function for verifying task availability
- claim_task function with 24h expiration default
- release_claim function for task completion
- Warning display format for claimed tasks
- Integration with task selection flow

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive workflow section that ties together pull, push, claim,
and conflict resolution functions into the Pure Ralph session lifecycle.
Updates "Your Job" checklist with sync, claim, push, and release steps.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Manual sync command for distributed tracking:
- Default mode: pull and show status diff table
- --push: push local PRD to repo's .hq/
- --claim {id}: claim a specific task
- --release {id}: release a claim

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Created comprehensive workflow.md with:
- Full sync lifecycle documentation
- Claim/release flow examples
- Troubleshooting guide for 7 common conflicts
- Best practices for distributed teams

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Updated structure.md to document prompt.md in .hq/ directory
- Scripts now check for .hq/prompt.md and copy from HQ if missing
- Scripts use .hq/prompt.md and .hq/prd.json for all operations
- Prompt now references .hq/prd.json directly (no {{PRD_PATH}} substitution)
- Added Initialize-HqDirectory function to both ps1 and sh scripts
- Enables project-specific prompt evolution and portability

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.

1 participant