universal-dev-standards 3.5.1-beta.4 → 3.5.1-beta.6
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/bin/uds.js +2 -0
- package/bundled/skills/claude-code/CONTRIBUTING.template.md +141 -0
- package/bundled/skills/claude-code/README.md +196 -0
- package/bundled/skills/claude-code/ai/standards/checkin.ai.yaml +21 -0
- package/bundled/skills/claude-code/ai/standards/commit.ai.yaml +20 -0
- package/bundled/skills/claude-code/ai/standards/refactoring.ai.yaml +34 -0
- package/bundled/skills/claude-code/ai/standards/testing.ai.yaml +41 -0
- package/bundled/skills/claude-code/ai-collaboration-standards/SKILL.md +175 -0
- package/bundled/skills/claude-code/ai-collaboration-standards/anti-hallucination.md +215 -0
- package/bundled/skills/claude-code/ai-collaboration-standards/certainty-labels.md +124 -0
- package/bundled/skills/claude-code/changelog-guide/SKILL.md +232 -0
- package/bundled/skills/claude-code/checkin-assistant/SKILL.md +402 -0
- package/bundled/skills/claude-code/code-review-assistant/SKILL.md +220 -0
- package/bundled/skills/claude-code/code-review-assistant/checkin-checklist.md +249 -0
- package/bundled/skills/claude-code/code-review-assistant/review-checklist.md +238 -0
- package/bundled/skills/claude-code/commands/README.md +78 -0
- package/bundled/skills/claude-code/commands/bdd.md +142 -0
- package/bundled/skills/claude-code/commands/changelog.md +57 -0
- package/bundled/skills/claude-code/commands/check.md +91 -0
- package/bundled/skills/claude-code/commands/commit.md +48 -0
- package/bundled/skills/claude-code/commands/config.md +97 -0
- package/bundled/skills/claude-code/commands/coverage.md +58 -0
- package/bundled/skills/claude-code/commands/docs.md +75 -0
- package/bundled/skills/claude-code/commands/init.md +88 -0
- package/bundled/skills/claude-code/commands/methodology.md +268 -0
- package/bundled/skills/claude-code/commands/release.md +50 -0
- package/bundled/skills/claude-code/commands/requirement.md +54 -0
- package/bundled/skills/claude-code/commands/review.md +50 -0
- package/bundled/skills/claude-code/commands/spec.md +69 -0
- package/bundled/skills/claude-code/commands/tdd.md +86 -0
- package/bundled/skills/claude-code/commands/update.md +122 -0
- package/bundled/skills/claude-code/commit-standards/SKILL.md +249 -0
- package/bundled/skills/claude-code/commit-standards/conventional-commits.md +256 -0
- package/bundled/skills/claude-code/commit-standards/language-options.md +164 -0
- package/bundled/skills/claude-code/documentation-guide/SKILL.md +416 -0
- package/bundled/skills/claude-code/documentation-guide/documentation-structure.md +349 -0
- package/bundled/skills/claude-code/documentation-guide/readme-template.md +404 -0
- package/bundled/skills/claude-code/error-code-guide/SKILL.md +264 -0
- package/bundled/skills/claude-code/git-workflow-guide/SKILL.md +226 -0
- package/bundled/skills/claude-code/git-workflow-guide/branch-naming.md +212 -0
- package/bundled/skills/claude-code/git-workflow-guide/git-workflow.md +313 -0
- package/bundled/skills/claude-code/logging-guide/SKILL.md +280 -0
- package/bundled/skills/claude-code/methodology-system/SKILL.md +215 -0
- package/bundled/skills/claude-code/methodology-system/create-methodology.md +450 -0
- package/bundled/skills/claude-code/methodology-system/runtime.md +271 -0
- package/bundled/skills/claude-code/project-structure-guide/SKILL.md +143 -0
- package/bundled/skills/claude-code/project-structure-guide/language-patterns.md +263 -0
- package/bundled/skills/claude-code/refactoring-assistant/SKILL.md +205 -0
- package/bundled/skills/claude-code/release-standards/SKILL.md +191 -0
- package/bundled/skills/claude-code/release-standards/changelog-format.md +239 -0
- package/bundled/skills/claude-code/release-standards/release-workflow.md +337 -0
- package/bundled/skills/claude-code/release-standards/semantic-versioning.md +242 -0
- package/bundled/skills/claude-code/requirement-assistant/SKILL.md +222 -0
- package/bundled/skills/claude-code/requirement-assistant/requirement-checklist.md +317 -0
- package/bundled/skills/claude-code/requirement-assistant/requirement-writing.md +391 -0
- package/bundled/skills/claude-code/spec-driven-dev/SKILL.md +238 -0
- package/bundled/skills/claude-code/tdd-assistant/SKILL.md +384 -0
- package/bundled/skills/claude-code/tdd-assistant/language-examples.md +1276 -0
- package/bundled/skills/claude-code/tdd-assistant/tdd-workflow.md +659 -0
- package/bundled/skills/claude-code/test-coverage-assistant/SKILL.md +277 -0
- package/bundled/skills/claude-code/testing-guide/SKILL.md +317 -0
- package/bundled/skills/claude-code/testing-guide/testing-pyramid.md +440 -0
- package/package.json +1 -1
- package/src/utils/skills-installer.js +17 -1
- package/standards-registry.json +3 -3
package/bin/uds.js
CHANGED
|
@@ -79,6 +79,8 @@ program
|
|
|
79
79
|
.option('--standards-only', 'Only update standards, skip integration files')
|
|
80
80
|
.option('--offline', 'Skip npm registry check for CLI updates')
|
|
81
81
|
.option('--beta', 'Check for beta version updates')
|
|
82
|
+
.option('--skills', 'Install/update Skills for configured AI tools')
|
|
83
|
+
.option('--commands', 'Install/update slash commands for configured AI tools')
|
|
82
84
|
.action(updateCommand);
|
|
83
85
|
|
|
84
86
|
program
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# Contributing Guidelines Template
|
|
2
|
+
|
|
3
|
+
> Copy this file to your project as `CONTRIBUTING.md` and customize as needed.
|
|
4
|
+
> This template includes configuration sections for [universal-dev-skills](https://github.com/AsiaOstrich/universal-dev-skills).
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Disabled Skills
|
|
9
|
+
|
|
10
|
+
<!--
|
|
11
|
+
All skills are enabled by default.
|
|
12
|
+
Uncomment and list skills you want to DISABLE for this project.
|
|
13
|
+
-->
|
|
14
|
+
|
|
15
|
+
<!--
|
|
16
|
+
- testing-guide
|
|
17
|
+
- release-standards
|
|
18
|
+
-->
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Development Standards
|
|
23
|
+
|
|
24
|
+
### Commit Message Language
|
|
25
|
+
|
|
26
|
+
This project uses **English** commit types.
|
|
27
|
+
<!-- Options: English | Traditional Chinese | Bilingual -->
|
|
28
|
+
|
|
29
|
+
#### Allowed Types
|
|
30
|
+
|
|
31
|
+
| Type | Description |
|
|
32
|
+
|------|-------------|
|
|
33
|
+
| `feat` | New feature |
|
|
34
|
+
| `fix` | Bug fix |
|
|
35
|
+
| `refactor` | Code refactoring |
|
|
36
|
+
| `docs` | Documentation |
|
|
37
|
+
| `style` | Formatting |
|
|
38
|
+
| `test` | Tests |
|
|
39
|
+
| `perf` | Performance |
|
|
40
|
+
| `build` | Build system |
|
|
41
|
+
| `ci` | CI/CD changes |
|
|
42
|
+
| `chore` | Maintenance |
|
|
43
|
+
| `revert` | Revert commit |
|
|
44
|
+
| `security` | Security fix |
|
|
45
|
+
|
|
46
|
+
#### Allowed Scopes
|
|
47
|
+
|
|
48
|
+
- `auth` - Authentication module
|
|
49
|
+
- `api` - API layer
|
|
50
|
+
- `ui` - User interface
|
|
51
|
+
- `db` - Database
|
|
52
|
+
- `core` - Core functionality
|
|
53
|
+
<!-- Add your project-specific scopes -->
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
### Certainty Tag Language
|
|
58
|
+
|
|
59
|
+
This project uses **English** certainty tags.
|
|
60
|
+
<!-- Options: English | 中文 -->
|
|
61
|
+
|
|
62
|
+
#### Tag Reference
|
|
63
|
+
|
|
64
|
+
| Tag | Use When |
|
|
65
|
+
|-----|----------|
|
|
66
|
+
| `[Confirmed]` | Direct evidence from code/docs |
|
|
67
|
+
| `[Inferred]` | Logical deduction from evidence |
|
|
68
|
+
| `[Assumption]` | Based on common patterns |
|
|
69
|
+
| `[Unknown]` | Information not available |
|
|
70
|
+
| `[Need Confirmation]` | Requires user clarification |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
### Git Workflow
|
|
75
|
+
|
|
76
|
+
#### Branching Strategy
|
|
77
|
+
|
|
78
|
+
This project uses **GitHub Flow**.
|
|
79
|
+
<!-- Options: GitFlow | GitHub Flow | Trunk-Based Development -->
|
|
80
|
+
|
|
81
|
+
#### Branch Naming
|
|
82
|
+
|
|
83
|
+
Format: `<type>/<description>`
|
|
84
|
+
|
|
85
|
+
| Type | Usage | Example |
|
|
86
|
+
|------|-------|---------|
|
|
87
|
+
| `feature/` | New functionality | `feature/oauth-login` |
|
|
88
|
+
| `fix/` | Bug fixes | `fix/memory-leak` |
|
|
89
|
+
| `hotfix/` | Urgent fixes | `hotfix/security-patch` |
|
|
90
|
+
| `refactor/` | Code refactoring | `refactor/extract-service` |
|
|
91
|
+
| `docs/` | Documentation | `docs/api-reference` |
|
|
92
|
+
| `chore/` | Maintenance | `chore/update-deps` |
|
|
93
|
+
| `release/` | Release prep | `release/v1.2.0` |
|
|
94
|
+
|
|
95
|
+
#### Merge Strategy
|
|
96
|
+
|
|
97
|
+
- Feature branches: **Squash Merge**
|
|
98
|
+
<!-- Options: Merge Commit | Squash Merge | Rebase -->
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Code Review
|
|
103
|
+
|
|
104
|
+
### Comment Prefixes
|
|
105
|
+
|
|
106
|
+
| Prefix | Action Required |
|
|
107
|
+
|--------|-----------------|
|
|
108
|
+
| **BLOCKING** | Must fix before merge |
|
|
109
|
+
| **IMPORTANT** | Should fix |
|
|
110
|
+
| **SUGGESTION** | Optional improvement |
|
|
111
|
+
| **QUESTION** | Need clarification |
|
|
112
|
+
| **NOTE** | Informational |
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Testing
|
|
117
|
+
|
|
118
|
+
### Minimum Coverage
|
|
119
|
+
|
|
120
|
+
| Level | Target |
|
|
121
|
+
|-------|--------|
|
|
122
|
+
| Unit Tests | 80% |
|
|
123
|
+
| Integration Tests | 60% |
|
|
124
|
+
| E2E Tests | Critical paths |
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## Pull Request Process
|
|
129
|
+
|
|
130
|
+
1. Create a feature branch from `main`
|
|
131
|
+
2. Make your changes
|
|
132
|
+
3. Ensure all tests pass
|
|
133
|
+
4. Submit a pull request
|
|
134
|
+
5. Address review comments
|
|
135
|
+
6. Merge after approval
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## License
|
|
140
|
+
|
|
141
|
+
By contributing to this project, you agree that your contributions will be licensed under the project's license.
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
# Claude Code Skills
|
|
2
|
+
|
|
3
|
+
Claude Code Skills for software development standards.
|
|
4
|
+
|
|
5
|
+
> Derived from [universal-dev-standards](https://github.com/AsiaOstrich/universal-dev-standards) core standards.
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
These skills are automatically triggered based on context when using Claude Code, helping you:
|
|
10
|
+
|
|
11
|
+
- Prevent AI hallucination with evidence-based responses
|
|
12
|
+
- Write consistent, well-formatted commit messages
|
|
13
|
+
- Conduct thorough code reviews
|
|
14
|
+
- Follow testing best practices
|
|
15
|
+
- Manage releases with semantic versioning
|
|
16
|
+
|
|
17
|
+
## Available Skills
|
|
18
|
+
|
|
19
|
+
| Skill | Description | Triggers |
|
|
20
|
+
|-------|-------------|----------|
|
|
21
|
+
| `ai-collaboration-standards` | Prevent AI hallucination | Code analysis, "certainty" |
|
|
22
|
+
| `checkin-assistant` | Pre-commit quality gates | "commit", "checkin", "quality gate" |
|
|
23
|
+
| `commit-standards` | Conventional Commits format | "commit", git operations |
|
|
24
|
+
| `code-review-assistant` | Systematic code review | "review", "PR" |
|
|
25
|
+
| `testing-guide` | Testing pyramid | Writing tests |
|
|
26
|
+
| `tdd-assistant` | Test-Driven Development | "TDD", "test first", "red green refactor" |
|
|
27
|
+
| `release-standards` | Semantic versioning | Release preparation |
|
|
28
|
+
| `git-workflow-guide` | Branching strategies | "branch", "merge" |
|
|
29
|
+
| `documentation-guide` | Documentation structure & writing | "README", "docs", "ARCHITECTURE" |
|
|
30
|
+
| `requirement-assistant` | Requirement writing | "requirement", "user story" |
|
|
31
|
+
|
|
32
|
+
## Static vs Dynamic Standards | 靜態與動態規範
|
|
33
|
+
|
|
34
|
+
Standards are classified into two types based on when they should be applied:
|
|
35
|
+
|
|
36
|
+
規範依據應用時機分為兩類:
|
|
37
|
+
|
|
38
|
+
### Static Standards (Project Files) | 靜態規範
|
|
39
|
+
|
|
40
|
+
These standards should **always be active**. Add them to your project's `CLAUDE.md` or `.cursorrules`:
|
|
41
|
+
|
|
42
|
+
這些規範應該**隨時生效**,建議放在專案的 `CLAUDE.md` 或 `.cursorrules` 中:
|
|
43
|
+
|
|
44
|
+
| Standard | Key Rules | 核心規則 |
|
|
45
|
+
|----------|-----------|---------|
|
|
46
|
+
| [anti-hallucination](../../core/anti-hallucination.md) | Certainty labels, suggestion principles | 確定性標籤、建議原則 |
|
|
47
|
+
| [checkin-standards](../../core/checkin-standards.md) | Build passes, tests pass, coverage met | 編譯通過、測試通過、覆蓋率達標 |
|
|
48
|
+
| [project-structure](../../core/project-structure.md) | Directory structure conventions | 目錄結構規範 |
|
|
49
|
+
|
|
50
|
+
> 📄 See [CLAUDE.md.template](../../templates/CLAUDE.md.template) for a ready-to-use template.
|
|
51
|
+
>
|
|
52
|
+
> 📄 參見 [CLAUDE.md.template](../../templates/CLAUDE.md.template) 取得可直接使用的範本。
|
|
53
|
+
|
|
54
|
+
### Dynamic Standards (Skills) | 動態規範
|
|
55
|
+
|
|
56
|
+
These are **triggered by keywords** or specific tasks. Install as Skills:
|
|
57
|
+
|
|
58
|
+
這些規範由**關鍵字觸發**,按需載入。安裝為 Skills 使用:
|
|
59
|
+
|
|
60
|
+
| Skill | Trigger Keywords | 觸發關鍵字 |
|
|
61
|
+
|-------|-----------------|-----------|
|
|
62
|
+
| checkin-assistant | checkin, pre-commit, quality gate | 簽入, 品質關卡 |
|
|
63
|
+
| commit-standards | commit, git, message | 提交, 訊息 |
|
|
64
|
+
| code-review-assistant | review, PR, checklist | 審查, 檢查 |
|
|
65
|
+
| git-workflow-guide | branch, merge, workflow | 分支, 合併 |
|
|
66
|
+
| testing-guide | test, coverage, pyramid | 測試, 覆蓋率 |
|
|
67
|
+
| tdd-assistant | TDD, test first, red green refactor | TDD, 測試優先, 紅綠重構 |
|
|
68
|
+
| release-standards | version, release, semver | 版本, 發布 |
|
|
69
|
+
| documentation-guide | README, docs, ARCHITECTURE, API docs | 文件, 架構, API 文件 |
|
|
70
|
+
| requirement-assistant | spec, SDD, requirement | 規格, 需求, 新功能 |
|
|
71
|
+
|
|
72
|
+
> 📖 See [Static vs Dynamic Guide](../../adoption/STATIC-DYNAMIC-GUIDE.md) for detailed classification.
|
|
73
|
+
>
|
|
74
|
+
> 📖 參見[靜態與動態指南](../../adoption/STATIC-DYNAMIC-GUIDE.md)了解詳細分類說明。
|
|
75
|
+
|
|
76
|
+
## Slash Commands | 斜線命令
|
|
77
|
+
|
|
78
|
+
In addition to automatic Skills, this plugin provides **manual slash commands** for explicit actions:
|
|
79
|
+
|
|
80
|
+
除了自動觸發的 Skills,此插件還提供**手動斜線命令**用於明確的操作:
|
|
81
|
+
|
|
82
|
+
| Command | Description | 說明 |
|
|
83
|
+
|---------|-------------|------|
|
|
84
|
+
| `/commit` | Generate commit messages | 產生 commit message |
|
|
85
|
+
| `/review` | Perform code review | 執行程式碼審查 |
|
|
86
|
+
| `/release` | Guide release process | 引導發布流程 |
|
|
87
|
+
| `/changelog` | Update CHANGELOG | 更新變更日誌 |
|
|
88
|
+
| `/requirement` | Write user stories | 撰寫用戶故事 |
|
|
89
|
+
| `/spec` | Create specifications | 建立規格文件 |
|
|
90
|
+
| `/tdd` | TDD workflow | TDD 工作流程 |
|
|
91
|
+
| `/docs` | Documentation | 文件撰寫 |
|
|
92
|
+
| `/coverage` | Test coverage analysis | 測試覆蓋率分析 |
|
|
93
|
+
|
|
94
|
+
### Skills vs Commands | Skills 與命令的差異
|
|
95
|
+
|
|
96
|
+
| Aspect | Skills | Commands |
|
|
97
|
+
|--------|--------|----------|
|
|
98
|
+
| **Trigger** | Automatic (context-based) | Manual (`/command`) |
|
|
99
|
+
| **Use Case** | Background assistance | Explicit action |
|
|
100
|
+
| **Example** | Claude suggests commit format | `/commit` to generate message |
|
|
101
|
+
|
|
102
|
+
> 📖 See [commands/](./commands/) for detailed command documentation.
|
|
103
|
+
>
|
|
104
|
+
> 📖 參見 [commands/](./commands/) 了解詳細的命令文件。
|
|
105
|
+
|
|
106
|
+
## Installation
|
|
107
|
+
|
|
108
|
+
### Recommended: Plugin Marketplace
|
|
109
|
+
|
|
110
|
+
Install via Claude Code Plugin Marketplace for automatic updates:
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Add the marketplace (one-time setup)
|
|
114
|
+
/plugin marketplace add AsiaOstrich/universal-dev-standards
|
|
115
|
+
|
|
116
|
+
# Install the plugin with all 16 skills
|
|
117
|
+
/plugin install universal-dev-standards@asia-ostrich
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Benefits:**
|
|
121
|
+
- ✅ Automatic updates on Claude Code restart
|
|
122
|
+
- ✅ Better integration with Claude Code
|
|
123
|
+
- ✅ No manual maintenance required
|
|
124
|
+
|
|
125
|
+
All skills will be automatically loaded and ready to use.
|
|
126
|
+
|
|
127
|
+
### Alternative: Script Installation (Deprecated)
|
|
128
|
+
|
|
129
|
+
> ⚠️ **Deprecated**: Manual installation via scripts is deprecated and will be removed in a future version. Please use Plugin Marketplace instead.
|
|
130
|
+
|
|
131
|
+
For users in environments without Marketplace access (e.g., enterprise networks):
|
|
132
|
+
|
|
133
|
+
#### Manual Install (Select Skills)
|
|
134
|
+
|
|
135
|
+
**macOS / Linux:**
|
|
136
|
+
```bash
|
|
137
|
+
mkdir -p ~/.claude/skills
|
|
138
|
+
cp -r ai-collaboration-standards ~/.claude/skills/
|
|
139
|
+
cp -r commit-standards ~/.claude/skills/
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Windows PowerShell:**
|
|
143
|
+
```powershell
|
|
144
|
+
New-Item -ItemType Directory -Force -Path $env:USERPROFILE\.claude\skills
|
|
145
|
+
Copy-Item -Recurse ai-collaboration-standards $env:USERPROFILE\.claude\skills\
|
|
146
|
+
Copy-Item -Recurse commit-standards $env:USERPROFILE\.claude\skills\
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Alternative: Project-Level Installation (Deprecated)
|
|
150
|
+
|
|
151
|
+
> ⚠️ **Deprecated**: Project-level manual installation is deprecated. Use Plugin Marketplace for the best experience.
|
|
152
|
+
|
|
153
|
+
For project-specific skill customization:
|
|
154
|
+
|
|
155
|
+
**macOS / Linux:**
|
|
156
|
+
```bash
|
|
157
|
+
mkdir -p .claude/skills
|
|
158
|
+
cp -r /path/to/skills/claude-code/* .claude/skills/
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**Windows PowerShell:**
|
|
162
|
+
```powershell
|
|
163
|
+
New-Item -ItemType Directory -Force -Path .claude\skills
|
|
164
|
+
Copy-Item -Recurse path\to\skills\claude-code\* .claude\skills\
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
> **Note**: Project-level skills (`.claude/skills/`) take precedence over global skills (`~/.claude/skills/`).
|
|
168
|
+
|
|
169
|
+
## Configuration
|
|
170
|
+
|
|
171
|
+
Skills support project-specific configuration through `CONTRIBUTING.md`.
|
|
172
|
+
|
|
173
|
+
### Disable Skills
|
|
174
|
+
|
|
175
|
+
Add to your project's `CONTRIBUTING.md`:
|
|
176
|
+
|
|
177
|
+
```markdown
|
|
178
|
+
## Disabled Skills
|
|
179
|
+
|
|
180
|
+
- testing-guide
|
|
181
|
+
- release-standards
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Configuration Template
|
|
185
|
+
|
|
186
|
+
See [CONTRIBUTING.template.md](CONTRIBUTING.template.md) for complete configuration options.
|
|
187
|
+
|
|
188
|
+
## Skill Priority
|
|
189
|
+
|
|
190
|
+
When the same skill exists in both locations:
|
|
191
|
+
1. **Project level** (`.claude/skills/`) takes precedence
|
|
192
|
+
2. **Global level** (`~/.claude/skills/`) is fallback
|
|
193
|
+
|
|
194
|
+
## License
|
|
195
|
+
|
|
196
|
+
Dual-licensed: CC BY 4.0 (documentation) + MIT (code)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Checkin Standards - Ultra Compressed
|
|
2
|
+
v: 1.3.0
|
|
3
|
+
philosophy: [complete_unit,working_state,reversible,has_tests,understandable]
|
|
4
|
+
checklist:
|
|
5
|
+
build: {compile:"0 errors/warnings",deps:"installed,locked"}
|
|
6
|
+
test: {pass:"100%",new_tested:true,"cov":"not_decreased"}
|
|
7
|
+
quality: {standards:true,smells:"methods≤50,nest≤3,complex≤10,no_dup",security:"no_secrets,no_sqli,no_xss"}
|
|
8
|
+
docs: {api:true,readme:"if_needed",changelog:"user_facing→[Unreleased]"}
|
|
9
|
+
workflow: {branch:"feature/|fix/|docs/|chore/",commit:conventional,synced:true}
|
|
10
|
+
never_commit: [build_error,test_fail,incomplete_feature,WIP_critical,debug_code,commented_code]
|
|
11
|
+
timing:
|
|
12
|
+
good: [completed_unit,bug_fixed_with_test,independent_refactor,runnable]
|
|
13
|
+
bad: [build_fail,test_fail,incomplete,experimental_TODO]
|
|
14
|
+
granularity:
|
|
15
|
+
size: {files:"1-10",lines:"50-300",scope:single_concern}
|
|
16
|
+
combine: [feature+tests,tightly_related]
|
|
17
|
+
separate: [A+B,refactor+feature,fix+incidental]
|
|
18
|
+
special:
|
|
19
|
+
emergency: {stash:"git stash save WIP:desc",wip_branch:"git checkout -b wip/name"}
|
|
20
|
+
experimental: {branch:"experiment/name",free_commits:true,success:"squash→merge",fail:"doc_lessons→delete"}
|
|
21
|
+
hotfix: {from:main,minimal:true,mark:"[URGENT]"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Commit Standards - Ultra Compressed
|
|
2
|
+
v: 1.0.0
|
|
3
|
+
format: "<type>(<scope>): <subject>\n\n<body>\n\n<footer>"
|
|
4
|
+
types: [feat,fix,refactor,docs,style,test,perf,build,ci,chore,revert,security]
|
|
5
|
+
types_zh: [功能,修復,重構,文件,樣式,測試,效能,建置,CI,雜項,回退,安全]
|
|
6
|
+
subject: {len:"≤72(50ideal)",tense:imperative,cap:first,period:no}
|
|
7
|
+
lang_decision:
|
|
8
|
+
tree: [open_source?→EN, intl_team?→EN, single_lang_team?→team_pref|EN, mixed→bilingual]
|
|
9
|
+
matrix:
|
|
10
|
+
open_source: {l:EN,r:"intl contributors"}
|
|
11
|
+
intl_team: {l:EN,r:"common lang"}
|
|
12
|
+
local_EN: {l:EN,r:"tools,mobility"}
|
|
13
|
+
local_ZH: {l:ZH,r:"clarity,preference"}
|
|
14
|
+
mixed: {l:bilingual,r:"best of both"}
|
|
15
|
+
bilingual_format: "type(scope): EN subject\n\n中文 body"
|
|
16
|
+
refs: {closes:"#N→auto_close",fixes:"#N→auto_close",refs:"#N→link_only"}
|
|
17
|
+
breaking: "BREAKING CHANGE: description\n\nMigration guide:\n1. step"
|
|
18
|
+
examples:
|
|
19
|
+
good: ["feat(auth): Add OAuth2 Google login","fix(api): Resolve memory leak"]
|
|
20
|
+
bad: ["fixed bug","WIP","Update stuff."]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Refactoring Standards - Ultra Compressed
|
|
2
|
+
# Token-optimized for AI assistants
|
|
3
|
+
v: 1.0.0
|
|
4
|
+
decision:
|
|
5
|
+
tree: [in_prod?→n:rewrite|y:next, understand?→n:char_tests|y:next, "cov>60%?"→n:add_tests|y:next, arch_ok?→n:strangler|y:incr_refactor]
|
|
6
|
+
refactor: [large_code,good_tests,critical_biz,team_knows,sound_arch,tight_deadline,low_risk]
|
|
7
|
+
rewrite: [small,no_tests,downtime_ok,no_knowledge,flawed_arch,flex_time,high_risk]
|
|
8
|
+
warn: "Second-System Effect: Don't add features, over-abstract, ignore lessons"
|
|
9
|
+
scales:
|
|
10
|
+
S: {t:"5-15m",s:method,tech:[extract,rename,inline,const]}
|
|
11
|
+
M: {t:"hrs-days",s:module,req:"cov>80%"}
|
|
12
|
+
L: {t:"wks-mos",s:system,patterns:[strangler,branch_abstract,expand_contract]}
|
|
13
|
+
patterns:
|
|
14
|
+
strangler: {1:intercept,2:migrate_partial,3:complete_decommission}
|
|
15
|
+
branch_abstract: {1:"client→iface→old",2:"→[old,new_toggled]",3:"→new_only"}
|
|
16
|
+
expand_contract: {expand:"add_both",migrate:"switch_clients",contract:"remove_old"}
|
|
17
|
+
legacy:
|
|
18
|
+
def: "code without tests"
|
|
19
|
+
char_test: [call,expect_fail,run,update_assert,repeat]
|
|
20
|
+
seams: {obj:polymorphism,preproc:macros,link:DI}
|
|
21
|
+
sprout: {method:"new_fn→call_from_old",class:"new_class→ref_from_old"}
|
|
22
|
+
wrap: {method:"rename→wrapper",class:decorator}
|
|
23
|
+
db:
|
|
24
|
+
expand_contract: {1:"add_new,write_both",2:"copy,verify,read_new",3:"drop_old"}
|
|
25
|
+
workflow:
|
|
26
|
+
before: [success_criteria,"cov>80%",clean_dir,branch,communicate]
|
|
27
|
+
during: [one_change,test_every,revert_if_fail,commit_often,no_new_func]
|
|
28
|
+
after: [tests_pass,measurably_better,docs,reviewed]
|
|
29
|
+
metrics:
|
|
30
|
+
code: {complexity:"<10",dup:"<3%"}
|
|
31
|
+
test: {cov:"≥80%",speed:faster,flaky:decrease}
|
|
32
|
+
debt:
|
|
33
|
+
quadrant: {prudent_delib:"know_debt",reckless_delib:"no_time",prudent_inadv:"learned_now",reckless_inadv:"what_layering?"}
|
|
34
|
+
priority: {H:"blocks→immediate",M:"slows→next_sprint",L:"minor→opportunistic"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Testing Standards - Ultra Compressed
|
|
2
|
+
v: 1.1.0
|
|
3
|
+
pyramid: {UT:70%,IT:20%,E2E:10%}
|
|
4
|
+
levels:
|
|
5
|
+
UT: {scope:fn/class,speed:"<100ms",deps:mocked}
|
|
6
|
+
IT: {scope:components,speed:"1-10s",deps:"real_db(container)"}
|
|
7
|
+
ST: {scope:full_system,speed:min,deps:prod_like}
|
|
8
|
+
E2E: {scope:user_journey,speed:"30s+",deps:all_real}
|
|
9
|
+
coverage: {line:"70→85%",branch:"60→80%",fn:"80→90%"}
|
|
10
|
+
theory:
|
|
11
|
+
chain: "error(human)→defect(code)→failure(runtime)"
|
|
12
|
+
oracle: [spec,reference,consistency,heuristic]
|
|
13
|
+
static: {def:"no_exec",tech:[review,analysis],tools:[ESLint,SonarQube]}
|
|
14
|
+
dynamic: {def:"execute",tech:[unit,integration,system]}
|
|
15
|
+
design:
|
|
16
|
+
black_box:
|
|
17
|
+
equiv_partition: "divide inputs→classes"
|
|
18
|
+
boundary: "test at edges"
|
|
19
|
+
decision_table: "conditions→actions"
|
|
20
|
+
state_trans: "valid state sequences"
|
|
21
|
+
white_box: {stmt:"every_stmt",branch:"every_decision",cond:"T/F",path:"all_paths"}
|
|
22
|
+
risk: {formula:"likelihood×impact",HH:extensive,HL:good,LH:good,LL:basic}
|
|
23
|
+
doubles:
|
|
24
|
+
stub: "predefined returns"
|
|
25
|
+
mock: "verify interactions"
|
|
26
|
+
fake: "simplified impl"
|
|
27
|
+
spy: "record+delegate"
|
|
28
|
+
use: {UT:mock_all,IT:"fake_db,stub_api",ST:"real,fake_external",E2E:all_real}
|
|
29
|
+
FIRST: [Fast,Independent,Repeatable,Self_validating,Timely]
|
|
30
|
+
AAA: [Arrange,Act,Assert]
|
|
31
|
+
antipatterns: [interdependence,flaky,impl_details,over_mock,no_assert,magic_values]
|
|
32
|
+
defect:
|
|
33
|
+
lifecycle: [new,assigned,in_progress,fixed,verified,closed]
|
|
34
|
+
severity: [critical,major,minor,trivial]
|
|
35
|
+
priority: [high,medium,low]
|
|
36
|
+
env:
|
|
37
|
+
unit: in_memory
|
|
38
|
+
integration: containerized
|
|
39
|
+
staging: prod_like
|
|
40
|
+
production: feature_flags
|
|
41
|
+
data: [fixtures,factories,snapshots,synthetic]
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ai-collaboration-standards
|
|
3
|
+
description: |
|
|
4
|
+
Prevent AI hallucination and ensure evidence-based responses when analyzing code or making suggestions.
|
|
5
|
+
Use when: analyzing code, making recommendations, providing options, or when user asks about confidence/certainty.
|
|
6
|
+
Keywords: certainty, assumption, inference, evidence, source, 確定性, 推測, 假設, 來源, 證據.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# AI Collaboration Standards
|
|
10
|
+
|
|
11
|
+
> **Language**: English | [繁體中文](../../../../locales/zh-TW/skills/claude-code/ai-collaboration-standards/SKILL.md)
|
|
12
|
+
|
|
13
|
+
**Version**: 1.0.0
|
|
14
|
+
**Last Updated**: 2025-12-24
|
|
15
|
+
**Applicability**: Claude Code Skills
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Purpose
|
|
20
|
+
|
|
21
|
+
This skill ensures AI assistants provide accurate, evidence-based responses without hallucination.
|
|
22
|
+
|
|
23
|
+
## Quick Reference
|
|
24
|
+
|
|
25
|
+
### Certainty Tags
|
|
26
|
+
|
|
27
|
+
| Tag | Use When |
|
|
28
|
+
|-----|----------|
|
|
29
|
+
| `[Confirmed]` | Direct evidence from code/docs |
|
|
30
|
+
| `[Inferred]` | Logical deduction from evidence |
|
|
31
|
+
| `[Assumption]` | Based on common patterns (needs verification) |
|
|
32
|
+
| `[Unknown]` | Information not available |
|
|
33
|
+
| `[Need Confirmation]` | Requires user clarification |
|
|
34
|
+
|
|
35
|
+
### Source Types
|
|
36
|
+
|
|
37
|
+
| Source Type | Tag | Reliability |
|
|
38
|
+
|-------------|-----|-------------|
|
|
39
|
+
| Project Code | `[Source: Code]` | ⭐⭐⭐⭐⭐ Highest |
|
|
40
|
+
| Project Docs | `[Source: Docs]` | ⭐⭐⭐⭐ High |
|
|
41
|
+
| External Docs | `[Source: External]` | ⭐⭐⭐⭐ High |
|
|
42
|
+
| Web Search | `[Source: Search]` | ⭐⭐⭐ Medium |
|
|
43
|
+
| AI Knowledge | `[Source: Knowledge]` | ⭐⭐ Low |
|
|
44
|
+
| User Provided | `[Source: User]` | ⭐⭐⭐ Medium |
|
|
45
|
+
|
|
46
|
+
### Core Rules
|
|
47
|
+
|
|
48
|
+
1. **Evidence-Based Only**: Only analyze content that has been explicitly read
|
|
49
|
+
2. **Cite Sources**: Include file path and line number for code references
|
|
50
|
+
3. **Classify Certainty**: Tag all statements with certainty level
|
|
51
|
+
4. **Always Recommend**: When presenting options, include a recommended choice with reasoning
|
|
52
|
+
|
|
53
|
+
## Detailed Guidelines
|
|
54
|
+
|
|
55
|
+
For complete standards, see:
|
|
56
|
+
- [Anti-Hallucination Guidelines](./anti-hallucination.md)
|
|
57
|
+
- [Certainty Labels Reference](./certainty-labels.md)
|
|
58
|
+
|
|
59
|
+
## Examples
|
|
60
|
+
|
|
61
|
+
### ✅ Correct Response
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
[Confirmed] src/auth/service.ts:45 - JWT validation uses 'jsonwebtoken' library
|
|
65
|
+
[Inferred] Based on repository pattern in src/repositories/, likely using dependency injection
|
|
66
|
+
[Need Confirmation] Should the new feature support multi-tenancy?
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### ❌ Incorrect Response
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
The system uses Redis for caching (code not reviewed)
|
|
73
|
+
The UserService should have an authenticate() method (API not verified)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### ✅ Correct Option Presentation
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
There are three options:
|
|
80
|
+
1. Redis caching
|
|
81
|
+
2. In-memory caching
|
|
82
|
+
3. File-based caching
|
|
83
|
+
|
|
84
|
+
**Recommended: Option 1 (Redis)**: Given the project already has Redis infrastructure
|
|
85
|
+
and needs cross-instance cache sharing, Redis is the most suitable choice.
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### ❌ Incorrect Option Presentation
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
There are three options:
|
|
92
|
+
1. Redis caching
|
|
93
|
+
2. In-memory caching
|
|
94
|
+
3. File-based caching
|
|
95
|
+
|
|
96
|
+
Please choose one.
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Checklist
|
|
100
|
+
|
|
101
|
+
Before making any statement:
|
|
102
|
+
|
|
103
|
+
- [ ] Source Verified - Have I read the actual file/document?
|
|
104
|
+
- [ ] Source Type Tagged - Did I specify `[Source: Code]`, `[Source: External]`, etc.?
|
|
105
|
+
- [ ] Reference Cited - Did I include file path and line number?
|
|
106
|
+
- [ ] Certainty Classified - Did I tag as `[Confirmed]`, `[Inferred]`, etc.?
|
|
107
|
+
- [ ] No Fabrication - Did I avoid inventing APIs, configs, or requirements?
|
|
108
|
+
- [ ] Recommendation Included - When presenting options, did I include a recommended choice?
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Configuration Detection
|
|
113
|
+
|
|
114
|
+
This skill supports project-specific language configuration for certainty tags.
|
|
115
|
+
|
|
116
|
+
### Detection Order
|
|
117
|
+
|
|
118
|
+
1. Check `CONTRIBUTING.md` for "Certainty Tag Language" section
|
|
119
|
+
2. If found, use the specified language (English / 中文)
|
|
120
|
+
3. If not found, **default to English** tags
|
|
121
|
+
|
|
122
|
+
### First-Time Setup
|
|
123
|
+
|
|
124
|
+
If no configuration found and context is unclear:
|
|
125
|
+
|
|
126
|
+
1. Ask the user: "This project hasn't configured certainty tag language preference. Which would you like to use? (English / 中文)"
|
|
127
|
+
2. After user selection, suggest documenting in `CONTRIBUTING.md`:
|
|
128
|
+
|
|
129
|
+
```markdown
|
|
130
|
+
## Certainty Tag Language
|
|
131
|
+
|
|
132
|
+
This project uses **[English / 中文]** certainty tags.
|
|
133
|
+
<!-- Options: English | 中文 -->
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Configuration Example
|
|
137
|
+
|
|
138
|
+
In project's `CONTRIBUTING.md`:
|
|
139
|
+
|
|
140
|
+
```markdown
|
|
141
|
+
## Certainty Tag Language
|
|
142
|
+
|
|
143
|
+
This project uses **English** certainty tags.
|
|
144
|
+
|
|
145
|
+
### Tag Reference
|
|
146
|
+
- [Confirmed] - Direct evidence from code/docs
|
|
147
|
+
- [Inferred] - Logical deduction from evidence
|
|
148
|
+
- [Assumption] - Based on common patterns
|
|
149
|
+
- [Unknown] - Information not available
|
|
150
|
+
- [Need Confirmation] - Requires user clarification
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Related Standards
|
|
156
|
+
|
|
157
|
+
- [Anti-Hallucination Standards](../../core/anti-hallucination.md)
|
|
158
|
+
- [Code Review Checklist](../../core/code-review-checklist.md)
|
|
159
|
+
- [Testing Standards](../../core/testing-standards.md)
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Version History
|
|
164
|
+
|
|
165
|
+
| Version | Date | Changes |
|
|
166
|
+
|---------|------|---------|
|
|
167
|
+
| 1.0.0 | 2025-12-24 | Added: Standard sections (Purpose, Related Standards, Version History, License) |
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## License
|
|
172
|
+
|
|
173
|
+
This skill is released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
|
|
174
|
+
|
|
175
|
+
**Source**: [universal-dev-standards](https://github.com/AsiaOstrich/universal-dev-standards)
|