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
|
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-researcher, hatch3r-docs-writer]
|
|
|
6
6
|
description: Translate a greenfield vision into future-state design artifacts -- ADRs, domain model, API contracts, per-module technical specs, and a board-ready todo.md
|
|
7
7
|
tags: [planning, greenfield]
|
|
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
|
# Project Spec — Greenfield Project Specification from Vision to Docs
|
|
11
15
|
|
|
@@ -37,6 +41,18 @@ Take a project idea or vision and produce complete project documentation across
|
|
|
37
41
|
|
|
38
42
|
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.
|
|
39
43
|
|
|
44
|
+
## Step 0: Triage
|
|
45
|
+
|
|
46
|
+
Classify the project-spec request before delegating:
|
|
47
|
+
|
|
48
|
+
- **Tier 1 (trivial)**: small greenfield project with focused scope, single platform, no compliance burden; reduced fanout (3–4 researchers) and skip the production-blueprint sub-agent.
|
|
49
|
+
- **Tier 2 (standard)**: standard greenfield with business and technical lenses; standard pipeline with all 7 parallel researchers and ADR generation.
|
|
50
|
+
- **Tier 3 (deep)**: enterprise-scale, multi-platform, or regulated greenfield (HIPAA/PCI/FedRAMP); full pipeline with all researchers, deep web research for compliance, and confirm spec scope with the user before file writes.
|
|
51
|
+
|
|
52
|
+
If Tier 1, run the reduced researcher set and skip Sub-Agents 6–7 unless the user opts in. If Tier 2, run the standard pipeline below. If Tier 3, run the full pipeline including the production-blueprint and confirm scope with the user before generating ADRs.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
40
56
|
### Step 1: Gather Project Vision & Business Context
|
|
41
57
|
|
|
42
58
|
#### 1a. Core Vision
|
|
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-implementer, hatch3r-lint-fixer, hatch3r-reviewer, hatch
|
|
|
6
6
|
description: Lightweight command for small changes not worth tracking on the board. Adaptive ceremony with inline or sub-agent implementation, batch support, and soft scope guards.
|
|
7
7
|
tags: [core, implementation]
|
|
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
|
|
@@ -77,9 +81,21 @@ Downstream propagation: every ASK checkpoint that reports verification quality,
|
|
|
77
81
|
|
|
78
82
|
---
|
|
79
83
|
|
|
84
|
+
## Triage
|
|
85
|
+
|
|
86
|
+
Classify the change request before delegating. Detailed tier scoring runs in Step 2 (Tier Assessment); this section summarizes the routing:
|
|
87
|
+
|
|
88
|
+
- **Tier 1 (trivial)**: single-file edit, config tweak, typo, or constant rename; inline implementation in Step 4a, no researcher, no review loop.
|
|
89
|
+
- **Tier 2 (standard)**: multi-file change or new function with bounded scope; standard pipeline with `hatch3r-implementer` and lightweight researcher (`similar-implementation` at `quick` depth).
|
|
90
|
+
- **Tier 3 (deep)**: hard-blocked here — quick-change does not provide research depth for Tier 3 work. Step 2b routes Tier 3 to `hatch3r-workflow`.
|
|
91
|
+
|
|
92
|
+
If Tier 1, run inline. If Tier 2, run the implementer-only pipeline below. If Tier 3, exit and recommend `hatch3r-workflow`.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
80
96
|
## Workflow
|
|
81
97
|
|
|
82
|
-
Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
|
|
98
|
+
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`.
|
|
83
99
|
|
|
84
100
|
### Step 1: Input and Batch Parsing
|
|
85
101
|
|
|
@@ -94,7 +110,7 @@ Parse the user's description into discrete change items.
|
|
|
94
110
|
|
|
95
111
|
---
|
|
96
112
|
|
|
97
|
-
### Step 2:
|
|
113
|
+
### Step 2: Tier Assessment (Soft Guard)
|
|
98
114
|
|
|
99
115
|
Evaluate whether the described changes fit the quick-change scope.
|
|
100
116
|
|
|
@@ -5,6 +5,9 @@ orchestrator: false
|
|
|
5
5
|
description: Execute shareable workflow recipes that compose agents, skills, and commands into guided sequences for common development scenarios
|
|
6
6
|
tags: [core]
|
|
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-docs-writer]
|
|
|
6
6
|
description: Plan a refactoring or migration effort -- spawn parallel researchers, produce refactoring spec, ADR(s), and phased todo.md entries for board-fill.
|
|
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
|
|
@@ -47,6 +51,18 @@ The command produces phased todo.md entries that map to the appropriate executio
|
|
|
47
51
|
|
|
48
52
|
Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
|
|
49
53
|
|
|
54
|
+
## Step 0: Triage
|
|
55
|
+
|
|
56
|
+
Classify the refactor-planning request before delegating:
|
|
57
|
+
|
|
58
|
+
- **Tier 1 (trivial)**: localized refactoring scoped to a single module with strong test coverage; reduced fanout (1–2 researchers) and produce a single-phase todo entry.
|
|
59
|
+
- **Tier 2 (standard)**: standard refactor across 2–4 modules or a single dimension (structural or logical or visual); standard pipeline with all 5 parallel researcher modes.
|
|
60
|
+
- **Tier 3 (deep)**: cross-cutting refactor (architectural shift, framework swap, or mixed-dimension); full pipeline with deep research and confirm phased plan with the user before file writes.
|
|
61
|
+
|
|
62
|
+
If Tier 1, run the reduced researcher set and skip ADR generation unless decisions are obvious. If Tier 2, run the standard pipeline below. If Tier 3, run the full pipeline including ADR generation and confirm phasing with the user before writing files.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
50
66
|
### Step 1: Gather Refactoring Goal
|
|
51
67
|
|
|
52
68
|
1. **ASK:** "Tell me about the refactoring or migration you want to plan. I need:
|
|
@@ -5,6 +5,9 @@ orchestrator: false
|
|
|
5
5
|
description: Cut a versioned release with changelog generation, version bumping, and GitHub release creation.
|
|
6
6
|
tags: [devops]
|
|
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
|
# Release — Cut a Versioned Release with Changelog
|
|
10
13
|
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: hatch3r-report
|
|
3
|
+
type: command
|
|
4
|
+
orchestrator: false
|
|
5
|
+
description: Generate an in-chat session report from the active or named transcript — every tool call, sub-agent delegation, and file edit, with diagnostics for missed parallelism, redundant work, and over-serialization.
|
|
6
|
+
tags: [maintenance]
|
|
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
|
|
11
|
+
---
|
|
12
|
+
## Agent Pipeline
|
|
13
|
+
|
|
14
|
+
This command runs inline and does not spawn sub-agents. Parsing is driven by Bash + jq over the on-disk session transcript; the LLM only sees aggregated counts and triggered-heuristic evidence, never the raw JSONL. This keeps the command efficient (P7) even on 1000+ record sessions.
|
|
15
|
+
|
|
16
|
+
# Session Report — Agentic Action Replay
|
|
17
|
+
|
|
18
|
+
Render an in-chat report of what happened in a Claude Code session: every tool call, every sub-agent `Agent` delegation, every file edit, every hook event. Default = current session, executive summary, in-chat. Flags extend scope and depth. Two audiences: (a) users who want to understand the session end-to-end; (b) maintainers investigating runtime shape for framework-level optimizations.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Argument Parsing
|
|
23
|
+
|
|
24
|
+
| Flag | Effect |
|
|
25
|
+
|------|--------|
|
|
26
|
+
| `--session <id\|path>` | Target a UUID under the project slug dir, or an absolute `.jsonl` path. Default = newest-mtime jsonl in current project slug. |
|
|
27
|
+
| `--list` | Exclusive. Print the 5 most-recent sessions in this project (sessionId, mtime, first-user-message preview 60 chars). Skips all other rendering. |
|
|
28
|
+
| `--verbose` | Append a chronological per-turn timeline after the executive summary. |
|
|
29
|
+
| `--save` | After rendering in-chat, also write to `.hatch3r/reports/{sessionId-short8}-{YYYYMMDD-HHMMSS}.md`. |
|
|
30
|
+
|
|
31
|
+
`--list` takes precedence over `--session`, `--verbose`, `--save`. All other flags compose.
|
|
32
|
+
|
|
33
|
+
## Step 1 — Discover the Session
|
|
34
|
+
|
|
35
|
+
Compute the project slug from the working directory: `SLUG="$(pwd | sed 's|/|-|g')"`. The transcript directory is `~/.claude/projects/${SLUG}`. List `*.jsonl` files; the active session is the newest by mtime (`ls -t *.jsonl | head -1`). When `--session <value>` is provided, resolve a 36-char UUID against the slug dir as `${value}.jsonl`, otherwise treat as an absolute path. When `--list` is set, enumerate the top-5 newest jsonl files; for each, parse the first `type=user` record and emit `<short-id> <mtime> <first-60-chars-of-user-text>`.
|
|
36
|
+
|
|
37
|
+
## Step 2 — Aggregate via jq
|
|
38
|
+
|
|
39
|
+
Run jq over the JSONL to produce a single structured JSON of counts. Persist to `$(mktemp)` so the LLM reads aggregated data only. Sample pipeline:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
jq -s '
|
|
43
|
+
def tu: [.[] | select(.message.content?) | .message.content[] | select(.type=="tool_use")];
|
|
44
|
+
def tr: [.[] | select(.message.content?) | .message.content[] | select(.type=="tool_result")];
|
|
45
|
+
def asst_turns: [.[] | select(.type=="assistant" and (.message.content?))];
|
|
46
|
+
def thinks: [.[] | select(.message.content?) | .message.content[] | select(.type=="thinking") | .text];
|
|
47
|
+
{
|
|
48
|
+
sessionId: .[0].sessionId, firstTs: .[0].timestamp, lastTs: .[-1].timestamp,
|
|
49
|
+
cwd: .[0].cwd, gitBranch: .[0].gitBranch, records: length,
|
|
50
|
+
toolCounts: (tu | group_by(.name) | map({tool: .[0].name, count: length}) | sort_by(-.count)),
|
|
51
|
+
distinctReads: (tu | map(select(.name=="Read") | .input.file_path) | unique | length),
|
|
52
|
+
distinctEdits: (tu | map(select(.name=="Edit" or .name=="Write") | .input.file_path) | unique | length),
|
|
53
|
+
topReads: (tu | map(select(.name=="Read") | .input.file_path) | group_by(.) | map({path: .[0], count: length}) | sort_by(-.count) | .[0:3]),
|
|
54
|
+
agentCalls: (tu | map(select(.name=="Agent") | {sub: (.input.subagent_type // "general-purpose"), prompt: (.input.prompt[:80] // "")})),
|
|
55
|
+
bashCmds: (tu | map(select(.name=="Bash") | .input.command)),
|
|
56
|
+
turnLens: [asst_turns[] | (.message.content | map(select(.type=="tool_use")) | length)],
|
|
57
|
+
thinkingChars: ([thinks[] | length] | add // 0),
|
|
58
|
+
errorResults: (tr | map(select((.content | tostring) | test("error|failed"; "i"))) | length),
|
|
59
|
+
totalResults: (tr | length)
|
|
60
|
+
}' "$JSONL"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
`thinkingChars` is the summed length of every `thinking` block's text — required input for D-LOOP-01 (`thinking chars ÷ (tool_use count + 1) > 1200`).
|
|
64
|
+
|
|
65
|
+
The LLM reads the resulting JSON, computes derived metrics (parallel-batch count = turns with ≥2 tool_use; sequential count = turns with exactly 1), and builds the rendered tables.
|
|
66
|
+
|
|
67
|
+
## Step 3 — Compute Diagnostics
|
|
68
|
+
|
|
69
|
+
Apply each rule in §Diagnostic Heuristics over the aggregated structure. Each fired diagnostic produces a record `{id, severity, turns:[...], evidence, suggestion}`. Emit at most one fire per rule per session (consolidate same-rule fires across turns into one record). If zero rules fire, render `None — execution shape is clean.`
|
|
70
|
+
|
|
71
|
+
## Step 4 — Render Executive Summary
|
|
72
|
+
|
|
73
|
+
Always emit. Headings, order, and content per §Output Format. Mask obvious secret patterns (`sk-...`, `ghp_...`, `xoxb-...`, `AIza...`, `Bearer ...`) in any rendered tool_use input field. Truncate Bash commands and Agent prompts to ≤80 chars in tables.
|
|
74
|
+
|
|
75
|
+
## Step 5 — Render Verbose Timeline (--verbose only)
|
|
76
|
+
|
|
77
|
+
Append `## Timeline`. For each assistant turn containing ≥1 tool_use, emit a numbered block: turn index, ISO timestamp, elapsed-since-start, optional `thinking: N chars` summary, one line per tool_use (tool name + first 60 chars of primary input field), and a parallel/sequential marker — `→ {n} tool_use blocks ✓ parallel` when n≥2, `→ 1 tool_use ⚠ sequential` when n=1.
|
|
78
|
+
|
|
79
|
+
## Step 6 — Save to Disk (--save only)
|
|
80
|
+
|
|
81
|
+
Create `.hatch3r/reports/` if missing. Write the rendered markdown (executive summary + timeline if `--verbose` set) to `.hatch3r/reports/{sessionId-short8}-{YYYYMMDD-HHMMSS}.md`. Append a `## Raw Counts (machine-readable)` section containing the jq-aggregated JSON in a fenced ```json``` block — this lets future tooling grep across sessions without re-parsing the source JSONL. Print the file path back to chat. The `.hatch3r/` directory is gitignored.
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Output Format
|
|
86
|
+
|
|
87
|
+
```markdown
|
|
88
|
+
## Session Report — a5d750f7
|
|
89
|
+
|
|
90
|
+
**Window:** 2026-05-12 09:14:03 → 09:47:21 (33m 18s, 272 records)
|
|
91
|
+
**Project:** hatch3r (release/1.7.1)
|
|
92
|
+
|
|
93
|
+
### Tool Activity (91 tool calls)
|
|
94
|
+
|
|
95
|
+
| Tool | Calls | Notable |
|
|
96
|
+
|------|------:|---------|
|
|
97
|
+
| Read | 47 | 12 distinct files; validate.ts read 4x |
|
|
98
|
+
| Bash | 21 | 6 parallel batches, 15 sequential |
|
|
99
|
+
| Edit | 18 | 9 distinct files |
|
|
100
|
+
| Task | 4 | 3 general-purpose, 1 explore — all sequential |
|
|
101
|
+
| Grep | 1 | — |
|
|
102
|
+
|
|
103
|
+
### Sub-Agent Delegation (4 Agent calls)
|
|
104
|
+
|
|
105
|
+
| # | Subagent | Prompt (first 60) | Files touched |
|
|
106
|
+
|---|----------|-------------------|---------------|
|
|
107
|
+
| 1 | general-purpose | "Find references to validateCommandOrch..." | 0 |
|
|
108
|
+
| 2 | Explore | "Map existing commands that overlap..." | 0 |
|
|
109
|
+
| 3 | Explore | "Find conversation transcript access..." | 0 |
|
|
110
|
+
| 4 | Plan | "Design hatch3r-report command..." | 0 |
|
|
111
|
+
|
|
112
|
+
### File Footprint
|
|
113
|
+
|
|
114
|
+
- 12 distinct files read; 9 distinct files edited
|
|
115
|
+
- Top 3 most-read: src/cli/commands/validate.ts (4x), commands/hatch3r-context-health.md (2x), CHANGELOG.md (2x)
|
|
116
|
+
|
|
117
|
+
### Diagnostics
|
|
118
|
+
|
|
119
|
+
- WARN D-PAR-01 Missed parallelism: turns 7, 9, 11 each issued one Read on disjoint paths → batch into one assistant turn.
|
|
120
|
+
- WARN D-RED-01 Redundant Read: src/cli/commands/validate.ts read at turns 4, 8, 22, 31 with no Edit between turns 4 and 31.
|
|
121
|
+
- INFO D-PAR-02 Sub-agent fan-out: 4 Agent calls at turns 44, 53, 67, 78 — disjoint subsystems → eligible for parallel fan-out.
|
|
122
|
+
|
|
123
|
+
### Suggested Next Action
|
|
124
|
+
|
|
125
|
+
Re-run `/hatch3r-report --verbose` for the chronological timeline.
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Diagnostic Heuristics
|
|
131
|
+
|
|
132
|
+
| ID | Heuristic | Trigger | Severity |
|
|
133
|
+
|----|-----------|---------|----------|
|
|
134
|
+
| D-PAR-01 | Missed parallelism (same-tool sequential) | ≥3 consecutive assistant turns each with exactly 1 `tool_use` of the **same** tool type targeting disjoint inputs | WARN |
|
|
135
|
+
| D-PAR-02 | Sub-agent fan-out missed | ≥2 `Agent` tool_use blocks within 10 turns where prompt subjects target disjoint path prefixes | WARN |
|
|
136
|
+
| D-RED-01 | Redundant Read | Same `Read.file_path` in ≥3 tool_use blocks with no intervening `Edit`/`Write` on that path | WARN |
|
|
137
|
+
| D-RED-02 | Re-Bash identical command | Same `Bash.command` (trimmed exact match) ≥2 times within 20 turns | INFO |
|
|
138
|
+
| D-LOOP-01 | High thinking-to-action ratio | Total `thinking` chars ÷ (tool_use count + 1) > 1200 AND tool_use count < 8 | WARN |
|
|
139
|
+
| D-LOOP-02 | Tool burst → stall | One turn with ≥5 tool_use blocks AND next turn with 0 AND ≥3 subsequent turns with 0 tool_use | INFO |
|
|
140
|
+
| D-ERR-01 | Tool-result error rate | `tool_result.content` matches `/error\|failed/i` in >20% of results | WARN |
|
|
141
|
+
| D-PATH-01 | File staleness | Path read at turn N, edited at turn M, re-read at turn P>M+15 with no intervening edit on that path | INFO |
|
|
142
|
+
| D-SUB-01 | Sub-agent returning empty | `Agent` tool_result body <200 chars AND no subsequent Edit on any path the prompt referenced | WARN |
|
|
143
|
+
|
|
144
|
+
Each fired record: `{id, severity, turns:[n,...], evidence, suggestion}`. Consolidate same-rule fires into one record per session.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Error Handling
|
|
149
|
+
|
|
150
|
+
| Condition | Action |
|
|
151
|
+
|-----------|--------|
|
|
152
|
+
| `~/.claude/projects/{slug}` does not exist | Print: "No Claude Code transcripts found for this project. Slug: {slug}". Exit. |
|
|
153
|
+
| Slug dir exists but contains no `*.jsonl` | Print: "Project directory empty — no sessions to report on." Exit. |
|
|
154
|
+
| `--session <id>` does not resolve to a readable file | Print: "Session {id} not found under {slug}. Use --list to see available sessions." Exit. |
|
|
155
|
+
| `jq` not installed | Print: "jq is required. Install via `brew install jq` (macOS) or your distro's package manager, then retry." Exit. |
|
|
156
|
+
| Malformed JSONL record encountered | Skip the record; increment a `skipped` counter; surface the count in the executive summary footer when non-zero. |
|
|
157
|
+
| Read access denied to a transcript file | Print: "Cannot read {path}: permission denied." Exit. |
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Guardrails
|
|
162
|
+
|
|
163
|
+
- **Never modify the JSONL.** Read-only access. All scratch files go to `$(mktemp)` and are deleted at end-of-run.
|
|
164
|
+
- **Mask obvious secret patterns** (`sk-`, `ghp_`, `xoxb-`, `AIza`, `Bearer `) in any rendered tool_use input — substitute `{REDACTED-{prefix}}`. The transcript may contain ephemeral tokens from user pastes.
|
|
165
|
+
- **Never write outside `.hatch3r/reports/`.** The `--save` target is fixed; do not honor flags or env vars that redirect output to other paths.
|
|
166
|
+
- **Never abort on a malformed record.** Skip-and-count is the contract; aborting would hide the rest of the session from the operator (Silent Failure Contract — surface the skip count rather than swallowing it).
|
|
167
|
+
- **Honor the iteration summary contract** (`rules/hatch3r-iteration-summary.md`) at the end of the parent assistant turn that invoked this command. The report content is not a substitute for the canonical Status / Outcome / Done block.
|
|
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-implementer, hatch3r-lint-fixer, hatch3r-test-writer, ha
|
|
|
6
6
|
description: User-guided revision of agent-implemented code in a fresh context window. Reconstructs what was done, interviews the user for feedback, fixes issues, cleans up leftovers, and drives toward merge readiness. Delegation, quality pipeline, modes, and board integration details are in commands/revision/.
|
|
7
7
|
tags: [implementation, 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
|
|
@@ -75,6 +79,18 @@ Initialize the run cache at the start of the workflow. See `commands/revision/re
|
|
|
75
79
|
|
|
76
80
|
Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
|
|
77
81
|
|
|
82
|
+
## Step 0: Triage
|
|
83
|
+
|
|
84
|
+
Classify the revision request before delegating:
|
|
85
|
+
|
|
86
|
+
- **Tier 1 (trivial)**: cleanup-only revision or 1–3 minor leftovers; reduced pipeline (Steps 1–2, 4–5, 8) with inline fixes and skip the full review loop in Step 7.
|
|
87
|
+
- **Tier 2 (standard)**: standard user feedback with a mix of critical/important/cleanup findings; standard pipeline with sub-agent delegation (Step 6) and the review loop (Step 7a).
|
|
88
|
+
- **Tier 3 (deep)**: deep revision with critical findings, architectural concerns, or board-deferred follow-ups; full pipeline including the parallel quality specialists in Step 7b and the merge-readiness gate in Step 9.
|
|
89
|
+
|
|
90
|
+
If Tier 1, run the reduced pipeline. If Tier 2, run the standard pipeline below. If Tier 3, run the full pipeline including all quality specialists and confirm merge readiness with the user before commit.
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
78
94
|
### Step 1: Context Reconstruction
|
|
79
95
|
|
|
80
96
|
Rebuild full context in the fresh window. No prior implementation context is assumed.
|
|
@@ -129,7 +145,7 @@ Revision Context:
|
|
|
129
145
|
|
|
130
146
|
**ASK:** "Is this the work you want to revise? Any additional context I should know about? (yes / provide context / wrong branch)"
|
|
131
147
|
|
|
132
|
-
If the user provides additional context (e.g., a different issue number, clarifications, or scope adjustments), incorporate it before proceeding.
|
|
148
|
+
When asking, use the platform-native question tool per `agents/shared/user-question-protocol.md`. If the user provides additional context (e.g., a different issue number, clarifications, or scope adjustments), incorporate it before proceeding.
|
|
133
149
|
|
|
134
150
|
---
|
|
135
151
|
|
|
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-researcher, hatch3r-docs-writer]
|
|
|
6
6
|
description: Sequence delivery phases over time into a dependency-ordered milestone plan with business and technical lenses, emitting a todo.md rollout schedule rather than design docs
|
|
7
7
|
tags: [planning, greenfield]
|
|
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
|
# Roadmap — Generate Phased Roadmap from Specs & Vision
|
|
11
15
|
|
|
@@ -35,6 +39,18 @@ Follow the **Token-Saving Directives** in `hatch3r-board-shared`.
|
|
|
35
39
|
|
|
36
40
|
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.
|
|
37
41
|
|
|
42
|
+
## Step 0: Triage
|
|
43
|
+
|
|
44
|
+
Classify the roadmap request before delegating:
|
|
45
|
+
|
|
46
|
+
- **Tier 1 (trivial)**: small project with focused scope (under 20 backlog items), single dimension (technical only); reduced fanout (1 researcher: Technical Readiness) and condensed todo.md output.
|
|
47
|
+
- **Tier 2 (standard)**: standard dual-lens roadmap (business + technical) with both researchers; standard pipeline with parallel research and AGENTS.md generation.
|
|
48
|
+
- **Tier 3 (deep)**: enterprise/scale company with regulatory deadlines, multi-quarter horizon, or 50+ backlog items; full pipeline with deep web research and confirm milestones with the user before writing files.
|
|
49
|
+
|
|
50
|
+
If Tier 1, run the reduced researcher set and skip Step 7 (AGENTS.md) unless requested. If Tier 2, run the standard pipeline below. If Tier 3, run the full pipeline with deep research, surface market-timing intelligence, and confirm phased plan with the user before file writes.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
38
54
|
### Step 1: Load Project Context & Business Discovery
|
|
39
55
|
|
|
40
56
|
#### 1a. Load Existing Documentation
|
|
@@ -5,6 +5,9 @@ orchestrator: false
|
|
|
5
5
|
description: Edit rule scope globs, toggle always-on versus conditional activation, and adjust precedence tier via .hatch3r/rules/ YAML overrides plus markdown appends
|
|
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: Open an OWASP ASI security epic reviewing auth boundaries, input validation, and supply-chain risks with one hardening sub-issue per module plus trust-boundary audit
|
|
6
6
|
tags: [maintenance, security]
|
|
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: Rewrite skill dispatch descriptions for model auto-selection, gate per-preset exposure, and control slash-command surfacing via .hatch3r/skills/ YAML 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
|
|
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-researcher, hatch3r-docs-writer]
|
|
|
6
6
|
description: Plan a comprehensive test strategy -- spawn parallel researchers, produce test plan spec with coverage targets, priority ordering, test case outlines, and structured todo.md entries for board-fill.
|
|
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
|
|
@@ -38,6 +42,18 @@ Take a test planning scope (feature, module, or codebase area) and produce a com
|
|
|
38
42
|
|
|
39
43
|
Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
|
|
40
44
|
|
|
45
|
+
## Step 0: Triage
|
|
46
|
+
|
|
47
|
+
Classify the test-planning request before delegating:
|
|
48
|
+
|
|
49
|
+
- **Tier 1 (trivial)**: tests for a single feature or single module with existing test infrastructure; reduced fanout (1–2 researchers: coverage-analysis, risk-prioritization) and produce a single-task todo entry.
|
|
50
|
+
- **Tier 2 (standard)**: feature-scoped or module-coverage audit with mixed test types; standard pipeline with all 5 parallel researcher modes.
|
|
51
|
+
- **Tier 3 (deep)**: full-suite restructure, mutation-testing rollout, contract testing, or coverage uplift across the whole codebase; full pipeline with deep research and confirm test plan scope with the user before writing files.
|
|
52
|
+
|
|
53
|
+
If Tier 1, run the reduced researcher set and skip Step 6 (ADRs). If Tier 2, run the standard pipeline below. If Tier 3, run the full pipeline including ADR generation for testing infrastructure decisions and confirm scope with the user before writing files.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
41
57
|
### Step 1: Gather Test Planning Scope
|
|
42
58
|
|
|
43
59
|
1. **ASK:** "Tell me about the test strategy you want to plan. I need:
|
|
@@ -6,6 +6,10 @@ agentPipeline: [hatch3r-researcher, hatch3r-implementer, hatch3r-reviewer, hatch
|
|
|
6
6
|
description: Guided development lifecycle with 4 phases (Analyze, Plan, Implement, Review) and scale-adaptive Quick Mode for small tasks.
|
|
7
7
|
tags: [core, implementation]
|
|
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
|
# Development Workflow -- Guided Lifecycle for Structured Implementation
|
|
11
15
|
|
|
@@ -59,11 +63,23 @@ Downstream propagation: every ASK checkpoint that reports verification quality,
|
|
|
59
63
|
|
|
60
64
|
---
|
|
61
65
|
|
|
66
|
+
## Triage
|
|
67
|
+
|
|
68
|
+
Classify the development task before delegating. Detailed mode classification runs in Step 0 (Triage / Scale-Adaptive Mode Selection); this section summarizes the routing:
|
|
69
|
+
|
|
70
|
+
- **Tier 1 (trivial)**: single-line edit, typo, or trivial config change; Quick Mode skips most ASK checkpoints and runs the streamlined 3-step path.
|
|
71
|
+
- **Tier 2 (standard)**: bug fix or small feature in 1–3 files; Quick Mode with full sub-agent delegation (researcher, implementer, reviewer, fixer, test-writer, security-auditor).
|
|
72
|
+
- **Tier 3 (deep)**: multi-module feature, architectural change, or cross-cutting refactor; Full Mode with all 4 phases (Analyze, Plan, Implement, Review) and deep research before mutating files.
|
|
73
|
+
|
|
74
|
+
If Tier 1, take Quick Mode with reduced sub-agent prompts. If Tier 2, take Quick Mode below. If Tier 3, switch to Full Mode and confirm the plan with the user before implementation.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
62
78
|
## Workflow
|
|
63
79
|
|
|
64
|
-
Execute these steps in order. **Do not skip any step.** Ask the user at every checkpoint marked with ASK.
|
|
80
|
+
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`.
|
|
65
81
|
|
|
66
|
-
### Step 0:
|
|
82
|
+
### Step 0: Triage (Scale-Adaptive Mode Selection)
|
|
67
83
|
|
|
68
84
|
Assess the task to recommend a mode.
|
|
69
85
|
|
|
@@ -4,6 +4,7 @@ type: command
|
|
|
4
4
|
description: Board integration for revision. Covers run cache schema, post-commit PR updates, dashboard refresh (Step 9a), and lightweight reconciliation (Step 9b).
|
|
5
5
|
tags: [implementation, team]
|
|
6
6
|
quality_charter: agents/shared/quality-charter.md
|
|
7
|
+
cache_friendly: true
|
|
7
8
|
---
|
|
8
9
|
# Revision — Board Integration
|
|
9
10
|
|
|
@@ -4,6 +4,7 @@ type: command
|
|
|
4
4
|
description: Fix delegation protocol for revision Step 6. Covers complexity-aware grouping, blast radius context, sub-agent prompt templates, and cross-agent conflict resolution.
|
|
5
5
|
tags: [implementation, team]
|
|
6
6
|
quality_charter: agents/shared/quality-charter.md
|
|
7
|
+
cache_friendly: true
|
|
7
8
|
---
|
|
8
9
|
# Revision — Fix Delegation (Step 6)
|
|
9
10
|
|
|
@@ -4,6 +4,7 @@ type: command
|
|
|
4
4
|
description: Auto-advance mode, safety guardrails, error handling, and session report for revision. Covers --auto operation, never-skip rules, platform-aware error recovery, and end-of-session summary.
|
|
5
5
|
tags: [implementation, team]
|
|
6
6
|
quality_charter: agents/shared/quality-charter.md
|
|
7
|
+
cache_friendly: true
|
|
7
8
|
---
|
|
8
9
|
# Revision — Modes, Guardrails, and Error Handling
|
|
9
10
|
|
|
@@ -4,6 +4,7 @@ type: command
|
|
|
4
4
|
description: Quality verification pipeline for revision Step 7. Covers review loop (Stage 1), final quality with conditional specialists (Stage 2), and failure handling.
|
|
5
5
|
tags: [implementation, team]
|
|
6
6
|
quality_charter: agents/shared/quality-charter.md
|
|
7
|
+
cache_friendly: true
|
|
7
8
|
---
|
|
8
9
|
# Revision — Quality Verification (Step 7)
|
|
9
10
|
|