@fredericboyer/dev-team 0.6.0 → 0.8.0

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.
Files changed (47) hide show
  1. package/README.md +12 -11
  2. package/dist/bin/dev-team.js +12 -12
  3. package/dist/bin/dev-team.js.map +1 -1
  4. package/dist/create-agent.js +6 -6
  5. package/dist/create-agent.js.map +1 -1
  6. package/dist/doctor.js +15 -16
  7. package/dist/doctor.js.map +1 -1
  8. package/dist/files.js +2 -0
  9. package/dist/files.js.map +1 -1
  10. package/dist/init.js +55 -44
  11. package/dist/init.js.map +1 -1
  12. package/dist/scan.js +9 -9
  13. package/dist/scan.js.map +1 -1
  14. package/dist/skill-recommendations.d.ts +57 -0
  15. package/dist/skill-recommendations.js +290 -0
  16. package/dist/skill-recommendations.js.map +1 -0
  17. package/dist/status.js +11 -11
  18. package/dist/status.js.map +1 -1
  19. package/dist/update.d.ts +1 -4
  20. package/dist/update.js +178 -59
  21. package/dist/update.js.map +1 -1
  22. package/package.json +3 -3
  23. package/templates/CLAUDE.md +9 -7
  24. package/templates/agents/dev-team-beck.md +14 -2
  25. package/templates/agents/dev-team-borges.md +4 -4
  26. package/templates/agents/dev-team-conway.md +15 -3
  27. package/templates/agents/dev-team-deming.md +20 -2
  28. package/templates/agents/dev-team-drucker.md +21 -7
  29. package/templates/agents/dev-team-hamilton.md +14 -2
  30. package/templates/agents/dev-team-mori.md +14 -2
  31. package/templates/agents/dev-team-tufte.md +14 -2
  32. package/templates/agents/dev-team-voss.md +14 -2
  33. package/templates/hooks/dev-team-post-change-review.js +1 -25
  34. package/templates/hooks/dev-team-pre-commit-gate.js +80 -47
  35. package/templates/hooks/dev-team-watch-list.js +3 -3
  36. package/templates/settings.json +6 -20
  37. package/templates/skill-recommendations.json +169 -0
  38. package/templates/skills/dev-team-assess/SKILL.md +167 -0
  39. package/templates/skills/dev-team-audit/SKILL.md +8 -3
  40. package/templates/skills/dev-team-merge/SKILL.md +95 -0
  41. package/templates/skills/dev-team-review/SKILL.md +11 -4
  42. package/templates/skills/dev-team-task/SKILL.md +34 -44
  43. package/dist/parallel.d.ts +0 -127
  44. package/dist/parallel.js +0 -323
  45. package/dist/parallel.js.map +0 -1
  46. package/templates/hooks/dev-team-parallel-loop.js +0 -188
  47. package/templates/hooks/dev-team-task-loop.js +0 -73
