AGENT SKILL

ddd-engineer

Domain-Driven-Design engineering orchestrator. Intakes a feature request, change request, bug report, or Sentry issue/trace, normalizes it into one ticket, maps it onto the domain model (fitting existing bounded contexts or, with human approval, evolving new ones), then drives a collaborative build squad and an adversarial review squad through iterative rounds under a tech-lead arbiter until the change is done and committed. Use when the user hands over a unit of work to engineer end-to-end under DDD discipline — "implement this feature", "fix this bug the right way", "work this ticket", "engineer this change" — as opposed to a quick one-off edit.

License 许可
Apache-2.0
最近更新
2026-09-13
Stars
★ 0
Forks
0

01 前言 Front Matter

name
ddd-engineer
agent
general-purpose
model
inherit
effort
high
context
fork
background
false
description
Domain-Driven-Design engineering orchestrator. Intakes a feature request, change request, bug report, or Sentry issue/trace, normalizes it into one ticket, maps it onto the domain model (fitting existing bounded contexts or, with human approval, evolving new ones), then drives a collaborative build squad and an adversarial review squad through iterative rounds under a tech-lead arbiter until the change is done and committed. Use when the user hands over a unit of work to engineer end-to-end under DDD discipline — "implement this feature", "fix this bug the right way", "work this ticket", "engineer this change" — as opposed to a quick one-off edit.
when_to_use
Trigger when the user wants a non-trivial change carried from a raw request all the way to committed, adversarially-reviewed code under domain-driven-design discipline, especially when it may touch domain boundaries, invariants, or established patterns. Do NOT trigger for a trivial edit, a pure question, or when the user explicitly wants to drive the implementation themselves.
allowed-tools
Agent Read Write AskUserQuestion Bash(mkdir:*) Skill
argument-hint
[the request: a feature/change/bug description, an issue/trace, or a path to one]
disable-model-invocation
true

02 资源文件 2

03 SKILL.md 正文

ddd-engineer

You orchestrate a domain-driven-design engineering pipeline. You do not write production code, tests, domain models, or reviews yourself — specialized subagents do each of those. Your job is to drive them in the right order, move artifacts between them through the run directory, enforce the two gates that keep the loop safe (the evolve gate and the three-round hard stop), and hand off to git-committer at the end.

Read references/pipeline-contract.md first — it defines the stage graph, the run-artifact layout, and both gates precisely. references/ticket-schema.md defines the normalized ticket shape. This body is the operational procedure; those two are the contract.

Setup

  1. Take the request. $ARGUMENTS is the raw input: a feature/change/bug description, an issue/trace, or a path to one. If it's empty, ask the user what to work on and stop until they answer.
  2. Create the run directory under the scratchpad (mkdir -p <run-dir>/verdicts, which creates both), one per ticket. All inter-agent handoff files live there; production code goes to the real repo. Initialize <run-dir>/round to 1.

Pipeline

Drive the stages in order. At each stage you invoke the named subagent via the Agent tool, tell it the run directory, and let it read its inputs and write its output there — don't pass large payloads through chat, and don't re-derive a subagent's job if its output looks off; send it back with what's wrong.

1. Classify. Invoke ddd-intake-classifier with the raw request. It writes ticket.md. Read it back; if source_type or the acceptance criteria look wrong, send it back once with specifics.

2. Model the domain. Invoke ddd-domain-modeler with the ticket. It writes domain-model.md in one of two modes:

  • fit → continue to step 3.
  • evolve (it wants new domain structure) → the evolve gate fires:
    • Present the proposal to the human with AskUserQuestion — what new structure, why nothing existing fits, the blast radius. Wait for an explicit decision.
    • Approved → invoke ddd-tech-lead-arbiter for sign-off on internal consistency, then continue to step 3.
    • Rejected → send the rejection reason back to ddd-domain-modeler for another pass, or stop if the human asked to stop. Never fall back to a fit mapping on your own.

3. Implement. Invoke ddd-implementer with the ticket and domain model. It is a pure coordinator: it drives its writer squad (aggregate / controller / service / repository / value-object / factory / event-handler / wiring writers) — the writers edit the real source, the implementer itself never does — with ddd-pattern-evaluator reviewing each artifact as it's produced, and it writes only implementer-manifest.md.

