↑ ↓ 移动 · Enter 打开 · Esc 关闭点按一个结果

架构
skill · design 类 · opus

graphql-api-architect

设计 GraphQL 适配器:schema、输入与载荷、连接、批量加载和错误映射。

skill · designopus写入 31-graphql.md仅限 docs/use-cases/UC-*/**
§ 它写出的文件

31-graphql.md,逐块说明

bank-app 还没有 31-graphql.md。以下是 SKILL.md 所述该分文件包含的块。

## 1 · Operations

One row per root field: kind, input port, return, REST counterpart

## 2 · Schema

Types, fields, nullability and why, the read model behind each

## 3 · Inputs and payloads

Input fields and shape validation, payload, userErrors codes

## 4 · Pagination

Per connection: directions, order with its unique key, default and maximum page, the cursor's keys

## 5 · Batch loads

Per child field: the batch port (a requirement when new), key, missing-key answer

## 6 · Project setup

Every limit with its value and reason — or inherited from UC-NNN — and the Admission rows: none, or the setup and this case's quota and cap (step 8b)

## 7 · Error map

Situation, where it lands, classification, errorCode

## 8 · Personal data

Per matching output field: form, receiver and reason

## 9 · Requirements to other partials

Batch ports, statements and indexes, access rows

## 10 · Contract test cases

Every case, by level

## 11 · Declared dependencies

The starter and its test starter

## 12 · Configuration

Every property, its value, its owner

## 13 · Deferred

Same shape as every partial. none when nothing was deferred

## Design patterns

Each pattern the controllers, records or mappers adopt — step 12b

§ 行为

它读什么、写什么、拒绝什么

skill 自己的契约,取自 SKILL.md,保留原文。

Class

design — the territory is skill_classes.design in @.claude/schemas/extensions.json, and ArchHook.java guard enforces it. Writes inside the use case folder and nothing else.

Reads

docs/use-cases/UC-NNN-<slug>/00-use-case.md (mandatory), 10-domain.md (mandatory), 30-rest.md (when present), the 31-graphql.md of earlier cases, pom.xml, the schema files under src/main/resources/graphql/, the active blueprint's packages.map, the Initializr's metadata, @.claude/rules/api-graphql.md, @.claude/rules/authorization.md, @.claude/rules/error-handling.md, @.claude/rules/personal-data.md, @.claude/rules/logging.md, @.claude/rules/naming.md, @.claude/rules/architecture-ddd.md, and this skill's references/ — plus, with an Admission row, @.claude/rules/inbound-admission.md and the partial that wrote the admission setup.

Writes

docs/use-cases/UC-NNN-<slug>/31-graphql.md. Nothing else.

Owns

the root fields and the port each calls, the schema's types and nullability, inputs, payloads and userErrors, connections and their ceilings, batch loads and the batch ports they ask for, the GraphQL error map, the personal-data decision per output field, the project's GraphQL setup, the GraphQL endpoint's quota and each root field's cap, and GraphQL dependencies and configuration.

Does not decide

the input ports, their read models or the exceptions (10-domain.md), the trigger or the Access row (00-use-case.md), the REST operations (30-rest.md), the access rule of each field and the filter chain (32-security.md), the batch statements and indexes (20-persistence.md), or the tests (40-tests.md). Does not write Java, schema files, pom.xml or application.yml — the executor does, from this partial. Doesn't touch .claude/rules/**.

来源:SKILL.md § Contract(nerviz e4cae27)。

§ guard 与 hook

guard 如何处理它

design 是这个 skill 的类。ArchHook 在 skill 被调用时开启一个阶段,并按该类的领地检查每次写入。右侧文字是 hook 自己的输出。

design 类的 write_allow

  • ✓docs/use-cases/UC-*/**
  • ✓docs/use-cases/BACKLOG.md
  • src/**:迁移和类归执行器
  • docker-compose.yml:另一个类的文件
  • 已批准的用例:其 spec 已冻结

拒绝以退出码 2 结束,消息回到模型。

PreToolUse  Skill(graphql-api-architect)
  audit call                       exit 0
  guard call                       exit 0
# a skill of another class replaces the phase
# write_allow: docs/use-cases/UC-*/**, docs/use-cases/BACKLOG.md
§ 编排

它在轨道上的位置

每张卡片是 /new-feature 的一步;箭头带着一步交给下一步的分文件。虚线的步骤仅在用例需要时运行。

/new-feature-implement 之后谁读这份分文件

批准之后,/new-feature-implement 让执行器构建代码。spec 按引用整合,与分文件不一致时以 spec 为准;分文件按章节读取,用于细节。

31-graphql.mddocs/use-cases/UC-NNN-…/
按章节读取,用于细节
java-spring-boot-developeragent · executor
写出代码
src/**把一个用例设计成规格,不写代码
← 返回链路