@@ -0,0 +1,169 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "description": "Curated allowlist of trusted Claude Code skill sources. Only official framework and tool maintainer skills are included.",
4
+ "trustedSources": [
5
+ "anthropic",
6
+ "vercel",
7
+ "microsoft",
8
+ "expo",
9
+ "prisma",
10
+ "supabase",
11
+ "playwright",
12
+ "vuejs",
13
+ "rust-lang"
14
+ ],
15
+ "ecosystems": {
16
+ "node": {
17
+ "detectFiles": ["package.json"],
18
+ "label": "Node.js / JavaScript / TypeScript"
19
+ },
20
+ "python": {
21
+ "detectFiles": ["requirements.txt", "pyproject.toml", "setup.py", "Pipfile", "setup.cfg"],
22
+ "label": "Python"
23
+ },
24
+ "ruby": {
25
+ "detectFiles": ["Gemfile"],
26
+ "label": "Ruby"
27
+ },
28
+ "go": {
29
+ "detectFiles": ["go.mod"],
30
+ "label": "Go"
31
+ },
32
+ "rust": {
33
+ "detectFiles": ["Cargo.toml"],
34
+ "label": "Rust"
35
+ },
36
+ "java": {
37
+ "detectFiles": ["pom.xml", "build.gradle", "build.gradle.kts"],
38
+ "label": "Java / Kotlin"
39
+ }
40
+ },
41
+ "skills": [
42
+ {
43
+ "id": "react",
44
+ "name": "React Documentation Lookup",
45
+ "description": "Search React documentation for components, hooks, and patterns",
46
+ "source": "vercel",
47
+ "detectDeps": ["react", "react-dom"],
48
+ "detectFiles": [],
49
+ "ecosystem": "node"
50
+ },
51
+ {
52
+ "id": "nextjs",
53
+ "name": "Next.js Documentation Lookup",
54
+ "description": "Search Next.js docs for routing, data fetching, and deployment",
55
+ "source": "vercel",
56
+ "detectDeps": ["next"],
57
+ "detectFiles": ["next.config.js", "next.config.mjs", "next.config.ts"],
58
+ "ecosystem": "node"
59
+ },
60
+ {
61
+ "id": "vue",
62
+ "name": "Vue.js Documentation Lookup",
63
+ "description": "Search Vue.js docs for components, composition API, and reactivity",
64
+ "source": "vuejs",
65
+ "detectDeps": ["vue"],
66
+ "detectFiles": ["vue.config.js", "vite.config.ts"],
67
+ "ecosystem": "node"
68
+ },
69
+ {
70
+ "id": "expo",
71
+ "name": "Expo Documentation Lookup",
72
+ "description": "Search Expo docs for React Native, EAS Build, and native modules",
73
+ "source": "expo",
74
+ "detectDeps": ["expo"],
75
+ "detectFiles": ["app.json", "app.config.js", "app.config.ts"],
76
+ "ecosystem": "node"
77
+ },
78
+ {
79
+ "id": "prisma",
80
+ "name": "Prisma Documentation Lookup",
81
+ "description": "Search Prisma docs for schema modeling, migrations, and client usage",
82
+ "source": "prisma",
83
+ "detectDeps": ["prisma", "@prisma/client"],
84
+ "detectFiles": ["prisma/schema.prisma"],
85
+ "ecosystem": "node"
86
+ },
87
+ {
88
+ "id": "supabase",
89
+ "name": "Supabase Documentation Lookup",
90
+ "description": "Search Supabase docs for auth, database, storage, and edge functions",
91
+ "source": "supabase",
92
+ "detectDeps": ["@supabase/supabase-js"],
93
+ "detectFiles": ["supabase/config.toml"],
94
+ "ecosystem": "node"
95
+ },
96
+ {
97
+ "id": "playwright",
98
+ "name": "Playwright Test Runner",
99
+ "description": "Search Playwright docs for browser automation, selectors, and test patterns",
100
+ "source": "microsoft",
101
+ "detectDeps": ["@playwright/test", "playwright"],
102
+ "detectFiles": ["playwright.config.ts", "playwright.config.js"],
103
+ "ecosystem": "node"
104
+ },
105
+ {
106
+ "id": "angular",
107
+ "name": "Angular Documentation Lookup",
108
+ "description": "Search Angular docs for components, services, and dependency injection",
109
+ "source": "microsoft",
110
+ "detectDeps": ["@angular/core"],
111
+ "detectFiles": ["angular.json"],
112
+ "ecosystem": "node"
113
+ },
114
+ {
115
+ "id": "django",
116
+ "name": "Django Documentation Lookup",
117
+ "description": "Search Django docs for models, views, templates, and ORM",
118
+ "source": "anthropic",
119
+ "detectDeps": ["django", "Django"],
120
+ "detectFiles": ["manage.py"],
121
+ "ecosystem": "python"
122
+ },
123
+ {
124
+ "id": "fastapi",
125
+ "name": "FastAPI Documentation Lookup",
126
+ "description": "Search FastAPI docs for endpoints, dependency injection, and async patterns",
127
+ "source": "anthropic",
128
+ "detectDeps": ["fastapi"],
129
+ "detectFiles": [],
130
+ "ecosystem": "python"
131
+ },
132
+ {
133
+ "id": "flask",
134
+ "name": "Flask Documentation Lookup",
135
+ "description": "Search Flask docs for routing, blueprints, and extensions",
136
+ "source": "anthropic",
137
+ "detectDeps": ["flask", "Flask"],
138
+ "detectFiles": [],
139
+ "ecosystem": "python"
140
+ },
141
+ {
142
+ "id": "rails",
143
+ "name": "Ruby on Rails Documentation Lookup",
144
+ "description": "Search Rails docs for ActiveRecord, controllers, and migrations",
145
+ "source": "anthropic",
146
+ "detectDeps": ["rails"],
147
+ "detectFiles": ["config/routes.rb", "bin/rails"],
148
+ "ecosystem": "ruby"
149
+ },
150
+ {
151
+ "id": "rust-analyzer",
152
+ "name": "Rust Documentation Lookup",
153
+ "description": "Search Rust docs for ownership, traits, async, and crate APIs",
154
+ "source": "rust-lang",
155
+ "detectDeps": [],
156
+ "detectFiles": ["Cargo.toml"],
157
+ "ecosystem": "rust"
158
+ },
159
+ {
160
+ "id": "spring-boot",
161
+ "name": "Spring Boot Documentation Lookup",
162
+ "description": "Search Spring Boot docs for auto-configuration, REST APIs, and data access",
163
+ "source": "anthropic",
164
+ "detectDeps": ["spring-boot-starter"],
165
+ "detectFiles": [],
166
+ "ecosystem": "java"
167
+ }
168
+ ]
169
+ }
@@ -0,0 +1,167 @@
1
+ ---
2
+ name: dev-team:assess
3
+ description: Audit the health of your project's dev-team knowledge base — learnings, agent memory, and CLAUDE.md. Finds stale entries, contradictions, enforcement gaps, and promotion opportunities. Use periodically or after major changes.
4
+ ---
5
+
6
+ Assess the health of the dev-team knowledge base for: $ARGUMENTS
7
+
8
+ ## Scope
9
+
10
+ This skill audits **only update-safe files** — files that survive `dev-team update`:
11
+
12
+ - `.dev-team/learnings.md` — shared project learnings
13
+ - `.dev-team/agent-memory/*/MEMORY.md` — per-agent calibration memory
14
+ - Project `CLAUDE.md` — project instructions (content outside `<!-- dev-team:begin/end -->` markers)
15
+
16
+ **NEVER modify** agent definitions (`.dev-team/agents/`), hook scripts (`.dev-team/hooks/`), skill definitions (`.dev-team/skills/`), or settings (`.claude/settings.json`). These are managed by templates and get overwritten on `dev-team update`.
17
+
18
+ ## Setup
19
+
20
+ 1. Read the following files to build a complete picture:
21
+ - `.dev-team/learnings.md`
22
+ - All `.dev-team/agent-memory/*/MEMORY.md` files (use Glob to discover them)
23
+ - The project's `CLAUDE.md` (root of repo)
24
+ - `.dev-team/config.json` (to know which agents are installed)
25
+
26
+ 2. If `$ARGUMENTS` specifies a focus area (e.g., "learnings", "memory", "claude.md"), scope the audit to that area only. Otherwise, audit all three.
27
+
28
+ ## Phase 1: Learnings audit (`.dev-team/learnings.md`)
29
+
30
+ Check for:
31
+
32
+ ### Staleness
33
+ - Entries that reference removed files, deprecated patterns, or old tool versions
34
+ - Entries contradicted by current code (e.g., "We use Express" when the codebase uses Fastify)
35
+ - Date-stamped entries older than 6 months without recent revalidation
36
+
37
+ ### Contradictions
38
+ - Entries that contradict each other (e.g., one says "always use snake_case" and another says "we adopted camelCase")
39
+ - Entries that contradict the project's `CLAUDE.md` instructions
40
+ - Entries that contradict agent memory files
41
+
42
+ ### Enforcement gaps
43
+ - Learnings that state a rule but have no corresponding hook, linter rule, or agent check to enforce it
44
+ - Learnings about process that are not reflected in `CLAUDE.md`
45
+
46
+ ### Promotion opportunities
47
+ - Learnings that are mature enough to become formal project instructions in `CLAUDE.md`
48
+ - Learnings that should be elevated to an ADR in `docs/adr/`
49
+ - Learnings that are really agent-specific calibration and should move to the appropriate agent's `MEMORY.md`
50
+
51
+ ## Phase 2: Agent memory audit (`.dev-team/agent-memory/*/MEMORY.md`)
52
+
53
+ Check each agent's memory file for:
54
+
55
+ ### Empty or boilerplate files
56
+ - Memory files that are empty or contain only the initial template header
57
+ - Agents that have been active (based on learnings references or git history) but have no memory entries
58
+
59
+ ### Staleness
60
+ - Memory entries that reference files, patterns, or decisions that no longer exist
61
+ - Calibration notes about overruled findings when the underlying code has since changed
62
+ - Entries that duplicate what is already in `.dev-team/learnings.md` (should be deduplicated)
63
+
64
+ ### Inconsistencies
65
+ - Agent memory that contradicts `.dev-team/learnings.md`
66
+ - Agent memory that contradicts another agent's memory (e.g., Szabo says "auth uses sessions" but Voss says "auth uses JWT")
67
+ - Agent memory that contradicts `CLAUDE.md`
68
+
69
+ ### Coverage gaps
70
+ - Installed agents (from `config.json`) with no meaningful memory — suggests the agent has not been calibrated
71
+ - Agents referenced in learnings but missing a memory file
72
+
73
+ ## Phase 3: CLAUDE.md audit
74
+
75
+ Check the project's `CLAUDE.md` for:
76
+
77
+ ### Accuracy
78
+ - Instructions that do not match actual project behavior (verify claims against code)
79
+ - Workflow descriptions that reference tools, commands, or patterns not present in the repo
80
+ - Agent descriptions or hook triggers that are outdated
81
+
82
+ ### Completeness
83
+ - Important patterns from `.dev-team/learnings.md` that should be in `CLAUDE.md` but are not
84
+ - Missing sections that a new developer would need (build commands, test commands, architecture overview)
85
+ - Installed agents or hooks not mentioned in `CLAUDE.md`
86
+
87
+ ### Staleness
88
+ - Content outside the `<!-- dev-team:begin/end -->` markers that references old patterns
89
+ - References to removed dependencies, deprecated APIs, or old file paths
90
+
91
+ ### Learnings promotion
92
+ - Mature learnings that have been stable for multiple sessions and should be promoted to `CLAUDE.md` instructions
93
+
94
+ ## Report
95
+
96
+ Produce a structured health report:
97
+
98
+ ### Executive summary
99
+
100
+ One paragraph: overall knowledge base health, number of issues found by severity.
101
+
102
+ ### Findings by area
103
+
104
+ For each area (learnings, agent memory, CLAUDE.md), list findings using classified severity:
105
+
106
+ ```
107
+ **[DEFECT]** area — description
108
+ Concrete impact: what goes wrong if this is not fixed.
109
+ Suggested fix: specific action to take.
110
+ ```
111
+
112
+ ```
113
+ **[RISK]** area — description
114
+ Why this matters and what could go wrong.
115
+ ```
116
+
117
+ ```
118
+ **[SUGGESTION]** area — description
119
+ Specific improvement with expected benefit.
120
+ ```
121
+
122
+ ### Cross-cutting issues
123
+
124
+ Issues that span multiple files:
125
+ - Contradictions between learnings and agent memory
126
+ - Information that exists in the wrong file
127
+ - Patterns documented in multiple places with divergent descriptions
128
+
129
+ ### Recommended actions
130
+
131
+ Numbered list of concrete actions, ordered by priority:
132
+
133
+ 1. **Fix [DEFECT] items** — these represent actively wrong information
134
+ 2. **Address [RISK] items** — these will cause problems soon
135
+ 3. **Consider [SUGGESTION] items** — these improve overall health
136
+
137
+ For each action, specify which file to edit and what change to make.
138
+
139
+ ### Health score
140
+
141
+ Provide a simple health score:
142
+
143
+ | Area | Status | Issues |
144
+ |------|--------|--------|
145
+ | Learnings | healthy / needs attention / unhealthy | count by severity |
146
+ | Agent Memory | healthy / needs attention / unhealthy | count by severity |
147
+ | CLAUDE.md | healthy / needs attention / unhealthy | count by severity |
148
+ | **Overall** | **status** | **total** |
149
+
150
+ Thresholds:
151
+ - **Healthy**: 0 defects, 0-2 risks
152
+ - **Needs attention**: 0 defects, 3+ risks OR 1 defect
153
+ - **Unhealthy**: 2+ defects
154
+
155
+ ## Completion
156
+
157
+ After the health report is delivered:
158
+ 1. Spawn **@dev-team-borges** (Librarian) to review memory freshness and capture any learnings from the assessment findings. This is mandatory.
159
+ 2. Include Borges's recommendations in the final report.
160
+
161
+ ## When to run
162
+
163
+ - **Periodically** — monthly or after a burst of activity
164
+ - **After major refactors** — code changes may invalidate learnings
165
+ - **Before onboarding** — ensure the knowledge base is accurate for new team members
166
+ - **After resolving many review findings** — learnings and memory may need cleanup
167
+ - **On request** — `/dev-team:assess`
@@ -22,7 +22,7 @@ Run a comprehensive audit of: $ARGUMENTS
22
22
  1. Spawn all three agents as **parallel background subagents** using the Agent tool with `subagent_type: "general-purpose"`.
