hatch3r 1.6.2 → 1.7.1
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/README.md +5 -5
- package/agents/hatch3r-a11y-auditor.md +5 -0
- package/agents/hatch3r-architect.md +6 -1
- package/agents/hatch3r-ci-watcher.md +5 -0
- package/agents/hatch3r-context-rules.md +5 -0
- package/agents/hatch3r-creator.md +304 -0
- package/agents/hatch3r-dependency-auditor.md +5 -0
- package/agents/hatch3r-devops.md +5 -0
- package/agents/hatch3r-docs-writer.md +5 -0
- package/agents/hatch3r-fixer.md +6 -1
- package/agents/hatch3r-implementer.md +6 -1
- package/agents/hatch3r-learnings-loader.md +5 -0
- package/agents/hatch3r-lint-fixer.md +5 -0
- package/agents/hatch3r-perf-profiler.md +5 -0
- package/agents/hatch3r-researcher.md +6 -1
- package/agents/hatch3r-reviewer.md +5 -0
- package/agents/hatch3r-security-auditor.md +5 -0
- package/agents/hatch3r-test-writer.md +5 -0
- package/agents/modes/architecture.md +3 -0
- package/agents/modes/boundary-analysis.md +3 -0
- package/agents/modes/codebase-impact.md +3 -0
- package/agents/modes/complexity-risk.md +3 -0
- package/agents/modes/coverage-analysis.md +3 -0
- package/agents/modes/current-state.md +3 -0
- package/agents/modes/feature-design.md +3 -0
- package/agents/modes/impact-analysis.md +3 -0
- package/agents/modes/library-docs.md +3 -0
- package/agents/modes/migration-path.md +3 -0
- package/agents/modes/prior-art.md +3 -0
- package/agents/modes/refactoring-strategy.md +3 -0
- package/agents/modes/regression.md +3 -0
- package/agents/modes/requirements-elicitation.md +4 -0
- package/agents/modes/risk-assessment.md +3 -0
- package/agents/modes/risk-prioritization.md +3 -0
- package/agents/modes/root-cause.md +3 -0
- package/agents/modes/similar-implementation.md +3 -0
- package/agents/modes/symptom-trace.md +3 -0
- package/agents/modes/test-pattern.md +3 -0
- package/agents/shared/efficiency-patterns.md +71 -0
- package/agents/shared/external-knowledge.md +2 -0
- package/agents/shared/injection-patterns.md +2 -0
- package/agents/shared/prompt-structure.md +2 -0
- package/agents/shared/quality-charter.md +11 -0
- package/agents/shared/user-content-templates.md +257 -0
- package/agents/shared/user-question-protocol.md +95 -0
- package/checks/accessibility.md +1 -0
- package/checks/code-quality.md +1 -0
- package/checks/performance.md +1 -0
- package/checks/security.md +1 -0
- package/checks/testing.md +1 -0
- package/commands/board/pickup-azure-devops.md +1 -0
- package/commands/board/pickup-delegation-multi.md +1 -0
- package/commands/board/pickup-delegation.md +1 -0
- package/commands/board/pickup-github.md +1 -0
- package/commands/board/pickup-gitlab.md +1 -0
- package/commands/board/pickup-modes.md +1 -0
- package/commands/board/pickup-post-impl.md +1 -0
- package/commands/board/shared-azure-devops.md +3 -0
- package/commands/board/shared-board-overview.md +1 -0
- package/commands/board/shared-github.md +18 -0
- package/commands/board/shared-gitlab.md +5 -0
- package/commands/hatch3r-agent-customize.md +9 -2
- package/commands/hatch3r-api-spec.md +16 -0
- package/commands/hatch3r-benchmark.md +16 -0
- package/commands/hatch3r-board-fill.md +17 -1
- package/commands/hatch3r-board-groom.md +3 -0
- package/commands/hatch3r-board-init.md +3 -0
- package/commands/hatch3r-board-pickup.md +17 -1
- package/commands/hatch3r-board-refresh.md +3 -0
- package/commands/hatch3r-board-shared.md +24 -0
- package/commands/hatch3r-bug-plan.md +16 -0
- package/commands/hatch3r-codebase-map.md +16 -0
- package/commands/hatch3r-command-customize.md +3 -0
- package/commands/hatch3r-context-health.md +3 -0
- package/commands/hatch3r-cost-tracking.md +3 -0
- package/commands/hatch3r-create.md +197 -0
- package/commands/hatch3r-debug.md +16 -0
- package/commands/hatch3r-dep-audit.md +3 -0
- package/commands/hatch3r-feature-plan.md +16 -0
- package/commands/hatch3r-healthcheck.md +3 -0
- package/commands/hatch3r-hooks.md +3 -0
- package/commands/hatch3r-learn.md +3 -0
- package/commands/hatch3r-migration-plan.md +16 -0
- package/commands/hatch3r-onboard.md +16 -0
- package/commands/hatch3r-pr-resolve.md +668 -0
- package/commands/hatch3r-project-spec.md +16 -0
- package/commands/hatch3r-quick-change.md +18 -2
- package/commands/hatch3r-recipe.md +3 -0
- package/commands/hatch3r-refactor-plan.md +16 -0
- package/commands/hatch3r-release.md +3 -0
- package/commands/hatch3r-report.md +167 -0
- package/commands/hatch3r-revision.md +17 -1
- package/commands/hatch3r-roadmap.md +16 -0
- package/commands/hatch3r-rule-customize.md +3 -0
- package/commands/hatch3r-security-audit.md +3 -0
- package/commands/hatch3r-skill-customize.md +3 -0
- package/commands/hatch3r-test-plan.md +16 -0
- package/commands/hatch3r-workflow.md +18 -2
- package/commands/revision/revision-board-integration.md +1 -0
- package/commands/revision/revision-delegation.md +1 -0
- package/commands/revision/revision-modes.md +1 -0
- package/commands/revision/revision-quality.md +1 -0
- package/dist/cli/index.js +2962 -1217
- package/dist/cli/index.js.map +1 -1
- package/github-agents/hatch3r-docs-agent.md +3 -0
- package/github-agents/hatch3r-lint-agent.md +3 -0
- package/github-agents/hatch3r-security-agent.md +3 -0
- package/github-agents/hatch3r-test-agent.md +3 -0
- package/hooks/hatch3r-ci-failure.md +1 -0
- package/hooks/hatch3r-file-save.md +1 -0
- package/hooks/hatch3r-post-merge.md +1 -0
- package/hooks/hatch3r-pre-commit.md +1 -0
- package/hooks/hatch3r-pre-push.md +1 -0
- package/hooks/hatch3r-session-start.md +1 -0
- package/package.json +10 -1
- package/prompts/hatch3r-bug-triage.md +2 -0
- package/prompts/hatch3r-code-review.md +2 -0
- package/prompts/hatch3r-pr-description.md +2 -0
- package/rules/hatch3r-accessibility-standards.md +1 -0
- package/rules/hatch3r-agent-orchestration-detail.md +1 -0
- package/rules/hatch3r-agent-orchestration.md +24 -0
- package/rules/hatch3r-agent-orchestration.mdc +23 -0
- package/rules/hatch3r-api-design.md +1 -0
- package/rules/hatch3r-browser-verification.md +1 -0
- package/rules/hatch3r-ci-cd.md +1 -0
- package/rules/hatch3r-code-standards.md +1 -0
- package/rules/hatch3r-component-conventions.md +1 -0
- package/rules/hatch3r-data-classification.md +1 -0
- package/rules/hatch3r-deep-context.md +2 -1
- package/rules/hatch3r-deep-context.mdc +1 -1
- package/rules/hatch3r-dependency-management.md +1 -0
- package/rules/hatch3r-feature-flags.md +1 -0
- package/rules/hatch3r-git-conventions.md +1 -0
- package/rules/hatch3r-i18n.md +1 -0
- package/rules/hatch3r-iteration-summary.md +88 -0
- package/rules/hatch3r-iteration-summary.mdc +83 -0
- package/rules/hatch3r-learning-consult.md +1 -0
- package/rules/hatch3r-migrations.md +1 -0
- package/rules/hatch3r-observability-logging.md +1 -0
- package/rules/hatch3r-observability-metrics.md +1 -0
- package/rules/hatch3r-observability-tracing-detail.md +1 -0
- package/rules/hatch3r-observability-tracing.md +1 -0
- package/rules/hatch3r-observability.md +1 -0
- package/rules/hatch3r-performance-budgets.md +1 -0
- package/rules/hatch3r-secrets-management.md +1 -0
- package/rules/hatch3r-security-patterns.md +1 -0
- package/rules/hatch3r-testing.md +1 -0
- package/rules/hatch3r-theming.md +1 -0
- package/rules/hatch3r-tooling-hierarchy.md +1 -0
- package/skills/hatch3r-a11y-audit/SKILL.md +2 -0
- package/skills/hatch3r-agent-customize/SKILL.md +2 -0
- package/skills/hatch3r-api-spec/SKILL.md +2 -0
- package/skills/hatch3r-architecture-review/SKILL.md +2 -0
- package/skills/hatch3r-bug-fix/SKILL.md +2 -0
- package/skills/hatch3r-ci-pipeline/SKILL.md +2 -0
- package/skills/hatch3r-command-customize/SKILL.md +2 -0
- package/skills/hatch3r-context-health/SKILL.md +2 -0
- package/skills/hatch3r-cost-tracking/SKILL.md +2 -0
- package/skills/hatch3r-customize/SKILL.md +2 -0
- package/skills/hatch3r-dep-audit/SKILL.md +2 -0
- package/skills/hatch3r-feature/SKILL.md +2 -0
- package/skills/hatch3r-gh-agentic-workflows/SKILL.md +2 -0
- package/skills/hatch3r-incident-response/SKILL.md +2 -0
- package/skills/hatch3r-issue-workflow/SKILL.md +2 -0
- package/skills/hatch3r-logical-refactor/SKILL.md +2 -0
- package/skills/hatch3r-migration/SKILL.md +2 -0
- package/skills/hatch3r-perf-audit/SKILL.md +2 -0
- package/skills/hatch3r-pr-creation/SKILL.md +2 -0
- package/skills/hatch3r-qa-validation/SKILL.md +2 -0
- package/skills/hatch3r-recipe/SKILL.md +2 -0
- package/skills/hatch3r-refactor/SKILL.md +2 -0
- package/skills/hatch3r-release/SKILL.md +2 -0
- package/skills/hatch3r-rule-customize/SKILL.md +2 -0
- package/skills/hatch3r-skill-customize/SKILL.md +2 -0
- package/skills/hatch3r-visual-refactor/SKILL.md +2 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: shared-user-question-protocol
|
|
3
|
+
type: reference
|
|
4
|
+
description: Protocol for how hatch3r agents and commands ask the user clarifying questions — when to ask, native-tool preference, and a plain-text fallback shape.
|
|
5
|
+
tags: [shared, ux, p1, p4]
|
|
6
|
+
cache_friendly: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
This protocol defines how hatch3r agents and commands surface clarifying or triage questions to the user across the 15 supported AI coding platforms. It is the single source of truth for the *how* of asking; the *whether* is governed by [quality-charter §3 "Question Unclear Requirements"](./quality-charter.md) and §8 "Escalate Ambiguity Early". Files that reference this protocol: the requirements-elicitation mode (`agents/modes/requirements-elicitation.md`), the five ASK-checkpoint commands, and the four ask-prone agents — researcher, fixer, architect, implementer.
|
|
12
|
+
|
|
13
|
+
## When To Ask
|
|
14
|
+
|
|
15
|
+
- **Ambiguous requirement** — the request maps to two or more reasonable interpretations that produce different code.
|
|
16
|
+
- **Irreversible decision** — deleting data, renaming a public API, dropping a column, force-pushing a branch.
|
|
17
|
+
- **Branching path** — two or more viable approaches with materially different cost, scope, or risk.
|
|
18
|
+
- **Conflicting constraints** — requirements that cannot all hold (e.g., "no new dependencies" and "use library X").
|
|
19
|
+
- **Missing acceptance criteria** — no testable definition of done for the requested change.
|
|
20
|
+
|
|
21
|
+
## When NOT To Ask
|
|
22
|
+
|
|
23
|
+
- The user already decided scope in this turn or an earlier turn of the same session.
|
|
24
|
+
- You are in free-text discussion, planning, or a status update — questions belong inside actionable workflows.
|
|
25
|
+
- The answer is verifiable by reading code, running a test, or grepping the repo — verify first, ask only if verification fails.
|
|
26
|
+
- The choice is reversible, low-stakes, and the safer default is obvious — pick the default and note it.
|
|
27
|
+
|
|
28
|
+
## How To Ask
|
|
29
|
+
|
|
30
|
+
1. Check whether your target platform exposes a native question or triage tool (see Platform-Native Tool below).
|
|
31
|
+
2. If yes, use the native tool — it produces better UX than free-text replies and is structured for the host runtime.
|
|
32
|
+
3. If no native tool exists on this platform, use the Plain-Text Fallback Template.
|
|
33
|
+
4. Ask at most one question per turn. Bundle related sub-questions into a single multiple-choice prompt rather than firing multiple turns.
|
|
34
|
+
|
|
35
|
+
## Platform-Native Tool
|
|
36
|
+
|
|
37
|
+
The marker below is replaced at canonical-write time with the enumeration table generated from `src/pipeline/adapterToolTranslator.ts::ASK_USER_TOOLS`. Look up your runtime platform and follow its row. If your platform's row reads "No documented native tool", use the Plain-Text Fallback Template defined in the next section.
|
|
38
|
+
|
|
39
|
+
<!-- HATCH3R:PLATFORM-TOOL -->
|
|
40
|
+
|
|
41
|
+
When viewing this file in the source repo (pre-generation), the marker is unsubstituted — refer to the adapter map in `src/pipeline/adapterToolTranslator.ts` for the same mappings.
|
|
42
|
+
|
|
43
|
+
## Plain-Text Fallback Template
|
|
44
|
+
|
|
45
|
+
Use this exact shape when no native tool is available:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
**Question:** <one-sentence question stating the choice>
|
|
49
|
+
|
|
50
|
+
1. <Option A> — <one-line rationale or trade-off>
|
|
51
|
+
2. <Option B> — <one-line rationale or trade-off>
|
|
52
|
+
3. <Option C> — <one-line rationale or trade-off>
|
|
53
|
+
|
|
54
|
+
Default if no response: <option number, e.g., 2>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Rules for the template:
|
|
58
|
+
|
|
59
|
+
- Two to four numbered options. One option is too few; five or more signals you have not narrowed the design.
|
|
60
|
+
- Each option carries a one-line trade-off so the user can pick without re-deriving the problem.
|
|
61
|
+
- The default-if-no-response line is mandatory — it removes the deadlock when the user is away or replies "you decide".
|
|
62
|
+
- The default option is the safest reversible choice, not the most ambitious one.
|
|
63
|
+
|
|
64
|
+
## Examples
|
|
65
|
+
|
|
66
|
+
**Example 1 — Ambiguous requirement.** Request: "Add caching to the user profile endpoint."
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
**Question:** Which cache scope matches your needs for the profile endpoint?
|
|
70
|
+
|
|
71
|
+
1. Per-user, 60s TTL — fastest response, stale data tolerated up to 60s.
|
|
72
|
+
2. Per-user, write-through invalidation — fresh data, +1 cache write per profile update.
|
|
73
|
+
3. Edge cache only — no app changes, but TTL is fixed by the CDN config.
|
|
74
|
+
|
|
75
|
+
Default if no response: 2
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Example 2 — Branching path.** Request: "Migrate the build to Vite."
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
**Question:** Should the Vite migration land in one PR or staged behind a feature flag?
|
|
82
|
+
|
|
83
|
+
1. Single PR — shorter total time, larger blast radius if a regression ships.
|
|
84
|
+
2. Staged with VITE_BUILD flag — two PRs, lets you A/B locally before flipping.
|
|
85
|
+
|
|
86
|
+
Default if no response: 2
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Anti-Patterns
|
|
90
|
+
|
|
91
|
+
- **Multi-question barrage** — asking five questions in one turn. Ask the highest-leverage one first; the answer often collapses the rest.
|
|
92
|
+
- **Options-free questions** — "What should I do?" forces the user to design the prompt. Always supply 2–4 candidate options with trade-offs.
|
|
93
|
+
- **Silent assumption** — proceeding when ambiguity is real. Apply quality-charter §8: log the ambiguity in structured output even if you decide to proceed under a default.
|
|
94
|
+
- **Echo-as-question** — restating the user's request back as a question ("So you want me to add caching?"). Confirm only when you have a specific decision point with options to offer.
|
|
95
|
+
- **Inflated default** — choosing the most disruptive option as the no-response default. Defaults must be the reversible, lowest-blast-radius choice.
|
package/checks/accessibility.md
CHANGED
package/checks/code-quality.md
CHANGED
package/checks/performance.md
CHANGED
package/checks/security.md
CHANGED
package/checks/testing.md
CHANGED
|
@@ -4,6 +4,7 @@ type: command
|
|
|
4
4
|
description: Azure DevOps-specific platform procedures for board-pickup. Covers az CLI commands for work item listing, status updates, collision detection, PR creation, and state transitions.
|
|
5
5
|
tags: [board, team, azure-devops]
|
|
6
6
|
quality_charter: agents/shared/quality-charter.md
|
|
7
|
+
cache_friendly: true
|
|
7
8
|
---
|
|
8
9
|
# Board Pickup — Azure DevOps Platform Details
|
|
9
10
|
|
|
@@ -4,6 +4,7 @@ type: command
|
|
|
4
4
|
description: Multi-issue sub-agent delegation protocols for board-pickup Steps 6b (epics) and 6c (batch). Covers level-by-level parallel execution, shared context, and quality pipelines.
|
|
5
5
|
tags: [board, team]
|
|
6
6
|
quality_charter: agents/shared/quality-charter.md
|
|
7
|
+
cache_friendly: true
|
|
7
8
|
---
|
|
8
9
|
# Board Pickup — Multi-Issue Delegation (Steps 6b, 6c)
|
|
9
10
|
|
|
@@ -4,6 +4,7 @@ type: command
|
|
|
4
4
|
description: Single-issue sub-agent delegation protocol for board-pickup Step 6a. Covers research, implementation, and quality pipeline for standalone issues.
|
|
5
5
|
tags: [board, team]
|
|
6
6
|
quality_charter: agents/shared/quality-charter.md
|
|
7
|
+
cache_friendly: true
|
|
7
8
|
---
|
|
8
9
|
# Board Pickup — Single-Issue Delegation (Step 6a)
|
|
9
10
|
|
|
@@ -4,6 +4,7 @@ type: command
|
|
|
4
4
|
description: GitHub-specific platform procedures for board-pickup. Covers gh CLI commands for issue listing, status updates, collision detection, PR creation, and label transitions.
|
|
5
5
|
tags: [board, team, github]
|
|
6
6
|
quality_charter: agents/shared/quality-charter.md
|
|
7
|
+
cache_friendly: true
|
|
7
8
|
---
|
|
8
9
|
# Board Pickup — GitHub Platform Details
|
|
9
10
|
|
|
@@ -4,6 +4,7 @@ type: command
|
|
|
4
4
|
description: GitLab-specific platform procedures for board-pickup. Covers glab CLI commands for issue listing, status updates, collision detection, MR creation, and label transitions.
|
|
5
5
|
tags: [board, team, gitlab]
|
|
6
6
|
quality_charter: agents/shared/quality-charter.md
|
|
7
|
+
cache_friendly: true
|
|
7
8
|
---
|
|
8
9
|
# Board Pickup — GitLab Platform Details
|
|
9
10
|
|
|
@@ -4,6 +4,7 @@ type: command
|
|
|
4
4
|
description: Auto-advance mode, error handling, and guardrails for board-pickup. Covers --auto/--unattended operation, safety guardrails, and specification generation.
|
|
5
5
|
tags: [board, team]
|
|
6
6
|
quality_charter: agents/shared/quality-charter.md
|
|
7
|
+
cache_friendly: true
|
|
7
8
|
---
|
|
8
9
|
# Board Pickup — Modes, Guardrails, and Error Handling
|
|
9
10
|
|
|
@@ -4,6 +4,7 @@ type: command
|
|
|
4
4
|
description: Post-implementation steps for board-pickup (Steps 7-10). Covers quality verification, commit/push, PR/MR creation, label transitions, board sync, dashboard refresh, reconciliation, and learnings capture.
|
|
5
5
|
tags: [board, team]
|
|
6
6
|
quality_charter: agents/shared/quality-charter.md
|
|
7
|
+
cache_friendly: true
|
|
7
8
|
---
|
|
8
9
|
# Board Pickup — Post-Implementation Steps (7-10)
|
|
9
10
|
|
|
@@ -4,6 +4,7 @@ type: shared-context
|
|
|
4
4
|
description: Azure DevOps-specific platform details for board shared context. Covers Work Items, Azure Boards, az CLI, and MCP tools.
|
|
5
5
|
tags: [board, team, azure-devops]
|
|
6
6
|
quality_charter: agents/shared/quality-charter.md
|
|
7
|
+
cache_friendly: true
|
|
7
8
|
---
|
|
8
9
|
# Board Shared Reference — Azure DevOps Platform Details
|
|
9
10
|
|
|
@@ -155,6 +156,8 @@ After linking, verify via `az boards work-item relation list --id {epic}` and ch
|
|
|
155
156
|
| Add comments | `az boards work-item update --id N --discussion "..."` | N/A |
|
|
156
157
|
| Create PRs | `az repos pr create --title "..." --source-branch "..." --target-branch "..."` | `create_pull_request` |
|
|
157
158
|
| Read PR details | `az repos pr show --id N` | N/A |
|
|
159
|
+
| Read PR comment threads | `az rest -m GET --url 'https://dev.azure.com/{org}/{project}/_apis/git/repositories/{repo}/pullRequests/{N}/threads?api-version=7.1-preview.1'` | N/A |
|
|
160
|
+
| Reply to PR thread | `az rest -m POST --url '.../pullRequests/{N}/threads/{threadId}/comments?api-version=7.1-preview.1' --body '{"parentCommentId":1,"content":"...","commentType":"text"}'` | N/A |
|
|
158
161
|
| Manage tags | `az boards work-item update --id N --fields "System.Tags=tag1; tag2"` | N/A |
|
|
159
162
|
| Board sync | Work Item State updates (automatic board placement) | N/A |
|
|
160
163
|
| CI/Pipelines | `az pipelines run list` / `az pipelines run show` | N/A |
|
|
@@ -4,6 +4,7 @@ type: shared-context
|
|
|
4
4
|
description: Board overview dashboard template, model pool, model selection heuristic, and lane computation algorithm. Referenced from hatch3r-board-shared.
|
|
5
5
|
tags: [board, team]
|
|
6
6
|
quality_charter: agents/shared/quality-charter.md
|
|
7
|
+
cache_friendly: true
|
|
7
8
|
---
|
|
8
9
|
# Board Overview Reference
|
|
9
10
|
|
|
@@ -4,6 +4,7 @@ type: shared-context
|
|
|
4
4
|
description: GitHub-specific platform details for board shared context. Covers GitHub Issues, Projects V2, gh CLI, and MCP tools.
|
|
5
5
|
tags: [board, team, github]
|
|
6
6
|
quality_charter: agents/shared/quality-charter.md
|
|
7
|
+
cache_friendly: true
|
|
7
8
|
---
|
|
8
9
|
# Board Shared Reference — GitHub Platform Details
|
|
9
10
|
|
|
@@ -165,9 +166,26 @@ After linking, verify via `issue_read` with `method: get_sub_issues` on the pare
|
|
|
165
166
|
| Add comments | `gh issue comment` | `add_issue_comment` |
|
|
166
167
|
| Create PRs | `gh pr create` | `create_pull_request` |
|
|
167
168
|
| Read PR details | `gh pr view` | `pull_request_read` |
|
|
169
|
+
| Read PR inline comments | `gh api repos/{owner}/{repo}/pulls/{N}/comments --paginate` | `pull_request_read` |
|
|
170
|
+
| Read PR review summaries | `gh api repos/{owner}/{repo}/pulls/{N}/reviews --paginate` | `pull_request_read` |
|
|
171
|
+
| Read PR discussion | `gh api repos/{owner}/{repo}/issues/{N}/comments --paginate` | `pull_request_read` |
|
|
172
|
+
| Read PR thread resolution | `gh api graphql -f query='{repository(owner:"o",name:"r"){pullRequest(number:N){reviewThreads(first:100){nodes{id,isResolved}}}}}'` | N/A |
|
|
173
|
+
| Reply to inline comment | `gh api repos/{owner}/{repo}/pulls/{N}/comments -X POST -F in_reply_to={comment_id} -f body=@{file}` | N/A |
|
|
174
|
+
| Comment on PR thread | `gh api repos/{owner}/{repo}/issues/{N}/comments -X POST -f body=@{file}` | `add_issue_comment` |
|
|
168
175
|
| Manage labels | `gh label create` / `gh label list` | `issue_write` (with labels) |
|
|
169
176
|
| Projects v2 | `gh project item-add`, `gh project item-edit`, `gh project item-list`, `gh project field-list`, `gh project view` | `projects_write` / `projects_get` / `projects_list` |
|
|
170
177
|
| CI/Actions | `gh run list` / `gh run view` | N/A |
|
|
171
178
|
| Releases | `gh release create` | N/A |
|
|
172
179
|
|
|
173
180
|
Fallback to MCP only for operations the `gh` CLI cannot handle: sub-issue management (`sub_issue_write`).
|
|
181
|
+
|
|
182
|
+
### GitHub CLI Field-Typing Notes
|
|
183
|
+
|
|
184
|
+
`gh api` field flags differ by type. Pass the wrong one and the GitHub REST API returns `HTTP 422: not of type {integer|boolean}`.
|
|
185
|
+
|
|
186
|
+
| Flag | Type sent | Use for |
|
|
187
|
+
|------|-----------|---------|
|
|
188
|
+
| `-f key=value` | string (URL-encoded form) | `body`, `title`, `commit_message`, `query`, `state`, `event` |
|
|
189
|
+
| `-F key=value` | integer / boolean (auto-typed) — also `@file` for file contents | numeric IDs: `sub_issue_id`, `in_reply_to`, `parent_issue_id`, `issue_number`, `pull_number`, `team_id`, `user_id`, `milestone_number`; booleans: `draft`, `merged`, `auto_merge` |
|
|
190
|
+
|
|
191
|
+
Sub-issue linking via `POST /repos/{owner}/{repo}/issues/{N}/sub_issues` requires `-F sub_issue_id={child_numeric_id}` — `-f` returns 422. When the `sub_issue_write` MCP is unavailable, write the hand-rolled `gh api` call with `-F`, never `-f`. The same rule applies to PR review-reply (`in_reply_to`), milestone assignment (`milestone_number`), and team membership (`team_id` / `user_id`).
|
|
@@ -4,6 +4,7 @@ type: shared-context
|
|
|
4
4
|
description: GitLab-specific platform details for board shared context. Covers GitLab Issues, Issue Boards, glab CLI, and label-based sync.
|
|
5
5
|
tags: [board, team, gitlab]
|
|
6
6
|
quality_charter: agents/shared/quality-charter.md
|
|
7
|
+
cache_friendly: true
|
|
7
8
|
---
|
|
8
9
|
# Board Shared Reference — GitLab Platform Details
|
|
9
10
|
|
|
@@ -145,6 +146,10 @@ After linking, verify via `glab api projects/{project_id}/issues/{epic_iid}/link
|
|
|
145
146
|
| Add comments | `glab issue note N -R {namespace}/{project}` | N/A |
|
|
146
147
|
| Create MRs | `glab mr create -R {namespace}/{project}` | N/A |
|
|
147
148
|
| Read MR details | `glab mr view N -R {namespace}/{project}` | N/A |
|
|
149
|
+
| Read MR discussions | `glab api '/projects/{project_id}/merge_requests/{iid}/discussions?per_page=100' --paginate` | N/A |
|
|
150
|
+
| Read MR notes | `glab api '/projects/{project_id}/merge_requests/{iid}/notes?per_page=100' --paginate` | N/A |
|
|
151
|
+
| Reply to discussion | `glab api '/projects/{project_id}/merge_requests/{iid}/discussions/{discussion_id}/notes' -X POST -f body=@{file}` | N/A |
|
|
152
|
+
| Add MR note | `glab api '/projects/{project_id}/merge_requests/{iid}/notes' -X POST -f body=@{file}` | N/A |
|
|
148
153
|
| Manage labels | `glab label create` / `glab label list` | N/A |
|
|
149
154
|
| Board sync | Label updates (automatic board list placement) | N/A |
|
|
150
155
|
| CI/Pipelines | `glab ci list` / `glab ci view` | N/A |
|
|
@@ -5,6 +5,9 @@ orchestrator: false
|
|
|
5
5
|
description: Override agent persona, model selection, preset enablement, and repo-file apply-scope via YAML plus markdown injection under .hatch3r/agents/
|
|
6
6
|
tags: [customize]
|
|
7
7
|
quality_charter: agents/shared/quality-charter.md
|
|
8
|
+
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
9
|
+
cache_friendly: true
|
|
10
|
+
parallel_tool_default: true
|
|
8
11
|
---
|
|
9
12
|
|
|
10
13
|
## Agent Pipeline
|
|
@@ -92,8 +95,10 @@ PostgreSQL for persistence, Redis for caching.
|
|
|
92
95
|
|
|
93
96
|
### Resulting Adapter Output
|
|
94
97
|
|
|
98
|
+
The adapter wraps the result in hatch3r-managed block comments (literal markers omitted here so this file itself stays valid):
|
|
99
|
+
|
|
95
100
|
```markdown
|
|
96
|
-
|
|
101
|
+
[managed-block-start]
|
|
97
102
|
{canonical agent content}
|
|
98
103
|
|
|
99
104
|
---
|
|
@@ -101,9 +106,11 @@ PostgreSQL for persistence, Redis for caching.
|
|
|
101
106
|
## Project Customizations
|
|
102
107
|
|
|
103
108
|
{content from .customize.md}
|
|
104
|
-
|
|
109
|
+
[managed-block-end]
|
|
105
110
|
```
|
|
106
111
|
|
|
112
|
+
Replace `[managed-block-start]` / `[managed-block-end]` with the actual `<!-- HATCH3R\:BEGIN -->` / `<!-- HATCH3R\:END -->` markers in real adapter output.
|
|
113
|
+
|
|
107
114
|
Content placed **outside** the managed block markers by directly editing adapter output files is always preserved.
|
|
108
115
|
|
|
109
116
|
## Per-Agent Customization Examples
|
|
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-researcher, hatch3r-docs-writer, hatch3r-reviewer]
|
|
|
6
6
|
description: Generate or validate an OpenAPI specification from the codebase. Scans route definitions, extracts schemas, and produces a complete API spec.
|
|
7
7
|
tags: [planning]
|
|
8
8
|
quality_charter: agents/shared/quality-charter.md
|
|
9
|
+
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
10
|
+
cache_friendly: true
|
|
11
|
+
parallel_tool_default: true
|
|
12
|
+
triage_tiers: [1, 2, 3]
|
|
9
13
|
---
|
|
10
14
|
|
|
11
15
|
## Agent Pipeline
|
|
@@ -42,6 +46,18 @@ Take a codebase with HTTP or RPC endpoints and produce a complete OpenAPI 3.1 sp
|
|
|
42
46
|
|
|
43
47
|
Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
|
|
44
48
|
|
|
49
|
+
## Step 0: Triage
|
|
50
|
+
|
|
51
|
+
Classify the request before delegating:
|
|
52
|
+
|
|
53
|
+
- **Tier 1 (trivial)**: single-endpoint documentation update or schema tweak; inline execution, no sub-agent fanout.
|
|
54
|
+
- **Tier 2 (standard)**: feature-scoped spec generation or validate mode for an existing API; standard pipeline including review loop.
|
|
55
|
+
- **Tier 3 (deep)**: full codebase scan, multi-framework detection, or breaking-change drift; full pipeline with research and confirm with the user before mutating files.
|
|
56
|
+
|
|
57
|
+
If Tier 1, complete inline and skip the parallel researcher fanout. If Tier 2, run the standard pipeline below. If Tier 3, run the full pipeline with research and confirm scope with the user before writing the spec.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
45
61
|
### Step 1: Gather API Context
|
|
46
62
|
|
|
47
63
|
1. **ASK:** "I'll generate or validate an OpenAPI specification from your codebase. I need:
|
|
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-researcher, hatch3r-perf-profiler, hatch3r-docs-writer]
|
|
|
6
6
|
description: Run and analyze performance benchmarks. Compare results against baselines, identify regressions, and produce performance reports.
|
|
7
7
|
tags: [review, performance]
|
|
8
8
|
quality_charter: agents/shared/quality-charter.md
|
|
9
|
+
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
10
|
+
cache_friendly: true
|
|
11
|
+
parallel_tool_default: true
|
|
12
|
+
triage_tiers: [1, 2, 3]
|
|
9
13
|
---
|
|
10
14
|
|
|
11
15
|
## Agent Pipeline
|
|
@@ -40,6 +44,18 @@ Run performance benchmarks against a target (file, function, endpoint, or full s
|
|
|
40
44
|
|
|
41
45
|
Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
|
|
42
46
|
|
|
47
|
+
## Step 0: Triage
|
|
48
|
+
|
|
49
|
+
Classify the benchmark request before delegating:
|
|
50
|
+
|
|
51
|
+
- **Tier 1 (trivial)**: single benchmark with `none` baseline or quick re-run of an existing suite; inline execution, no `hatch3r-perf-profiler` fanout.
|
|
52
|
+
- **Tier 2 (standard)**: standard suite with `previous-run` or git-ref baseline; standard pipeline including statistical analysis and reporting.
|
|
53
|
+
- **Tier 3 (deep)**: full-suite cross-environment benchmark with regression triage and root-cause tracing; full pipeline with research and confirm scope with the user before saving results.
|
|
54
|
+
|
|
55
|
+
If Tier 1, complete inline and skip the analysis fanout. If Tier 2, run the standard pipeline below. If Tier 3, run the full pipeline with research and confirm scope with the user before saving results.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
43
59
|
### Step 1: Gather Benchmark Context
|
|
44
60
|
|
|
45
61
|
1. **ASK:** "Tell me about the benchmarks you want to run. I need:
|
|
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-reviewer, hatch3r-fixer]
|
|
|
6
6
|
description: Create epics and issues/work items from todo.md, reorganize the board with dependency analysis, readiness assessment, and implementation ordering. Supports GitHub, Azure DevOps, and GitLab.
|
|
7
7
|
tags: [board, team]
|
|
8
8
|
quality_charter: agents/shared/quality-charter.md
|
|
9
|
+
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
10
|
+
cache_friendly: true
|
|
11
|
+
parallel_tool_default: true
|
|
12
|
+
triage_tiers: [1, 2, 3]
|
|
9
13
|
---
|
|
10
14
|
|
|
11
15
|
## Agent Pipeline
|
|
@@ -51,7 +55,19 @@ Follow the **Token-Saving Directives** in `hatch3r-board-shared`.
|
|
|
51
55
|
|
|
52
56
|
## Workflow
|
|
53
57
|
|
|
54
|
-
Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
|
|
58
|
+
Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK. For every ASK checkpoint, use the platform-native question tool per `agents/shared/user-question-protocol.md`.
|
|
59
|
+
|
|
60
|
+
## Step 0: Triage
|
|
61
|
+
|
|
62
|
+
Classify the board-fill request before delegating:
|
|
63
|
+
|
|
64
|
+
- **Tier 1 (trivial)**: 1–3 todo items, all clear scope, no decomposition needed; inline issue creation with minimal triage questioning.
|
|
65
|
+
- **Tier 2 (standard)**: standard batch (4–15 items) with mixed clarity and grouping decisions; standard pipeline with item-level triage (Step 2.5) and full readiness assessment.
|
|
66
|
+
- **Tier 3 (deep)**: large board reorganization, vision-driven greenfield batching, or 15+ items with decomposition; full pipeline with deep triage and confirm scope with the user before any GitHub mutations.
|
|
67
|
+
|
|
68
|
+
If Tier 1, run only Steps 1–3, 5–6, and 7 (skip the heavy production-readiness review). If Tier 2, run the standard pipeline below. If Tier 3, run the full pipeline including Steps 5.5, 5.6, and 7.9, and confirm batch composition with the user before executing.
|
|
69
|
+
|
|
70
|
+
---
|
|
55
71
|
|
|
56
72
|
### Step 1: Read and Parse todo.md
|
|
57
73
|
|
|
@@ -5,6 +5,9 @@ orchestrator: false
|
|
|
5
5
|
description: Ongoing backlog refinement for existing board items. Re-prioritize, reclassify, re-scope, archive stale items, decompose oversized issues, merge duplicates, refresh dependencies, and remediate board health findings.
|
|
6
6
|
tags: [board, team]
|
|
7
7
|
quality_charter: agents/shared/quality-charter.md
|
|
8
|
+
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
9
|
+
cache_friendly: true
|
|
10
|
+
parallel_tool_default: true
|
|
8
11
|
---
|
|
9
12
|
|
|
10
13
|
## Agent Pipeline
|
|
@@ -5,6 +5,9 @@ orchestrator: false
|
|
|
5
5
|
description: Initialize a project board (GitHub Projects V2, Azure Boards, or GitLab Issue Boards) with hatch3r's label taxonomy, status fields, and board structure. Platform detected from hatch.json.
|
|
6
6
|
tags: [board, team]
|
|
7
7
|
quality_charter: agents/shared/quality-charter.md
|
|
8
|
+
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
9
|
+
cache_friendly: true
|
|
10
|
+
parallel_tool_default: true
|
|
8
11
|
---
|
|
9
12
|
|
|
10
13
|
## Agent Pipeline
|
|
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-researcher, hatch3r-implementer, hatch3r-reviewer, hatch
|
|
|
6
6
|
description: Pick up one or more epics/issues from the project board for development. Handles dependency-aware selection, collision detection, branching, parallel sub-agent delegation, and batch execution. Supports GitHub, Azure DevOps, and GitLab. Platform-specific details are in commands/board/pickup-{platform}.md.
|
|
7
7
|
tags: [board, team]
|
|
8
8
|
quality_charter: agents/shared/quality-charter.md
|
|
9
|
+
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
10
|
+
cache_friendly: true
|
|
11
|
+
parallel_tool_default: true
|
|
12
|
+
triage_tiers: [1, 2, 3]
|
|
9
13
|
---
|
|
10
14
|
# Board Pickup -- Develop Issues from the Project Board
|
|
11
15
|
|
|
@@ -69,7 +73,19 @@ Downstream propagation: every ASK checkpoint that reports verification quality,
|
|
|
69
73
|
|
|
70
74
|
## Workflow
|
|
71
75
|
|
|
72
|
-
Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
|
|
76
|
+
Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK. When asking the user how to proceed, use the platform-native question tool per `agents/shared/user-question-protocol.md`.
|
|
77
|
+
|
|
78
|
+
## Step 0: Triage
|
|
79
|
+
|
|
80
|
+
Classify the pickup request before delegating:
|
|
81
|
+
|
|
82
|
+
- **Tier 1 (trivial)**: single sub-issue, isolated change, clear acceptance criteria; standard pipeline but with `quick` researcher depth and no parallel batch.
|
|
83
|
+
- **Tier 2 (standard)**: single epic with sub-issues, or 2–3 independent issues in a batch; standard pipeline with researcher per issue and parallel implementer fanout.
|
|
84
|
+
- **Tier 3 (deep)**: cross-cutting epic, contract change, multi-module batch, or audit epic; full pipeline with deep research, confirm sub-issue selection with the user, and serialize work that touches overlapping files.
|
|
85
|
+
|
|
86
|
+
If Tier 1, run the standard delegation path (Step 6a) with reduced research depth. If Tier 2, run the standard pipeline below with parallel fanout where dependencies allow. If Tier 3, run the full pipeline with deep research and confirm batch composition with the user before branching.
|
|
87
|
+
|
|
88
|
+
---
|
|
73
89
|
|
|
74
90
|
### Step 1: List Available Work (Dependency-Aware)
|
|
75
91
|
|
|
@@ -5,6 +5,9 @@ orchestrator: false
|
|
|
5
5
|
description: Regenerate the living board overview dashboard from current board state. Scans all open issues, computes health metrics, and updates the meta:board-overview issue.
|
|
6
6
|
tags: [board, team]
|
|
7
7
|
quality_charter: agents/shared/quality-charter.md
|
|
8
|
+
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
9
|
+
cache_friendly: true
|
|
10
|
+
parallel_tool_default: true
|
|
8
11
|
---
|
|
9
12
|
|
|
10
13
|
## Agent Pipeline
|
|
@@ -5,6 +5,9 @@ orchestrator: false
|
|
|
5
5
|
description: Shared context and procedures for all board commands. Provides platform-agnostic board config, label taxonomy, branch conventions, sync enforcement, and tooling directives. Platform-specific details are in commands/board/shared-{platform}.md.
|
|
6
6
|
tags: [board, team]
|
|
7
7
|
quality_charter: agents/shared/quality-charter.md
|
|
8
|
+
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
9
|
+
cache_friendly: true
|
|
10
|
+
parallel_tool_default: true
|
|
8
11
|
---
|
|
9
12
|
# Board Shared Reference
|
|
10
13
|
|
|
@@ -270,6 +273,27 @@ During **board-fill Step 4c** (external research) and **board-pickup Step 6** (i
|
|
|
270
273
|
2. Use **web research** for novel technical challenges, current best practices, security advisories, or breaking changes not covered by Context7 or local docs.
|
|
271
274
|
3. Follow the project's tooling hierarchy for knowledge augmentation priority.
|
|
272
275
|
|
|
276
|
+
### Agent-Synthesized Wrapper Scripts
|
|
277
|
+
|
|
278
|
+
Board commands instruct the agent to invoke individual CLI / MCP calls; the agent harness already batches them. If the agent synthesises a wrapper shell script anyway, the script MUST be portable across the user's installed shells. macOS ships `bash 3.2` as `/bin/bash` and many users default to `zsh` — bash-4-only features fail loudly on both.
|
|
279
|
+
|
|
280
|
+
1. **Default to individual tool calls.** Do not wrap `gh issue create`, `gh issue edit`, `gh project item-add`, `az boards work-item create`, or `glab issue create` loops in a synthesised bash script unless the user explicitly asks for a script artifact. The harness's parallel tool dispatch is cheaper than spawning a sub-shell and avoids the portability problem entirely.
|
|
281
|
+
2. **If a wrapper is required, target `bash 3.2` (macOS system default).** Banned constructs: `declare -A` (associative arrays), `${!ARR[@]}` (associative-array key expansion), `mapfile`, `readarray`. Use parallel indexed arrays (`KEYS=()`, `VALUES=()`) with integer indices, or rewrite the batching logic in Python / Node. `zsh` is not a drop-in substitute — `${!ARR[@]}` semantics differ; `bad substitution` is the symptom.
|
|
282
|
+
3. **Pin the shell explicitly.** Start every synthesised script with `#!/usr/bin/env bash` and guard any bash-4+ feature behind `[[ ${BASH_VERSINFO[0]} -ge 4 ]] || { echo "bash 4+ required, found ${BASH_VERSION}"; exit 64; }` so the failure mode is loud, not silent.
|
|
283
|
+
|
|
284
|
+
### Pager-Bypass Directive
|
|
285
|
+
|
|
286
|
+
Every `gh api`, `gh pr view`, `gh issue view`, `gh project item-list`, `az pipelines run`, and `glab api` invocation from an agent-driven terminal MUST run with `GH_PAGER=cat` and `PAGER=cat` set. The default GitHub CLI pager (`less`) opens the alternate screen buffer, which returns empty captured output in non-TTY contexts — the call appears to succeed but its `--jq` output is lost. Piping to `| cat` does not bypass the alternate-buffer behaviour; the environment variables are the only reliable workaround.
|
|
287
|
+
|
|
288
|
+
Set once at the start of every board / PR command run, before the first CLI invocation:
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
export GH_PAGER=cat
|
|
292
|
+
export PAGER=cat
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
The export is idempotent and safe to re-set. `GH_PAGER` is scoped to `gh`; `PAGER` covers downstream `git`, `az`, or `glab` invocations. This directive applies to every command in this directory tree.
|
|
296
|
+
|
|
273
297
|
---
|
|
274
298
|
|
|
275
299
|
## Formatting Rules
|
|
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-researcher, hatch3r-docs-writer]
|
|
|
6
6
|
description: Diagnose a complex incident -- reproduce the symptom, rank root-cause hypotheses, design the fix path, and emit regression coverage items as a board-ready investigation
|
|
7
7
|
tags: [core, planning]
|
|
8
8
|
quality_charter: agents/shared/quality-charter.md
|
|
9
|
+
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
10
|
+
cache_friendly: true
|
|
11
|
+
parallel_tool_default: true
|
|
12
|
+
triage_tiers: [1, 2, 3]
|
|
9
13
|
---
|
|
10
14
|
|
|
11
15
|
## Agent Pipeline
|
|
@@ -43,6 +47,18 @@ Take a complex or ambiguous bug report and produce a structured investigation re
|
|
|
43
47
|
|
|
44
48
|
Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
|
|
45
49
|
|
|
50
|
+
## Step 0: Triage
|
|
51
|
+
|
|
52
|
+
Classify the bug investigation before delegating:
|
|
53
|
+
|
|
54
|
+
- **Tier 1 (trivial)**: clear root cause, single module, reproduction known; route to `hatch3r-bug-fix` skill instead of running this full investigation.
|
|
55
|
+
- **Tier 2 (standard)**: ambiguous symptoms across one subsystem with 2–3 plausible hypotheses; standard pipeline with the 5 parallel researcher modes.
|
|
56
|
+
- **Tier 3 (deep)**: multi-module, intermittent, lingering bug requiring ADRs and phased fixes; full pipeline with deep research and confirm scope with the user before generating fix items.
|
|
57
|
+
|
|
58
|
+
If Tier 1, recommend the `hatch3r-bug-fix` skill and exit. If Tier 2, run the standard parallel-researcher pipeline below. If Tier 3, run the full pipeline including ADR generation in Step 6 and confirm fix phases with the user before writing files.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
46
62
|
### Step 1: Gather Bug Report
|
|
47
63
|
|
|
48
64
|
1. **ASK:** "Tell me about the bug you want to investigate. I need:
|
|
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-researcher, hatch3r-docs-writer]
|
|
|
6
6
|
description: Reverse-engineer a brownfield codebase into current-state module boundaries, integration-point inventory, tech-debt register, and dependency graph via static analysis
|
|
7
7
|
tags: [planning, brownfield]
|
|
8
8
|
quality_charter: agents/shared/quality-charter.md
|
|
9
|
+
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
10
|
+
cache_friendly: true
|
|
11
|
+
parallel_tool_default: true
|
|
12
|
+
triage_tiers: [1, 2, 3]
|
|
9
13
|
---
|
|
10
14
|
# Codebase Map — Brownfield Codebase Analysis & Spec Generation
|
|
11
15
|
|
|
@@ -38,6 +42,18 @@ Analyze an existing codebase to reverse-engineer project documentation across **
|
|
|
38
42
|
|
|
39
43
|
Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK. When in doubt, **ASK** — it is better to ask one question too many than to make one wrong assumption. Discovery questions are never wasted.
|
|
40
44
|
|
|
45
|
+
## Step 0: Triage
|
|
46
|
+
|
|
47
|
+
Classify the codebase analysis request before delegating:
|
|
48
|
+
|
|
49
|
+
- **Tier 1 (trivial)**: single-module spec or scoped reverse-engineering of one subsystem; reduced fanout (1–2 analyzers), no AGENTS.md regeneration unless requested.
|
|
50
|
+
- **Tier 2 (standard)**: standard scope (full repo, < 5K files) with both technical and business specs; standard pipeline with all 6 parallel analyzers and AGENTS.md generation.
|
|
51
|
+
- **Tier 3 (deep)**: monorepo, very large codebase (>10K files), or full production-readiness audit; full pipeline with all analyzers and confirm scope with the user before writing files.
|
|
52
|
+
|
|
53
|
+
If Tier 1, run the reduced analyzer set and skip Step 5 (ADRs) unless decisions are obvious. If Tier 2, run the standard pipeline below. If Tier 3, run the full pipeline including the production-readiness scorecard and confirm scope with the user before file writes.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
41
57
|
### Step 1: Initial Scan, Scope & Discovery
|
|
42
58
|
|
|
43
59
|
Perform a lightweight scan of the project root to build a project fingerprint, then gather business context.
|
|
@@ -5,6 +5,9 @@ orchestrator: false
|
|
|
5
5
|
description: Tune slash-command display text, orchestrator sub-agent dispatch pipeline, and invocation arguments via .hatch3r/commands/ YAML and markdown overrides
|
|
6
6
|
tags: [customize]
|
|
7
7
|
quality_charter: agents/shared/quality-charter.md
|
|
8
|
+
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
9
|
+
cache_friendly: true
|
|
10
|
+
parallel_tool_default: true
|
|
8
11
|
---
|
|
9
12
|
|
|
10
13
|
## Agent Pipeline
|
|
@@ -5,6 +5,9 @@ orchestrator: false
|
|
|
5
5
|
description: Monitor conversation context health, detect degradation, and auto-suggest fresh context or sub-agent delegation
|
|
6
6
|
tags: [maintenance]
|
|
7
7
|
quality_charter: agents/shared/quality-charter.md
|
|
8
|
+
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
9
|
+
cache_friendly: true
|
|
10
|
+
parallel_tool_default: true
|
|
8
11
|
---
|
|
9
12
|
## Agent Pipeline
|
|
10
13
|
|
|
@@ -5,6 +5,9 @@ orchestrator: false
|
|
|
5
5
|
description: Track and report token usage and estimated costs across agent workflows and board operations
|
|
6
6
|
tags: [maintenance]
|
|
7
7
|
quality_charter: agents/shared/quality-charter.md
|
|
8
|
+
efficiency_patterns: agents/shared/efficiency-patterns.md
|
|
9
|
+
cache_friendly: true
|
|
10
|
+
parallel_tool_default: true
|
|
8
11
|
---
|
|
9
12
|
## Agent Pipeline
|
|
10
13
|
|