Skip to content

smorky850612/Aurakit / skills/aura

All-in-one fullstack dev engine. /aura: 46 modes (build/fix/clean/deploy/review/spec/lore/ax/experiment/payment/debug/qa/orchestrate/escalate+), 6-layer security with 32 hooks, tiered models (ZERO/ECO/PRO/MAX), 8 languages, 16 specialized agents, SPEC/EARS/TRUST5/XLOOP/RALF/Autopus absorbed. ~55% token savings.

FileKindSize
SKILL.mdskill md29.2 KB
resources/agent-security.mdmarkdown4.2 KB
resources/agent-spawning.mdmarkdown5.9 KB
resources/agent-team.mdmarkdown5.7 KB
resources/archive-pipeline.mdmarkdown3.5 KB
resources/autopus-agent-teams.mdmarkdown6.8 KB
resources/autopus-ax-annotation.mdmarkdown6.1 KB
resources/autopus-executor-profiles.mdmarkdown9.9 KB
resources/autopus-experiment-loop.mdmarkdown5.9 KB
resources/autopus-lore-commit.mdmarkdown6.0 KB
resources/autopus-pipeline-v2.mdmarkdown8.5 KB
resources/autopus-spec-system.mdmarkdown4.8 KB
resources/autopus-validator-gates.mdmarkdown7.0 KB
resources/autopus-worktree-isolation.mdmarkdown4.6 KB
resources/baas-pipeline.mdmarkdown3.8 KB
resources/batch-pipeline.mdmarkdown4.9 KB
resources/brainstorming.mdmarkdown4.7 KB
resources/branch-finishing.mdmarkdown4.7 KB
resources/build-pipeline.mdmarkdown12.0 KB
resources/build-resolvers-cpp.mdmarkdown10.0 KB
resources/build-resolvers-go.mdmarkdown1.2 KB
resources/build-resolvers-java.mdmarkdown9.1 KB
resources/build-resolvers-kotlin.mdmarkdown8.7 KB
resources/build-resolvers-python.mdmarkdown9.0 KB
resources/build-resolvers-rust.mdmarkdown1.2 KB
resources/build-resolvers-swift.mdmarkdown11.9 KB
resources/build-resolvers.mdmarkdown1.6 KB
resources/business-skills.mdmarkdown7.0 KB
resources/cache-engineering.mdmarkdown6.6 KB
resources/clean-pipeline.mdmarkdown6.5 KB
resources/common-protocol.mdmarkdown7.4 KB
resources/config-schema.mdmarkdown3.0 KB
resources/cross-harness.mdmarkdown16.6 KB
resources/deploy-enterprise.mdmarkdown9.0 KB
resources/deploy-pipeline.mdmarkdown6.9 KB
resources/design-pipeline.mdmarkdown3.2 KB
resources/desktop-pipeline.mdmarkdown3.5 KB
resources/discovery-protocol.mdmarkdown3.3 KB
resources/e2e-pipeline.mdmarkdown7.7 KB
resources/explain-pipeline.mdmarkdown972 B
resources/fix-pipeline.mdmarkdown5.6 KB
resources/framework-patterns.mdmarkdown8.3 KB
resources/gap-check.mdmarkdown3.4 KB
resources/install-guide.mdmarkdown3.4 KB
resources/instinct-system.mdmarkdown6.8 KB
resources/iterate-pipeline.mdmarkdown2.5 KB
resources/language-reviewers.mdmarkdown18.5 KB
resources/loop-pipeline.mdmarkdown3.5 KB
resources/mcp-configs.mdmarkdown4.7 KB
resources/migrate-pipeline.mdmarkdown1.5 KB
resources/mobile-pipeline.mdmarkdown3.5 KB
resources/mode-reference.mdmarkdown6.1 KB
resources/model-routing.mdmarkdown9.1 KB
resources/orchestration-patterns.mdmarkdown5.9 KB
resources/payment-lemonsqueezy.mdmarkdown5.6 KB
resources/payment-pipeline.mdmarkdown10.6 KB
resources/payment-polar.mdmarkdown3.6 KB
resources/payment-steppay.mdmarkdown4.8 KB
resources/payment-stripe.mdmarkdown6.7 KB
resources/payment-toss.mdmarkdown7.2 KB
resources/pipeline-guide.mdmarkdown6.1 KB
resources/plan-pipeline.mdmarkdown2.4 KB
resources/pm-pipeline.mdmarkdown4.5 KB
resources/qa-pipeline.mdmarkdown8.8 KB
resources/report-pipeline.mdmarkdown3.0 KB
resources/review-pipeline.mdmarkdown8.0 KB
resources/rollback-pipeline.mdmarkdown1.3 KB
resources/security-rules.mdmarkdown17.5 KB
resources/snippets-guide.mdmarkdown4.6 KB
resources/status-dashboard.mdmarkdown5.3 KB
resources/style-guide.mdmarkdown2.7 KB
resources/systematic-debugging.mdmarkdown5.7 KB
resources/tdd-pipeline.mdmarkdown4.4 KB

