You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Purpose: Define a safe parallel workflow for human developers and AI coding agents building a static GitHub Pages application.
Core rule: Every worker branch merges into one temporary integration branch. Only the validated integration branch may open a pull request into main.
1. Caveman Summary
main is production source.
Do not work on main.
Coordinator creates:
integration-feature-name
Coordinator splits feature into small tasks.
Each agent gets one task.
Each agent gets one branch.
Each shared file gets one owner.
Agents code in parallel.
Agents test, commit, and push.
Agents open PRs into integration.
Merge passing PRs one at a time.
Run full static build after every merge.
Broken?
Stop queue.
Create repair branch.
Everything good?
Open final PR into main.
Merge main.
GitHub Actions deploys Pages.
SQLite is special.
Only one agent edits SQLite.
2. Deployment Model
agent branches
|
v
integration-feature-name
|
v
final pull request
|
v
main
|
v
GitHub Actions build
|
v
GitHub Pages
main contains reviewed production source. GitHub Actions creates the static artifact. Agents never deploy worker branches or manually edit generated production files.
3. Branch Types
Branch
Example
Purpose
Production
main
Reviewed source deployed to Pages
Integration
integration-nearby-map
Temporary feature integration boundary
Agent
agent/42-map-shell
One isolated implementation task
Data
data/42-oakland-locations
Exclusive SQLite or location-data work
Repair
repair/42-base-path
One classified integration repair
Hotfix
hotfix/73-pages-build
Urgent production-source repair
A manually maintained gh-pages branch is unnecessary when GitHub Actions deploys a Pages artifact.
Read assigned issue
|
v
Confirm owned files
|
v
Implement scoped task
|
v
Review status and diff
|
v
Run required checks
|
v
Commit and push
|
v
PR into integration
Recommended checks:
npm run format:check
npm run lint
npm run typecheck
npm run test
npm run build
No worker targets main while the integration workflow is active.
11. Approved Merge Queue
Passing PRs merge serially, not simultaneously.
PR approved
|
v
Enter merge queue
|
v
Update from current integration
|
v
Run CI again
|
v
Merge one PR
|
v
Run integrated validation
|
+--> pass: merge next PR
|
+--> fail: stop queue and repair
Recommended merge order:
Shared contracts and static-build configuration
SQLite schema and seed data
Read-only data adapter
Map and filter features
Accessibility changes
Tests
Privacy and security changes
Documentation
Pages deployment and integration changes
Follow actual dependencies rather than agent numbers.
12. SQLite Single-Writer Rule
SQLite is a binary database. Git cannot safely merge independently edited database copies.
One database.
One data owner.
One active SQLite branch.
Allowed:
integration-feature-name
|
v
data/42-oakland-locations
|
| edit records
| checkpoint WAL
| validate integrity
v
PR into integration-feature-name
The data owner must attach a deterministic record summary because GitHub cannot meaningfully display a binary SQLite diff.
13. Static Pages Boundary
GitHub Pages serves static files. It does not provide a writable server filesystem or Node server.
SQLite is packaged as a read-only site asset.
The browser may query it through a compatible WebAssembly SQLite library.
Database updates occur through reviewed repository branches and redeployment.
Public visitors cannot write directly into the committed database.
Anonymous public submissions require a separate write service or submission channel.
Agents must not introduce authentication, server API, or runtime-database work into this static MVP.
14. Integrated Validation Gate
After each queued merge:
Formatting passes
Linting passes
Type checking passes
Unit and browser tests pass
Static production build passes
GitHub Pages base path works
Internal links and assets resolve
SQLite loads and passes integrity validation
Map attribution is visible
Manual search works when geolocation is denied
Keyboard navigation works
Mobile viewport works
No secrets or local files enter the artifact
Artifact size stays within budget
flowchart TD
A["Merge one approved PR"] --> B["Build integrated candidate"]
B --> C{"All checks pass?"}
C -->|Yes| D{"More queued PRs?"}
D -->|Yes| E["Update next PR"]
E --> A
D -->|No| F["Open final PR into main"]
C -->|No| G["Stop merge queue"]
G --> H["Create repair branch"]
H --> I["Repair PR into integration"]
I --> B
Loading
15. Repair Swarm
Do not make random direct edits on the integration branch.
One feature.
One temporary integration branch.
Many scoped workers.
One branch per worker.
One owner per shared file.
One SQLite owner.
No binary database merging.
Every worker PR targets integration.
Passing PRs enter a serial merge queue.
Integration validates after every merge.
Failures create repair branches.
Only integration opens PR into main.
Only main deploys GitHub Pages.
main stays stable.
Pages stays reproducible.
Parallel work stays reviewable.
Static GitHub Pages App — Parallel Branching Strategy
1. Caveman Summary
2. Deployment Model
maincontains reviewed production source. GitHub Actions creates the static artifact. Agents never deploy worker branches or manually edit generated production files.3. Branch Types
mainintegration-nearby-mapagent/42-map-shelldata/42-oakland-locationsrepair/42-base-pathhotfix/73-pages-buildA manually maintained
gh-pagesbranch is unnecessary when GitHub Actions deploys a Pages artifact.4. Naming Rules
Examples:
Use lowercase names with hyphens. Name the task, not the agent provider or a meaningless session number.
5. Ten-Agent Static-App Split
The backend-oriented roles in the original workflow are replaced with work appropriate for a static Pages application.
agent/42-static-buildagent/42-data-readerdata/42-oakland-locationsagent/42-map-shellagent/42-filter-detailsagent/42-accessibilityagent/42-testsagent/42-privacy-securityagent/42-docs-contentagent/42-pages-integrationUse fewer agents when the work cannot be divided into independent tasks. Parallelism is useful only when ownership boundaries are real.
6. Ownership Rules
Before work begins, the coordinator assigns files and directories.
Shared files require coordinator approval:
package.jsonTwo agents must not independently edit the same shared file. Sequence the tasks or assign that file to one owner.
7. Full Parallel Workflow
flowchart TD MAIN["main<br/>Production source"] STAGE["integration-feature-name<br/>Temporary integration"] COORD["Swarm coordinator"] PLAN["Define contracts, ownership, and tasks"] MAIN --> STAGE STAGE --> COORD COORD --> PLAN PLAN --> A1["Agent 01<br/>Static build"] PLAN --> A2["Agent 02<br/>Data reader"] PLAN --> A3["Agent 03<br/>SQLite owner"] PLAN --> A4["Agent 04<br/>Map UI"] PLAN --> A5["Agent 05<br/>Filters"] PLAN --> A6["Agent 06<br/>Accessibility"] PLAN --> A7["Agent 07<br/>Tests"] PLAN --> A8["Agent 08<br/>Privacy"] PLAN --> A9["Agent 09<br/>Docs"] PLAN --> A10["Agent 10<br/>Pages integration"] A1 --> WORK["Commit, push, and open scoped PR"] A2 --> WORK A3 --> WORK A4 --> WORK A5 --> WORK A6 --> WORK A7 --> WORK A8 --> WORK A9 --> WORK A10 --> WORK WORK --> CI{"Branch CI passes?"} CI -->|No| FIX["Return to owning branch"] FIX --> WORK CI -->|Yes| QUEUE["Approved PR merge queue"] QUEUE --> MERGE["Merge one PR into integration"] MERGE --> VALIDATE["Run integrated static validation"] VALIDATE --> READY{"Integration healthy?"} READY -->|No| REPAIR["Create scoped repair branch"] REPAIR --> REPAIRPR["Repair PR into integration"] REPAIRPR --> MERGE READY -->|More PRs| QUEUE READY -->|All merged| FINAL["Final PR into main"] FINAL --> REVIEW["Human review and required checks"] REVIEW --> APPROVED{"Approved?"} APPROVED -->|No| REPAIR APPROVED -->|Yes| PROD["Merge into main"] PROD --> DEPLOY["Build and deploy Pages artifact"] DEPLOY --> VERIFY["Verify production URL"] VERIFY --> CLEAN["Delete temporary branches"]8. Dependency-Aware Waves
Do not start all agents blindly. Release work when its contracts are ready.
Wave 1 — Foundations
Wave 2 — Implementation
Wave 3 — Integration
flowchart TD START["Acceptance criteria"] --> BUILD["Static build contract"] START --> DATA["SQLite schema"] START --> UX["UI contracts"] START --> PRIVACY["Privacy review"] BUILD --> READER["Read-only data adapter"] DATA --> READER READER --> MAP["Map UI"] READER --> FILTERS["Filters"] UX --> MAP UX --> FILTERS MAP --> TESTS["Integrated tests"] FILTERS --> TESTS PRIVACY --> REVIEW["Final review"] BUILD --> PAGES["Pages artifact"] TESTS --> FINAL["Integrated candidate"] REVIEW --> FINAL PAGES --> FINAL9. Coordinator Setup
Create the integration branch:
Before worker branches are created, record:
Every worker branches from the same approved integration commit:
10. Worker Flow
Recommended checks:
npm run format:check npm run lint npm run typecheck npm run test npm run buildCommit only assigned paths:
Every worker PR uses:
No worker targets
mainwhile the integration workflow is active.11. Approved Merge Queue
Passing PRs merge serially, not simultaneously.
Recommended merge order:
Follow actual dependencies rather than agent numbers.
12. SQLite Single-Writer Rule
SQLite is a binary database. Git cannot safely merge independently edited database copies.
Allowed:
Forbidden:
Before committing:
The integrity result must be
ok.Never commit:
The data owner must attach a deterministic record summary because GitHub cannot meaningfully display a binary SQLite diff.
13. Static Pages Boundary
GitHub Pages serves static files. It does not provide a writable server filesystem or Node server.
14. Integrated Validation Gate
After each queued merge:
flowchart TD A["Merge one approved PR"] --> B["Build integrated candidate"] B --> C{"All checks pass?"} C -->|Yes| D{"More queued PRs?"} D -->|Yes| E["Update next PR"] E --> A D -->|No| F["Open final PR into main"] C -->|No| G["Stop merge queue"] G --> H["Create repair branch"] H --> I["Repair PR into integration"] I --> B15. Repair Swarm
Do not make random direct edits on the integration branch.
Each repair branch must:
If a repair changes SQLite, assign it to the current data owner or formally transfer the single-writer lock.
16. Final Pull Request
After all planned worker PRs merge and integrated validation passes:
The final PR includes:
Only a reviewed merge into
mainmay trigger the production Pages deployment.17. Branch Protection
Protect
mainwith:Recommended checks:
Require only checks implemented by the repository.
18. Merge Strategy
Use squash merge for worker PRs:
Use a merge commit for the final integration PR when preserving the complete integration boundary helps auditing and rollback:
The repository may squash the final PR if a linear history is preferred. Choose one convention and document it.
19. Forbidden Flows
Also forbidden:
20. Pull Request Matrix
agent/*integration-feature-namedata/*integration-feature-namerepair/*integration-feature-nameintegration-feature-namemainhotfix/*mainagent/*maindata/*main21. Coordinator Checklist
mainmain22. Every Agent Checklist
git statusandgit diff23. Final Rule