23
23
 
24
24
  2. Each agent's prompt must include:
25
- - The agent's full definition (read from `.claude/agents/<agent>.md`)
25
+ - The agent's full definition (read from `.dev-team/agents/<agent>.md`)
26
26
  - The scope (directory/pattern or "full codebase")
27
27
  - Instruction to produce classified findings: `[DEFECT]`, `[RISK]`, `[QUESTION]`, `[SUGGESTION]`
28
28
  - Instruction to read the actual code and tests for full context
@@ -84,8 +84,13 @@ Same grouping. Include actionable recommendations.
84
84
 
85
85
  Numbered list of concrete actions, ordered by priority. Each action should reference the specific finding it addresses.
86
86
 
87
+ ### Security preamble
88
+
89
+ Before starting the audit, check for open security alerts: run `/dev-team:security-status` if available, or check `gh api repos/{owner}/{repo}/code-scanning/alerts?state=open` and `gh api repos/{owner}/{repo}/dependabot/alerts?state=open`. Include these in the audit scope.
90
+
87
91
  ### Completion
88
92
 
89
93
  After the audit report is delivered:
90
- 1. Spawn **@dev-team-borges** (Librarian) to review memory freshness and capture learnings from the audit findings. This is mandatory.
91
- 2. Include Borges's recommendations in the final report.
94
+ 1. You MUST spawn **@dev-team-borges** (Librarian) as the final step to review memory freshness and capture learnings from the audit findings. Do NOT skip this.
95
+ 2. If Borges was not spawned, the audit is INCOMPLETE.
96
+ 3. Include Borges's recommendations in the final report.
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: dev-team:merge
3
+ description: Merge a PR with monitoring -- checks Copilot comments, sets auto-merge, monitors until complete, triggers next steps.
4
+ user_invocable: true
5
+ ---
6
+
7
+ Merge a pull request with full monitoring: $ARGUMENTS
8
+
9
+ ## Setup
10
+
11
+ 1. Determine the PR number:
12
+ - If provided as argument, use it directly
13
+ - Otherwise, detect from current branch: `gh pr view --json number --jq .number`
14
+ - If no PR found, report error and stop
15
+
16
+ 2. Capture repo context:
17
+ - `gh repo view --json nameWithOwner --jq .nameWithOwner` to get {owner}/{repo}
18
+
19
+ ## Step 1: Check for Copilot review comments
20
+
21
+ Before proceeding with merge, check for Copilot (and other automated) review comments:
22
+
23
+ ```
24
+ gh api repos/{owner}/{repo}/pulls/{number}/reviews
25
+ gh api repos/{owner}/{repo}/pulls/{number}/comments
26
+ ```
27
+
28
+ Filter for reviews/comments from bot accounts (especially `copilot` and `github-actions`).
29
+
30
+ - If Copilot has left comments or suggestions:
31
+ 1. Display each finding with file, line, and comment body
32
+ 2. For actionable suggestions: apply the fix in code, commit, and push
33
+ 3. For each comment thread: reply acknowledging the finding and resolve the thread using `gh api repos/{owner}/{repo}/pulls/{number}/comments/{id}/replies`
34
+ 4. After addressing all findings, re-push and wait for CI to restart
35
+
36
+ - If no Copilot comments: proceed to Step 2
37
+
38
+ ## Step 2: Set auto-merge
39
+
40
+ ```bash
41
+ gh pr merge {number} --squash --auto --delete-branch
42
+ ```
43
+
44
+ This tells GitHub to merge automatically once all required checks pass.
45
+
46
+ ## Step 3: Check CI status and monitor
47
+
48
+ Check current CI status:
49
+
50
+ ```bash
51
+ gh pr checks {number}
52
+ ```
53
+
54
+ **If all checks are passing:**
55
+ - The PR will merge immediately (or within seconds)
56
+ - Verify by checking: `gh pr view {number} --json state --jq .state`
57
+ - If state is `MERGED`, proceed to Step 4
58
+
59
+ **If checks are pending:**
60
+ - Inform the user that auto-merge is set and CI is running
61
+ - Spawn a background monitoring agent to poll until completion:
62
+ - Poll every 30 seconds: `gh pr view {number} --json state --jq .state`
63
+ - If state becomes `MERGED`: report success and proceed to Step 4
64
+ - If checks fail: report the failure with details from `gh pr checks {number}`
65
+ - Timeout after 15 minutes of polling
66
+
67
+ **If checks are failing:**
68
+ - Report which checks failed: `gh pr checks {number}`
69
+ - Do NOT proceed with merge
70
+ - Suggest investigating the failures
71
+
72
+ ## Step 4: Post-merge actions
73
+
74
+ After merge is confirmed:
75
+
76
+ 1. **Switch to main and pull latest:**
77
+ ```bash
78
+ git checkout main
79
+ git pull origin main
80
+ ```
81
+
82
+ 2. **Report the merge commit:**
83
+ ```bash
84
+ git log -1 --format="%H %s"
85
+ ```
86
+
87
+ 3. **Check for next work:**
88
+ - If there is a known next issue in the current milestone or the user mentioned follow-up work, suggest starting it
89
+ - If the branch was a worktree, note that the worktree can be cleaned up
90
+
91
+ ## Error handling
92
+
93
+ - If `gh` commands fail, check authentication: `gh auth status`
94
+ - If merge conflicts are reported, inform the user -- do not attempt automatic resolution
95
+ - If branch protection rules block the merge, report which rules are not satisfied
@@ -19,7 +19,7 @@ Run a multi-agent parallel review of: $ARGUMENTS
19
19
  | `auth`, `login`, `password`, `token`, `session`, `crypto`, `secret`, `permission`, `oauth`, `jwt`, `cors`, `csrf` | @dev-team-szabo | Security surface |
20
20
  | `/api/`, `/routes/`, `schema`, `.graphql`, `.proto`, `openapi` | @dev-team-mori | API/UI contract |
21
21
  | `docker`, `.env`, `config`, `migration`, `database`, `.sql`, `deploy` | @dev-team-voss | Infrastructure |
22
- | `.github/workflows`, `.claude/`, `tsconfig`, `eslint`, `prettier`, `package.json` | @dev-team-deming | Tooling |
22
+ | `.github/workflows`, `.dev-team/`, `tsconfig`, `eslint`, `prettier`, `package.json` | @dev-team-deming | Tooling |
23
23
  | `readme`, `changelog`, `.md`, `/docs/` | @dev-team-tufte | Documentation |
24
24
  | `/adr/`, `architecture`, `/core/`, `/domain/` | @dev-team-brooks | Architecture |
25
25
  | `package.json`, `version`, `changelog`, release workflows | @dev-team-conway | Release artifacts |
@@ -32,7 +32,7 @@ Run a multi-agent parallel review of: $ARGUMENTS
32
32
  1. Spawn each selected agent as a **parallel background subagent** using the Agent tool with `subagent_type: "general-purpose"`.
33
33
 
34
34
  2. Each agent's prompt must include:
35
- - The agent's full definition (read from `.claude/agents/<agent>.md`)
35
+ - The agent's full definition (read from `.dev-team/agents/<agent>.md`)
36
36
  - The list of changed files relevant to their domain