resources/autopus-worktree-isolation.md

View on GitHub
# Autopus Worktree Isolation

> Absorbed from Autopus-ADK. Rules R1-R7 for parallel agent execution
> in isolated git worktrees with conflict detection and GC suppression.

---

## Overview

When multiple executor agents work in parallel, each gets an isolated git worktree.
This prevents file conflicts during Phase 2 and enables true parallel development.

---

## Rules

### R1 — Isolation Flag

All executor agents MUST use `isolation: "worktree"` in Agent() calls:

```javascript
Agent({
  subagent_type: "general-purpose",
  model: "sonnet",
  description: "Implement auth module",
  prompt: "...",
  isolation: "worktree"  // REQUIRED — never omit
})
```

Without isolation, concurrent writes corrupt each other's work.

### R2 — File Ownership Conflict Detection

Before assigning files to agents, the planner runs conflict detection:

Three-check algorithm:
```
Check 1: Prefix containment
  Files: ["src/auth/login.ts", "src/auth/"]
  Conflict: "src/auth/login.ts" is contained by "src/auth/"
  → Merge into single agent assignment

Check 2: Glob intersection
  Agent A: "src/auth/*.ts"
  Agent B: "src/auth/session.ts"
  Conflict: session.ts matches Agent A's glob
  → Assign session.ts to Agent A only

Check 3: Directory overlap
  Agent A files: src/auth/login.ts, src/auth/session.ts
  Agent B files: src/auth/types.ts
  → Same directory — merge A+B or add shared types to both read-only
```

Resolution: Conflicting files are merged into one agent's assignment.
Never assign the same file to two agents.

### R3 — Merge Strategy

Sequential merge (preferred):
```
As soon as executor A completes → merge immediately → executor B is working
on non-overlapping files in parallel
```

Batch merge (Phase 2.1):
```
All executors complete → merge in dependency order (no circular deps)
```

Conflict handling:
```
Merge conflict detected → ABORT that worktree
→ Report to Lead: which files conflicted
→ Lead decides: re-assign to single agent for sequential retry
```

### R4 — Conflict Abort

If merge fails with conflict:
```
1. git worktree remove --force {worktree-path}
2. Report: MERGE_CONFLICT in files [list]
3. Do NOT attempt to resolve automatically
4. Return BLOCKED status to Lead
```

Manual conflict resolution is always safer than automated merge in complex cases.

### R5 — GC Suppression + Lock Retry

Prevent git GC from interfering with worktrees:
```bash
git -c gc.auto=0 worktree add {path} {branch}
git -c gc.auto=0 merge {branch}
```

Lock retry for stale `.git/index.lock`:
```
If lock file exists:
  Wait 3 seconds → retry
  If still locked: wait 6 seconds → retry
  If still locked: wait 12 seconds → retry (exponential backoff)
  If still locked after 3 retries: FAIL → report stale lock
```

### R6 — Max Concurrent

Maximum 5 simultaneous worktrees at any time.

If planner assigns > 5 parallel agents:
```
Sort by dependency order
Execute first 5 in parallel
As each completes, start next in queue
```

### R7 — Branch Naming

```
Branch naming convention: autopus/wt-{task-id}-{short-desc}

Examples:
  autopus/wt-001-auth-login
  autopus/wt-001-auth-types
  autopus/wt-002-payment-webhook

Cleanup after merge: git worktree remove && git branch -d autopus/wt-*
```

---

## Worktree Lifecycle

```
[Planner] Detect parallel-safe files → assign to agent groups
    ↓
[For each agent group]
  git worktree add -b autopus/wt-{id}-{desc} .worktrees/{id}-{desc}
    ↓
  Agent runs in isolated worktree
    ↓
  Agent completes → git add + git commit (no push)
    ↓
[Merge sequence (Phase 2.1)]
  git merge --no-ff autopus/wt-{id}-{desc}
  ON CONFLICT → ABORT → report → single-agent retry
    ↓
  git worktree remove .worktrees/{id}-{desc}
  git branch -d autopus/wt-{id}-{desc}
```

---

## Directory Structure

```
project/
├── .worktrees/        ← active worktrees (gitignored)
│   ├── 001-auth/      ← Agent A's workspace
│   └── 002-payment/   ← Agent B's workspace
├── src/               ← main branch
└── .git/
```

Add to `.gitignore`:
```
.worktrees/
```

---

## Integration with AuraKit

AuraKit's existing batch pipeline uses worktrees for `/aura batch:`.
The Autopus rules extend this with:
- Formal conflict detection (R2 three-check algorithm)
- GC suppression (R5)
- Explicit ownership tracking per file

In BUILD mode with multiple files, planner activates worktree isolation automatically
when 2+ executor agents are needed for parallel implementation.

Config:
```json
{
  "worktree": {
    "max_concurrent": 5,
    "gc_suppression": true,
    "lock_retry_backoff": [3, 6, 12],
    "branch_prefix": "aura/wt"
  }
}
```
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall