@mizyoel/mercury-mesh 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.copilot/mcp-config.json +14 -0
- package/.copilot/skills/agent-collaboration/SKILL.md +42 -0
- package/.copilot/skills/agent-conduct/SKILL.md +24 -0
- package/.copilot/skills/architectural-proposals/SKILL.md +151 -0
- package/.copilot/skills/ci-validation-gates/SKILL.md +84 -0
- package/.copilot/skills/cli-wiring/SKILL.md +47 -0
- package/.copilot/skills/client-compatibility/SKILL.md +89 -0
- package/.copilot/skills/cross-mesh/SKILL.md +114 -0
- package/.copilot/skills/distributed-mesh/SKILL.md +287 -0
- package/.copilot/skills/distributed-mesh/mesh.json.example +30 -0
- package/.copilot/skills/distributed-mesh/sync-mesh.ps1 +111 -0
- package/.copilot/skills/distributed-mesh/sync-mesh.sh +104 -0
- package/.copilot/skills/docs-standards/SKILL.md +71 -0
- package/.copilot/skills/economy-mode/SKILL.md +101 -0
- package/.copilot/skills/external-comms/SKILL.md +331 -0
- package/.copilot/skills/gh-auth-isolation/SKILL.md +183 -0
- package/.copilot/skills/git-workflow/SKILL.md +206 -0
- package/.copilot/skills/github-multi-account/SKILL.md +95 -0
- package/.copilot/skills/history-hygiene/SKILL.md +36 -0
- package/.copilot/skills/humanizer/SKILL.md +107 -0
- package/.copilot/skills/init-mode/SKILL.md +101 -0
- package/.copilot/skills/mesh-conventions/SKILL.md +69 -0
- package/.copilot/skills/model-selection/SKILL.md +139 -0
- package/.copilot/skills/nap/SKILL.md +24 -0
- package/.copilot/skills/personal-mesh/SKILL.md +57 -0
- package/.copilot/skills/project-conventions/SKILL.md +56 -0
- package/.copilot/skills/release-process/SKILL.md +435 -0
- package/.copilot/skills/reskill/SKILL.md +92 -0
- package/.copilot/skills/reviewer-protocol/SKILL.md +79 -0
- package/.copilot/skills/secret-handling/SKILL.md +200 -0
- package/.copilot/skills/session-recovery/SKILL.md +155 -0
- package/.copilot/skills/test-discipline/SKILL.md +37 -0
- package/.copilot/skills/windows-compatibility/SKILL.md +74 -0
- package/.github/agents/mercury-mesh.agent.md +1732 -0
- package/.mesh/manifesto.md +66 -0
- package/.mesh/templates/casting/Futurama.json +10 -0
- package/.mesh/templates/casting-history.json +4 -0
- package/.mesh/templates/casting-policy.json +37 -0
- package/.mesh/templates/casting-reference.md +104 -0
- package/.mesh/templates/casting-registry.json +3 -0
- package/.mesh/templates/ceremonies.md +41 -0
- package/.mesh/templates/charter.md +56 -0
- package/.mesh/templates/constraint-tracking.md +38 -0
- package/.mesh/templates/cooperative-rate-limiting.md +229 -0
- package/.mesh/templates/copilot-instructions.md +50 -0
- package/.mesh/templates/department-backlog.md +15 -0
- package/.mesh/templates/department-charter.md +27 -0
- package/.mesh/templates/department-state.json +19 -0
- package/.mesh/templates/history.md +10 -0
- package/.mesh/templates/identity/now.md +9 -0
- package/.mesh/templates/identity/wisdom.md +15 -0
- package/.mesh/templates/interface-contract.md +26 -0
- package/.mesh/templates/issue-lifecycle.md +421 -0
- package/.mesh/templates/keda-scaler.md +166 -0
- package/.mesh/templates/machine-capabilities.md +77 -0
- package/.mesh/templates/mcp-config.md +90 -0
- package/.mesh/templates/mercury-mesh.agent.md +1732 -0
- package/.mesh/templates/multi-agent-format.md +28 -0
- package/.mesh/templates/orchestration-log.md +27 -0
- package/.mesh/templates/org-autonomy-spec.md +152 -0
- package/.mesh/templates/org-backlog-from-triage.js +199 -0
- package/.mesh/templates/org-runtime-reconcile.js +364 -0
- package/.mesh/templates/org-seed-runtime.js +238 -0
- package/.mesh/templates/org-status.js +193 -0
- package/.mesh/templates/org-structure.json +38 -0
- package/.mesh/templates/package.json +3 -0
- package/.mesh/templates/plugin-marketplace.md +49 -0
- package/.mesh/templates/ralph-circuit-breaker.md +313 -0
- package/.mesh/templates/ralph-triage.js +844 -0
- package/.mesh/templates/raw-agent-output.md +37 -0
- package/.mesh/templates/roster.md +60 -0
- package/.mesh/templates/routing.md +78 -0
- package/.mesh/templates/run-output.md +50 -0
- package/.mesh/templates/schedule.json +64 -0
- package/.mesh/templates/scribe-charter.md +119 -0
- package/.mesh/templates/skill.md +24 -0
- package/.mesh/templates/skills/agent-collaboration/SKILL.md +42 -0
- package/.mesh/templates/skills/agent-conduct/SKILL.md +24 -0
- package/.mesh/templates/skills/architectural-proposals/SKILL.md +151 -0
- package/.mesh/templates/skills/ci-validation-gates/SKILL.md +84 -0
- package/.mesh/templates/skills/cli-wiring/SKILL.md +47 -0
- package/.mesh/templates/skills/client-compatibility/SKILL.md +89 -0
- package/.mesh/templates/skills/cross-mesh/SKILL.md +114 -0
- package/.mesh/templates/skills/distributed-mesh/SKILL.md +287 -0
- package/.mesh/templates/skills/distributed-mesh/mesh.json.example +30 -0
- package/.mesh/templates/skills/distributed-mesh/sync-mesh.ps1 +111 -0
- package/.mesh/templates/skills/distributed-mesh/sync-mesh.sh +104 -0
- package/.mesh/templates/skills/docs-standards/SKILL.md +71 -0
- package/.mesh/templates/skills/economy-mode/SKILL.md +101 -0
- package/.mesh/templates/skills/external-comms/SKILL.md +331 -0
- package/.mesh/templates/skills/gh-auth-isolation/SKILL.md +183 -0
- package/.mesh/templates/skills/git-workflow/SKILL.md +204 -0
- package/.mesh/templates/skills/github-multi-account/SKILL.md +95 -0
- package/.mesh/templates/skills/history-hygiene/SKILL.md +36 -0
- package/.mesh/templates/skills/humanizer/SKILL.md +107 -0
- package/.mesh/templates/skills/init-mode/SKILL.md +101 -0
- package/.mesh/templates/skills/mesh-conventions/SKILL.md +69 -0
- package/.mesh/templates/skills/model-selection/SKILL.md +139 -0
- package/.mesh/templates/skills/nap/SKILL.md +24 -0
- package/.mesh/templates/skills/personal-mesh/SKILL.md +57 -0
- package/.mesh/templates/skills/project-conventions/SKILL.md +56 -0
- package/.mesh/templates/skills/release-process/SKILL.md +435 -0
- package/.mesh/templates/skills/reskill/SKILL.md +92 -0
- package/.mesh/templates/skills/reviewer-protocol/SKILL.md +79 -0
- package/.mesh/templates/skills/secret-handling/SKILL.md +200 -0
- package/.mesh/templates/skills/session-recovery/SKILL.md +155 -0
- package/.mesh/templates/skills/test-discipline/SKILL.md +37 -0
- package/.mesh/templates/skills/windows-compatibility/SKILL.md +74 -0
- package/.mesh/templates/workflows/mesh-ci.yml +24 -0
- package/.mesh/templates/workflows/mesh-docs.yml +54 -0
- package/.mesh/templates/workflows/mesh-heartbeat.yml +237 -0
- package/.mesh/templates/workflows/mesh-insider-release.yml +61 -0
- package/.mesh/templates/workflows/mesh-issue-assign.yml +243 -0
- package/.mesh/templates/workflows/mesh-label-enforce.yml +181 -0
- package/.mesh/templates/workflows/mesh-preview.yml +55 -0
- package/.mesh/templates/workflows/mesh-promote.yml +120 -0
- package/.mesh/templates/workflows/mesh-release.yml +77 -0
- package/.mesh/templates/workflows/mesh-triage.yml +383 -0
- package/.mesh/templates/workflows/sync-mesh-labels.yml +204 -0
- package/README.md +640 -0
- package/bin/mercury-mesh.cjs +317 -0
- package/docs/brand-language.md +287 -0
- package/docs/commander-onboarding.md +462 -0
- package/docs/mercury-mesh-runtime-rename-impact.md +148 -0
- package/docs/persona-manifesto.md +114 -0
- package/docs/scenarios/client-compatibility.md +59 -0
- package/index.cjs +41 -0
- package/package.json +43 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "git-workflow"
|
|
3
|
+
description: "Mercury Mesh branching model: dev-first workflow with insiders preview channel"
|
|
4
|
+
domain: "version-control"
|
|
5
|
+
confidence: "high"
|
|
6
|
+
source: "team-decision"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
Mercury Mesh uses a three-branch model. **All feature work starts from `dev`, not `main`.**
|
|
12
|
+
|
|
13
|
+
| Branch | Purpose | Publishes |
|
|
14
|
+
|--------|---------|-----------|
|
|
15
|
+
| `main` | Released, tagged, in-npm code only | `npm publish` on tag |
|
|
16
|
+
| `dev` | Integration branch โ all feature work lands here | `npm publish --tag preview` on merge |
|
|
17
|
+
| `insiders` | Early-access channel โ synced from dev | `npm publish --tag insiders` on sync |
|
|
18
|
+
|
|
19
|
+
## Branch Naming Convention
|
|
20
|
+
|
|
21
|
+
Issue branches MUST use: `mesh/{issue-number}-{kebab-case-slug}`
|
|
22
|
+
|
|
23
|
+
Examples:
|
|
24
|
+
- `mesh/195-fix-version-stamp-bug`
|
|
25
|
+
- `mesh/42-add-profile-api`
|
|
26
|
+
|
|
27
|
+
> The legacy prefix `mesh/{issue-number}-{slug}` remains compatible during the migration phase.
|
|
28
|
+
|
|
29
|
+
## Workflow for Issue Work
|
|
30
|
+
|
|
31
|
+
1. **Branch from dev:**
|
|
32
|
+
```bash
|
|
33
|
+
git checkout dev
|
|
34
|
+
git pull origin dev
|
|
35
|
+
git checkout -b mesh/{issue-number}-{slug}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
2. **Mark issue in-progress:**
|
|
39
|
+
```bash
|
|
40
|
+
gh issue edit {number} --add-label "status:in-progress"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
3. **Create draft PR targeting dev:**
|
|
44
|
+
```bash
|
|
45
|
+
gh pr create --base dev --title "{description}" --body "Closes #{issue-number}" --draft
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
4. **Do the work.** Make changes, write tests, commit with issue reference.
|
|
49
|
+
|
|
50
|
+
5. **Push and mark ready:**
|
|
51
|
+
```bash
|
|
52
|
+
git push -u origin mesh/{issue-number}-{slug}
|
|
53
|
+
gh pr ready
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
6. **After merge to dev:**
|
|
57
|
+
```bash
|
|
58
|
+
git checkout dev
|
|
59
|
+
git pull origin dev
|
|
60
|
+
git branch -d mesh/{issue-number}-{slug}
|
|
61
|
+
git push origin --delete mesh/{issue-number}-{slug}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Parallel Multi-Issue Work (Worktrees)
|
|
65
|
+
|
|
66
|
+
When the coordinator routes multiple issues simultaneously (e.g., "fix bugs X, Y, and Z"), use `git worktree` to give each agent an isolated working directory. No filesystem collisions, no branch-switching overhead.
|
|
67
|
+
|
|
68
|
+
### When to Use Worktrees vs Sequential
|
|
69
|
+
|
|
70
|
+
| Scenario | Strategy |
|
|
71
|
+
|----------|----------|
|
|
72
|
+
| Single issue | Standard workflow above โ no worktree needed |
|
|
73
|
+
| 2+ simultaneous issues in same repo | Worktrees โ one per issue |
|
|
74
|
+
| Work spanning multiple repos | Separate clones as siblings (see Multi-Repo below) |
|
|
75
|
+
|
|
76
|
+
### Setup
|
|
77
|
+
|
|
78
|
+
From the main clone (must be on dev or any branch):
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# Ensure dev is current
|
|
82
|
+
git fetch origin dev
|
|
83
|
+
|
|
84
|
+
# Create a worktree per issue โ siblings to the main clone
|
|
85
|
+
git worktree add ../mesh-195 -b mesh/195-fix-stamp-bug origin/dev
|
|
86
|
+
git worktree add ../mesh-193 -b mesh/193-refactor-loader origin/dev
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Naming convention:** `../{repo-name}-{issue-number}` (e.g., `../mesh-195`, `../mesh-pr-42`).
|
|
90
|
+
|
|
91
|
+
Each worktree:
|
|
92
|
+
- Has its own working directory and index
|
|
93
|
+
- Is on its own `mesh/{issue-number}-{slug}` branch from dev
|
|
94
|
+
- Shares the same `.git` object store (disk-efficient)
|
|
95
|
+
|
|
96
|
+
### Per-Worktree Agent Workflow
|
|
97
|
+
|
|
98
|
+
Each agent operates inside its worktree exactly like the single-issue workflow:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
cd ../mesh-195
|
|
102
|
+
|
|
103
|
+
# Work normally โ commits, tests, pushes
|
|
104
|
+
git add -A && git commit -m "fix: stamp bug (#195)"
|
|
105
|
+
git push -u origin mesh/195-fix-stamp-bug
|
|
106
|
+
|
|
107
|
+
# Create PR targeting dev
|
|
108
|
+
gh pr create --base dev --title "fix: stamp bug" --body "Closes #195" --draft
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
All PRs target `dev` independently. Agents never interfere with each other's filesystem.
|
|
112
|
+
|
|
113
|
+
### Runtime State in Worktrees
|
|
114
|
+
|
|
115
|
+
The runtime directory (`.mesh/` or `.mesh/`) exists in each worktree as a copy. This is safe because:
|
|
116
|
+
- `.gitattributes` declares `merge=union` on append-only files (history.md, decisions.md, logs)
|
|
117
|
+
- Each agent appends to its own section; union merge reconciles on PR merge to dev
|
|
118
|
+
- **Rule:** Never rewrite or reorder runtime state files in a worktree โ append only
|
|
119
|
+
|
|
120
|
+
### Cleanup After Merge
|
|
121
|
+
|
|
122
|
+
After a worktree's PR is merged to dev:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# From the main clone
|
|
126
|
+
git worktree remove ../mesh-195
|
|
127
|
+
git worktree prune # clean stale metadata
|
|
128
|
+
git branch -d mesh/195-fix-stamp-bug
|
|
129
|
+
git push origin --delete mesh/195-fix-stamp-bug
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
If a worktree was deleted manually (rm -rf), `git worktree prune` recovers the state.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Multi-Repo Downstream Scenarios
|
|
137
|
+
|
|
138
|
+
When work spans multiple repositories (e.g., Mercury Mesh-cli changes need Mercury Mesh-sdk changes, or a user's app depends on Mercury Mesh):
|
|
139
|
+
|
|
140
|
+
### Setup
|
|
141
|
+
|
|
142
|
+
Clone downstream repos as siblings to the main repo:
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
~/work/
|
|
146
|
+
Mercury Mesh-pr/ # main repo
|
|
147
|
+
Mercury Mesh-sdk/ # downstream dependency
|
|
148
|
+
user-app/ # consumer project
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Each repo gets its own issue branch following its own naming convention. If the downstream repo also uses Mercury Mesh conventions, use `mesh/{issue-number}-{slug}`.
|
|
152
|
+
|
|
153
|
+
### Coordinated PRs
|
|
154
|
+
|
|
155
|
+
- Create PRs in each repo independently
|
|
156
|
+
- Link them in PR descriptions:
|
|
157
|
+
```
|
|
158
|
+
Closes #42
|
|
159
|
+
|
|
160
|
+
**Depends on:** Mercury Mesh-sdk PR #17 (Mercury Mesh-sdk changes required for this feature)
|
|
161
|
+
```
|
|
162
|
+
- Merge order: dependencies first (e.g., Mercury Mesh-sdk), then dependents (e.g., Mercury Mesh-cli)
|
|
163
|
+
|
|
164
|
+
### Local Linking for Testing
|
|
165
|
+
|
|
166
|
+
Before pushing, verify cross-repo changes work together:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# Node.js / npm
|
|
170
|
+
cd ../Mercury Mesh-sdk && npm link
|
|
171
|
+
cd ../Mercury Mesh-pr && npm link Mercury Mesh-sdk
|
|
172
|
+
|
|
173
|
+
# Go
|
|
174
|
+
# Use replace directive in go.mod:
|
|
175
|
+
# replace github.com/org/Mercury Mesh-sdk => ../Mercury Mesh-sdk
|
|
176
|
+
|
|
177
|
+
# Python
|
|
178
|
+
cd ../Mercury Mesh-sdk && pip install -e .
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Important:** Remove local links before committing. `npm link` and `go replace` are dev-only โ CI must use published packages or PR-specific refs.
|
|
182
|
+
|
|
183
|
+
### Worktrees + Multi-Repo
|
|
184
|
+
|
|
185
|
+
These compose naturally. You can have:
|
|
186
|
+
- Multiple worktrees in the main repo (parallel issues)
|
|
187
|
+
- Separate clones for downstream repos
|
|
188
|
+
- Each combination operates independently
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Anti-Patterns
|
|
193
|
+
|
|
194
|
+
- โ Branching from main (branch from dev)
|
|
195
|
+
- โ PR targeting main directly (target dev)
|
|
196
|
+
- โ Non-conforming branch names (must be Mercury Mesh/{number}-{slug})
|
|
197
|
+
- โ Committing directly to main or dev (use PRs)
|
|
198
|
+
- โ Switching branches in the main clone while worktrees are active (use worktrees instead)
|
|
199
|
+
- โ Using worktrees for cross-repo work (use separate clones)
|
|
200
|
+
- โ Leaving stale worktrees after PR merge (clean up immediately)
|
|
201
|
+
|
|
202
|
+
## Promotion Pipeline
|
|
203
|
+
|
|
204
|
+
- dev โ insiders: Automated sync on green build
|
|
205
|
+
- dev โ main: Manual merge when ready for stable release, then tag
|
|
206
|
+
- Hotfixes: Branch from main as `hotfix/{slug}`, PR to dev, cherry-pick to main if urgent
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: github-multi-account
|
|
3
|
+
description: Detect and set up account-locked gh aliases for multi-account GitHub. The AI reads this skill, detects accounts, asks the user which is personal/work, and runs the setup automatically.
|
|
4
|
+
confidence: high
|
|
5
|
+
source: https://github.com/tamirdresher/Mercury Mesh-skills/tree/main/plugins/github-multi-account
|
|
6
|
+
author: tamirdresher
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# GitHub Multi-Account โ AI-Driven Setup
|
|
10
|
+
|
|
11
|
+
## When to Activate
|
|
12
|
+
When the user has multiple GitHub accounts (check with `gh auth status`). If you see 2+ accounts listed, this skill applies.
|
|
13
|
+
|
|
14
|
+
## What to Do (as the AI agent)
|
|
15
|
+
|
|
16
|
+
### Step 1: Detect accounts
|
|
17
|
+
Run: `gh auth status`
|
|
18
|
+
Look for multiple accounts. Note which usernames are listed.
|
|
19
|
+
|
|
20
|
+
### Step 2: Ask the user
|
|
21
|
+
Ask: "I see you have multiple GitHub accounts: {list them}. Which one is your personal account and which is your work/EMU account?"
|
|
22
|
+
|
|
23
|
+
### Step 3: Run the setup automatically
|
|
24
|
+
Once the user confirms, do ALL of this for them:
|
|
25
|
+
|
|
26
|
+
```powershell
|
|
27
|
+
# 1. Define the functions
|
|
28
|
+
$personal = "THEIR_PERSONAL_USERNAME"
|
|
29
|
+
$work = "THEIR_WORK_USERNAME"
|
|
30
|
+
|
|
31
|
+
# 2. Add to PowerShell profile
|
|
32
|
+
$profilePath = $PROFILE.CurrentUserAllHosts
|
|
33
|
+
if (!(Test-Path $profilePath)) { New-Item -Path $profilePath -Force | Out-Null }
|
|
34
|
+
$existing = Get-Content $profilePath -Raw -ErrorAction SilentlyContinue
|
|
35
|
+
if ($existing -notmatch "gh-personal") {
|
|
36
|
+
$block = @"
|
|
37
|
+
|
|
38
|
+
# === GitHub Multi-Account Aliases ===
|
|
39
|
+
function gh-personal { gh auth switch --user $personal 2>`$null | Out-Null; gh @args }
|
|
40
|
+
function gh-work { gh auth switch --user $work 2>`$null | Out-Null; gh @args }
|
|
41
|
+
Set-Alias ghp gh-personal
|
|
42
|
+
Set-Alias ghw gh-work
|
|
43
|
+
"@
|
|
44
|
+
Add-Content -Path $profilePath -Value $block
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
# 3. Create CMD wrappers
|
|
48
|
+
$binDir = Join-Path $env:USERPROFILE ".mesh\bin"
|
|
49
|
+
if (!(Test-Path $binDir)) { New-Item -ItemType Directory -Path $binDir -Force | Out-Null }
|
|
50
|
+
"@echo off`ngh auth switch --user $personal >nul 2>&1`ngh %*" | Out-File "$binDir\ghp.cmd" -Encoding ascii
|
|
51
|
+
"@echo off`ngh auth switch --user $work >nul 2>&1`ngh %*" | Out-File "$binDir\ghw.cmd" -Encoding ascii
|
|
52
|
+
|
|
53
|
+
# 4. Add to PATH
|
|
54
|
+
$userPath = [Environment]::GetEnvironmentVariable("PATH", "User")
|
|
55
|
+
if ($userPath -notmatch [regex]::Escape($binDir)) {
|
|
56
|
+
[Environment]::SetEnvironmentVariable("PATH", "$binDir;$userPath", "User")
|
|
57
|
+
$env:PATH = "$binDir;$env:PATH"
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
# 5. Load in current session
|
|
61
|
+
function gh-personal { gh auth switch --user $personal 2>$null | Out-Null; gh @args }
|
|
62
|
+
function gh-work { gh auth switch --user $work 2>$null | Out-Null; gh @args }
|
|
63
|
+
Set-Alias ghp gh-personal
|
|
64
|
+
Set-Alias ghw gh-work
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Step 4: Verify for the user
|
|
68
|
+
Run these and show the results:
|
|
69
|
+
```powershell
|
|
70
|
+
ghp api user --jq '.login' # should show personal username
|
|
71
|
+
ghw api user --jq '.login' # should show work username
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Step 5: Tell the user
|
|
75
|
+
"All set! From now on use `ghp` for personal repos and `ghw` for work repos. I'll use them too."
|
|
76
|
+
|
|
77
|
+
## After Setup โ Usage Rules
|
|
78
|
+
|
|
79
|
+
1. **NEVER** use bare `gh` for repo operations โ always `ghp` or `ghw`
|
|
80
|
+
2. **NEVER** manually `gh auth switch` โ the aliases handle it
|
|
81
|
+
3. Determine alias by repo owner:
|
|
82
|
+
- Personal account repos โ `ghp` / `gh-personal`
|
|
83
|
+
- Work/EMU account repos โ `ghw` / `gh-work`
|
|
84
|
+
|
|
85
|
+
## Repo-Specific Account Binding
|
|
86
|
+
|
|
87
|
+
This repo (`bradygaster/Mercury Mesh`) is bound to the **bradygaster** (personal) account.
|
|
88
|
+
All `gh` operations in this repo MUST use `ghp` / `gh-personal`.
|
|
89
|
+
|
|
90
|
+
## For Mercury Mesh Agents
|
|
91
|
+
At the TOP of any script touching GitHub, define:
|
|
92
|
+
```powershell
|
|
93
|
+
function gh-personal { gh auth switch --user bradygaster 2>$null | Out-Null; gh @args }
|
|
94
|
+
function gh-work { gh auth switch --user bradyg_microsoft 2>$null | Out-Null; gh @args }
|
|
95
|
+
```
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: history-hygiene
|
|
3
|
+
description: Record final outcomes to history.md, not intermediate requests or reversed decisions
|
|
4
|
+
domain: documentation, team-collaboration
|
|
5
|
+
confidence: high
|
|
6
|
+
source: earned (Kobayashi v0.6.0 incident, team intervention)
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
History files (.md files tracking decisions, spawns, outcomes) are read cold by future agents. Stale or incorrect entries poison decision-making downstream. The Kobayashi incident proved this: history said "Brady decided v0.6.0" when Brady had reversed that to v0.8.17. Future spawns read the wrong truth and repeated the mistake.
|
|
12
|
+
|
|
13
|
+
## Patterns
|
|
14
|
+
|
|
15
|
+
- **Record the final outcome**, not the initial request.
|
|
16
|
+
- **Wait for confirmation** before writing to history โ don't log intermediate states.
|
|
17
|
+
- **If a decision reverses**, update the entry immediately โ don't leave stale data.
|
|
18
|
+
- **One read = one truth.** A future agent should never need to cross-reference other files to understand what actually happened.
|
|
19
|
+
|
|
20
|
+
## Examples
|
|
21
|
+
|
|
22
|
+
โ **Correct:**
|
|
23
|
+
- "Migration target: v0.8.17 (initially discussed as v0.6.0, corrected by Brady)"
|
|
24
|
+
- "Reverted to Node 18 per Brady's explicit request on 2024-01-15"
|
|
25
|
+
|
|
26
|
+
โ **Incorrect:**
|
|
27
|
+
- "Brady directed v0.6.0" (when later reversed)
|
|
28
|
+
- Recording what was *requested* instead of what *actually happened*
|
|
29
|
+
- Logging entries before outcome is confirmed
|
|
30
|
+
|
|
31
|
+
## Anti-Patterns
|
|
32
|
+
|
|
33
|
+
- Writing intermediate or "for now" states to disk
|
|
34
|
+
- Attributing decisions without confirming final direction
|
|
35
|
+
- Treating history like a draft โ history is the source of truth
|
|
36
|
+
- Assuming readers will cross-reference or verify; they won't
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "humanizer"
|
|
3
|
+
description: "Tone enforcement patterns for external-facing community responses"
|
|
4
|
+
metadata:
|
|
5
|
+
domain: "communication, tone, community"
|
|
6
|
+
confidence: "low"
|
|
7
|
+
source: "manual (RFC #426 โ PAO External Communications)"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Context
|
|
11
|
+
|
|
12
|
+
Use this skill whenever PAO drafts external-facing responses for issues or discussions.
|
|
13
|
+
|
|
14
|
+
- Tone must be direct, human, and high-signal โ never submissive, robotic, or corporate.
|
|
15
|
+
- The Brand Language System and Persona Manifesto apply everywhere: **sharp signal is mandatory**.
|
|
16
|
+
- This applies to **all external-facing content** drafted by PAO in Phase 1 issues/discussions workflows.
|
|
17
|
+
|
|
18
|
+
## Patterns
|
|
19
|
+
|
|
20
|
+
1. **Signal-first opening** โ Start with the readout, not pleasantries: "Signal received", "Telemetry locked", "Routing correction"
|
|
21
|
+
2. **Active voice** โ "We reproduced the fault" not "This is being investigated"
|
|
22
|
+
3. **Second person** โ Address the person directly ("you" not "the user")
|
|
23
|
+
4. **Controlled connectors** โ Use transitions with motion: "Current read:", "Next burn:", "Transmit this:"
|
|
24
|
+
5. **Specific, not vague** โ "This hits the casting module in v0.8.x" not "We are aware of issues"
|
|
25
|
+
6. **Measured empathy** โ Validate the signal without soft filler: "Real fault", "Valid concern", "Confirmed drift"
|
|
26
|
+
7. **Action-oriented closes** โ End with the next vector or telemetry request, never "happy to help"
|
|
27
|
+
8. **Bounded uncertainty** โ "Root cause is still in the dark. Here's what we ruled out" is better than false confidence
|
|
28
|
+
9. **No apologies. No filler.** Never use "I'm sorry," "Thanks for reporting," "Great question," "Let us know," or similar padding
|
|
29
|
+
10. **Profanity filter** โ Never include profanity, slurs, or aggressive language, even when quoting
|
|
30
|
+
11. **Baseline comparison** โ Responses should align with tone of 5-10 gold-standard responses (>80% similarity threshold)
|
|
31
|
+
12. **Tension without hostility** โ The voice can challenge or sharpen; it does not belittle
|
|
32
|
+
13. **Information request** โ Ask for specific details, not open-ended "can you provide more info?"
|
|
33
|
+
14. **No link-dumping** โ Don't just paste URLs. Provide context: "Read the getting started guide โ routing section" not just a bare link
|
|
34
|
+
|
|
35
|
+
## Examples
|
|
36
|
+
|
|
37
|
+
### 1. Welcome
|
|
38
|
+
|
|
39
|
+
```text
|
|
40
|
+
{author}, signal received. Welcome aboard.
|
|
41
|
+
{substantive response}
|
|
42
|
+
Telemetry remains open if the thread picks up drift.
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### 2. Troubleshooting
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
Telemetry locked, {author}.
|
|
49
|
+
Current read: {explanation}
|
|
50
|
+
{steps or workaround}
|
|
51
|
+
If the drift persists, transmit {specific ask}.
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 3. Feature guidance
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
Vector received. {context on current state}
|
|
58
|
+
{guidance or workaround}
|
|
59
|
+
Queued on the flight path: {tracking info if applicable}.
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 4. Redirect
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
Routing correction, {author}. This belongs in {correct location}.
|
|
66
|
+
{brief explanation of why}
|
|
67
|
+
Open the thread there and carry this context forward: {handoff note}.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 5. Acknowledgment
|
|
71
|
+
|
|
72
|
+
```text
|
|
73
|
+
Confirmed, {author}. Real fault.
|
|
74
|
+
{what we know so far}
|
|
75
|
+
Patch is not in the burn yet. Telemetry will update here when it is.
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### 6. Closing
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
Patch landed in {version/PR}.
|
|
82
|
+
{brief summary of what changed}
|
|
83
|
+
Re-enter the burn and confirm hull integrity.
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 7. Technical uncertainty
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
Signal received, {author}. Root cause is still in the dark.
|
|
90
|
+
Ruled out: {list}
|
|
91
|
+
Transmit {specific ask}.
|
|
92
|
+
That narrows the drift. Telemetry will update when the fault resolves.
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Anti-Patterns
|
|
96
|
+
|
|
97
|
+
- โ Corporate speak: "We appreciate your patience as we investigate this matter"
|
|
98
|
+
- โ Marketing hype: "Mercury Mesh is the BEST way to..." or "This amazing feature..."
|
|
99
|
+
- โ Passive voice: "It has been determined that..." or "The issue is being tracked"
|
|
100
|
+
- โ Dismissive: "This works as designed" without acknowledging the signal
|
|
101
|
+
- โ Over-promising: "We'll ship this next week" without commitment from the team
|
|
102
|
+
- โ Empty acknowledgment: "Thanks for your feedback" with no substance
|
|
103
|
+
- โ Robot signatures: "Best regards, PAO" or "Sincerely, The Mercury Mesh Team"
|
|
104
|
+
- โ Excessive emoji: More than 1-2 emoji per response
|
|
105
|
+
- โ Quoting profanity: Even when the original issue contains it, paraphrase instead
|
|
106
|
+
- โ Link-dumping: Pasting URLs without context ("See: https://...")
|
|
107
|
+
- โ Open-ended info requests: "Can you provide more information?" without specifying what information
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "init-mode"
|
|
3
|
+
description: "Team initialization flow (Phase 1 proposal + Phase 2 creation)"
|
|
4
|
+
metadata:
|
|
5
|
+
domain: "orchestration"
|
|
6
|
+
confidence: "high"
|
|
7
|
+
source: "extracted"
|
|
8
|
+
primary_tool: "ask_user"
|
|
9
|
+
primary_tool_use: "Confirm team roster with a selectable menu during Phase 1 proposal."
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Context
|
|
13
|
+
|
|
14
|
+
Init Mode activates when `.mesh/team.md` does not exist, or exists but has zero roster entries under `## Members`. The coordinator proposes a team (Phase 1), waits for user confirmation, then creates the team structure (Phase 2).
|
|
15
|
+
|
|
16
|
+
## Patterns
|
|
17
|
+
|
|
18
|
+
### Phase 1: Propose the Team
|
|
19
|
+
|
|
20
|
+
No team exists yet. Propose one โ but **DO NOT create any files until the user confirms.**
|
|
21
|
+
|
|
22
|
+
1. **Identify the user.** Run `git config user.name` to learn who you're working with. Use their name in conversation (e.g., *"Brady, declare the mission."*). Store their name (NOT email) in `team.md` under Project Context. **Never read or store `git config user.email` โ email addresses are PII and must not be written to committed files.**
|
|
23
|
+
2. Ask: *"Commander, declare the mission. Share the language, stack, and what the system must do."*
|
|
24
|
+
3. **Cast the team.** Before proposing names, run the Casting & Persistent Naming algorithm (see that section):
|
|
25
|
+
- Determine team size (typically 4โ5 + Scribe).
|
|
26
|
+
- Determine assignment shape from the user's project description.
|
|
27
|
+
- Derive resonance signals from the session and repo context.
|
|
28
|
+
- Select a universe. If the universe is custom, allocate character names from that universe based on the related list found in the `.mesh/templates/casting/` directory. Prefer custom universes when available.
|
|
29
|
+
- Scribe is always "Scribe" โ exempt from casting.
|
|
30
|
+
- Ralph is always "Ralph" โ exempt from casting.
|
|
31
|
+
4. Propose the team with their cast names. Example (names will vary per cast):
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
๐๏ธ {CastName1} โ Lead Scope, decisions, code review
|
|
35
|
+
โ๏ธ {CastName2} โ Frontend Dev React, UI, components
|
|
36
|
+
๐ง {CastName3} โ Backend Dev APIs, database, services
|
|
37
|
+
๐งช {CastName4} โ Tester Tests, quality, edge cases
|
|
38
|
+
๐ Scribe โ (silent) Memory, decisions, session logs
|
|
39
|
+
๐ Ralph โ (monitor) Work queue, backlog, keep-alive
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
5. Use the `ask_user` tool to confirm the roster. Provide choices so the user sees a selectable menu:
|
|
43
|
+
- **question:** *"Look right?"*
|
|
44
|
+
- **choices:** `["Yes, hire this team", "Add someone", "Change a role"]`
|
|
45
|
+
|
|
46
|
+
**โ ๏ธ STOP. Your response ENDS here. Do NOT proceed to Phase 2. Do NOT create any files or directories. Wait for the user's reply.**
|
|
47
|
+
|
|
48
|
+
### Phase 2: Create the Team
|
|
49
|
+
|
|
50
|
+
**Trigger:** The user replied to Phase 1 with confirmation ("yes", "looks good", or similar affirmative), OR the user's reply to Phase 1 is a task (treat as implicit "yes").
|
|
51
|
+
|
|
52
|
+
> If the user said "add someone" or "change a role," go back to Phase 1 step 3 and re-propose. Do NOT enter Phase 2 until the user confirms.
|
|
53
|
+
|
|
54
|
+
6. Create the `.mesh/` directory structure (see `.mesh/templates/` for format guides or use the standard structure: team.md, routing.md, ceremonies.md, decisions.md, decisions/inbox/, casting/, agents/, orchestration-log/, skills/, log/).
|
|
55
|
+
|
|
56
|
+
**Casting state initialization:** Copy `.mesh/templates/casting-policy.json` to `.mesh/casting/policy.json` (or create from defaults). Create `registry.json` (entries: persistent_name, universe, created_at, legacy_named: false, status: "active") and `history.json` (first assignment snapshot with unique assignment_id).
|
|
57
|
+
|
|
58
|
+
**Seeding:** Each agent's `history.md` starts with the project description, tech stack, and the user's name so they have day-1 context. Agent folder names are the cast name in lowercase (e.g., `.mesh/agents/ripley/`). The Scribe's charter includes maintaining `decisions.md` and cross-agent context sharing.
|
|
59
|
+
|
|
60
|
+
**Team.md structure:** `team.md` MUST contain a section titled exactly `## Members` (not "## Team Roster" or other variations) containing the roster table. This header is hard-coded in GitHub workflows (`mesh-heartbeat.yml`, `mesh-issue-assign.yml`, `mesh-triage.yml`, `sync-mesh-labels.yml`) for label automation. If the header is missing or titled differently, label routing breaks.
|
|
61
|
+
|
|
62
|
+
**Merge driver for append-only files:** Create or update `.gitattributes` at the repo root to enable conflict-free merging of `.mesh/` state across branches:
|
|
63
|
+
```
|
|
64
|
+
.mesh/decisions.md merge=union
|
|
65
|
+
.mesh/agents/*/history.md merge=union
|
|
66
|
+
.mesh/log/** merge=union
|
|
67
|
+
.mesh/orchestration-log/** merge=union
|
|
68
|
+
```
|
|
69
|
+
The `union` merge driver keeps all lines from both sides, which is correct for append-only files. This makes worktree-local strategy work seamlessly when branches merge โ decisions, memories, and logs from all branches combine automatically.
|
|
70
|
+
|
|
71
|
+
7. Say: *"โ
Team hired. Try: '{FirstCastName}, set up the project structure'"*
|
|
72
|
+
|
|
73
|
+
8. **Post-setup input sources** (optional โ ask after team is created, not during casting):
|
|
74
|
+
- PRD/spec: *"Do you have a PRD or spec document? (file path, paste it, or skip)"* โ If provided, follow PRD Mode flow
|
|
75
|
+
- GitHub issues: *"Is there a GitHub repo with issues I should pull from? (owner/repo, or skip)"* โ If provided, follow GitHub Issues Mode flow
|
|
76
|
+
- Human members: *"Are any humans joining the team? (names and roles, or just AI for now)"* โ If provided, add per Human Team Members section
|
|
77
|
+
- Copilot agent: *"Want to include @copilot? It can pick up issues autonomously. (yes/no)"* โ If yes, follow Copilot Coding Agent Member section and ask about auto-assignment
|
|
78
|
+
- These are additive. Don't block โ if the user skips or gives a task instead, proceed immediately.
|
|
79
|
+
|
|
80
|
+
## Examples
|
|
81
|
+
|
|
82
|
+
**Example flow:**
|
|
83
|
+
1. Coordinator detects no team.md โ Init Mode
|
|
84
|
+
2. Runs `git config user.name` โ "Brady"
|
|
85
|
+
3. Asks: *"Brady, declare the mission."*
|
|
86
|
+
4. User: *"TypeScript CLI tool with GitHub API integration"*
|
|
87
|
+
5. Coordinator runs casting algorithm โ selects "The Usual Suspects" universe
|
|
88
|
+
6. Proposes: Keaton (Lead), Verbal (Prompt), Fenster (Backend), Hockney (Tester), Scribe, Ralph
|
|
89
|
+
7. Uses `ask_user` with choices โ user selects "Yes, hire this team"
|
|
90
|
+
8. Coordinator creates `.mesh/` structure, initializes casting state, seeds agents
|
|
91
|
+
9. Says: *"โ
Team hired. Try: 'Keaton, set up the project structure'"*
|
|
92
|
+
|
|
93
|
+
## Anti-Patterns
|
|
94
|
+
|
|
95
|
+
- โ Creating files before user confirms Phase 1
|
|
96
|
+
- โ Mixing agents from different universes in the same cast
|
|
97
|
+
- โ Skipping the `ask_user` tool and assuming confirmation
|
|
98
|
+
- โ Proceeding to Phase 2 when user said "add someone" or "change a role"
|
|
99
|
+
- โ Using `## Team Roster` instead of `## Members` as the header (breaks GitHub workflows)
|
|
100
|
+
- โ Forgetting to initialize `.mesh/casting/` state files
|
|
101
|
+
- โ Reading or storing `git config user.email` (PII violation)
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "mercury mesh-conventions"
|
|
3
|
+
description: "Core conventions and patterns used in the Mercury Mesh codebase"
|
|
4
|
+
domain: "project-conventions"
|
|
5
|
+
confidence: "high"
|
|
6
|
+
source: "manual"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
These conventions apply to all work on the Mercury Mesh CLI tool (`create-Mercury Mesh`). Mercury Mesh is a zero-dependency Node.js package that adds AI agent teams to any project. Understanding these patterns is essential before modifying any Mercury Mesh source code.
|
|
11
|
+
|
|
12
|
+
## Patterns
|
|
13
|
+
|
|
14
|
+
### Zero Dependencies
|
|
15
|
+
Mercury Mesh has zero runtime dependencies. Everything uses Node.js built-ins (`fs`, `path`, `os`, `child_process`). Do not add packages to `dependencies` in `package.json`. This is a hard constraint, not a preference.
|
|
16
|
+
|
|
17
|
+
### Node.js Built-in Test Runner
|
|
18
|
+
Tests use `node:test` and `node:assert/strict` โ no test frameworks. Run with `npm test`. Test files live in `test/`. The test command is `node --test test/`.
|
|
19
|
+
|
|
20
|
+
### Error Handling โ `fatal()` Pattern
|
|
21
|
+
All user-facing errors use the `fatal(msg)` function which prints a red `โ` prefix and exits with code 1. Never throw unhandled exceptions or print raw stack traces. The global `uncaughtException` handler calls `fatal()` as a safety net.
|
|
22
|
+
|
|
23
|
+
### ANSI Color Constants
|
|
24
|
+
Colors are defined as constants at the top of `index.js`: `GREEN`, `RED`, `DIM`, `BOLD`, `RESET`. Use these constants โ do not inline ANSI escape codes.
|
|
25
|
+
|
|
26
|
+
### File Structure
|
|
27
|
+
- `.mesh/` โ Team state (user-owned, never overwritten by upgrades)
|
|
28
|
+
- `.mesh/templates/` โ Template files copied from `templates/` (Mercury Mesh-owned, overwritten on upgrade)
|
|
29
|
+
- `.github/agents/mercury-mesh.agent.md` โ Coordinator prompt (Mercury Mesh-owned, overwritten on upgrade)
|
|
30
|
+
- `templates/` โ Source templates shipped with the npm package
|
|
31
|
+
- `.mesh/skills/` โ Team skills in SKILL.md format (user-owned)
|
|
32
|
+
- `.mesh/decisions/inbox/` โ Drop-box for parallel decision writes
|
|
33
|
+
|
|
34
|
+
### Windows Compatibility
|
|
35
|
+
Always use `path.join()` for file paths โ never hardcode `/` or `\` separators. Mercury Mesh must work on Windows, macOS, and Linux. All tests must pass on all platforms.
|
|
36
|
+
|
|
37
|
+
### Init Idempotency
|
|
38
|
+
The init flow uses a skip-if-exists pattern: if a file or directory already exists, skip it and report "already exists." Never overwrite user state during init. The upgrade flow overwrites only Mercury Mesh-owned files.
|
|
39
|
+
|
|
40
|
+
### Copy Pattern
|
|
41
|
+
`copyRecursive(src, target)` handles both files and directories. It creates parent directories with `{ recursive: true }` and uses `fs.copyFileSync` for files.
|
|
42
|
+
|
|
43
|
+
## Examples
|
|
44
|
+
|
|
45
|
+
```javascript
|
|
46
|
+
// Error handling
|
|
47
|
+
function fatal(msg) {
|
|
48
|
+
console.error(`${RED}โ${RESET} ${msg}`);
|
|
49
|
+
process.exit(1);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// File path construction (Windows-safe)
|
|
53
|
+
const agentDest = path.join(dest, '.github', 'agents', 'mercury-mesh.agent.md');
|
|
54
|
+
|
|
55
|
+
// Skip-if-exists pattern
|
|
56
|
+
if (!fs.existsSync(ceremoniesDest)) {
|
|
57
|
+
fs.copyFileSync(ceremoniesSrc, ceremoniesDest);
|
|
58
|
+
console.log(`${GREEN}โ${RESET} .mesh/ceremonies.md`);
|
|
59
|
+
} else {
|
|
60
|
+
console.log(`${DIM}ceremonies.md already exists โ skipping${RESET}`);
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Anti-Patterns
|
|
65
|
+
- **Adding npm dependencies** โ Mercury Mesh is zero-dep. Use Node.js built-ins only.
|
|
66
|
+
- **Hardcoded path separators** โ Never use `/` or `\` directly. Always `path.join()`.
|
|
67
|
+
- **Overwriting user state on init** โ Init skips existing files. Only upgrade overwrites Mercury Mesh-owned files.
|
|
68
|
+
- **Raw stack traces** โ All errors go through `fatal()`. Users see clean messages, not stack traces.
|
|
69
|
+
- **Inline ANSI codes** โ Use the color constants (`GREEN`, `RED`, `DIM`, `BOLD`, `RESET`).
|