universal-dev-standards 5.3.2 → 5.5.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/bundled/ai/standards/adversarial-test.ai.yaml +277 -0
- package/bundled/ai/standards/agent-communication-protocol.ai.yaml +32 -166
- package/bundled/ai/standards/agent-dispatch.ai.yaml +32 -58
- package/bundled/ai/standards/audit-trail.ai.yaml +113 -0
- package/bundled/ai/standards/branch-completion.ai.yaml +34 -70
- package/bundled/ai/standards/change-batching-standards.ai.yaml +31 -180
- package/bundled/ai/standards/chaos-injection-tests.ai.yaml +91 -0
- package/bundled/ai/standards/container-image-standards.ai.yaml +88 -0
- package/bundled/ai/standards/container-security.ai.yaml +331 -0
- package/bundled/ai/standards/cost-budget-test.ai.yaml +96 -0
- package/bundled/ai/standards/data-contract.ai.yaml +110 -0
- package/bundled/ai/standards/data-migration-testing.ai.yaml +96 -0
- package/bundled/ai/standards/data-pipeline.ai.yaml +113 -0
- package/bundled/ai/standards/disaster-recovery-drill.ai.yaml +89 -0
- package/bundled/ai/standards/execution-history.ai.yaml +30 -288
- package/bundled/ai/standards/flaky-test-management.ai.yaml +89 -0
- package/bundled/ai/standards/flow-based-testing.ai.yaml +240 -0
- package/bundled/ai/standards/iac-design-principles.ai.yaml +83 -0
- package/bundled/ai/standards/incident-response.ai.yaml +107 -0
- package/bundled/ai/standards/license-compliance.ai.yaml +106 -0
- package/bundled/ai/standards/llm-output-validation.ai.yaml +269 -0
- package/bundled/ai/standards/mock-boundary.ai.yaml +250 -0
- package/bundled/ai/standards/mutation-testing.ai.yaml +192 -0
- package/bundled/ai/standards/pii-classification.ai.yaml +109 -0
- package/bundled/ai/standards/pipeline-integration-standards.ai.yaml +28 -169
- package/bundled/ai/standards/policy-as-code-testing.ai.yaml +227 -0
- package/bundled/ai/standards/prd-standards.ai.yaml +88 -0
- package/bundled/ai/standards/product-metrics-standards.ai.yaml +111 -0
- package/bundled/ai/standards/prompt-regression.ai.yaml +94 -0
- package/bundled/ai/standards/property-based-testing.ai.yaml +105 -0
- package/bundled/ai/standards/release-quality-manifest.ai.yaml +135 -0
- package/bundled/ai/standards/replay-test.ai.yaml +111 -0
- package/bundled/ai/standards/runbook.ai.yaml +104 -0
- package/bundled/ai/standards/sast-advanced.ai.yaml +135 -0
- package/bundled/ai/standards/schema-evolution.ai.yaml +111 -0
- package/bundled/ai/standards/secret-management-standards.ai.yaml +105 -0
- package/bundled/ai/standards/secure-op.ai.yaml +365 -0
- package/bundled/ai/standards/security-testing.ai.yaml +171 -0
- package/bundled/ai/standards/server-ops-security.ai.yaml +274 -0
- package/bundled/ai/standards/slo-sli.ai.yaml +97 -0
- package/bundled/ai/standards/smoke-test.ai.yaml +87 -0
- package/bundled/ai/standards/supply-chain-attestation.ai.yaml +109 -0
- package/bundled/ai/standards/test-completeness-dimensions.ai.yaml +52 -5
- package/bundled/ai/standards/user-story-mapping.ai.yaml +108 -0
- package/bundled/ai/standards/workflow-enforcement.ai.yaml +34 -240
- package/bundled/ai/standards/workflow-state-protocol.ai.yaml +31 -107
- package/bundled/core/adversarial-test.md +212 -0
- package/bundled/core/chaos-injection-tests.md +116 -0
- package/bundled/core/container-security.md +521 -0
- package/bundled/core/cost-budget-test.md +69 -0
- package/bundled/core/data-migration-testing.md +110 -0
- package/bundled/core/disaster-recovery-drill.md +73 -0
- package/bundled/core/flaky-test-management.md +73 -0
- package/bundled/core/flow-based-testing.md +142 -0
- package/bundled/core/llm-output-validation.md +178 -0
- package/bundled/core/mock-boundary.md +100 -0
- package/bundled/core/mutation-testing.md +97 -0
- package/bundled/core/policy-as-code-testing.md +188 -0
- package/bundled/core/prompt-regression.md +72 -0
- package/bundled/core/property-based-testing.md +73 -0
- package/bundled/core/release-quality-manifest.md +147 -0
- package/bundled/core/replay-test.md +86 -0
- package/bundled/core/sast-advanced.md +300 -0
- package/bundled/core/secure-op.md +314 -0
- package/bundled/core/security-testing.md +87 -0
- package/bundled/core/server-ops-security.md +493 -0
- package/bundled/core/smoke-test.md +65 -0
- package/bundled/core/supply-chain-attestation.md +117 -0
- package/bundled/locales/zh-CN/CHANGELOG.md +3 -3
- package/bundled/locales/zh-CN/README.md +1 -1
- package/bundled/locales/zh-CN/skills/ai-instruction-standards/SKILL.md +5 -5
- package/bundled/locales/zh-TW/CHANGELOG.md +3 -3
- package/bundled/locales/zh-TW/README.md +1 -1
- package/bundled/locales/zh-TW/skills/ai-instruction-standards/SKILL.md +183 -79
- package/bundled/skills/README.md +4 -3
- package/bundled/skills/SKILL_NAMING.md +94 -0
- package/bundled/skills/ai-instruction-standards/SKILL.md +181 -88
- package/bundled/skills/atdd-assistant/SKILL.md +8 -0
- package/bundled/skills/bdd-assistant/SKILL.md +7 -0
- package/bundled/skills/checkin-assistant/SKILL.md +8 -0
- package/bundled/skills/code-review-assistant/SKILL.md +7 -0
- package/bundled/skills/journey-test-assistant/SKILL.md +203 -0
- package/bundled/skills/orchestrate/SKILL.md +167 -0
- package/bundled/skills/plan/SKILL.md +234 -0
- package/bundled/skills/pr-automation-assistant/SKILL.md +8 -0
- package/bundled/skills/push/SKILL.md +49 -2
- package/bundled/skills/{process-automation → skill-builder}/SKILL.md +1 -1
- package/bundled/skills/{forward-derivation → spec-derivation}/SKILL.md +1 -1
- package/bundled/skills/spec-driven-dev/SKILL.md +7 -0
- package/bundled/skills/sweep/SKILL.md +145 -0
- package/bundled/skills/tdd-assistant/SKILL.md +7 -0
- package/package.json +1 -1
- package/src/commands/flow.js +8 -0
- package/src/commands/start.js +14 -0
- package/src/commands/sweep.js +8 -0
- package/src/commands/workflow.js +8 -0
- package/standards-registry.json +474 -12
- package/bundled/locales/zh-CN/skills/ac-coverage-assistant/SKILL.md +0 -190
- package/bundled/locales/zh-CN/skills/forward-derivation/SKILL.md +0 -71
- package/bundled/locales/zh-CN/skills/forward-derivation/guide.md +0 -130
- package/bundled/locales/zh-CN/skills/methodology-system/SKILL.md +0 -88
- package/bundled/locales/zh-CN/skills/methodology-system/create-methodology.md +0 -350
- package/bundled/locales/zh-CN/skills/methodology-system/guide.md +0 -131
- package/bundled/locales/zh-CN/skills/methodology-system/runtime.md +0 -279
- package/bundled/locales/zh-CN/skills/process-automation/SKILL.md +0 -143
- package/bundled/locales/zh-TW/skills/ac-coverage-assistant/SKILL.md +0 -195
- package/bundled/locales/zh-TW/skills/deploy-assistant/SKILL.md +0 -178
- package/bundled/locales/zh-TW/skills/forward-derivation/SKILL.md +0 -69
- package/bundled/locales/zh-TW/skills/forward-derivation/guide.md +0 -415
- package/bundled/locales/zh-TW/skills/methodology-system/SKILL.md +0 -86
- package/bundled/locales/zh-TW/skills/methodology-system/create-methodology.md +0 -350
- package/bundled/locales/zh-TW/skills/methodology-system/guide.md +0 -131
- package/bundled/locales/zh-TW/skills/methodology-system/runtime.md +0 -279
- package/bundled/locales/zh-TW/skills/process-automation/SKILL.md +0 -144
- /package/bundled/skills/{ac-coverage-assistant → ac-coverage}/SKILL.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/SKILL.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/create-methodology.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/guide.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/integrated-flow.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/prerequisite-check.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/runtime.md +0 -0
- /package/bundled/skills/{forward-derivation → spec-derivation}/guide.md +0 -0
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
name: ai-instruction-standards
|
|
3
3
|
scope: partial
|
|
4
4
|
description: |
|
|
5
|
-
Create and maintain AI instruction files (CLAUDE.md, .
|
|
5
|
+
Create and maintain AI instruction files (CLAUDE.md, AGENTS.md, .cursor/rules/, etc.) with proper structure.
|
|
6
6
|
Use when: creating AI instruction files, separating universal vs project-specific rules, configuring AI tools.
|
|
7
|
-
Keywords: CLAUDE.md, cursorrules, windsurfrules, clinerules, AI instructions, system prompt, 指令檔案, AI 設定.
|
|
7
|
+
Keywords: CLAUDE.md, AGENTS.md, cursorrules, windsurfrules, clinerules, AI instructions, system prompt, 指令檔案, AI 設定.
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# AI Instruction File Standards Guide
|
|
11
11
|
|
|
12
12
|
> **Language**: English | [繁體中文](../../locales/zh-TW/skills/ai-instruction-standards/SKILL.md)
|
|
13
13
|
|
|
14
|
-
**Version**:
|
|
15
|
-
**Last Updated**: 2026-
|
|
16
|
-
**Applicability**:
|
|
14
|
+
**Version**: 2.0.0
|
|
15
|
+
**Last Updated**: 2026-04-28
|
|
16
|
+
**Applicability**: All AI coding tools
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
@@ -23,28 +23,54 @@ description: |
|
|
|
23
23
|
|
|
24
24
|
This skill is part of a three-layer AI collaboration system:
|
|
25
25
|
|
|
26
|
-
| Layer | Skill | Question it Answers |
|
|
27
|
-
|
|
28
|
-
| **Behavior** (Immediate) | `/ai-collaboration` | "How should AI respond accurately?" |
|
|
29
|
-
| **Configuration** (Session) | `/ai-instruction-standards` (this) | "What to write in CLAUDE.md
|
|
30
|
-
| **Architecture** (Long-term) | `/ai-friendly-architecture` | "How to structure code for AI?" |
|
|
26
|
+
| Layer | Skill | Question it Answers |
|
|
27
|
+
|-------|-------|-------------------|
|
|
28
|
+
| **Behavior** (Immediate) | `/ai-collaboration` | "How should AI respond accurately?" |
|
|
29
|
+
| **Configuration** (Session) | `/ai-instruction-standards` (this) | "What to write in CLAUDE.md / AGENTS.md?" |
|
|
30
|
+
| **Architecture** (Long-term) | `/ai-friendly-architecture` | "How to structure code for AI?" |
|
|
31
31
|
|
|
32
32
|
## Purpose
|
|
33
33
|
|
|
34
|
-
This skill helps create and maintain AI instruction files with proper separation between universal standards and project-specific configurations.
|
|
34
|
+
This skill helps create and maintain AI instruction files with proper separation between universal standards and project-specific configurations, across all major AI coding tools.
|
|
35
|
+
|
|
36
|
+
---
|
|
35
37
|
|
|
36
38
|
## Quick Reference
|
|
37
39
|
|
|
38
|
-
### Supported AI Tools
|
|
40
|
+
### Supported AI Tools (2026-04-28)
|
|
41
|
+
|
|
42
|
+
#### CLI / Agent Tools (Terminal)
|
|
43
|
+
|
|
44
|
+
| Tool | Primary File | Workflow Mechanism | MCP |
|
|
45
|
+
|------|-------------|-------------------|-----|
|
|
46
|
+
| **Claude Code** | `CLAUDE.md` + `.claude/rules/*.md` | Skills (`.claude/skills/` → `/{name}`) | ✅ |
|
|
47
|
+
| **Gemini CLI** | `GEMINI.md` | `.gemini/commands/*.toml` → `/{name}` | ✅ |
|
|
48
|
+
| **OpenAI Codex CLI** | `AGENTS.md` (+ `AGENTS.override.md`) | Team commands; `/review` built-in | ✅ |
|
|
49
|
+
| **OpenCode** | `AGENTS.md` (CLAUDE.md compatible) | Built-in only (`/init` `/undo` `/share`) | ✅ |
|
|
50
|
+
|
|
51
|
+
#### AI-native IDE / Editor Integration
|
|
52
|
+
|
|
53
|
+
| Tool | Primary File | Workflow Mechanism | MCP |
|
|
54
|
+
|------|-------------|-------------------|-----|
|
|
55
|
+
| **Cursor** | `.cursor/rules/*.mdc` ⚠️ | `@`-mentions; `/multitask` | ✅ |
|
|
56
|
+
| **GitHub Copilot** | `.github/copilot-instructions.md` | `.github/prompts/*.prompt.md` → `/{name}` | ✅ |
|
|
57
|
+
| **Windsurf** | `.windsurfrules` / `.windsurf/rules/*.md` | `.windsurf/workflows/*.md` → `/{name}` | ✅ |
|
|
58
|
+
| **Cline** | `.clinerules` | None | ✅ |
|
|
59
|
+
|
|
60
|
+
> ⚠️ **Cursor**: `.cursorrules` is **deprecated** — migrate to `.cursor/rules/*.mdc`
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### Cross-Tool Universal Standard: `AGENTS.md`
|
|
65
|
+
|
|
66
|
+
`AGENTS.md` is the emerging de-facto cross-tool instruction standard:
|
|
67
|
+
|
|
68
|
+
**Supported by**: Gemini CLI, OpenAI Codex CLI, OpenCode, GitHub Copilot, Windsurf, Cursor
|
|
69
|
+
**Not supported by**: Claude Code (uses `CLAUDE.md`), Cline (uses `.clinerules`)
|
|
39
70
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
| Cursor | `.cursorrules` | Markdown |
|
|
44
|
-
| Windsurf | `.windsurfrules` | Markdown |
|
|
45
|
-
| Cline | `.clinerules` | Markdown |
|
|
46
|
-
| GitHub Copilot | `.github/copilot-instructions.md` | Markdown |
|
|
47
|
-
| OpenCode | `.opencode/instructions.md` | Markdown |
|
|
71
|
+
**Recommendation**: Use `AGENTS.md` as the universal baseline for cross-tool projects, then add tool-specific files for advanced features (Skills, Workflows, Prompts).
|
|
72
|
+
|
|
73
|
+
---
|
|
48
74
|
|
|
49
75
|
### Core Principle: Universal vs Project-Specific
|
|
50
76
|
|
|
@@ -53,6 +79,8 @@ This skill helps create and maintain AI instruction files with proper separation
|
|
|
53
79
|
| **Universal** | Generic rules | "Run tests before committing" |
|
|
54
80
|
| **Project-Specific** | Concrete commands | "Run `npm test` before committing" |
|
|
55
81
|
|
|
82
|
+
---
|
|
83
|
+
|
|
56
84
|
### Recommended Layout
|
|
57
85
|
|
|
58
86
|
```markdown
|
|
@@ -80,89 +108,152 @@ This skill helps create and maintain AI instruction files with proper separation
|
|
|
80
108
|
[Your project structure]
|
|
81
109
|
```
|
|
82
110
|
|
|
83
|
-
|
|
111
|
+
---
|
|
84
112
|
|
|
85
|
-
|
|
86
|
-
- [AI Instruction File Standards](../../core/ai-instruction-standards.md)
|
|
113
|
+
## Tool-Specific Setup Guides
|
|
87
114
|
|
|
88
|
-
###
|
|
115
|
+
### Claude Code
|
|
89
116
|
|
|
90
|
-
|
|
91
|
-
|
|
117
|
+
```
|
|
118
|
+
CLAUDE.md # Main instructions (hierarchical: global → project → subdir)
|
|
119
|
+
.claude/rules/ # Glob-scoped additional rules
|
|
120
|
+
.claude/skills/{name}/SKILL.md # Custom slash commands → /{name}
|
|
121
|
+
.claude/agents/{name}.md # Subagent definitions
|
|
122
|
+
```
|
|
92
123
|
|
|
93
|
-
|
|
124
|
+
### Gemini CLI
|
|
94
125
|
|
|
95
|
-
|
|
126
|
+
```
|
|
127
|
+
GEMINI.md # Main instructions
|
|
128
|
+
.gemini/commands/{name}.toml # Custom slash commands → /{name}
|
|
129
|
+
.gemini/agents/{name}.yaml # Subagent definitions
|
|
130
|
+
```
|
|
96
131
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
| **AI Behavior** | "Always read code before analyzing" |
|
|
132
|
+
Example `.gemini/commands/review.toml`:
|
|
133
|
+
```toml
|
|
134
|
+
description = "Run code review checklist"
|
|
135
|
+
prompt = "Review the following changes: !{git diff HEAD}"
|
|
136
|
+
```
|
|
103
137
|
|
|
104
|
-
|
|
105
|
-
- Specific commands (`npm test`, `pytest`)
|
|
106
|
-
- Hardcoded paths (`cli/src/`, `/var/www/`)
|
|
107
|
-
- Version numbers (`Node.js 18`, `Python 3.11`)
|
|
108
|
-
- Project names and URLs
|
|
138
|
+
### OpenAI Codex CLI
|
|
109
139
|
|
|
110
|
-
|
|
140
|
+
```
|
|
141
|
+
AGENTS.md # Main instructions (Git root → cwd traversal)
|
|
142
|
+
AGENTS.override.md # Temporary override (highest priority)
|
|
143
|
+
~/.codex/AGENTS.md # Global fallback
|
|
144
|
+
.codex/agents/ # Custom agent definitions
|
|
145
|
+
```
|
|
111
146
|
|
|
112
|
-
|
|
113
|
-
|----------|----------|
|
|
114
|
-
| **Tech Stack** | Node.js 18, React 18, PostgreSQL 15 |
|
|
115
|
-
| **Commands** | `npm run lint`, `./scripts/deploy.sh` |
|
|
116
|
-
| **File Structure** | `src/`, `cli/`, `tests/` |
|
|
117
|
-
| **Team Conventions** | Traditional Chinese comments |
|
|
147
|
+
### OpenCode
|
|
118
148
|
|
|
119
|
-
|
|
149
|
+
```
|
|
150
|
+
AGENTS.md # Primary (auto-recognized)
|
|
151
|
+
CLAUDE.md # Also recognized (migration compatibility)
|
|
152
|
+
.opencode/agents/ # Custom agent definitions
|
|
153
|
+
opencode.json (instructions) # Glob-pattern file references
|
|
154
|
+
```
|
|
120
155
|
|
|
121
|
-
###
|
|
156
|
+
### Cursor
|
|
122
157
|
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
|
|
158
|
+
```
|
|
159
|
+
.cursor/rules/ # MDC format rules (replaces .cursorrules)
|
|
160
|
+
{name}.mdc # Frontmatter: description, globs, alwaysApply
|
|
161
|
+
AGENTS.md # Also supported for agent context
|
|
162
|
+
```
|
|
126
163
|
|
|
127
|
-
|
|
128
|
-
|
|
164
|
+
MDC frontmatter example:
|
|
165
|
+
```yaml
|
|
166
|
+
---
|
|
167
|
+
description: "TypeScript coding standards"
|
|
168
|
+
globs: ["**/*.ts", "**/*.tsx"]
|
|
169
|
+
alwaysApply: false
|
|
170
|
+
---
|
|
129
171
|
```
|
|
130
172
|
|
|
131
|
-
|
|
173
|
+
> **Migration**: If you have `.cursorrules`, move content to `.cursor/rules/*.mdc`.
|
|
132
174
|
|
|
133
|
-
|
|
134
|
-
> ⚠️ **Project-Specific**: This section contains configuration unique to this project.
|
|
175
|
+
### GitHub Copilot
|
|
135
176
|
|
|
136
|
-
|
|
137
|
-
|
|
177
|
+
```
|
|
178
|
+
.github/copilot-instructions.md # Always-on, all chats
|
|
179
|
+
.github/instructions/*.instructions.md # File-glob scoped (applyTo frontmatter)
|
|
180
|
+
.github/prompts/*.prompt.md # Reusable templates → /{name} slash commands
|
|
181
|
+
.github/agents/*.agent.md # Custom agents with tool access control
|
|
182
|
+
AGENTS.md # Also recognized
|
|
138
183
|
```
|
|
139
184
|
|
|
140
|
-
###
|
|
185
|
+
### Windsurf
|
|
141
186
|
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
187
|
+
```
|
|
188
|
+
.windsurfrules # Project rules (team-shareable)
|
|
189
|
+
.windsurf/rules/*.md # MDC frontmatter structured rules
|
|
190
|
+
.windsurf/workflows/*.md # Reusable task sequences → /{name}
|
|
191
|
+
AGENTS.md # Also recognized
|
|
192
|
+
```
|
|
146
193
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
194
|
+
Workflow example (`.windsurf/workflows/review.md`):
|
|
195
|
+
```markdown
|
|
196
|
+
Run a code review:
|
|
197
|
+
1. Run `git diff HEAD`
|
|
198
|
+
2. Check for BLOCKING issues (security, correctness)
|
|
199
|
+
3. Check for IMPORTANT issues (design, tests)
|
|
200
|
+
4. Output findings with BLOCKING/IMPORTANT/SUGGESTION prefixes
|
|
150
201
|
```
|
|
151
202
|
|
|
152
|
-
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Multi-Tool Project Configuration
|
|
153
206
|
|
|
154
|
-
When
|
|
207
|
+
When a project uses multiple AI tools:
|
|
155
208
|
|
|
156
209
|
```
|
|
157
210
|
project/
|
|
158
|
-
├──
|
|
159
|
-
├── .
|
|
160
|
-
├── .
|
|
211
|
+
├── AGENTS.md # Universal baseline (cross-tool)
|
|
212
|
+
├── CLAUDE.md # Claude Code (extends AGENTS.md)
|
|
213
|
+
├── GEMINI.md # Gemini CLI
|
|
214
|
+
├── .cursor/rules/
|
|
215
|
+
│ └── standards.mdc # Cursor
|
|
216
|
+
├── .windsurf/
|
|
217
|
+
│ └── workflows/ # Windsurf workflows
|
|
218
|
+
│ ├── review.md
|
|
219
|
+
│ └── checkin.md
|
|
161
220
|
└── .github/
|
|
162
|
-
|
|
221
|
+
├── copilot-instructions.md # Copilot always-on
|
|
222
|
+
└── prompts/
|
|
223
|
+
└── review.prompt.md # Copilot slash command
|
|
163
224
|
```
|
|
164
225
|
|
|
165
|
-
**Best Practice**:
|
|
226
|
+
**Best Practice**: Write universal content in `AGENTS.md` once, then import/reference it from tool-specific files to avoid duplication.
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Content Guidelines
|
|
231
|
+
|
|
232
|
+
### Universal Content (Keep Generic)
|
|
233
|
+
|
|
234
|
+
| Category | Good Examples |
|
|
235
|
+
|----------|---------------|
|
|
236
|
+
| **Commit Standards** | "Follow Conventional Commits format" |
|
|
237
|
+
| **Code Review** | "Use BLOCKING, IMPORTANT, SUGGESTION prefixes" |
|
|
238
|
+
| **Testing** | "Maintain 80% coverage minimum" |
|
|
239
|
+
| **AI Behavior** | "Always read code before analyzing" |
|
|
240
|
+
|
|
241
|
+
**Avoid in Universal Sections:**
|
|
242
|
+
- Specific commands (`npm test`, `pytest`)
|
|
243
|
+
- Hardcoded paths (`cli/src/`, `/var/www/`)
|
|
244
|
+
- Version numbers (`Node.js 18`, `Python 3.11`)
|
|
245
|
+
- Project names and URLs
|
|
246
|
+
|
|
247
|
+
### Project-Specific Content
|
|
248
|
+
|
|
249
|
+
| Category | Examples |
|
|
250
|
+
|----------|----------|
|
|
251
|
+
| **Tech Stack** | Node.js 18, React 18, PostgreSQL 15 |
|
|
252
|
+
| **Commands** | `npm run lint`, `./scripts/deploy.sh` |
|
|
253
|
+
| **File Structure** | `src/`, `cli/`, `tests/` |
|
|
254
|
+
| **Team Conventions** | Traditional Chinese comments |
|
|
255
|
+
|
|
256
|
+
---
|
|
166
257
|
|
|
167
258
|
## Maintenance Checklist
|
|
168
259
|
|
|
@@ -172,38 +263,39 @@ Before committing changes to AI instruction files:
|
|
|
172
263
|
- [ ] Project-specific sections are clearly marked
|
|
173
264
|
- [ ] Cross-references to standards documents are correct
|
|
174
265
|
- [ ] Format matches existing sections
|
|
266
|
+
- [ ] If using Cursor: `.cursorrules` migrated to `.cursor/rules/*.mdc`
|
|
267
|
+
- [ ] If multi-tool project: `AGENTS.md` covers the universal baseline
|
|
175
268
|
|
|
176
269
|
---
|
|
177
270
|
|
|
178
271
|
## Configuration Detection
|
|
179
272
|
|
|
180
|
-
This skill supports project-specific configuration.
|
|
181
|
-
|
|
182
273
|
### Detection Order
|
|
183
274
|
|
|
184
|
-
1. Check for existing `CLAUDE.md` or equivalent files
|
|
185
|
-
2.
|
|
186
|
-
3.
|
|
275
|
+
1. Check for existing `CLAUDE.md`, `AGENTS.md`, `GEMINI.md`, or equivalent files
|
|
276
|
+
2. Detect which AI tools are in use (check for `.cursor/`, `.windsurf/`, `.github/copilot-instructions.md`, etc.)
|
|
277
|
+
3. Analyze content structure for universal/project-specific separation
|
|
278
|
+
4. If not found, **suggest creating structured AI instruction file**
|
|
187
279
|
|
|
188
280
|
### First-Time Setup
|
|
189
281
|
|
|
190
282
|
If no AI instruction file found:
|
|
191
283
|
|
|
192
|
-
1. Ask: "This project doesn't have an AI instruction file.
|
|
193
|
-
2.
|
|
194
|
-
3.
|
|
195
|
-
4.
|
|
284
|
+
1. Ask: "This project doesn't have an AI instruction file. Which AI tools do you use?"
|
|
285
|
+
2. Recommend `AGENTS.md` for cross-tool projects, `CLAUDE.md` for Claude Code only
|
|
286
|
+
3. Determine project type and tech stack
|
|
287
|
+
4. Generate template with appropriate sections
|
|
288
|
+
5. Add to `.gitignore` if contains sensitive info
|
|
196
289
|
|
|
197
290
|
---
|
|
198
291
|
|
|
199
|
-
## Next Steps Guidance
|
|
292
|
+
## Next Steps Guidance
|
|
200
293
|
|
|
201
|
-
After `/ai-instructions` completes,
|
|
294
|
+
After `/ai-instructions` completes, suggest:
|
|
202
295
|
|
|
203
|
-
>
|
|
204
|
-
> -
|
|
205
|
-
> -
|
|
206
|
-
> - 執行 `/ai-collaboration` 複習 AI 行為準則 — 確保指令檔案中的規則與行為標準一致 / Ensure instruction file rules align with behavior standards
|
|
296
|
+
> - Create or update project's `CLAUDE.md` / `AGENTS.md` ⭐ **Recommended** — Apply standards immediately
|
|
297
|
+
> - Run `/ai-friendly-architecture` to optimize AI collaboration at the architecture level
|
|
298
|
+
> - Run `/ai-collaboration` to review AI behavior guidelines
|
|
207
299
|
|
|
208
300
|
---
|
|
209
301
|
|
|
@@ -220,6 +312,7 @@ After `/ai-instructions` completes, the AI assistant should suggest:
|
|
|
220
312
|
|
|
221
313
|
| Version | Date | Changes |
|
|
222
314
|
|---------|------|---------|
|
|
315
|
+
| 2.0.0 | 2026-04-28 | Add Gemini CLI, OpenAI Codex CLI; update Cursor (MDC format, deprecated .cursorrules); update OpenCode (AGENTS.md primary); update Copilot (multiple file types); update Windsurf (Workflows); add AGENTS.md cross-tool standard section |
|
|
223
316
|
| 1.0.0 | 2026-01-25 | Initial release |
|
|
224
317
|
|
|
225
318
|
---
|
|
@@ -5,6 +5,14 @@ description: "[UDS] Guide through Acceptance Test-Driven Development workflow"
|
|
|
5
5
|
allowed-tools: Read, Write, Grep, Glob
|
|
6
6
|
argument-hint: "[feature or spec | 功能或規格]"
|
|
7
7
|
---
|
|
8
|
+
<!-- DEPRECATION NOTICE (XSPEC-086 Phase 4, 2026-04-28):
|
|
9
|
+
ATDD lifecycle orchestration (5-phase: WORKSHOP→DISTILLATION→DEVELOPMENT→DEMO→DONE,
|
|
10
|
+
INVEST validation, AC→Gherkin conversion, RED/GREEN execution, PO sign-off gates) extracted to:
|
|
11
|
+
- DevAP flow: dev-autopilot/.devap/flows/atdd.flow.yaml
|
|
12
|
+
- DevAP CLI: devap atdd (packages/cli/src/commands/atdd.ts)
|
|
13
|
+
This Skill retains: INVEST criteria table, ATDD cycle diagram, Gherkin AC format, Three Amigos structure.
|
|
14
|
+
Use `devap atdd` for enforced lifecycle; this Skill for format and principle reference.
|
|
15
|
+
-->
|
|
8
16
|
|
|
9
17
|
# ATDD Assistant | ATDD 助手
|
|
10
18
|
|
|
@@ -5,6 +5,13 @@ description: "[UDS] Guide through Behavior-Driven Development workflow"
|
|
|
5
5
|
allowed-tools: Read, Write, Grep, Glob
|
|
6
6
|
argument-hint: "[feature or spec | 功能或規格]"
|
|
7
7
|
---
|
|
8
|
+
<!-- DEPRECATION NOTICE (XSPEC-086 Phase 4, 2026-04-28):
|
|
9
|
+
BDD lifecycle orchestration (4-phase cycle, Gherkin scaffolding, RED/GREEN execution) extracted to:
|
|
10
|
+
- DevAP flow: dev-autopilot/.devap/flows/bdd.flow.yaml
|
|
11
|
+
- DevAP CLI: devap bdd (packages/cli/src/commands/bdd.ts)
|
|
12
|
+
This Skill retains: Gherkin format definition, Three Amigos structure, BDD cycle diagram.
|
|
13
|
+
Use `devap bdd` for enforced cycle; this Skill for format and principle reference.
|
|
14
|
+
-->
|
|
8
15
|
|
|
9
16
|
# BDD Assistant | BDD 助手
|
|
10
17
|
|
|
@@ -5,6 +5,14 @@ description: "[UDS] Pre-commit quality gates verification"
|
|
|
5
5
|
allowed-tools: Read, Grep, Glob, Bash(git diff:*), Bash(git status:*), Bash(npm test:*), Bash(npm run lint:*)
|
|
6
6
|
disable-model-invocation: true
|
|
7
7
|
---
|
|
8
|
+
<!-- DEPRECATION NOTICE (XSPEC-086 Phase 4, 2026-04-28):
|
|
9
|
+
Checkin workflow orchestration (gate execution sequence, abort logic) extracted to:
|
|
10
|
+
- DevAP flow: dev-autopilot/.devap/flows/checkin.flow.yaml
|
|
11
|
+
- DevAP CLI: devap checkin (packages/cli/src/commands/checkin.ts)
|
|
12
|
+
- Flow spec: dev-autopilot/standards/flow/checkin-gate-sequence.ai.yaml
|
|
13
|
+
This Skill retains: quality gate definitions, checklist items, never-commit rules.
|
|
14
|
+
Use `devap checkin` for enforced execution; this Skill for activity reference.
|
|
15
|
+
-->
|
|
8
16
|
|
|
9
17
|
# Check-in Assistant | 簽入助手
|
|
10
18
|
|
|
@@ -6,6 +6,13 @@ allowed-tools: Read, Grep, Glob, Bash(git diff:*), Bash(git log:*), Bash(git sho
|
|
|
6
6
|
argument-hint: "[file path or branch | 檔案路徑或分支名稱]"
|
|
7
7
|
disable-model-invocation: true
|
|
8
8
|
---
|
|
9
|
+
<!-- DEPRECATION NOTICE (XSPEC-086 Phase 4, 2026-04-28):
|
|
10
|
+
Code review workflow orchestration (4-step sequence, outcome gating) extracted to:
|
|
11
|
+
- DevAP flow: dev-autopilot/.devap/flows/review.flow.yaml
|
|
12
|
+
- DevAP CLI: devap review (packages/cli/src/commands/review.ts)
|
|
13
|
+
This Skill retains: 8 review category definitions, BLOCKING/IMPORTANT/SUGGESTION/QUESTION/NOTE prefix semantics.
|
|
14
|
+
Use `devap review` for enforced execution; this Skill for category and prefix reference.
|
|
15
|
+
-->
|
|
9
16
|
|
|
10
17
|
# Code Review Assistant | 程式碼審查助手
|
|
11
18
|
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: journey-test-assistant
|
|
3
|
+
scope: partial
|
|
4
|
+
description: "[UDS] 從專案描述生成連貫使用者旅程測試計畫(TESTPLAN)與 E2E 骨架"
|
|
5
|
+
allowed-tools: Read, Write, Grep, Glob
|
|
6
|
+
argument-hint: "[project description | --analyze | --archetype A1|A2|A3]"
|
|
7
|
+
status: stable
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Journey Test Assistant | 旅程測試助手
|
|
11
|
+
|
|
12
|
+
從專案描述生成連貫的使用者旅程測試計畫(TESTPLAN-NNN.md)與對應的 E2E 骨架,讓每個新專案從第一天起就擁有完整測試旅程。
|
|
13
|
+
|
|
14
|
+
## 與 /e2e 的差異
|
|
15
|
+
|
|
16
|
+
| 維度 | /e2e | /journey-test |
|
|
17
|
+
|------|------|--------------|
|
|
18
|
+
| 組織單位 | 單一 XSPEC/AC | 跨 Story 的使用者旅程 |
|
|
19
|
+
| 測試結構 | 隔離、獨立 | 連貫、狀態共享 |
|
|
20
|
+
| 產物 | `*.spec.ts` 骨架 | `TESTPLAN.md` + `*.journey.spec.ts` |
|
|
21
|
+
| 觸發時機 | 功能完成後 | 專案建立時(Journey-First) |
|
|
22
|
+
| 偵測目標 | 單一 AC 是否正確 | 跨步驟狀態傳遞是否連貫 |
|
|
23
|
+
|
|
24
|
+
## 工作流程
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
輸入:專案描述 / 現有 TESTPLAN / --analyze
|
|
28
|
+
↓
|
|
29
|
+
Phase 1:定義 Persona
|
|
30
|
+
分析專案描述 → 識別所有使用者角色 → 定義 Actor/Role/Key Permissions
|
|
31
|
+
↓
|
|
32
|
+
Phase 2:設計旅程地圖
|
|
33
|
+
列出主要業務目標 → 拆解為 T-NNN 群組 → 宣告依賴鏈
|
|
34
|
+
↓
|
|
35
|
+
Phase 3:生成 TESTPLAN
|
|
36
|
+
按格式輸出 test-plans/TESTPLAN-001.md(含 Personas、步驟、依賴圖)
|
|
37
|
+
↓
|
|
38
|
+
Phase 4:生成 E2E 骨架
|
|
39
|
+
從 TESTPLAN T-NNN 生成 *.journey.spec.ts(含 skipIf + 共享 state)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## 模式
|
|
43
|
+
|
|
44
|
+
### 1. 生成模式(預設)
|
|
45
|
+
|
|
46
|
+
從專案描述生成完整的 TESTPLAN + E2E 骨架。
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
/journey-test "電商平台,需要 buyer/seller/admin 三個角色"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
產物:
|
|
53
|
+
- `test-plans/TESTPLAN-001.md`:含 Personas、T-000 環境重置、T-001~T-NNN 步驟群組、執行順序依賴圖
|
|
54
|
+
- `src/e2e/journey/main-flow.journey.spec.ts`:含 `describe.skipIf` + 共享 state + T-NNN 對應的完整骨架
|
|
55
|
+
|
|
56
|
+
### 2. 分析模式(--analyze)
|
|
57
|
+
|
|
58
|
+
掃描現有測試,找出旅程覆蓋缺口。
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
/journey-test --analyze
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
執行步驟:
|
|
65
|
+
1. 讀取 `test-plans/TESTPLAN-NNN.md`(若存在)
|
|
66
|
+
2. 掃描 `src/e2e/` 下所有 `*.journey.spec.ts` 和 `*.journey.e2e.test.ts`
|
|
67
|
+
3. 比對 TESTPLAN T-NNN 與自動化測試中的 T-NNN 引用
|
|
68
|
+
4. 輸出 Coverage gap 報告:列出 TESTPLAN 中缺乏自動化對應的 T-NNN 步驟
|
|
69
|
+
|
|
70
|
+
### 3. Archetype 模式(--archetype)
|
|
71
|
+
|
|
72
|
+
使用預設旅程模板,適合已知類型的專案快速啟動。
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
/journey-test --archetype A1 # Spec-driven 旅程
|
|
76
|
+
/journey-test --archetype A2 # UI-driven 旅程
|
|
77
|
+
/journey-test --archetype A3 # Brownfield 旅程
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
| Archetype | 模板 | 適用場景 |
|
|
81
|
+
|-----------|------|---------|
|
|
82
|
+
| A1 | Spec-driven | 需求 → Spec → Code → Test,適合 API/Backend 專案 |
|
|
83
|
+
| A2 | UI-driven | 設計稿 → UI → 視覺回歸,適合前端/全端專案 |
|
|
84
|
+
| A3 | Brownfield | 現有程式碼 → 分析 → 重構驗證,適合既有專案補測試 |
|
|
85
|
+
|
|
86
|
+
## TESTPLAN 格式(T-NNN)
|
|
87
|
+
|
|
88
|
+
以下為完整的 TESTPLAN 範本,展示所有必要區段:
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
# TESTPLAN-001 <ProjectName> 主線旅程
|
|
92
|
+
|
|
93
|
+
## Personas
|
|
94
|
+
|
|
95
|
+
| Actor | Role | Key Permissions |
|
|
96
|
+
|---------------|---------------|------------------------------|
|
|
97
|
+
| platform_admin | Platform Admin | 建立 Org、管理使用者、查看所有資源 |
|
|
98
|
+
| org_member | Org Member | 讀取專案、執行 Pipeline |
|
|
99
|
+
|
|
100
|
+
## Environment
|
|
101
|
+
|
|
102
|
+
- BASE_URL:`http://localhost:3000`(本機)/ `$JOURNEY_BASE_URL`(CI)
|
|
103
|
+
- 驗證指令:`curl $BASE_URL/health`
|
|
104
|
+
- 必要帳號:`ADMIN_EMAIL`、`ADMIN_PASSWORD` 環境變數
|
|
105
|
+
|
|
106
|
+
## T-000 環境重置(optional)
|
|
107
|
+
|
|
108
|
+
前置條件:無
|
|
109
|
+
depends_on:無
|
|
110
|
+
|
|
111
|
+
| 步驟 | 操作 | 預期結果 |
|
|
112
|
+
|---------|-----------------------------------|-----------------|
|
|
113
|
+
| T-000-1 | [API] GET /health | 回傳 200 OK |
|
|
114
|
+
| T-000-2 | [CHECK] 資料庫連線正常 | 無錯誤日誌 |
|
|
115
|
+
|
|
116
|
+
## T-001 Platform Admin 登入
|
|
117
|
+
|
|
118
|
+
前置條件:環境正常運行(T-000 通過)
|
|
119
|
+
depends_on:T-000
|
|
120
|
+
|
|
121
|
+
| 步驟 | 操作 | 預期結果 |
|
|
122
|
+
|---------|---------------------------------------------|--------------------------|
|
|
123
|
+
| T-001-1 | [API] POST /api/auth/login(admin 帳號) | 回傳 200 + authToken |
|
|
124
|
+
| T-001-2 | [CHECK] authToken 存入共享 state | let authToken 有值 |
|
|
125
|
+
|
|
126
|
+
## T-010 主要功能操作
|
|
127
|
+
|
|
128
|
+
前置條件:authToken 已取得(T-001 通過)
|
|
129
|
+
depends_on:T-001
|
|
130
|
+
|
|
131
|
+
| 步驟 | 操作 | 預期結果 |
|
|
132
|
+
|---------|---------------------------------------------|--------------------------|
|
|
133
|
+
| T-010-1 | [API] POST /api/resources(帶 authToken) | 回傳 201 + resourceId ★ |
|
|
134
|
+
| T-010-2 | [CHECK] resourceId 存入共享 state | let resourceId 有值 |
|
|
135
|
+
|
|
136
|
+
## 執行順序依賴圖
|
|
137
|
+
|
|
138
|
+
T-000 → T-001 → T-010
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## E2E 骨架格式(.journey.spec.ts)
|
|
142
|
+
|
|
143
|
+
生成的骨架展示三個核心模式:`describe.skipIf` 環境保護、共享 `let` 狀態、T-NNN 識別碼對應。
|
|
144
|
+
|
|
145
|
+
```typescript
|
|
146
|
+
import { describe, it, expect } from "vitest"
|
|
147
|
+
|
|
148
|
+
// Journey E2E:需要真實後端,不設定 JOURNEY_BASE_URL 則全部 skip
|
|
149
|
+
const BASE_URL = process.env.JOURNEY_BASE_URL || ""
|
|
150
|
+
|
|
151
|
+
describe.skipIf(!BASE_URL)("Platform Admin Journey — T-001 → T-010", () => {
|
|
152
|
+
// 共享 state:每個步驟從前一步驟的結果取值
|
|
153
|
+
let authToken: string
|
|
154
|
+
let resourceId: string
|
|
155
|
+
|
|
156
|
+
it("T-001: Platform Admin 登入並取得 authToken", async () => {
|
|
157
|
+
const res = await fetch(`${BASE_URL}/api/auth/login`, {
|
|
158
|
+
method: "POST",
|
|
159
|
+
headers: { "Content-Type": "application/json" },
|
|
160
|
+
body: JSON.stringify({
|
|
161
|
+
email: process.env.ADMIN_EMAIL,
|
|
162
|
+
password: process.env.ADMIN_PASSWORD,
|
|
163
|
+
}),
|
|
164
|
+
})
|
|
165
|
+
expect(res.status, "T-001 failed: login should return 200").toBe(200)
|
|
166
|
+
const data = await res.json()
|
|
167
|
+
expect(data.token, "T-001 failed: token should be present").toBeTruthy()
|
|
168
|
+
authToken = data.token // ← 傳遞給後續步驟
|
|
169
|
+
})
|
|
170
|
+
|
|
171
|
+
it("T-010: 執行主要操作(depends on T-001)", async () => {
|
|
172
|
+
// 如果 T-001 失敗,authToken 為 undefined,此步驟的錯誤訊息會清楚說明
|
|
173
|
+
expect(authToken, "T-010 precondition failed: authToken from T-001 is missing").toBeTruthy()
|
|
174
|
+
|
|
175
|
+
const res = await fetch(`${BASE_URL}/api/resources`, {
|
|
176
|
+
method: "POST",
|
|
177
|
+
headers: {
|
|
178
|
+
"Content-Type": "application/json",
|
|
179
|
+
Authorization: `Bearer ${authToken}`,
|
|
180
|
+
},
|
|
181
|
+
body: JSON.stringify({ name: "journey-test-resource" }),
|
|
182
|
+
})
|
|
183
|
+
expect(res.status, `T-010 failed: expected 201, got ${res.status}`).toBe(201)
|
|
184
|
+
const data = await res.json()
|
|
185
|
+
resourceId = data.id // ← 傳遞給後續步驟
|
|
186
|
+
})
|
|
187
|
+
})
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## 後續步驟
|
|
191
|
+
|
|
192
|
+
完成後建議:
|
|
193
|
+
|
|
194
|
+
> **TESTPLAN 與 Journey E2E 骨架已生成。建議下一步:**
|
|
195
|
+
> - 執行 `/e2e` 生成各功能的 AC 層測試(補充旅程測試的細節覆蓋)
|
|
196
|
+
> - 執行 `/atdd` 定義各 T-NNN 步驟對應的驗收條件
|
|
197
|
+
> - 執行 `/journey-test --analyze` 定期檢查自動化覆蓋缺口
|
|
198
|
+
|
|
199
|
+
## 參考
|
|
200
|
+
|
|
201
|
+
- 標準:[user-journey-testing.ai.yaml](../../.standards/user-journey-testing.ai.yaml)
|
|
202
|
+
- 相關 XSPEC:XSPEC-128(UDS 標準定義)、XSPEC-129(VibeOps 實作範例)
|
|
203
|
+
- 相關 Skill:`/e2e`(AC 層測試)、`/atdd`(驗收條件定義)
|