z-coding

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

开发流程

Development Workflow

你需要严格按照契约式来进行开发,例如
openapi-spec
,
graphql-schema
放置在
contract/
中。
You need to develop strictly in a contract-first manner. For example,
openapi-spec
,
graphql-schema
should be placed in the
contract/
directory.

优先使用SKILL

Prioritize Using SKILL

在你不确定的时候,优先从已经有的SKILL中检索知识。有SKILL则使用SKILL。
When you are unsure, prioritize retrieving knowledge from existing SKILLs. Use SKILLs whenever available.

文档标准

Documentation Standards

编写文档使用一个统一标准的格式,如:<SKILL: z-document>。
Use a unified standard format for writing documents, e.g., <SKILL: z-document>.

阅读产品文档

Read Product Documents

每次开发前需要指定一个产品文档,默认可以用
ask
或者
question
工具从目录
docs/product/reviewed
列出日期最新的几个文档,让用户选择或输入
<产品文档>
Before each development task, you need to specify a product document. By default, you can use the
ask
or
question
tool to list the latest documents from the
docs/product/reviewed
directory, and let the user select or input
<Product Document>
.

开发流程

Development Workflow

创建需求分支 -> 编写技术方案 -> 更新Contract -> 创建开发分支 -> 编写实现[1] -> 编排服务 -> 覆盖API测试 -> 覆盖e2e测试。
[1] 编写实现部分是并行进行subagent调用。
为这套流程创建
todo
Create feature branch -> Write technical proposal -> Update Contract -> Create development branch -> Implement code[1] -> Orchestrate services -> Cover API tests -> Cover E2E tests.
[1] The code implementation part involves parallel subagent calls.
Create a
todo
for this workflow.

加载规范

Loading Specifications

在写代码之前,如果上下文没有加载对应目录下的AGENTS.md,则进行加载。
例如:修改
backend/src/x/y/z/a.ts
,加载
backend/AGENTS.md
每次进行代码编写,需要加载
docs/engineering/common-rules.md
Before writing code, if the corresponding directory's AGENTS.md is not loaded in the context, load it.
Example: When modifying
backend/src/x/y/z/a.ts
, load
backend/AGENTS.md
Every time you write code, you need to load
docs/engineering/common-rules.md

创建需求分支

Create Feature Branch

在指定了需要开发的产品文档后,在远端创建开发分支
<feat-branch>
,分支名是
feat/<slug>
,其中
<slug>
产品文档内容的提炼。
After specifying the product document to be developed, create a remote development branch
<feat-branch>
with the name
feat/<slug>
, where
<slug>
is a summary of the product document content.

编写技术方案

Write Technical Proposal

USE FOR: write proposal, update proposal REFERENCE: [[dev/dev-proposal-template.md]]
USE FOR: write proposal, update proposal REFERENCE: [[dev/dev-proposal-template.md]]

更新Contract

Update Contract

USE FOR: write contract, update contract REFERENCE: [[dev/update-contract.md]]
USE FOR: write contract, update contract REFERENCE: [[dev/update-contract.md]]

编写实现

Implement Code

USE FOR: implemention, write code, coding REFERENCE: [[dev/write-implementation.md]]
USE FOR: implemention, write code, coding REFERENCE: [[dev/write-implementation.md]]

编排服务

Orchestrate Services

默认使用 <SKILL: z-aspire-orchestrator>, 如果没有则使用docker-compose+本地启动进行编排。
By default, use <SKILL: z-aspire-orchestrator>. If it is not available, use docker-compose + local startup for orchestration.

编写集成 API test & e2e test

Write Integrated API Tests & E2E Tests

默认使用 <SKILL: z-test>, 如果则自行决定如何覆盖。
By default, use <SKILL: z-test>. If it is not available, decide on your own how to cover the tests.