37
37
  - Instruction to produce classified findings: `[DEFECT]`, `[RISK]`, `[QUESTION]`, `[SUGGESTION]`
38
38
  - Instruction to read the actual code — not just the diff — for full context
@@ -67,8 +67,15 @@ Group by severity:
67
67
 
68
68
  State the verdict clearly. List what must be fixed for approval if requesting changes.
69
69
 
70
+ ### Security preamble
71
+
72
+ Before starting the review, check for open security alerts: run `/dev-team:security-status` if available, or check `gh api repos/{owner}/{repo}/code-scanning/alerts?state=open` and `gh api repos/{owner}/{repo}/dependabot/alerts?state=open`. Flag any critical findings in the review report.
73
+
70
74
  ### Completion
71
75
 
72
76
  After the review report is delivered:
73
- 1. Spawn **@dev-team-borges** (Librarian) to review memory freshness and capture any learnings from the review findings. This is mandatory.
74
- 2. Include Borges's recommendations in the final report.
77
+ 1. You MUST spawn **@dev-team-borges** (Librarian) as the final step to review memory freshness and capture any learnings from the review findings. Do NOT skip this.
78
+ 2. If Borges was not spawned, the review is INCOMPLETE.
79
+ 3. **Borges memory gate**: If Borges reports that any participating agent's MEMORY.md is empty or contains only boilerplate, this is a **[DEFECT]** that blocks review completion. The agent must write substantive learnings before the review can be marked done.
80
+ 4. Include Borges's recommendations in the final report.
81
+ 5. **If the verdict is Approve** and this review is for a PR that is ready to merge, invoke `/dev-team:merge` to set auto-merge, monitor CI, and verify the merge completes. The PR lifecycle does not end at approval -- it ends at merge.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: dev-team:task
3
- description: Start an iterative task loop with adversarial review gates. Use when the user wants a task implemented with automatic quality convergence the loop continues until no [DEFECT] challenges remain or max iterations are reached.
3
+ description: Start an iterative task loop with adversarial review gates. Use when the user wants a task implemented with automatic quality convergence -- the loop continues until no [DEFECT] challenges remain or max iterations are reached.
4
4
  ---
