↑ ↓ para mover · Enter para abrir · Esc para fecharToque em um resultado

Arquitetura
agent · classe installer · opus

compose-service-installer

Adiciona ao docker-compose.yml todo serviço que a spec marca como materialize, rodando o docker-architect.

agent · installeropuseffort medium7 caminhos permitidos
§ a definição do agent

compose-service-installer.md, seção a seção

As seções do arquivo do próprio agent, em trechos. Passe o mouse ou clique numa para ver quais regras do projeto e templates ela cita. As seções também são chips: clique em um para ir até ela.

nerviz/.claude/agents/compose-service-installer.md

## Why this is an agent (Form 3)

Preserves context, and keeps a model pin from leaking. /new-feature-implement must materialize the service its spec decided at design time, and its own thread cannot do it: ArchHook.java guard refuses a build-class Skill call while its orchestrator phase is open, and skips the call when a classed agent makes it (decision 0126). Running docker-architect here also keeps the skill's body out of the implement thread, and keeps its opus pin out of the turns that follow (decision 0080). The closest rejected form was giving the compose files to java-spring-boot-developer, which would have carried the skill's body into an executor group and widened the executor's territory to infrastructure (@.claude/decisions/0137-pending-compose-service-decided-at-design-materialized-at-implement.md).

## Procedure

  1. Check the input. Read the spec's ## Infrastructure. No materialize row → return
  1. Drop what already exists. List the keys of the compose file's services: block with the
  1. Invoke docker-architect through the Skill tool, with the use case folder as the
  1. Check the result. Run java .claude/hooks/ArchHook.java compose and keep the lines it

---

## Failure mode

No base pair: `` ❌ compose-service-installer stopped — docker-compose.yml (or Dockerfile) missing The base pair is project-bootstrap's. Nothing added; every materialize row stays pending. ``

docker-architect stopped, or compose reports a service red: `` ⚠️ compose-service-installer — <service>: <first line of the failure> Run /docker-architect docs/use-cases/UC-NNN-<slug>/ to finish it. ``

No rollback. The implement run reports each row as it left it, and still prints the /git-publish line: the code is green whether or not the container exists.

---

## Summary format returned to the caller

✅ compose-service-installer complete — UC-NNN-<slug>
- kafka (apache/kafka:<tag>) · added · compose: up, healthy
- postgres (postgres:<tag>) · already present
- Files: docker-compose.yml, .env.example

One line per materialize row, each with one of added, already present or failed: <reason>, and the files written. On failure, the same shape with ❌ or ⚠️ and the one line that matters.

---

## References

  • @.claude/decisions/0137-pending-compose-service-decided-at-design-materialized-at-implement.md
  • @.claude/decisions/0126-guard-call-judges-classed-agent-skill-calls-by-agent-class.md —
  • @.claude/skills/docker-architect/SKILL.md — the procedure this agent runs, and its single
  • @.claude/agents/commons-logging-installer.md — the other installer
Abrir o arquivo completo no GitHub →
§ comportamento

O que lê, escreve e recusa

O contrato da própria skill, do SKILL.md, no texto original.

Class

installer — the territory is agent_classes.installer.overrides.compose-service-installer in @.claude/schemas/extensions.json: the same paths skill_classes.build gives docker-architect (the compose files, docker/**, the Dockerfile, .env, .env.example, .gitignore, .dockerignore). ArchHook.java guard reads this agent's agent_type on every write, including the writes docker-architect makes while it runs here, and refuses a path outside the list with exit 2.

Executor

yes — writes while /new-feature-implement's phase is open. The class grants it (executor: true), and ArchHook.java schema cross-checks this marker against that flag in both directions.

Pattern catalog

not injected — writes no Java (agent_classes.installer.pattern_catalog: false; schema cross-checks this line).

Input (required)

the path of the use case folder, docs/use-cases/UC-NNN-<slug>/, and the materialize rows of its spec's ## Infrastructure, both sent by the caller.

Reads

UC-NNN-spec.md § Infrastructure, docker-compose.yml, and what docker-architect reads for that folder.

Writes

nothing of its own. Every write is docker-architect's, made inside this agent and judged by this agent's territory.

Invokes

docker-architect through the Skill tool, once, with the use case folder. It never writes a service block itself: that skill is the single owner of every service block (decision 0029).

Does not

create docker-compose.yml or the Dockerfile when they are missing — that base pair is project-bootstrap's, written once at generation. Does not touch a row whose decision is exists, external or pending, edit the spec, run git, or ask anything: a background agent has no AskUserQuestion (decision 0123), and docker-architect asks nothing when it is given a use case folder.

Returns

one structured summary (shape below), not the skill's output.

Fonte: § Contract do agent, no nerviz e4cae27.

§ guard e hook

O que o guard faz com ela

installer é a classe do agent. O ArchHook lê o agent_type dele a cada escrita e confere o caminho contra a lista à esquerda; a skill que ele invoca não ganha território próprio. O texto à direita é o do próprio hook.

write_allow da classe compose-service-installer

  • ✓docker-compose*.yml
  • ✓docker/**
  • ✓Dockerfile
  • ✓.env
  • ✓.env.example
  • ✓.gitignore
  • ✓.dockerignore
  • qualquer caminho fora desta lista: recusado, exit 2

A recusa sai com código 2 e a mensagem volta para o modelo.

PreToolUse  Agent(compose-service-installer)
  audit call                       exit 0
  guard call                       exit 0
SubagentStart
  context subagent                 exit 0
  tests agent-start                exit 0
# installer · opus · write_allow: docker-compose*.yml, docker/**, Dockerfile, .env, .env.example, .gitignore, .dockerignore
§ orquestração

Onde ela fica no trilho

Cada cartão é um passo do /new-feature-implement. O executor roda três vezes, um grupo de blocos cada; entre dois grupos o orquestrador leva os relatórios adiante. Passos tracejados só rodam quando a spec precisa.

← voltar às cadeias