@event4u/agent-config 1.32.0 → 1.34.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.
- package/.agent-src/commands/research/deep.md +149 -0
- package/.agent-src/commands/research/report.md +134 -0
- package/.agent-src/commands/research.md +43 -13
- package/.agent-src/commands/review-changes.md +13 -8
- package/.agent-src/personas/README.md +12 -21
- package/.agent-src/personas/_template-specialist/persona.md +89 -0
- package/.agent-src/personas/backend-architect.md +96 -0
- package/.agent-src/personas/eloquent-tamer.md +96 -0
- package/.agent-src/personas/frontend-engineer.md +100 -0
- package/.agent-src/personas/qa.md +27 -2
- package/.agent-src/personas/security-engineer.md +100 -0
- package/.agent-src/skills/accessibility-auditor/SKILL.md +132 -0
- package/.agent-src/skills/adr-create/SKILL.md +1 -0
- package/.agent-src/skills/adversarial-review/SKILL.md +1 -0
- package/.agent-src/skills/agent-docs-writing/SKILL.md +1 -0
- package/.agent-src/skills/agents-md-thin-root/SKILL.md +1 -0
- package/.agent-src/skills/ai-council/SKILL.md +1 -0
- package/.agent-src/skills/analysis-autonomous-mode/SKILL.md +1 -0
- package/.agent-src/skills/analysis-skill-router/SKILL.md +1 -0
- package/.agent-src/skills/api-design/SKILL.md +3 -0
- package/.agent-src/skills/api-endpoint/SKILL.md +1 -0
- package/.agent-src/skills/api-testing/SKILL.md +1 -0
- package/.agent-src/skills/architecture-review-lens/SKILL.md +137 -0
- package/.agent-src/skills/artisan-commands/SKILL.md +1 -0
- package/.agent-src/skills/async-python-patterns/SKILL.md +1 -0
- package/.agent-src/skills/authz-review/SKILL.md +4 -0
- package/.agent-src/skills/aws-infrastructure/SKILL.md +1 -0
- package/.agent-src/skills/blade-ui/SKILL.md +1 -0
- package/.agent-src/skills/blast-radius-analyzer/SKILL.md +3 -0
- package/.agent-src/skills/bug-analyzer/SKILL.md +1 -0
- package/.agent-src/skills/check-refs/SKILL.md +1 -0
- package/.agent-src/skills/code-refactoring/SKILL.md +1 -0
- package/.agent-src/skills/code-review/SKILL.md +1 -0
- package/.agent-src/skills/command-routing/SKILL.md +1 -0
- package/.agent-src/skills/command-writing/SKILL.md +1 -0
- package/.agent-src/skills/composer-packages/SKILL.md +1 -0
- package/.agent-src/skills/context-authoring/SKILL.md +1 -0
- package/.agent-src/skills/context-document/SKILL.md +1 -0
- package/.agent-src/skills/conventional-commits-writing/SKILL.md +1 -0
- package/.agent-src/skills/copilot-agents-optimization/SKILL.md +1 -0
- package/.agent-src/skills/copilot-config/SKILL.md +1 -0
- package/.agent-src/skills/dashboard-design/SKILL.md +1 -0
- package/.agent-src/skills/data-flow-mapper/SKILL.md +1 -0
- package/.agent-src/skills/database/SKILL.md +3 -0
- package/.agent-src/skills/dcf-modeling/SKILL.md +1 -0
- package/.agent-src/skills/decision-record/SKILL.md +143 -0
- package/.agent-src/skills/deep-reading-analyst/SKILL.md +1 -0
- package/.agent-src/skills/defense-in-depth/SKILL.md +1 -0
- package/.agent-src/skills/dependency-upgrade/SKILL.md +1 -0
- package/.agent-src/skills/description-assist/SKILL.md +1 -0
- package/.agent-src/skills/design-review/SKILL.md +1 -0
- package/.agent-src/skills/devcontainer/SKILL.md +1 -0
- package/.agent-src/skills/developer-like-execution/SKILL.md +1 -0
- package/.agent-src/skills/docker/SKILL.md +1 -0
- package/.agent-src/skills/dto-creator/SKILL.md +1 -0
- package/.agent-src/skills/eloquent/SKILL.md +3 -0
- package/.agent-src/skills/error-handling-patterns/SKILL.md +1 -0
- package/.agent-src/skills/estimate-ticket/SKILL.md +1 -0
- package/.agent-src/skills/existing-ui-audit/SKILL.md +3 -0
- package/.agent-src/skills/fe-design/SKILL.md +4 -1
- package/.agent-src/skills/feature-planning/SKILL.md +1 -0
- package/.agent-src/skills/file-editor/SKILL.md +1 -0
- package/.agent-src/skills/finishing-a-development-branch/SKILL.md +1 -0
- package/.agent-src/skills/flux/SKILL.md +1 -0
- package/.agent-src/skills/form-handler/SKILL.md +145 -0
- package/.agent-src/skills/funnel-analysis/SKILL.md +1 -0
- package/.agent-src/skills/git-workflow/SKILL.md +1 -0
- package/.agent-src/skills/github-ci/SKILL.md +1 -0
- package/.agent-src/skills/grafana/SKILL.md +1 -0
- package/.agent-src/skills/guideline-writing/SKILL.md +1 -0
- package/.agent-src/skills/incident-commander/SKILL.md +140 -0
- package/.agent-src/skills/jira-integration/SKILL.md +1 -0
- package/.agent-src/skills/jobs-events/SKILL.md +1 -0
- package/.agent-src/skills/judge-bug-hunter/SKILL.md +1 -0
- package/.agent-src/skills/judge-code-quality/SKILL.md +1 -0
- package/.agent-src/skills/judge-security-auditor/SKILL.md +3 -0
- package/.agent-src/skills/judge-test-coverage/SKILL.md +1 -0
- package/.agent-src/skills/laravel/SKILL.md +1 -0
- package/.agent-src/skills/laravel-horizon/SKILL.md +1 -0
- package/.agent-src/skills/laravel-mail/SKILL.md +1 -0
- package/.agent-src/skills/laravel-middleware/SKILL.md +1 -0
- package/.agent-src/skills/laravel-notifications/SKILL.md +1 -0
- package/.agent-src/skills/laravel-pennant/SKILL.md +1 -0
- package/.agent-src/skills/laravel-pulse/SKILL.md +1 -0
- package/.agent-src/skills/laravel-reverb/SKILL.md +1 -0
- package/.agent-src/skills/laravel-scheduling/SKILL.md +1 -0
- package/.agent-src/skills/laravel-validation/SKILL.md +1 -0
- package/.agent-src/skills/learning-to-rule-or-skill/SKILL.md +1 -0
- package/.agent-src/skills/lint-skills/SKILL.md +1 -0
- package/.agent-src/skills/livewire/SKILL.md +1 -0
- package/.agent-src/skills/livewire-architect/SKILL.md +158 -0
- package/.agent-src/skills/logging-monitoring/SKILL.md +1 -0
- package/.agent-src/skills/markitdown/SKILL.md +1 -0
- package/.agent-src/skills/mcp/SKILL.md +1 -0
- package/.agent-src/skills/mcp-builder/SKILL.md +1 -0
- package/.agent-src/skills/md-language-check/SKILL.md +1 -0
- package/.agent-src/skills/merge-conflicts/SKILL.md +1 -0
- package/.agent-src/skills/migration-architect/SKILL.md +119 -0
- package/.agent-src/skills/migration-creator/SKILL.md +1 -0
- package/.agent-src/skills/mobile-e2e-strategy/SKILL.md +2 -1
- package/.agent-src/skills/module-management/SKILL.md +1 -0
- package/.agent-src/skills/multi-tenancy/SKILL.md +1 -0
- package/.agent-src/skills/okr-tree-modeling/SKILL.md +1 -0
- package/.agent-src/skills/openapi/SKILL.md +1 -0
- package/.agent-src/skills/override-management/SKILL.md +1 -0
- package/.agent-src/skills/performance/SKILL.md +1 -0
- package/.agent-src/skills/performance-analysis/SKILL.md +1 -0
- package/.agent-src/skills/persona-writing/SKILL.md +1 -0
- package/.agent-src/skills/pest-testing/SKILL.md +1 -0
- package/.agent-src/skills/php-coder/SKILL.md +1 -0
- package/.agent-src/skills/php-debugging/SKILL.md +1 -0
- package/.agent-src/skills/php-service/SKILL.md +1 -0
- package/.agent-src/skills/playwright-architect/SKILL.md +141 -0
- package/.agent-src/skills/playwright-testing/SKILL.md +1 -0
- package/.agent-src/skills/po-discovery/SKILL.md +127 -0
- package/.agent-src/skills/project-analysis-core/SKILL.md +1 -0
- package/.agent-src/skills/project-analysis-hypothesis-driven/SKILL.md +1 -0
- package/.agent-src/skills/project-analysis-laravel/SKILL.md +1 -0
- package/.agent-src/skills/project-analysis-nextjs/SKILL.md +1 -0
- package/.agent-src/skills/project-analysis-node-express/SKILL.md +1 -0
- package/.agent-src/skills/project-analysis-react/SKILL.md +1 -0
- package/.agent-src/skills/project-analysis-symfony/SKILL.md +1 -0
- package/.agent-src/skills/project-analysis-zend-laminas/SKILL.md +1 -0
- package/.agent-src/skills/project-analyzer/SKILL.md +1 -0
- package/.agent-src/skills/project-docs/SKILL.md +1 -0
- package/.agent-src/skills/prompt-engineering-patterns/SKILL.md +1 -0
- package/.agent-src/skills/prompt-optimizer/SKILL.md +1 -0
- package/.agent-src/skills/quality-tools/SKILL.md +1 -0
- package/.agent-src/skills/react-native-setup/SKILL.md +1 -0
- package/.agent-src/skills/react-shadcn-ui/SKILL.md +1 -0
- package/.agent-src/skills/readme-reviewer/SKILL.md +1 -0
- package/.agent-src/skills/readme-writing/SKILL.md +1 -0
- package/.agent-src/skills/readme-writing-package/SKILL.md +1 -0
- package/.agent-src/skills/receiving-code-review/SKILL.md +1 -0
- package/.agent-src/skills/refine-prompt/SKILL.md +1 -0
- package/.agent-src/skills/refine-ticket/SKILL.md +1 -0
- package/.agent-src/skills/repomix-packer/SKILL.md +1 -0
- package/.agent-src/skills/requesting-code-review/SKILL.md +1 -0
- package/.agent-src/skills/review-routing/SKILL.md +1 -0
- package/.agent-src/skills/rice-prioritization/SKILL.md +1 -0
- package/.agent-src/skills/risk-officer/SKILL.md +141 -0
- package/.agent-src/skills/roadmap-management/SKILL.md +1 -0
- package/.agent-src/skills/roadmap-writing/SKILL.md +1 -0
- package/.agent-src/skills/rtk-output-filtering/SKILL.md +1 -0
- package/.agent-src/skills/rule-writing/SKILL.md +1 -0
- package/.agent-src/skills/script-writing/SKILL.md +1 -0
- package/.agent-src/skills/secrets-management/SKILL.md +1 -0
- package/.agent-src/skills/security/SKILL.md +1 -0
- package/.agent-src/skills/security-audit/SKILL.md +1 -0
- package/.agent-src/skills/sentry-integration/SKILL.md +1 -0
- package/.agent-src/skills/sequential-thinking/SKILL.md +1 -0
- package/.agent-src/skills/skill-improvement-pipeline/SKILL.md +1 -0
- package/.agent-src/skills/skill-management/SKILL.md +1 -0
- package/.agent-src/skills/skill-reviewer/SKILL.md +1 -0
- package/.agent-src/skills/skill-writing/SKILL.md +1 -0
- package/.agent-src/skills/sql-writing/SKILL.md +1 -0
- package/.agent-src/skills/stakeholder-tradeoff/SKILL.md +149 -0
- package/.agent-src/skills/subagent-orchestration/SKILL.md +13 -0
- package/.agent-src/skills/systematic-debugging/SKILL.md +1 -0
- package/.agent-src/skills/tailwind-engineer/SKILL.md +130 -0
- package/.agent-src/skills/tech-debt-tracker/SKILL.md +152 -0
- package/.agent-src/skills/technical-specification/SKILL.md +1 -0
- package/.agent-src/skills/terraform/SKILL.md +1 -0
- package/.agent-src/skills/terragrunt/SKILL.md +1 -0
- package/.agent-src/skills/test-driven-development/SKILL.md +1 -0
- package/.agent-src/skills/test-performance/SKILL.md +1 -0
- package/.agent-src/skills/testing-anti-patterns/SKILL.md +1 -0
- package/.agent-src/skills/threat-modeling/SKILL.md +3 -0
- package/.agent-src/skills/token-optimizer/SKILL.md +1 -0
- package/.agent-src/skills/traefik/SKILL.md +1 -0
- package/.agent-src/skills/ui-component-architect/SKILL.md +153 -0
- package/.agent-src/skills/unit-economics-modeling/SKILL.md +1 -0
- package/.agent-src/skills/universal-project-analysis/SKILL.md +1 -0
- package/.agent-src/skills/upstream-contribute/SKILL.md +1 -0
- package/.agent-src/skills/using-git-worktrees/SKILL.md +1 -0
- package/.agent-src/skills/validate-feature-fit/SKILL.md +1 -0
- package/.agent-src/skills/verify-completion-evidence/SKILL.md +1 -0
- package/.agent-src/skills/websocket/SKILL.md +1 -0
- package/.claude-plugin/marketplace.json +17 -1
- package/AGENTS.md +1 -0
- package/CHANGELOG.md +68 -0
- package/README.md +3 -3
- package/docs/architecture.md +3 -3
- package/docs/catalog.md +26 -5
- package/docs/contracts/command-clusters.md +1 -1
- package/docs/contracts/file-ownership-matrix.json +560 -0
- package/docs/contracts/persona-schema.md +136 -0
- package/docs/contracts/skill-domains.md +143 -0
- package/docs/decisions/ADR-005-subagent-worktrees.md +120 -0
- package/docs/decisions/ADR-006-skill-tools-python-pilot.md +114 -0
- package/docs/decisions/INDEX.md +3 -0
- package/docs/getting-started.md +1 -1
- package/docs/guidelines/agent-infra/5w2h-analysis.md +260 -0
- package/docs/guidelines/agent-infra/critical-thinking.md +156 -0
- package/docs/guidelines/agent-infra/first-principles.md +192 -0
- package/docs/guidelines/agent-infra/six-hats.md +353 -0
- package/docs/guidelines/agent-infra/systems-thinking.md +220 -0
- package/docs/personas.md +115 -0
- package/package.json +1 -1
- package/scripts/_backfill_skill_domains.py +140 -0
- package/scripts/_emit_domain_table.py +35 -0
- package/scripts/install-hooks.sh +21 -4
- package/scripts/lint_skill_tools.py +168 -0
- package/scripts/schemas/skill.schema.json +6 -1
- package/scripts/skill_linter.py +19 -4
- package/scripts/skill_tools/__init__.py +22 -0
- package/scripts/skill_tools/audit_persona_coverage.py +147 -0
- package/scripts/skill_tools/run_block_d_eval.py +129 -0
- package/scripts/skill_tools/score_skill_relevance.py +169 -0
- package/scripts/skill_tools/suggest_skill_for_task.py +113 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: research:deep
|
|
3
|
+
cluster: research
|
|
4
|
+
sub: deep
|
|
5
|
+
description: "Read `outline.yaml`, research each item in batches, write per-item JSON validated against the project-local research-schema. No Python runtime, no `~/.claude/` paths."
|
|
6
|
+
disable-model-invocation: true
|
|
7
|
+
skills: [deep-reading-analyst]
|
|
8
|
+
suggestion:
|
|
9
|
+
eligible: true
|
|
10
|
+
trigger_description: "deep research, populate the research scaffold, fill outline.yaml items"
|
|
11
|
+
trigger_context: "user has run `/research <topic>` and now wants per-item depth"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# /research:deep
|
|
15
|
+
|
|
16
|
+
Reads the `outline.yaml` produced by [`/research`](../research.md), launches
|
|
17
|
+
batched per-item research, and writes one JSON per item under
|
|
18
|
+
`{output_dir}/`. Each JSON is self-validated against the
|
|
19
|
+
[`research-schema`](../../contexts/contracts/research-schema.md)
|
|
20
|
+
contract before write — **no `validate_json.py` script, no Python
|
|
21
|
+
runtime, no `~/.claude/` paths**.
|
|
22
|
+
|
|
23
|
+
## Trigger
|
|
24
|
+
|
|
25
|
+
`/research:deep [--batch-confirm=each|once|auto]`
|
|
26
|
+
|
|
27
|
+
`--batch-confirm` controls user gating between batches:
|
|
28
|
+
|
|
29
|
+
- `each` (default) — confirm before every batch.
|
|
30
|
+
- `once` — confirm only the first batch, then run the rest.
|
|
31
|
+
- `auto` — no confirmation, run all batches (only honoured under
|
|
32
|
+
explicit `/roadmap process-full` autonomy).
|
|
33
|
+
|
|
34
|
+
## Workflow
|
|
35
|
+
|
|
36
|
+
### Step 1 — Auto-locate outline
|
|
37
|
+
|
|
38
|
+
Search `$PROJECT_ROOT/agents/research/*/outline.yaml` (single match) or
|
|
39
|
+
ask via numbered options if multiple `outline.yaml` files exist. Read:
|
|
40
|
+
|
|
41
|
+
- `topic`, `topic_slug`, `items[]`, `execution.batch_size`,
|
|
42
|
+
`execution.items_per_agent`, `execution.output_dir` (default
|
|
43
|
+
`./results` relative to the topic dir).
|
|
44
|
+
|
|
45
|
+
### Step 2 — Resume check
|
|
46
|
+
|
|
47
|
+
Scan `{output_dir}/` for `*.json` files; mark items whose
|
|
48
|
+
`{slug(item.name)}.json` exists as **complete**. Slugify by lowercasing,
|
|
49
|
+
replacing whitespace with `_`, and stripping characters outside
|
|
50
|
+
`[a-z0-9_-]`.
|
|
51
|
+
|
|
52
|
+
### Step 3 — Batch execution
|
|
53
|
+
|
|
54
|
+
Group remaining items by `batch_size` (each batch holds
|
|
55
|
+
`batch_size × items_per_agent` items at most). For each batch:
|
|
56
|
+
|
|
57
|
+
1. Show the batch summary: `[N/M] items: a, b, c …`.
|
|
58
|
+
2. Apply the `--batch-confirm` policy (default `each` — wait for the
|
|
59
|
+
user; `once` after the first; `auto` skips).
|
|
60
|
+
3. For every item in the batch, run the per-item research using the
|
|
61
|
+
agent's **native web-search** (no `web-search-agent` persona).
|
|
62
|
+
|
|
63
|
+
#### Per-item prompt template
|
|
64
|
+
|
|
65
|
+
Variables in `{xxx}` only — **do not modify structure or wording**.
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
## Task
|
|
69
|
+
Research {item_related_info}, output structured JSON to {output_path}.
|
|
70
|
+
|
|
71
|
+
## Field definitions
|
|
72
|
+
Read {fields_path} to get all field definitions.
|
|
73
|
+
|
|
74
|
+
## Output requirements
|
|
75
|
+
1. Output JSON whose top-level keys map to the categories in
|
|
76
|
+
`fields.yaml` (or to the `{slug(category)}` form — both are
|
|
77
|
+
accepted by `/research:report`).
|
|
78
|
+
2. Mark uncertain field values with the literal string `[uncertain]`.
|
|
79
|
+
3. Append an `uncertain` array at the end of the JSON listing all
|
|
80
|
+
field names whose value contains `[uncertain]` or could not be
|
|
81
|
+
sourced.
|
|
82
|
+
4. All field values in English.
|
|
83
|
+
|
|
84
|
+
## Output path
|
|
85
|
+
{output_path}
|
|
86
|
+
|
|
87
|
+
## Validation (no Python, no host paths)
|
|
88
|
+
Self-validate the JSON against
|
|
89
|
+
`<package>/.agent-src.uncompressed/contexts/contracts/research-schema.md`
|
|
90
|
+
in memory before writing. The well-formedness escape hatch is
|
|
91
|
+
`jq -e '.[]' {output_path}` — agent runs it after write and re-tries
|
|
92
|
+
once on failure. Task is complete only after both checks pass.
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
#### Variable bindings
|
|
96
|
+
|
|
97
|
+
| Variable | Source |
|
|
98
|
+
|---|---|
|
|
99
|
+
| `{topic}` | `outline.yaml#/topic` |
|
|
100
|
+
| `{item_related_info}` | the item's full YAML block (`name`, `category`, `description`, etc.) |
|
|
101
|
+
| `{output_dir}` | `outline.yaml#/execution/output_dir` (default `./results`) |
|
|
102
|
+
| `{fields_path}` | `$PROJECT_ROOT/agents/research/{topic_slug}/fields.yaml` |
|
|
103
|
+
| `{output_path}` | `{output_dir}/{slug(item.name)}.json` |
|
|
104
|
+
|
|
105
|
+
### Step 4 — Wait and monitor
|
|
106
|
+
|
|
107
|
+
Wait for the current batch to finish (all per-item JSON files written
|
|
108
|
+
+ validated). Display per-item status (`✅ done`, `⚠️ uncertain`,
|
|
109
|
+
`❌ failed`) before moving on.
|
|
110
|
+
|
|
111
|
+
### Step 5 — Summary report
|
|
112
|
+
|
|
113
|
+
After all batches complete, print:
|
|
114
|
+
|
|
115
|
+
- Total items · completed · uncertain · failed.
|
|
116
|
+
- Output directory.
|
|
117
|
+
- Pointer to `/research:report` for the next phase.
|
|
118
|
+
|
|
119
|
+
## Output paths
|
|
120
|
+
|
|
121
|
+
```text
|
|
122
|
+
$PROJECT_ROOT/agents/research/{topic_slug}/
|
|
123
|
+
├── outline.yaml
|
|
124
|
+
├── fields.yaml
|
|
125
|
+
└── {output_dir}/
|
|
126
|
+
├── {slug(item_a)}.json
|
|
127
|
+
├── {slug(item_b)}.json
|
|
128
|
+
└── …
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Portability notes
|
|
132
|
+
|
|
133
|
+
- **No Python runtime** — validator dropped at adoption, replaced by
|
|
134
|
+
the in-memory JSON-Schema check + `jq -e` escape hatch (`jq` is
|
|
135
|
+
optional; agents skip it gracefully if not installed and report
|
|
136
|
+
`⚠️ jq missing — well-formedness not verified`).
|
|
137
|
+
- **No `~/.claude/` paths** — every reference is rooted at
|
|
138
|
+
`$PROJECT_ROOT/agents/research/`.
|
|
139
|
+
- **No `web-search-agent` persona** — uses the host agent's native
|
|
140
|
+
web-search tool.
|
|
141
|
+
|
|
142
|
+
## ADOPT citation
|
|
143
|
+
|
|
144
|
+
Adopted from [`Weizhena/Deep-Research-skills`](https://github.com/Weizhena/Deep-Research-skills)
|
|
145
|
+
`@dc18cf4:skills/research-en/research-deep/SKILL.md` · MIT License.
|
|
146
|
+
Refactored:
|
|
147
|
+
dropped Pydantic validator + `~/.claude/` paths + `web-search-agent`
|
|
148
|
+
persona, added `--batch-confirm` flag, kept the per-item prompt
|
|
149
|
+
structure verbatim except for the validation block.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: research:report
|
|
3
|
+
cluster: research
|
|
4
|
+
sub: report
|
|
5
|
+
description: "Summarise per-item JSON results from `/research:deep` into `report.md`. Agent renders directly + emits an optional `jq` template for deterministic regeneration. No Python runtime."
|
|
6
|
+
disable-model-invocation: true
|
|
7
|
+
skills: [deep-reading-analyst]
|
|
8
|
+
suggestion:
|
|
9
|
+
eligible: true
|
|
10
|
+
trigger_description: "summarise research results, build research report, render outline.yaml results"
|
|
11
|
+
trigger_context: "user has finished `/research:deep` and wants a single markdown summary"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# /research:report
|
|
15
|
+
|
|
16
|
+
Reads the per-item JSON files emitted by
|
|
17
|
+
[`/research:deep`](deep.md), asks the user which fields to surface in
|
|
18
|
+
the table of contents, then writes `{topic_slug}/report.md` directly.
|
|
19
|
+
Optionally emits `{topic_slug}/report-template.jq` so the same report
|
|
20
|
+
can be regenerated deterministically without re-invoking the agent.
|
|
21
|
+
|
|
22
|
+
## Trigger
|
|
23
|
+
|
|
24
|
+
`/research:report`
|
|
25
|
+
|
|
26
|
+
## Workflow
|
|
27
|
+
|
|
28
|
+
### Step 1 — Locate results
|
|
29
|
+
|
|
30
|
+
Find `$PROJECT_ROOT/agents/research/*/outline.yaml` (single match) or
|
|
31
|
+
ask via numbered options. Read `topic`, `topic_slug`, and
|
|
32
|
+
`execution.output_dir`.
|
|
33
|
+
|
|
34
|
+
### Step 2 — Scan summary-field candidates
|
|
35
|
+
|
|
36
|
+
Read every `*.json` in `{output_dir}/`. Collect field names whose
|
|
37
|
+
values are short / numeric (e.g. `github_stars`,
|
|
38
|
+
`google_scholar_cites`, `swe_bench_score`, `user_scale`, `valuation`,
|
|
39
|
+
`release_date`). Filter:
|
|
40
|
+
|
|
41
|
+
- numeric scalars (int / float),
|
|
42
|
+
- short strings (≤ 40 chars), or
|
|
43
|
+
- ISO-8601 dates.
|
|
44
|
+
|
|
45
|
+
### Step 3 — Ask user (numbered options)
|
|
46
|
+
|
|
47
|
+
Per [`user-interaction`](../../rules/user-interaction.md) Iron Law,
|
|
48
|
+
offer numbered options for **TOC summary fields** drawn from the
|
|
49
|
+
candidate list. Allow multi-select (e.g., *"1, 3, 5"*) plus *"none"*.
|
|
50
|
+
|
|
51
|
+
### Step 4 — Render `report.md` directly
|
|
52
|
+
|
|
53
|
+
The agent itself reads each JSON + `fields.yaml` + the user's TOC
|
|
54
|
+
choices, then writes `{topic_slug}/report.md`. **No `generate_report.py`
|
|
55
|
+
script, no Python runtime.**
|
|
56
|
+
|
|
57
|
+
#### Required structure
|
|
58
|
+
|
|
59
|
+
1. **Title** — `# {topic} — Research Report`.
|
|
60
|
+
2. **TOC** — every item, anchor-linked, with the chosen summary fields
|
|
61
|
+
inline. Example:
|
|
62
|
+
`1. [GitHub Copilot](#github-copilot) — Stars: 10k · Score: 85%`.
|
|
63
|
+
3. **Detailed sections** — one `## {item.name}` per item, then
|
|
64
|
+
`### {category}` per category from `fields.yaml`, then field
|
|
65
|
+
key/value rows.
|
|
66
|
+
|
|
67
|
+
#### Rendering rules
|
|
68
|
+
|
|
69
|
+
| Rule | Behaviour |
|
|
70
|
+
|---|---|
|
|
71
|
+
| **JSON shape** | Support flat (`{"name": "…"}`) and nested (`{"basic_info": {"name": "…"}}`) layouts. Lookup order: top-level → category mapping → recursive walk. |
|
|
72
|
+
| **Category mapping** | Maintain a bidirectional alias map between `fields.yaml` category labels and JSON keys (e.g. `"Basic info" ↔ "basic_info"`). Use language-neutral keys, no hard-coded English/Chinese. |
|
|
73
|
+
| **List of dicts** | One row per dict, `key:value` pairs joined with ` \| `. |
|
|
74
|
+
| **Plain list** | Short → comma-joined; long (> 5 items) → bullet list. |
|
|
75
|
+
| **Nested dict** | Recurse; render with `;` between sibling keys or hard-break on long values. |
|
|
76
|
+
| **Long text** | Strings > 100 chars → wrap in a blockquote or insert `<br>`. |
|
|
77
|
+
| **Extra fields** | JSON keys not declared in `fields.yaml` → group under `### Other info`. Filter `_source_file`, `uncertain`, and category-container keys. |
|
|
78
|
+
| **`uncertain` array** | Render each entry on its own line under `### Uncertain fields`; never compress to a one-liner. |
|
|
79
|
+
| **Skip conditions** | Field value contains `[uncertain]` · field name in `uncertain` · value is `null` / empty string. |
|
|
80
|
+
|
|
81
|
+
### Step 5 — Optional `jq` template (deterministic regenerate)
|
|
82
|
+
|
|
83
|
+
Also emit `{topic_slug}/report-template.jq` capturing the user's TOC
|
|
84
|
+
choices + rendering rules as a `jq` program. Document the regenerate
|
|
85
|
+
command in the file's leading comment:
|
|
86
|
+
|
|
87
|
+
```text
|
|
88
|
+
# Regenerate report.md without re-invoking the agent:
|
|
89
|
+
# jq -rsf report-template.jq results/*.json > report.md
|
|
90
|
+
# Requires: jq ≥ 1.6. Skip this file if jq is unavailable —
|
|
91
|
+
# `report.md` from step 4 is the canonical artefact.
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The template is **best-effort**. Agents that cannot fully express
|
|
95
|
+
the rendering rules in `jq` may emit a stub with a `# TODO` comment
|
|
96
|
+
and a pointer back to step 4. The primary deliverable is `report.md`;
|
|
97
|
+
the `jq` template is a power-user convenience.
|
|
98
|
+
|
|
99
|
+
### Step 6 — Confirm
|
|
100
|
+
|
|
101
|
+
Print:
|
|
102
|
+
|
|
103
|
+
- Path to `report.md`.
|
|
104
|
+
- Whether `report-template.jq` was emitted.
|
|
105
|
+
- Item count · category count · skipped-uncertain count.
|
|
106
|
+
|
|
107
|
+
## Output paths
|
|
108
|
+
|
|
109
|
+
```text
|
|
110
|
+
$PROJECT_ROOT/agents/research/{topic_slug}/
|
|
111
|
+
├── report.md # primary artefact (agent-rendered)
|
|
112
|
+
└── report-template.jq # optional, deterministic regen
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Portability notes
|
|
116
|
+
|
|
117
|
+
- **No Python runtime** — upstream's `generate_report.py` was a
|
|
118
|
+
Python conversion script; this port shifts the transformation to
|
|
119
|
+
the agent (primary) + a `jq` template (optional). `augment-portability`
|
|
120
|
+
Iron Law upheld.
|
|
121
|
+
- **No `~/.claude/` paths** — every reference is rooted at
|
|
122
|
+
`$PROJECT_ROOT/agents/research/`.
|
|
123
|
+
- **`jq` is optional** — agents skip the template gracefully and
|
|
124
|
+
surface `⚠️ jq template not emitted` in the summary if generation
|
|
125
|
+
fails or the dependency is missing.
|
|
126
|
+
|
|
127
|
+
## ADOPT citation
|
|
128
|
+
|
|
129
|
+
Adopted from [`Weizhena/Deep-Research-skills`](https://github.com/Weizhena/Deep-Research-skills)
|
|
130
|
+
`@dc18cf4:skills/research-en/research-report/SKILL.md` · MIT License.
|
|
131
|
+
Refactored: dropped the `generate_report.py` Python script (replaced
|
|
132
|
+
with agent-side rendering + optional `jq` template), kept the
|
|
133
|
+
multilingual category mapping + complex-value formatting rules,
|
|
134
|
+
re-anchored every path under `$PROJECT_ROOT/agents/research/`.
|
|
@@ -12,15 +12,43 @@ suggestion:
|
|
|
12
12
|
|
|
13
13
|
# /research
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
the
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
Top-level entry point for the `/research` family. Bare `/research <topic>`
|
|
16
|
+
runs the preliminary scaffolder described under `## Default flow`. Sub-commands
|
|
17
|
+
drive the downstream phases (`:deep` populates the scaffold, `:report`
|
|
18
|
+
summarises the results).
|
|
19
19
|
|
|
20
20
|
Routes thinking-framework support to
|
|
21
21
|
[`deep-reading-analyst`](../skills/deep-reading-analyst/SKILL.md) (SCQA
|
|
22
22
|
for narrative structure, mental-models lens for object selection).
|
|
23
23
|
|
|
24
|
+
## Sub-commands
|
|
25
|
+
|
|
26
|
+
| Sub-command | Routes to | Purpose |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| `/research <topic>` (bare) | this file (`## Default flow`) | Pick objects, define fields, emit `outline.yaml` + `fields.yaml` |
|
|
29
|
+
| `/research:deep` | `commands/research/deep.md` | Read scaffold, research each item in batches, write per-item JSON |
|
|
30
|
+
| `/research:report` | `commands/research/report.md` | Summarise per-item JSON into a markdown report (+ optional `jq` template) |
|
|
31
|
+
|
|
32
|
+
## Dispatch
|
|
33
|
+
|
|
34
|
+
1. Parse the user's argument: `/research[:<sub>] [args]`.
|
|
35
|
+
2. Bare `/research <topic>` → run the `## Workflow` below verbatim.
|
|
36
|
+
3. `/research:deep` → load `commands/research/deep.md` and follow its
|
|
37
|
+
`## Workflow` section verbatim.
|
|
38
|
+
4. `/research:report` → load `commands/research/report.md` and follow its
|
|
39
|
+
`## Workflow` section verbatim.
|
|
40
|
+
5. Unknown sub-command → print the table above and ask which one.
|
|
41
|
+
|
|
42
|
+
## Rules
|
|
43
|
+
|
|
44
|
+
- **Do NOT commit, push, or open a PR** unless the sub-command explicitly
|
|
45
|
+
authorizes it.
|
|
46
|
+
- **Do NOT chain sub-commands.** One `/research[:<sub>]` per turn.
|
|
47
|
+
- If the user invokes `/research` with no argument, **show the menu** —
|
|
48
|
+
do not guess whether they meant the bare workflow or a sub-command.
|
|
49
|
+
- **Edit `.agent-src.uncompressed/` only.** `.agent-src/` and `.augment/`
|
|
50
|
+
regenerate from source.
|
|
51
|
+
|
|
24
52
|
## Trigger
|
|
25
53
|
|
|
26
54
|
`/research <topic>`
|
|
@@ -126,17 +154,19 @@ $PROJECT_ROOT/agents/research/{topic_slug}/
|
|
|
126
154
|
└── fields.yaml # field definitions
|
|
127
155
|
```
|
|
128
156
|
|
|
129
|
-
## Out of scope
|
|
157
|
+
## Out of scope
|
|
130
158
|
|
|
131
|
-
`/research
|
|
132
|
-
|
|
133
|
-
are
|
|
159
|
+
`/research:add-items` and `/research:add-fields` are **not** ported —
|
|
160
|
+
the existing scaffolder + sub-commands cover the round-trip; the
|
|
161
|
+
upstream incremental-edit commands are too thin to justify their own
|
|
162
|
+
sub-command. Re-run `/research <topic>` and merge by hand if the
|
|
163
|
+
field framework needs a follow-up adjustment.
|
|
134
164
|
|
|
135
165
|
## ADOPT citation
|
|
136
166
|
|
|
137
167
|
Adopted from [`Weizhena/Deep-Research-skills`](https://github.com/Weizhena/Deep-Research-skills)
|
|
138
|
-
|
|
139
|
-
Refactored: dropped `web-search-agent` persona
|
|
140
|
-
Pydantic validator (replaced with JSON-Schema
|
|
141
|
-
`./` → `$PROJECT_ROOT/agents/research
|
|
142
|
-
`/research
|
|
168
|
+
`@dc18cf4:skills/research-en/research/SKILL.md` · MIT License.
|
|
169
|
+
Refactored: dropped `web-search-agent` persona
|
|
170
|
+
(portability), dropped Pydantic validator (replaced with JSON-Schema
|
|
171
|
+
reference), repathed `./` → `$PROJECT_ROOT/agents/research/`. Phase 2
|
|
172
|
+
ported `/research:deep` and `/research:report` as cluster sub-commands.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: review-changes
|
|
3
|
-
skills: [code-review, subagent-orchestration, judge-bug-hunter, judge-security-auditor, judge-test-coverage, judge-code-quality, git-workflow]
|
|
4
|
-
description: Self-review local changes before creating a PR — dispatches to
|
|
3
|
+
skills: [code-review, subagent-orchestration, judge-bug-hunter, judge-security-auditor, judge-test-coverage, judge-code-quality, architecture-review-lens, git-workflow]
|
|
4
|
+
description: Self-review local changes before creating a PR — dispatches to five specialized judges (bug, security, tests, quality, architecture) and consolidates verdicts
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
suggestion:
|
|
7
7
|
eligible: true
|
|
@@ -55,7 +55,7 @@ Read `.agent-settings.yml`:
|
|
|
55
55
|
|
|
56
56
|
Unknown alias → stop. Never silently fall back.
|
|
57
57
|
|
|
58
|
-
### 4. Dispatch to the
|
|
58
|
+
### 4. Dispatch to the five judges
|
|
59
59
|
|
|
60
60
|
Each judge receives **the same diff plus the task context** (ticket,
|
|
61
61
|
PR body, commit messages) and runs independently. The judges are:
|
|
@@ -66,16 +66,21 @@ PR body, commit messages) and runs independently. The judges are:
|
|
|
66
66
|
| [`judge-security-auditor`](../skills/judge-security-auditor/SKILL.md) | AuthZ/AuthN, injection, secrets, unsafe deserialization, SSRF, XSS |
|
|
67
67
|
| [`judge-test-coverage`](../skills/judge-test-coverage/SKILL.md) | Missing assertions, uncovered branches, over-mocking, regression-test gaps |
|
|
68
68
|
| [`judge-code-quality`](../skills/judge-code-quality/SKILL.md) | Naming, SRP, DRY, dead code, consistency with codebase conventions |
|
|
69
|
+
| [`architecture-review-lens`](../skills/architecture-review-lens/SKILL.md) | Layer violations, dependency direction, leaky abstractions, cross-service contract drift |
|
|
70
|
+
|
|
71
|
+
The five judges weight equally in the consolidated verdict — none
|
|
72
|
+
overrides another.
|
|
69
73
|
|
|
70
74
|
Pick dispatch mode based on diff size and environment:
|
|
71
75
|
|
|
72
76
|
- **Sequential** (default, simplest) — run bug-hunter → security-auditor
|
|
73
|
-
→ test-coverage → code-quality, collect
|
|
77
|
+
→ test-coverage → code-quality → architecture-review-lens, collect
|
|
78
|
+
each verdict
|
|
74
79
|
- **Parallel** — if `subagents.max_parallel` in `.agent-settings.yml` is
|
|
75
|
-
≥
|
|
80
|
+
≥ 5 and subagent dispatch is available, run all five concurrently
|
|
76
81
|
following the `do-in-parallel` pattern in
|
|
77
82
|
[`subagent-orchestration`](../skills/subagent-orchestration/SKILL.md);
|
|
78
|
-
the
|
|
83
|
+
the five judges operate on the same diff but produce independent
|
|
79
84
|
reports, so no shared-state risk
|
|
80
85
|
|
|
81
86
|
Each judge returns its own `Judge / Model / Target / Verdict /
|
|
@@ -129,7 +134,7 @@ Produce one combined report:
|
|
|
129
134
|
before proceeding
|
|
130
135
|
- If **any** judge returned `revise` → fix 🔴 findings automatically,
|
|
131
136
|
ask before fixing 🟡 findings, report 🟢 as suggestions
|
|
132
|
-
- If all
|
|
137
|
+
- If all five returned `apply` → the diff is ready; report and stop
|
|
133
138
|
|
|
134
139
|
### 7. Quality tools (verbosity-gated)
|
|
135
140
|
|
|
@@ -163,7 +168,7 @@ Per `verbosity.routine_confirmations` (default `false`):
|
|
|
163
168
|
## Use this command when
|
|
164
169
|
|
|
165
170
|
- Preparing a self-review before opening a PR
|
|
166
|
-
- Stress-testing a local branch with the same
|
|
171
|
+
- Stress-testing a local branch with the same five lenses a reviewer
|
|
167
172
|
would apply
|
|
168
173
|
- Sanity-checking a diff before handing it to `/create-pr`
|
|
169
174
|
|
|
@@ -26,27 +26,17 @@ Personas fix that: one definition, many skills.
|
|
|
26
26
|
|
|
27
27
|
## Schema
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Locked in [`../../docs/contracts/persona-schema.md`](../../docs/contracts/persona-schema.md).
|
|
30
|
+
Two-tier hybrid (council iter-1 A-OQ1 verdict (c)):
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
| `description` | string | one sentence, ≤ 160 chars |
|
|
36
|
-
| `tier` | `core` \| `specialist` | Core = always-loaded cast; Specialist = opt-in |
|
|
37
|
-
| `mode` | string (optional) | advisory link to a role-contract workflow mode |
|
|
38
|
-
| `version` | string | semantic version; bump on breaking changes |
|
|
39
|
-
| `source` | string | `package` for personas shipped here |
|
|
40
|
-
|
|
41
|
-
Required sections (checked by the linter):
|
|
42
|
-
|
|
43
|
-
1. **Focus** — one paragraph, the lens.
|
|
44
|
-
2. **Mindset** — bullets, default assumptions and skepticism.
|
|
45
|
-
3. **Unique Questions** — ≥ 3 questions no other persona asks.
|
|
46
|
-
4. **Output Expectations** — how findings are phrased.
|
|
47
|
-
5. **Anti-Patterns** — what this persona must refuse to do.
|
|
32
|
+
- **Core** — 5 sections (Focus · Mindset · Unique Questions · Output
|
|
33
|
+
Expectations · Anti-Patterns), ≤ 120 lines. Always-loaded cast.
|
|
34
|
+
- **Specialist** — 7 sections (Core-5 + Critical Rules + Workflows),
|
|
35
|
+
≤ 100 lines. Opt-in lens.
|
|
48
36
|
|
|
49
|
-
|
|
37
|
+
Frontmatter is uniform across tiers: `id · role · description · tier
|
|
38
|
+
· mode · version · source`. See the contract for full details and
|
|
39
|
+
the linter check list.
|
|
50
40
|
|
|
51
41
|
## The Core-6 (always-loaded cast, v1)
|
|
52
42
|
|
|
@@ -94,10 +84,11 @@ cast (usually Core-6 for review skills, empty for others).
|
|
|
94
84
|
- Every persona must pass the Unique-Questions heuristic.
|
|
95
85
|
- Project-specific personas live in the consumer repo
|
|
96
86
|
(`.agent-src/personas/` overrides), never in this package.
|
|
97
|
-
-
|
|
98
|
-
|
|
87
|
+
- **Core** template: [`../templates/persona.md`](../templates/persona.md) (5 sections, ≤ 120 lines).
|
|
88
|
+
- **Specialist** template: [`./_template-specialist/persona.md`](./_template-specialist/persona.md) (7 sections, ≤ 100 lines).
|
|
99
89
|
|
|
100
90
|
## Related
|
|
101
91
|
|
|
92
|
+
- [`../../docs/contracts/persona-schema.md`](../../docs/contracts/persona-schema.md) — locked schema (Core / Specialist)
|
|
102
93
|
- [`../../docs/guidelines/agent-infra/role-contracts.md`](../../docs/guidelines/agent-infra/role-contracts.md) — workflow modes personas compose with
|
|
103
94
|
- [`../rules/artifact-drafting-protocol.md`](../rules/artifact-drafting-protocol.md) — mandatory per new persona
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: {persona-id}
|
|
3
|
+
role: {Human-readable role name}
|
|
4
|
+
description: "One sentence — the voice this specialist brings; ≤ 160 chars."
|
|
5
|
+
tier: specialist
|
|
6
|
+
mode: developer
|
|
7
|
+
version: "1.0"
|
|
8
|
+
source: package
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# {Human-readable role name}
|
|
12
|
+
|
|
13
|
+
## Focus
|
|
14
|
+
|
|
15
|
+
One paragraph. The lens this specialist applies — narrow domain,
|
|
16
|
+
explicit axis. State what this voice notices that no other persona
|
|
17
|
+
catches. Avoid restating the role title; describe the *reading
|
|
18
|
+
posture* the voice adopts when handed a diff or plan.
|
|
19
|
+
|
|
20
|
+
End with one sentence pinning the boundary: what this lens is **not**
|
|
21
|
+
responsible for.
|
|
22
|
+
|
|
23
|
+
## Mindset
|
|
24
|
+
|
|
25
|
+
- Default assumption #1 the persona starts every review from.
|
|
26
|
+
- Skepticism #1 — what this voice refuses to take on faith.
|
|
27
|
+
- Skepticism #2.
|
|
28
|
+
- Operational habit (e.g. "always reads X before Y").
|
|
29
|
+
- One unfair-but-useful prior (the bias the voice owns honestly).
|
|
30
|
+
|
|
31
|
+
## Unique Questions
|
|
32
|
+
|
|
33
|
+
Three or more questions no other persona asks verbatim. Each must
|
|
34
|
+
be falsifiable against the artefact under review.
|
|
35
|
+
|
|
36
|
+
- {Question 1 — direct, scoped, answerable from the diff/plan.}
|
|
37
|
+
- {Question 2.}
|
|
38
|
+
- {Question 3.}
|
|
39
|
+
- {Optional Question 4.}
|
|
40
|
+
|
|
41
|
+
## Output Expectations
|
|
42
|
+
|
|
43
|
+
How findings are phrased when this lens is invoked.
|
|
44
|
+
|
|
45
|
+
- Format: bullets · table · numbered list — pick one.
|
|
46
|
+
- Severity vocabulary: e.g. `must-fix · should-fix · nit`.
|
|
47
|
+
- Citation rule: every finding cites a file:line or contract path.
|
|
48
|
+
- Length: short — one screen unless the diff is genuinely large.
|
|
49
|
+
|
|
50
|
+
## Anti-Patterns
|
|
51
|
+
|
|
52
|
+
- {What this persona must refuse to do — e.g. "no rubber-stamp on
|
|
53
|
+
unsigned diffs"}.
|
|
54
|
+
- {Anti-pattern 2.}
|
|
55
|
+
- {Anti-pattern 3.}
|
|
56
|
+
- {Anti-pattern 4 — optional.}
|
|
57
|
+
|
|
58
|
+
## Critical Rules
|
|
59
|
+
|
|
60
|
+
Non-negotiable invariants this lens enforces. Bulleted, declarative,
|
|
61
|
+
≤ 8 items. Each rule must be verifiable against the artefact (diff,
|
|
62
|
+
plan, ticket) without external context.
|
|
63
|
+
|
|
64
|
+
- {Rule 1 — e.g. "Every public method touching tenant data must
|
|
65
|
+
resolve the tenant ID before the first DB call."}
|
|
66
|
+
- {Rule 2.}
|
|
67
|
+
- {Rule 3.}
|
|
68
|
+
- {Rule 4 — optional.}
|
|
69
|
+
|
|
70
|
+
## Workflows
|
|
71
|
+
|
|
72
|
+
Concrete inspection steps this persona runs against the skill's
|
|
73
|
+
input. Numbered, deterministic, ≤ 6 steps. Each step is a single
|
|
74
|
+
action with a clear pass/fail outcome.
|
|
75
|
+
|
|
76
|
+
1. {Step — e.g. "Locate every authorization gate touched by the
|
|
77
|
+
diff. Confirm each gate explicitly checks tenant + role."}
|
|
78
|
+
2. {Step.}
|
|
79
|
+
3. {Step.}
|
|
80
|
+
4. {Optional step.}
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
*Author note (delete before publishing): this template targets the
|
|
85
|
+
7-section specialist spine locked in
|
|
86
|
+
[`docs/contracts/persona-schema.md`](../../../docs/contracts/persona-schema.md).
|
|
87
|
+
Stay within the **≤ 100 line** budget (file total, including
|
|
88
|
+
frontmatter). Replace every `{placeholder}` with concrete content.
|
|
89
|
+
Run the project's CI / lint pipeline before commit.*
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: backend-architect
|
|
3
|
+
role: Backend Architect
|
|
4
|
+
description: "The voice that watches service-layer boundaries — module seams, transaction scope, and the contracts a change widens or breaks."
|
|
5
|
+
tier: specialist
|
|
6
|
+
mode: reviewer
|
|
7
|
+
version: "1.0"
|
|
8
|
+
source: package
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Backend Architect
|
|
12
|
+
|
|
13
|
+
## Focus
|
|
14
|
+
|
|
15
|
+
System shape behind the diff. Reads every change against the layered
|
|
16
|
+
boundaries it crosses — controller → service → domain → persistence —
|
|
17
|
+
and asks whether the boundary remains coherent after. Notices when a
|
|
18
|
+
module quietly absorbs a responsibility belonging elsewhere, when a
|
|
19
|
+
transaction grows new side-effects, when an interface gains implicit
|
|
20
|
+
clients.
|
|
21
|
+
|
|
22
|
+
Not the code-quality lens; does not chase naming or DRY. Chases
|
|
23
|
+
coupling, leakage, and decisions hard to undo.
|
|
24
|
+
|
|
25
|
+
## Mindset
|
|
26
|
+
|
|
27
|
+
- Every public method is a contract; every parameter change is a
|
|
28
|
+
versioning event in disguise.
|
|
29
|
+
- Transaction boundaries are part of the API — extending one across
|
|
30
|
+
a network call is the change, not the symptom.
|
|
31
|
+
- A service calling another service's repository signals the seam is
|
|
32
|
+
wrong, not that the call is convenient.
|
|
33
|
+
- Backwards-compatible-on-the-wire ≠ backwards-compatible — query
|
|
34
|
+
shapes, lock orderings, event payloads count too.
|
|
35
|
+
|
|
36
|
+
## Unique Questions
|
|
37
|
+
|
|
38
|
+
- Which seam does this change cross, and is the new dependency
|
|
39
|
+
direction the one we want long-term?
|
|
40
|
+
- What is the transaction boundary now, and does the diff stretch it
|
|
41
|
+
across an external call, queue, or tenant?
|
|
42
|
+
- Which downstream consumer of this API will silently break — caller
|
|
43
|
+
signature, event payload, or query result shape?
|
|
44
|
+
- Is this the right module to own this responsibility, or has it
|
|
45
|
+
drifted in because the right module felt expensive to touch?
|
|
46
|
+
|
|
47
|
+
## Output Expectations
|
|
48
|
+
|
|
49
|
+
Numbered findings, each citing `path:line` and naming the boundary
|
|
50
|
+
at risk. Severity: `must-fix` for new cyclic deps, widened
|
|
51
|
+
transaction scope, breaking contract changes; `should-fix` for
|
|
52
|
+
module misownership; `nit` for naming inside the seam. End with a
|
|
53
|
+
one-sentence verdict on whether the change is locally clean but
|
|
54
|
+
architecturally regressive.
|
|
55
|
+
|
|
56
|
+
## Anti-Patterns
|
|
57
|
+
|
|
58
|
+
- Do NOT review test coverage — `qa`'s lens.
|
|
59
|
+
- Do NOT comment on naming or formatting unless it signals a
|
|
60
|
+
boundary leak.
|
|
61
|
+
- Do NOT suggest rewrites — surface the boundary risk, propose the
|
|
62
|
+
smallest correction.
|
|
63
|
+
- Do NOT rubber-stamp a diff that compiles but reshapes a contract.
|
|
64
|
+
|
|
65
|
+
## Critical Rules
|
|
66
|
+
|
|
67
|
+
- A new dependency edge between layers (controller → repository
|
|
68
|
+
bypassing service) is `must-fix`.
|
|
69
|
+
- A method's return type widening from a domain object to a raw
|
|
70
|
+
array or `mixed` is `must-fix` — removes a contract.
|
|
71
|
+
- A transaction boundary newly spanning HTTP, queue dispatch, or
|
|
72
|
+
cross-tenant work is `must-fix`.
|
|
73
|
+
- An event payload field rename without a deprecation cycle is
|
|
74
|
+
`must-fix` — consumers exist outside this repo.
|
|
75
|
+
- A service method calling another service's models or repository
|
|
76
|
+
directly is `must-fix` — seam is wrong.
|
|
77
|
+
|
|
78
|
+
## Workflows
|
|
79
|
+
|
|
80
|
+
1. Inventory the layers touched by the diff (controller, service,
|
|
81
|
+
domain, persistence, infra). Note any new edges between them.
|
|
82
|
+
2. For every changed public signature, locate every caller. Flag
|
|
83
|
+
any caller whose contract assumptions break.
|
|
84
|
+
3. For every transaction or unit-of-work block touched, list the
|
|
85
|
+
side-effects inside it after the change. Flag external calls
|
|
86
|
+
added inside the boundary.
|
|
87
|
+
4. For every event or queue payload changed, locate consumers. Flag
|
|
88
|
+
missing version/deprecation handling.
|
|
89
|
+
5. Output: numbered findings with `path:line`, severity tag, and a
|
|
90
|
+
one-line "boundary at risk" label per finding.
|
|
91
|
+
|
|
92
|
+
## Composes well with
|
|
93
|
+
|
|
94
|
+
- `senior-engineer` — long-horizon impact framing.
|
|
95
|
+
- `security-engineer` — when boundary changes also cross trust
|
|
96
|
+
zones (tenant, public surface, secrets).
|