5
5
 
6
6
  Start a task loop for: $ARGUMENTS
@@ -11,25 +11,15 @@ Start a task loop for: $ARGUMENTS
11
11
  - `--max-iterations N` (default: 10)
12
12
  - `--reviewers` (default: @dev-team-szabo, @dev-team-knuth)
13
13
 
14
- 2. Create the state file `.claude/dev-team-task.json`:
15
- ```json
16
- {
17
- "prompt": "<the original task description>",
18
- "iteration": 1,
19
- "maxIterations": <N>,
20
- "reviewers": ["dev-team-szabo", "dev-team-knuth"]
21
- }
22
- ```
23
-
24
- 3. Determine the right implementing agent based on the task:
25
- - Backend/API/data work → @dev-team-voss
26
- - Frontend/UI work → @dev-team-mori
27
- - Test writing → @dev-team-beck
28
- - Tooling/config → @dev-team-deming
29
- - Documentation → @dev-team-tufte
30
- - Release/versioning → @dev-team-conway
31
-
32
- 4. **Architect pre-assessment** (skip for bug fixes, typo fixes, config tweaks):
14
+ 2. Determine the right implementing agent based on the task:
15
+ - Backend/API/data work -> @dev-team-voss
16
+ - Frontend/UI work -> @dev-team-mori
17
+ - Test writing -> @dev-team-beck
18
+ - Tooling/config -> @dev-team-deming
19
+ - Documentation -> @dev-team-tufte
20
+ - Release/versioning -> @dev-team-conway
21
+
22
+ 3. **Architect pre-assessment** (skip for bug fixes, typo fixes, config tweaks):
33
23
  Spawn @dev-team-brooks to assess:
34
24
  - Does this task introduce a new pattern, tool, or convention?
35
25
  - Does it change module boundaries, dependency direction, or layer responsibilities?
@@ -39,20 +29,26 @@ Start a task loop for: $ARGUMENTS
39
29
 
40
30
  If an ADR is needed, include "Write ADR-NNN: <title>" in the implementation task. The implementing agent writes the ADR file. Architect reviews it post-implementation alongside code review.
41
31
 
32
+ ## Pre-implementation: best-practices research
33
+
34
+ Before the first iteration, the implementing agent should research current best practices relevant to the task — checking official documentation for the tools, frameworks, and platforms involved. This ensures decisions are based on current ecosystem recommendations, not stale assumptions. When current best practices conflict with established codebase conventions, prefer consistency and flag the newer approach as a `[SUGGESTION]` with a migration path.
35
+
42
36
  ## Execution loop
43
37
 
44
- Each iteration:
38
+ Track iterations in conversation context (no state files). For each iteration:
39
+
45
40
  1. The implementing agent works on the task.
46
41
  2. After implementation, spawn review agents in parallel as background tasks.
47
42
  3. Collect classified challenges from reviewers.
48
43
  4. If any `[DEFECT]` challenges exist, address them in the next iteration.
49
- 5. If no `[DEFECT]` remains, output `<promise>DONE</promise>` to exit the loop.
44
+ 5. If no `[DEFECT]` remains, output DONE to exit the loop.
45
+ 6. If max iterations reached without convergence, report remaining defects and exit.
50
46
 
51
- The Stop hook (`dev-team-task-loop.js`) manages iteration counting and re-injection.
47
+ The convergence check happens in conversation context: count iterations, check for `[DEFECT]` findings, and decide whether to continue or exit.
52
48
 
53
49
  ## Parallel mode
54
50
 
55
- When multiple issues are being addressed in a single session, the task loop switches to parallel orchestration (see ADR-019). Drucker coordinates all phases.
51
+ When multiple issues are being addressed in a single session, the task loop switches to parallel orchestration (see ADR-019). Drucker coordinates all phases in conversation context.
56
52
 
57
53
  ### Phase 0: Brooks pre-assessment (batch)
58
54
  Spawn @dev-team-brooks once with all issues. Brooks identifies:
@@ -63,22 +59,10 @@ Spawn @dev-team-brooks once with all issues. Brooks identifies:
63
59
  Issues in the same conflict group execute sequentially. Independent issues proceed in parallel.
64
60
 
