Skip to content

Commit 15a4ed1

Browse files
authored
docs(#119): clarify git-agent delegation with explicit one-hop rule (#120)
* docs(#119): clarify git-agent delegation with explicit one-hop rule * fix(#119): standardize ONE-HOP RULE terminology (all caps)
1 parent a012fb2 commit 15a4ed1

8 files changed

Lines changed: 36 additions & 1 deletion

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ node_modules
22
package.json
33
bun.lock
44
.gitignore.project-id
5+
opencode/

‎AGENTS.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ Every development issue MUST include these checkboxes:
9090
## Agent Delegation Guidelines
9191
- **Project Manager**: ONLY entity that delegates to specialists - maintains scope control
9292
- **All Specialists**: Report discoveries to project manager (NO direct specialist-to-specialist delegation)
93-
- **Exception**: Git operations only - all agents can delegate git work to @git-agent
93+
- **Exception 1**: Git operations only - all agents can delegate git work to @git-agent
94+
- **Exception 2**: Quality gate fix delegation - @git-agent can delegate directly to language specialists for linting, type errors, test failures with ONE-HOP RULE enforced (specialist CANNOT further delegate)
9495
- **Scope Control**: Project manager decides whether to expand work based on discoveries
9596

9697
## Quality Enforcement Flow

‎prompts/git-agent.txt‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,17 @@ These actions will cause scope violation:
619619

620620
**Your role:** Git workflow orchestration and error REPORTING, NOT code investigation or fixing.
621621

622+
**ONE-HOP DELEGATION RULE:**
623+
- This is a limited direct delegation exception for quality gate fixes only
624+
- Delegated specialist CANNOT further delegate to other specialists
625+
- If issue exceeds specialist's scope: Report back to git-agent with details
626+
- Git-agent escalates cross-domain issues to PM for proper routing
627+
628+
**Example:** React specialist encounters Python error during ESLint fix:
629+
- React specialist REPORTS: "ESLint fixed, but found Python linting violation in utils.py"
630+
- React specialist does NOT delegate to Python specialist
631+
- Git-agent receives report, escalates to PM
632+
622633
**Advanced Git Operations:**
623634

624635
```bash

‎prompts/project-manager.txt‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,12 @@ DEVELOPMENT WORKFLOW
871871
- Context handoffs: use memory to pass context between sequential specialists
872872
- Always verify CI actually passes before declaring success
873873

874+
**Git-Agent Quality Gate Delegation Monitoring:**
875+
- @git-agent may delegate quality gate fixes directly to specialists (ONE-HOP RULE enforced)
876+
- Monitor through git log and specialist reports for these delegations
877+
- Intervene if: Delegation fails, cross-domain issues found, circular patterns detected
878+
- Escalate unresolved issues back to appropriate specialist through PM coordination
879+
874880
═══════════════════════════════════════════════════════
875881
COMMUNICATION PATTERNS
876882
═══════════════════════════════════════════════════════

‎prompts/python-best-practices.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ Your bash permissions enforce separation of concerns:
4141

4242
**Workflow:** When code is ready for version control, return to project manager who will delegate to @git-agent
4343

44+
**ONE-HOP RULE (When Delegated from Git-Agent):**
45+
- If delegated from @git-agent for quality gate fixes: CANNOT further delegate to other specialists
46+
- If issue exceeds your scope: Report back to git-agent (do NOT delegate laterally)
47+
4448
🎯 **EXECUTION PROTOCOL:**
4549
- **FOLLOW**: Quality standards and minimalist philosophy defined in AGENTS.md
4650
- **READ**: Issue content with `gh issue view #123` for complete requirements

‎prompts/rails-architect.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ Your bash permissions enforce separation of concerns:
3737

3838
**Workflow:** When code is ready for version control, return to project manager who will delegate to @git-agent
3939

40+
**ONE-HOP RULE (When Delegated from Git-Agent):**
41+
- If delegated from @git-agent for quality gate fixes: CANNOT further delegate to other specialists
42+
- If issue exceeds your scope: Report back to git-agent (do NOT delegate laterally)
43+
4044
🎯 **EXECUTION PROTOCOL:**
4145
- **FOLLOW**: Quality standards and minimalist philosophy defined in AGENTS.md
4246
- **READ**: Issue content with `gh issue view #123` for complete requirements

‎prompts/react-web-specialist.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ Your bash permissions enforce separation of concerns:
3737

3838
**Workflow:** When code is ready for version control, return to project manager who will delegate to @git-agent
3939

40+
**ONE-HOP RULE (When Delegated from Git-Agent):**
41+
- If delegated from @git-agent for quality gate fixes: CANNOT further delegate to other specialists
42+
- If issue exceeds your scope: Report back to git-agent (do NOT delegate laterally)
43+
4044
🎯 **EXECUTION PROTOCOL:**
4145
- **FOLLOW**: Quality standards and minimalist philosophy defined in AGENTS.md
4246
- **READ**: Issue content with `gh issue view #123` for complete requirements

‎prompts/rust-tdd-architect.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ Your bash permissions enforce separation of concerns:
5454

5555
**Workflow:** When code is ready for version control, return to project manager who will delegate to @git-agent
5656

57+
**ONE-HOP RULE (When Delegated from Git-Agent):**
58+
- If delegated from @git-agent for quality gate fixes: CANNOT further delegate to other specialists
59+
- If issue exceeds your scope: Report back to git-agent (do NOT delegate laterally)
60+
5761
🎯 **EXECUTION PROTOCOL:**
5862
- **FOLLOW**: Quality standards and minimalist philosophy defined in AGENTS.md
5963
- **READ**: Issue content with `gh issue view #123` for complete requirements

0 commit comments

Comments
 (0)