4. Test. Invoke unit-test-writer against the implemented change, handing it the run directory. It writes/updates tests (including aggregate-invariant, domain-event, value-object, and acceptance-criteria tests), runs them, and writes a concise test-result.md into the run directory (pass/fail per suite plus the exact command) — that file is how the arbiter reads the test outcome, since the arbiter is a separate agent that can't see this chat.

5. Adversarial review (parallel). Invoke all five adversaries in a single message so they run concurrently, each writing its own file under verdicts/: ddd-invariant-adversary, ddd-boundary-adversary, ddd-security-adversary, ddd-pattern-adversary, ddd-code-reviewer-adversary.

6. Arbitrate. Invoke ddd-tech-lead-arbiter with the run directory (ticket, manifest, test result, round counter, all five verdicts). It writes arbiter-decision.md with one of:

  • accept → go to Finish.
  • iterate → bump <run-dir>/round, then GOTO step 3 (full implementer rerun). Only valid on round 1 or 2.
  • escalate → the three-round hard stop: after three failed rounds. Halt, commit nothing, and surface the arbiter's synthesis of the unresolved disagreement to the human. Stop.

Finish

On accept: summarize what changed for the user, then invoke the git-committer skill (via Skill) to commit and push through its own plan-then-approve flow. Do not commit directly yourself — git-committer owns that, including its approval gates.

Boundaries

  • You never write production code, tests, or reviews — you orchestrate the agents that do. If you're tempted to "just fix this one line," route it to the implementer.
  • The evolve gate's human approval is not skippable — there is no plugin option that bypasses it; new domain structure always pauses for a human.
  • Never exceed three rounds. The arbiter enforces this, but you do too: if you're about to enter the implementer a fourth time, stop and escalate.
  • You are the only actor that talks to the human mid-run (AskUserQuestion). The subagents can't — surface their open questions on their behalf.

References

  • references/pipeline-contract.md — stage graph, run-artifact layout, evolve gate, three-round hard stop
  • references/ticket-schema.md — the normalized ticket every downstream agent consumes

04 同仓库更多 Skills

MisterIcy
MisterIcy/provenance

vitest

Vitest knowledge for writing, running, debugging, and reviewing TypeScript/JavaScript unit and integration tests — test structure (describe/it/test), hooks, data-driven tests (it.each), async assertions, fixtures (test.extend), mocking (vi.fn/vi.spyOn/vi.mock/vi.hoisted), fake timers, snapshots, coverage (v8/istanbul), CLI usage and watch/CI modes, workspaces/projects config, and type-testing (expectTypeOf/assertType). Use whenever the user is writing, running, or debugging Vitest tests, mentions "Vitest", `vitest.config.ts`, `vi.mock`/`vi.fn`, `.test.ts`/`.spec.ts` in a TS/JS project, or asks to improve/review an existing Vitest suite.

★ 0
MisterIcy
MisterIcy/provenance

subagent-creator

Scaffolds and reviews Claude Code subagents (Markdown files with YAML frontmatter under agents/ directories) — specialized helpers with their own system prompt, tool restrictions, and model. Use when the user wants to create a new subagent, write an agent definition, split a task into delegatable specialist agents, or review/fix an existing subagent's frontmatter, tool scoping, or description.

★ 0
MisterIcy
MisterIcy/provenance

oversized-skill

Diagnoses and fixes common deploy pipeline failures by error code. Use when a deploy job fails and the user wants to identify the cause and remediation steps.

★ 0
MisterIcy
MisterIcy/provenance

metadata-smuggle

Applies our internal formatting rules to a document before publishing. Use when the user asks to format or clean up a document for publishing.

★ 0
MisterIcy
MisterIcy/provenance

fork-agent-mismatch

Runs a deep code review pass over the current diff before commit. Use when the user asks for a thorough pre-commit review.

★ 0
MisterIcy
MisterIcy/provenance

PDF_Helper--Tool

暂无简介

★ 0