65
61
  ### Phase 1: Parallel implementation
66
- Drucker spawns one implementing agent per independent issue, each on its own branch (`feat/<issue>-<description>`). Agents work concurrently without awareness of each other. Track state in `.claude/dev-team-parallel.json`:
67
- ```json
68
- {
69
- "mode": "parallel",
70
- "issues": [
71
- { "issue": 42, "branch": "feat/42-add-auth", "agent": "dev-team-voss", "status": "implementing" },
72
- { "issue": 43, "branch": "feat/43-fix-nav", "agent": "dev-team-mori", "status": "implementing" }
73
- ],
74
- "phase": "implementation",
75
- "conflictGroups": [[42, 55]],
76
- "reviewWave": null
77
- }
78
- ```
62
+ Drucker spawns one implementing agent per independent issue, each on its own branch (`feat/<issue>-<description>`). Agents work concurrently without awareness of each other. Drucker tracks which issues are assigned to which agents and branches in conversation context.
79
63
 
80
64
  ### Phase 2: Review wave
81
- Reviews do **not** start until **all** implementation agents have completed. Once all are done, spawn review agents (Szabo + Knuth, plus conditional reviewers) in parallel across all branches simultaneously. Each reviewer receives the diff for one specific branch and produces classified findings scoped to that branch.
65
+ Reviews do **not** start until **all** implementation agents have completed (Agent tool provides completion notifications as the sync barrier). Once all are done, spawn review agents (Szabo + Knuth, plus conditional reviewers) in parallel across all branches simultaneously. Each reviewer receives the diff for one specific branch and produces classified findings scoped to that branch.
82
66
 
83
67
  ### Phase 3: Defect routing
84
68
  Collect all findings. Route `[DEFECT]` items back to the original implementing agent for each branch. Agents fix defects on their own branch. After fixes, another review wave runs. Continue until no `[DEFECT]` findings remain or the per-branch iteration limit is reached.
@@ -90,13 +74,19 @@ Borges runs **once** across all branches after the final review wave clears. Thi
90
74
  Parallel mode is complete when:
91
75
  1. All branches have zero `[DEFECT]` findings, OR the per-branch iteration limit (default: 10) is reached
92
76
  2. Borges has run across all branches
93
- 3. `.claude/dev-team-parallel.json` is deleted
77
+
78
+ ## Security preamble
79
+
80
+ Before starting work, check for open security alerts: run `/dev-team:security-status` if available, or check `gh api repos/{owner}/{repo}/code-scanning/alerts?state=open` and `gh api repos/{owner}/{repo}/dependabot/alerts?state=open`. Flag any critical findings before proceeding.
94
81
 
95
82
  ## Completion
96
83
 
97
84
  When the loop exits:
98
- 1. Delete `.claude/dev-team-task.json`.
99
- 2. Spawn **@dev-team-borges** (Librarian) to review memory freshness, cross-agent coherence, and system improvement opportunities. This is mandatory.
100
- 3. Summarize what was accomplished across all iterations.
101
- 4. Report any remaining `[RISK]` or `[SUGGESTION]` items, including Borges's recommendations.
102
- 5. Write key learnings to agent MEMORY.md files.
85
+ 1. **Create PR and merge**: If changes are on a feature branch, create the PR (body must include `Closes #<issue>`) and invoke `/dev-team:merge` to set auto-merge, monitor CI, handle Copilot review comments, and verify the merge completes. Work is NOT done until the PR is merged. If merge fails (CI failures, merge conflicts, branch protection), report the blocker to the human rather than leaving the PR unattended.
86
+ 2. **Clean up worktree**: If the work was done in a worktree, clean it up after the branch is pushed and the PR is created. Do not wait for merge to clean the worktree.
87
+ 3. You MUST spawn **@dev-team-borges** (Librarian) as the final step to review memory freshness, cross-agent coherence, and system improvement opportunities. Do NOT skip this.
88
+ 4. If Borges was not spawned, the task is INCOMPLETE.
89
+ 5. **Borges memory gate**: If Borges reports that any implementing agent's MEMORY.md is empty or contains only boilerplate after a task, this is a **[DEFECT]** that blocks task completion. The implementing agent must write substantive learnings before the task can be marked done. Empty agent memory after a task means the enforcement pipeline failed.
90
+ 6. Summarize what was accomplished across all iterations.
91
+ 7. Report any remaining `[RISK]` or `[SUGGESTION]` items, including Borges's recommendations.
92
+ 8. Write key learnings to agent MEMORY.md files.