moai-adk 0.4.0__py3-none-any.whl → 0.4.4__py3-none-any.whl
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.
Potentially problematic release.
This version of moai-adk might be problematic. Click here for more details.
- moai_adk/__init__.py +2 -3
- moai_adk/cli/commands/init.py +10 -5
- moai_adk/cli/commands/update.py +274 -118
- moai_adk/cli/prompts/init_prompts.py +14 -18
- moai_adk/core/diagnostics/slash_commands.py +1 -1
- moai_adk/core/project/backup_utils.py +2 -11
- moai_adk/core/project/checker.py +2 -2
- moai_adk/core/project/phase_executor.py +11 -14
- moai_adk/core/project/validator.py +3 -2
- moai_adk/core/quality/__init__.py +1 -1
- moai_adk/core/quality/trust_checker.py +63 -63
- moai_adk/core/quality/validators/__init__.py +1 -1
- moai_adk/core/quality/validators/base_validator.py +1 -1
- moai_adk/core/template/backup.py +21 -8
- moai_adk/core/template/merger.py +14 -4
- moai_adk/core/template/processor.py +24 -5
- moai_adk/templates/.claude/agents/alfred/cc-manager.md +446 -424
- moai_adk/templates/.claude/agents/alfred/debug-helper.md +116 -103
- moai_adk/templates/.claude/agents/alfred/doc-syncer.md +130 -116
- moai_adk/templates/.claude/agents/alfred/git-manager.md +186 -174
- moai_adk/templates/.claude/agents/alfred/implementation-planner.md +227 -213
- moai_adk/templates/.claude/agents/alfred/project-manager.md +216 -128
- moai_adk/templates/.claude/agents/alfred/quality-gate.md +224 -209
- moai_adk/templates/.claude/agents/alfred/spec-builder.md +174 -160
- moai_adk/templates/.claude/agents/alfred/tag-agent.md +151 -139
- moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +209 -196
- moai_adk/templates/.claude/agents/alfred/trust-checker.md +247 -233
- moai_adk/templates/.claude/commands/alfred/0-project.md +756 -640
- moai_adk/templates/.claude/commands/alfred/1-plan.md +343 -333
- moai_adk/templates/.claude/commands/alfred/2-run.md +297 -285
- moai_adk/templates/.claude/commands/alfred/3-sync.md +387 -356
- moai_adk/templates/.claude/hooks/alfred/README.md +52 -52
- moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +44 -48
- moai_adk/templates/.claude/hooks/alfred/core/__init__.py +17 -17
- moai_adk/templates/.claude/hooks/alfred/core/checkpoint.py +59 -59
- moai_adk/templates/.claude/hooks/alfred/core/context.py +19 -19
- moai_adk/templates/.claude/hooks/alfred/core/project.py +52 -52
- moai_adk/templates/.claude/hooks/alfred/handlers/__init__.py +1 -1
- moai_adk/templates/.claude/hooks/alfred/handlers/notification.py +4 -4
- moai_adk/templates/.claude/hooks/alfred/handlers/session.py +27 -27
- moai_adk/templates/.claude/hooks/alfred/handlers/tool.py +16 -17
- moai_adk/templates/.claude/hooks/alfred/handlers/user.py +11 -11
- moai_adk/templates/.claude/output-styles/alfred/agentic-coding.md +308 -307
- moai_adk/templates/.claude/output-styles/alfred/moai-adk-learning.md +297 -296
- moai_adk/templates/.claude/output-styles/alfred/study-with-alfred.md +191 -190
- moai_adk/templates/.claude/skills/moai-alfred-code-reviewer/SKILL.md +112 -0
- moai_adk/templates/.claude/skills/moai-alfred-debugger-pro/SKILL.md +103 -0
- moai_adk/templates/.claude/skills/moai-alfred-ears-authoring/SKILL.md +103 -0
- moai_adk/templates/.claude/skills/moai-alfred-git-workflow/SKILL.md +95 -0
- moai_adk/templates/.claude/skills/moai-alfred-language-detection/SKILL.md +99 -0
- moai_adk/templates/.claude/skills/moai-alfred-performance-optimizer/SKILL.md +105 -0
- moai_adk/templates/.claude/skills/moai-alfred-refactoring-coach/SKILL.md +97 -0
- moai_adk/templates/.claude/skills/moai-alfred-spec-metadata-validation/SKILL.md +97 -0
- moai_adk/templates/.claude/skills/moai-alfred-tag-scanning/SKILL.md +90 -0
- moai_adk/templates/.claude/skills/moai-alfred-trust-validation/SKILL.md +99 -0
- moai_adk/templates/.claude/skills/moai-alfred-tui-survey/SKILL.md +87 -0
- moai_adk/templates/.claude/skills/moai-alfred-tui-survey/examples.md +62 -0
- moai_adk/templates/.claude/skills/moai-claude-code/SKILL.md +70 -43
- moai_adk/templates/.claude/skills/moai-claude-code/examples.md +141 -141
- moai_adk/templates/.claude/skills/moai-claude-code/reference.md +179 -165
- moai_adk/templates/.claude/skills/moai-claude-code/templates/agent-full.md +78 -78
- moai_adk/templates/.claude/skills/moai-claude-code/templates/command-full.md +90 -90
- moai_adk/templates/.claude/skills/moai-claude-code/templates/plugin-full.json +39 -25
- moai_adk/templates/.claude/skills/moai-claude-code/templates/settings-full.json +117 -74
- moai_adk/templates/.claude/skills/moai-claude-code/templates/skill-full.md +131 -134
- moai_adk/templates/.claude/skills/moai-domain-backend/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-cli-tool/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-data-science/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-database/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-devops/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-frontend/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-ml/SKILL.md +43 -11
- moai_adk/templates/.claude/skills/moai-domain-mobile-app/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-security/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-domain-web-api/SKILL.md +43 -12
- moai_adk/templates/.claude/skills/moai-essentials-debug/SKILL.md +47 -11
- moai_adk/templates/.claude/skills/moai-essentials-perf/SKILL.md +47 -11
- moai_adk/templates/.claude/skills/moai-essentials-refactor/SKILL.md +51 -14
- moai_adk/templates/.claude/skills/moai-essentials-review/SKILL.md +46 -10
- moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +62 -25
- moai_adk/templates/.claude/skills/moai-foundation-git/SKILL.md +44 -17
- moai_adk/templates/.claude/skills/moai-foundation-langs/SKILL.md +44 -14
- moai_adk/templates/.claude/skills/moai-foundation-specs/SKILL.md +45 -13
- moai_adk/templates/.claude/skills/moai-foundation-tags/SKILL.md +46 -14
- moai_adk/templates/.claude/skills/moai-foundation-trust/SKILL.md +48 -8
- moai_adk/templates/.claude/skills/moai-lang-c/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-clojure/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-cpp/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-csharp/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-dart/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-elixir/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-go/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-haskell/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-java/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-javascript/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-julia/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-kotlin/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-lua/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-php/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-python/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-r/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-ruby/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-rust/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-scala/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-shell/SKILL.md +44 -11
- moai_adk/templates/.claude/skills/moai-lang-sql/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-swift/SKILL.md +44 -12
- moai_adk/templates/.claude/skills/moai-lang-typescript/SKILL.md +44 -12
- moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +44 -43
- moai_adk/templates/.github/workflows/moai-gitflow.yml +36 -35
- moai_adk/templates/.moai/config.json +9 -6
- moai_adk/templates/.moai/memory/development-guide.md +220 -221
- moai_adk/templates/.moai/memory/gitflow-protection-policy.md +85 -85
- moai_adk/templates/.moai/memory/spec-metadata.md +229 -150
- moai_adk/templates/.moai/project/product.md +90 -90
- moai_adk/templates/.moai/project/structure.md +85 -85
- moai_adk/templates/.moai/project/tech.md +117 -117
- moai_adk/templates/CLAUDE.md +564 -709
- moai_adk-0.4.4.dist-info/METADATA +369 -0
- moai_adk-0.4.4.dist-info/RECORD +152 -0
- moai_adk/templates/.claude/commands/alfred/1-spec.md +0 -31
- moai_adk/templates/.claude/commands/alfred/2-build.md +0 -30
- moai_adk/templates/.claude/skills/scripts/standardize_skills.py +0 -166
- moai_adk/templates/.claude/skills/scripts/verify_standardization.sh +0 -43
- moai_adk/templates/.moai/hooks/pre-push.sample +0 -88
- moai_adk-0.4.0.dist-info/METADATA +0 -1816
- moai_adk-0.4.0.dist-info/RECORD +0 -145
- {moai_adk-0.4.0.dist-info → moai_adk-0.4.4.dist-info}/WHEEL +0 -0
- {moai_adk-0.4.0.dist-info → moai_adk-0.4.4.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.4.0.dist-info → moai_adk-0.4.4.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
|
|
3
|
+
name: moai-alfred-refactoring-coach
|
|
4
|
+
description: Refactoring guidance with design patterns, code smells detection, and step-by-step improvement plans. Use when outlining refactor steps that preserve functionality.
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- TodoWrite
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Alfred Refactoring Coach
|
|
14
|
+
|
|
15
|
+
## Skill Metadata
|
|
16
|
+
| Field | Value |
|
|
17
|
+
| ----- | ----- |
|
|
18
|
+
| Allowed tools | Read (read_file), Write (write_file), Edit (edit_file), Bash (terminal), TodoWrite (todo_write) |
|
|
19
|
+
| Auto-load | /alfred:2-run refactor lane |
|
|
20
|
+
| Trigger cues | Refactoring retros, duplication cleanup, code health follow-ups inside Alfred. |
|
|
21
|
+
|
|
22
|
+
## What it does
|
|
23
|
+
|
|
24
|
+
Refactoring guidance with design pattern recommendations, code smell detection, and step-by-step improvement plans.
|
|
25
|
+
|
|
26
|
+
## When to use
|
|
27
|
+
|
|
28
|
+
- Activates when Alfred is asked to plan or stage refactoring work.
|
|
29
|
+
- “Help with refactoring”, “How can I improve this code?”, “Apply design patterns”
|
|
30
|
+
- “Code organization”, “Remove duplication”, “Separate functions”
|
|
31
|
+
|
|
32
|
+
## How it works
|
|
33
|
+
|
|
34
|
+
**Refactoring Techniques**:
|
|
35
|
+
- **Extract Method**: Separate long methods
|
|
36
|
+
- **Replace Conditional with Polymorphism**: Remove conditional statements
|
|
37
|
+
- **Introduce Parameter Object**: Group parameters
|
|
38
|
+
- **Extract Class**: Massive class separation
|
|
39
|
+
|
|
40
|
+
**Design Pattern Recommendations**:
|
|
41
|
+
- Complex object creation → **Builder Pattern**
|
|
42
|
+
- Type-specific behavior → **Strategy Pattern**
|
|
43
|
+
- Global state → **Singleton Pattern**
|
|
44
|
+
- Incompatible interfaces → **Adapter Pattern**
|
|
45
|
+
- Delayed object creation → **Factory Pattern**
|
|
46
|
+
|
|
47
|
+
**3-Strike Rule**:
|
|
48
|
+
```
|
|
49
|
+
1st occurrence: Just implement
|
|
50
|
+
2nd occurrence: Notice similarity (leave as-is)
|
|
51
|
+
3rd occurrence: Pattern confirmed → Refactor! 🔧
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Refactoring Checklist**:
|
|
55
|
+
- [ ] All tests passing before refactoring
|
|
56
|
+
- [ ] Code smells identified
|
|
57
|
+
- [ ] Refactoring goal clear
|
|
58
|
+
- [ ] Change one thing at a time
|
|
59
|
+
- [ ] Run tests after each change
|
|
60
|
+
- [ ] Commit frequently
|
|
61
|
+
|
|
62
|
+
## Best Practices
|
|
63
|
+
- The text shown to the user is written using TUI/report expressions.
|
|
64
|
+
- When running the tool, a summary of commands and results are recorded.
|
|
65
|
+
|
|
66
|
+
## Examples
|
|
67
|
+
```markdown
|
|
68
|
+
- Call this skill inside the /alfred command to generate a report.
|
|
69
|
+
- Add summary to Completion Report.
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Inputs
|
|
73
|
+
- MoAI-ADK project context (`.moai/project/`, `.claude/` templates, etc.).
|
|
74
|
+
- Parameters passed from user commands or higher commands.
|
|
75
|
+
|
|
76
|
+
## Outputs
|
|
77
|
+
- Reports, checklists or recommendations for your Alfred workflow.
|
|
78
|
+
- Structured data for subsequent subagent calls.
|
|
79
|
+
|
|
80
|
+
## Failure Modes
|
|
81
|
+
- When required input documents are missing or permissions are limited.
|
|
82
|
+
- When disruptive changes are required without user approval.
|
|
83
|
+
|
|
84
|
+
## Dependencies
|
|
85
|
+
- Cooperation with higher-level agents such as cc-manager and project-manager is required.
|
|
86
|
+
|
|
87
|
+
## References
|
|
88
|
+
- Fowler, Martin. "Refactoring: Improving the Design of Existing Code." Addison-Wesley, 2018.
|
|
89
|
+
- IEEE Software. "Managing Technical Debt." IEEE Software, 2021.
|
|
90
|
+
|
|
91
|
+
## Changelog
|
|
92
|
+
- 2025-03-29: Added input/output/failure response to Alfred-specific skills.
|
|
93
|
+
|
|
94
|
+
## Works well with
|
|
95
|
+
|
|
96
|
+
- alfred-code-reviewer
|
|
97
|
+
- alfred-trust-validation
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
|
|
3
|
+
name: moai-alfred-spec-metadata-validation
|
|
4
|
+
description: Validates SPEC YAML frontmatter (7 required fields) and HISTORY section compliance. Use when validating SPEC metadata for consistency.
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- TodoWrite
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Alfred SPEC Metadata Validation
|
|
14
|
+
|
|
15
|
+
## Skill Metadata
|
|
16
|
+
| Field | Value |
|
|
17
|
+
| ----- | ----- |
|
|
18
|
+
| Allowed tools | Read (read_file), Write (write_file), Edit (edit_file), Bash (terminal), TodoWrite (todo_write) |
|
|
19
|
+
| Auto-load | /alfred:1-plan spec validation |
|
|
20
|
+
| Trigger cues | SPEC frontmatter checks, history table enforcement, metadata guardrails. |
|
|
21
|
+
|
|
22
|
+
## What it does
|
|
23
|
+
|
|
24
|
+
Validates SPEC document structure including YAML frontmatter (7 required fields) and HISTORY section compliance.
|
|
25
|
+
|
|
26
|
+
## When to use
|
|
27
|
+
|
|
28
|
+
- Activates when Alfred validates SPEC templates or enforces metadata standards.
|
|
29
|
+
- "SPEC verification", "Metadata check", "SPEC structure check"
|
|
30
|
+
- Automatically invoked by `/alfred:1-plan`
|
|
31
|
+
- Before creating SPEC document
|
|
32
|
+
|
|
33
|
+
## How it works
|
|
34
|
+
|
|
35
|
+
**YAML Frontmatter Validation (7 required fields)**:
|
|
36
|
+
- `id`: SPEC ID (e.g., AUTH-001)
|
|
37
|
+
- `version`: Semantic Version (e.g., 0.0.1)
|
|
38
|
+
- `status`: draft|active|completed|deprecated
|
|
39
|
+
- `created`: YYYY-MM-DD format
|
|
40
|
+
- `updated`: YYYY-MM-DD format
|
|
41
|
+
- `author`: @{GitHub ID} format
|
|
42
|
+
- `priority`: low|medium|high|critical
|
|
43
|
+
|
|
44
|
+
**HISTORY Section Validation**:
|
|
45
|
+
- Checks existence of HISTORY section
|
|
46
|
+
- Verifies version history (INITIAL/ADDED/CHANGED/FIXED tags)
|
|
47
|
+
- Validates author and date consistency
|
|
48
|
+
|
|
49
|
+
**Format Validation**:
|
|
50
|
+
```bash
|
|
51
|
+
# Check required fields
|
|
52
|
+
rg "^(id|version|status|created|updated|author|priority):" .moai/specs/SPEC-*/spec.md
|
|
53
|
+
|
|
54
|
+
# Verify HISTORY section
|
|
55
|
+
rg "^## HISTORY" .moai/specs/SPEC-*/spec.md
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Best Practices
|
|
59
|
+
- The text shown to the user is written using TUI/report expressions.
|
|
60
|
+
- When running the tool, a summary of commands and results are recorded.
|
|
61
|
+
|
|
62
|
+
## Examples
|
|
63
|
+
```markdown
|
|
64
|
+
- Call this skill inside the /alfred command to generate a report.
|
|
65
|
+
- Add summary to Completion Report.
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Inputs
|
|
69
|
+
- MoAI-ADK project context (`.moai/project/`, `.claude/` templates, etc.).
|
|
70
|
+
- Parameters passed from user commands or higher commands.
|
|
71
|
+
|
|
72
|
+
## Outputs
|
|
73
|
+
- Reports, checklists or recommendations for your Alfred workflow.
|
|
74
|
+
- Structured data for subsequent subagent calls.
|
|
75
|
+
|
|
76
|
+
## Failure Modes
|
|
77
|
+
- When required input documents are missing or permissions are limited.
|
|
78
|
+
- When disruptive changes are required without user approval.
|
|
79
|
+
|
|
80
|
+
## Dependencies
|
|
81
|
+
- Cooperation with higher-level agents such as cc-manager and project-manager is required.
|
|
82
|
+
|
|
83
|
+
## References
|
|
84
|
+
- IEEE. "Software Requirements Specification Standard." IEEE 830-1998.
|
|
85
|
+
- NASA. "Systems Engineering Handbook." https://www.nasa.gov/seh/ (accessed 2025-03-29).
|
|
86
|
+
|
|
87
|
+
## Changelog
|
|
88
|
+
- 2025-03-29: Added input/output/failure response to Alfred-specific skills.
|
|
89
|
+
|
|
90
|
+
## Works well with
|
|
91
|
+
|
|
92
|
+
- alfred-ears-authoring (SPEC writing guide)
|
|
93
|
+
- alfred-tag-scanning (SPEC ID duplication check)
|
|
94
|
+
|
|
95
|
+
## Reference
|
|
96
|
+
|
|
97
|
+
SSOT (Single Source of Truth): `.moai/memory/spec-metadata.md`
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
|
|
3
|
+
name: moai-alfred-tag-scanning
|
|
4
|
+
description: Scans all @TAG markers directly from code and generates TAG inventory (CODE-FIRST principle - no intermediate cache). Use when rebuilding the TAG inventory from live code.
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- TodoWrite
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Alfred TAG Scanning
|
|
14
|
+
|
|
15
|
+
## Skill Metadata
|
|
16
|
+
| Field | Value |
|
|
17
|
+
| ----- | ----- |
|
|
18
|
+
| Allowed tools | Read (read_file), Write (write_file), Edit (edit_file), Bash (terminal), TodoWrite (todo_write) |
|
|
19
|
+
| Auto-load | /alfred:3-sync traceability gate |
|
|
20
|
+
| Trigger cues | Traceability scans, orphan TAG cleanup, TAG chain verification in Alfred. |
|
|
21
|
+
|
|
22
|
+
## What it does
|
|
23
|
+
|
|
24
|
+
Scans all @TAG markers (SPEC/TEST/CODE/DOC) directly from codebase and generates TAG inventory without intermediate caching (CODE-FIRST principle).
|
|
25
|
+
|
|
26
|
+
## When to use
|
|
27
|
+
|
|
28
|
+
- Activates when Alfred needs TAG inventories or chain verification.
|
|
29
|
+
- "TAG Scan", "TAG List", "TAG Inventory"
|
|
30
|
+
- Automatically invoked by `/alfred:3-sync`
|
|
31
|
+
- “Find orphan TAG”, “Check TAG chain”
|
|
32
|
+
|
|
33
|
+
## How it works
|
|
34
|
+
|
|
35
|
+
**CODE-FIRST Scanning**:
|
|
36
|
+
```bash
|
|
37
|
+
# Direct code scan without intermediate cache
|
|
38
|
+
rg '@(SPEC|TEST|CODE|DOC):' -n .moai/specs/ tests/ src/ docs/
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**TAG Inventory Generation**:
|
|
42
|
+
- Lists all TAGs with file locations
|
|
43
|
+
- Detects orphaned TAGs (no corresponding SPEC/TEST/CODE)
|
|
44
|
+
- Identifies broken links in TAG chain
|
|
45
|
+
- Reports duplicate IDs
|
|
46
|
+
|
|
47
|
+
**TAG Chain Verification**:
|
|
48
|
+
- @SPEC → @TEST → @CODE → @DOC connection check
|
|
49
|
+
- Ensures traceability across all artifacts
|
|
50
|
+
|
|
51
|
+
## Best Practices
|
|
52
|
+
- The text shown to the user is written using TUI/report expressions.
|
|
53
|
+
- When running the tool, a summary of commands and results are recorded.
|
|
54
|
+
|
|
55
|
+
## Examples
|
|
56
|
+
```markdown
|
|
57
|
+
- Call this skill inside the /alfred command to generate a report.
|
|
58
|
+
- Add summary to Completion Report.
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Inputs
|
|
62
|
+
- MoAI-ADK project context (`.moai/project/`, `.claude/` templates, etc.).
|
|
63
|
+
- Parameters passed from user commands or higher commands.
|
|
64
|
+
|
|
65
|
+
## Outputs
|
|
66
|
+
- Reports, checklists or recommendations for your Alfred workflow.
|
|
67
|
+
- Structured data for subsequent subagent calls.
|
|
68
|
+
|
|
69
|
+
## Failure Modes
|
|
70
|
+
- When required input documents are missing or permissions are limited.
|
|
71
|
+
- When disruptive changes are required without user approval.
|
|
72
|
+
|
|
73
|
+
## Dependencies
|
|
74
|
+
- Cooperation with higher-level agents such as cc-manager and project-manager is required.
|
|
75
|
+
|
|
76
|
+
## References
|
|
77
|
+
- BurntSushi. "ripgrep User Guide." https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md (accessed 2025-03-29).
|
|
78
|
+
- ReqView. "Requirements Traceability Matrix Guide." https://www.reqview.com/doc/requirements-traceability-matrix/ (accessed 2025-03-29).
|
|
79
|
+
|
|
80
|
+
## Changelog
|
|
81
|
+
- 2025-03-29: Added input/output/failure response to Alfred-specific skills.
|
|
82
|
+
|
|
83
|
+
## Works well with
|
|
84
|
+
|
|
85
|
+
- alfred-trust-validation (TAG traceability verification)
|
|
86
|
+
- alfred-spec-metadata-validation (SPEC ID validation)
|
|
87
|
+
|
|
88
|
+
## Files included
|
|
89
|
+
|
|
90
|
+
- templates/tag-inventory-template.md
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
|
|
3
|
+
name: moai-alfred-trust-validation
|
|
4
|
+
description: Validates TRUST 5-principles compliance (Test coverage 85%+, Code constraints, Architecture unity, Security, TAG trackability). Use when enforcing TRUST checkpoints before progression.
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- Bash
|
|
10
|
+
- TodoWrite
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Alfred TRUST Validation
|
|
14
|
+
|
|
15
|
+
## Skill Metadata
|
|
16
|
+
| Field | Value |
|
|
17
|
+
| ----- | ----- |
|
|
18
|
+
| Allowed tools | Read (read_file), Write (write_file), Edit (edit_file), Bash (terminal), TodoWrite (todo_write) |
|
|
19
|
+
| Auto-load | /alfred:3-sync quality gate |
|
|
20
|
+
| Trigger cues | TRUST checklist enforcement, release readiness scoring, risk gating. |
|
|
21
|
+
|
|
22
|
+
## What it does
|
|
23
|
+
|
|
24
|
+
Validates MoAI-ADK's TRUST 5-principles compliance to ensure code quality, testability, security, and traceability.
|
|
25
|
+
|
|
26
|
+
## When to use
|
|
27
|
+
|
|
28
|
+
- Activates when Alfred evaluates TRUST compliance before handoff.
|
|
29
|
+
- "Check the TRUST principle", "Quality verification", "Check code quality"
|
|
30
|
+
- Automatically invoked by `/alfred:3-sync`
|
|
31
|
+
- Before merging PR or releasing
|
|
32
|
+
|
|
33
|
+
## How it works
|
|
34
|
+
|
|
35
|
+
**T - Test First**:
|
|
36
|
+
- Checks test coverage ≥85% (pytest, vitest, go test, cargo test, etc.)
|
|
37
|
+
- Verifies TDD cycle compliance (RED → GREEN → REFACTOR)
|
|
38
|
+
|
|
39
|
+
**R - Readable**:
|
|
40
|
+
- File ≤300 LOC
|
|
41
|
+
- Function ≤50 LOC
|
|
42
|
+
- Parameters ≤5
|
|
43
|
+
- Cyclomatic complexity ≤10
|
|
44
|
+
|
|
45
|
+
**U - Unified**:
|
|
46
|
+
- SPEC-driven architecture consistency
|
|
47
|
+
- Clear module boundaries
|
|
48
|
+
- Language-specific standard structures
|
|
49
|
+
|
|
50
|
+
**S - Secured**:
|
|
51
|
+
- Input validation implementation
|
|
52
|
+
- No hardcoded secrets
|
|
53
|
+
- Access control applied
|
|
54
|
+
|
|
55
|
+
**T - Trackable**:
|
|
56
|
+
- TAG chain integrity (@SPEC → @TEST → @CODE → @DOC)
|
|
57
|
+
- No orphaned TAGs
|
|
58
|
+
- No duplicate SPEC IDs
|
|
59
|
+
|
|
60
|
+
## Best Practices
|
|
61
|
+
- The text shown to the user is written using TUI/report expressions.
|
|
62
|
+
- When running the tool, a summary of commands and results are recorded.
|
|
63
|
+
|
|
64
|
+
## Examples
|
|
65
|
+
```markdown
|
|
66
|
+
- Call this skill inside the /alfred command to generate a report.
|
|
67
|
+
- Add summary to Completion Report.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Inputs
|
|
71
|
+
- MoAI-ADK project context (`.moai/project/`, `.claude/` templates, etc.).
|
|
72
|
+
- Parameters passed from user commands or higher commands.
|
|
73
|
+
|
|
74
|
+
## Outputs
|
|
75
|
+
- Reports, checklists or recommendations for your Alfred workflow.
|
|
76
|
+
- Structured data for subsequent subagent calls.
|
|
77
|
+
|
|
78
|
+
## Failure Modes
|
|
79
|
+
- When required input documents are missing or permissions are limited.
|
|
80
|
+
- When disruptive changes are required without user approval.
|
|
81
|
+
|
|
82
|
+
## Dependencies
|
|
83
|
+
- Cooperation with higher-level agents such as cc-manager and project-manager is required.
|
|
84
|
+
|
|
85
|
+
## References
|
|
86
|
+
- SonarSource. "Quality Gate: Developer's Guide." https://www.sonarsource.com/company/newsroom/white-papers/quality-gate/ (accessed 2025-03-29).
|
|
87
|
+
- ISO/IEC 25010. "Systems and software quality models." (accessed 2025-03-29).
|
|
88
|
+
|
|
89
|
+
## Changelog
|
|
90
|
+
- 2025-03-29: Added input/output/failure response to Alfred-specific skills.
|
|
91
|
+
|
|
92
|
+
## Works well with
|
|
93
|
+
|
|
94
|
+
- alfred-tag-scanning (TAG traceability)
|
|
95
|
+
- alfred-code-reviewer (code quality analysis)
|
|
96
|
+
|
|
97
|
+
## Files included
|
|
98
|
+
|
|
99
|
+
- templates/trust-report-template.md
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
|
|
3
|
+
name: moai-alfred-tui-survey
|
|
4
|
+
description: Standardizes Claude Code Tools AskUserQuestion TUI menus for surveys, branching approvals, and option picking across Alfred workflows. Use when gathering approvals or decisions via Alfred’s TUI menus.
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
|
+
- TodoWrite
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Alfred TUI Survey Skill
|
|
13
|
+
|
|
14
|
+
## Skill Metadata
|
|
15
|
+
| Field | Value |
|
|
16
|
+
| ----- | ----- |
|
|
17
|
+
| Allowed tools | Read (read_file), Write (write_file), Edit (edit_file), TodoWrite (todo_write) |
|
|
18
|
+
| Auto-load | On demand when AskUserQuestion menus are built |
|
|
19
|
+
| Trigger cues | Branch approvals, survey menus, decision gating via AskUserQuestion. |
|
|
20
|
+
|
|
21
|
+
## What it does
|
|
22
|
+
|
|
23
|
+
Provides ready-to-use patterns for Claude Code's AskUserQuestion TUI selector so Alfred agents can gather user choices, approvals, or survey answers with structured menus instead of ad-hoc text prompts.
|
|
24
|
+
|
|
25
|
+
## When to use
|
|
26
|
+
|
|
27
|
+
- Activates when Alfred needs to gather structured choices through the TUI selector.
|
|
28
|
+
- Need confirmation before advancing to a risky/destructive step.
|
|
29
|
+
- Choosing between alternative implementation paths or automation levels.
|
|
30
|
+
- Collecting survey-like answers (persona, tech stack, priority, risk level).
|
|
31
|
+
- Any time a branched workflow depends on user-selected options rather than free-form text.
|
|
32
|
+
|
|
33
|
+
## How it works
|
|
34
|
+
|
|
35
|
+
1. **Detect gate** – Pause at steps that require explicit user choice.
|
|
36
|
+
2. **Shape options** – Offer 2–5 focused choices with concise labels.
|
|
37
|
+
3. **Render menu** – Emit the `AskUserQuestion({...})` block for the selector.
|
|
38
|
+
4. **Map follow-ups** – Note how each option alters the next action/agent.
|
|
39
|
+
5. **Fallback** – Provide plain-text instructions when the UI cannot render.
|
|
40
|
+
|
|
41
|
+
### Templates & examples
|
|
42
|
+
|
|
43
|
+
- [Single-select deployment decision](examples.md#single-select-template)
|
|
44
|
+
- [Multi-select diagnostics checklist](examples.md#multi-select-variation)
|
|
45
|
+
- [Follow-up drill-down prompt](examples.md#follow-up-prompt-for-deeper-detail)
|
|
46
|
+
|
|
47
|
+
## Best Practices
|
|
48
|
+
- Reduce context switching by putting questions, options, and follow-up actions on one screen.
|
|
49
|
+
- Options are sorted according to comparison criteria such as risk and priority.
|
|
50
|
+
- If safety measures are required, such as approval/suspension/cancellation, attach a warning message.
|
|
51
|
+
- Submission results are recorded for reuse in the Sync step or reports.
|
|
52
|
+
|
|
53
|
+
## Inputs
|
|
54
|
+
- Decision scenarios and candidate options collected by Alfred workflows.
|
|
55
|
+
- Definition of follow-up actions for each option (next command, subagent, TODO, etc.).
|
|
56
|
+
|
|
57
|
+
## Outputs
|
|
58
|
+
- AskUserQuestion block and choice → follow-up action mapping.
|
|
59
|
+
- Summary of selection results and TODO items that require further confirmation.
|
|
60
|
+
|
|
61
|
+
## Failure Modes
|
|
62
|
+
- Ambiguous or duplicate options cause selection delays.
|
|
63
|
+
- It is difficult to judge priorities when all options look the same.
|
|
64
|
+
- AskUserQuestion does not work in a TUI-inactive environment, so plan B is needed.
|
|
65
|
+
|
|
66
|
+
## Dependencies
|
|
67
|
+
- Works with the main `/alfred:*` command and schedules follow-up actions with TodoWrite when necessary.
|
|
68
|
+
- When combined with moai-foundation-ears · moai-foundation-tags, requirements → options → TAG records are connected.
|
|
69
|
+
|
|
70
|
+
## References
|
|
71
|
+
- Jakubovic, J. "Designing Effective CLI Dialogs." ACM Queue, 2021.
|
|
72
|
+
- NCurses. "Programming Guide." https://invisible-island.net/ncurses/man/ncurses.3x.html (accessed 2025-03-29).
|
|
73
|
+
|
|
74
|
+
## Changelog
|
|
75
|
+
- 2025-03-29: Added input/output/failure response to Alfred-specific skills.
|
|
76
|
+
|
|
77
|
+
## Works well with
|
|
78
|
+
|
|
79
|
+
- `moai-foundation-ears` – Combine structured requirement patterns with menu-driven confirmations.
|
|
80
|
+
- `moai-alfred-git-workflow` – Use menus to choose branch/worktree strategies.
|
|
81
|
+
- `moai-alfred-code-reviewer` – Capture reviewer focus areas through guided selection.
|
|
82
|
+
|
|
83
|
+
## Examples
|
|
84
|
+
```markdown
|
|
85
|
+
- In the `/alfred:1-plan` step, user priorities are collected and the results are written to the PLAN board.
|
|
86
|
+
- Check user approval before high-risk operations while running `/alfred:2-run`.
|
|
87
|
+
```
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Alfred TUI Survey Examples
|
|
2
|
+
|
|
3
|
+
## Single-select template
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
AskUserQuestion({
|
|
7
|
+
questions: [{
|
|
8
|
+
header: "Decision point: Deployment Strategy",
|
|
9
|
+
question: "How should we roll out the new release?",
|
|
10
|
+
options: [
|
|
11
|
+
{
|
|
12
|
+
label: "Canary release",
|
|
13
|
+
description: "Gradually roll out to a small user segment; monitor metrics first."
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: "Blue/Green",
|
|
17
|
+
description: "Keep the current version live while preparing the new stack in parallel."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
label: "Full deploy",
|
|
21
|
+
description: "Immediate production rollout after smoke tests succeed."
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
multiSelect: false
|
|
25
|
+
}]
|
|
26
|
+
})
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Multi-select variation
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
AskUserQuestion({
|
|
33
|
+
questions: [{
|
|
34
|
+
header: "Select diagnostics to run",
|
|
35
|
+
question: "Which checks should run before proceeding?",
|
|
36
|
+
options: [
|
|
37
|
+
{ label: "Unit tests", description: "Fast verification for core modules." },
|
|
38
|
+
{ label: "Integration tests", description: "Service-level interactions and DB calls." },
|
|
39
|
+
{ label: "Security scan", description: "Dependency vulnerability audit." }
|
|
40
|
+
],
|
|
41
|
+
multiSelect: true
|
|
42
|
+
}]
|
|
43
|
+
})
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Follow-up prompt for deeper detail
|
|
47
|
+
|
|
48
|
+
```typescript
|
|
49
|
+
if (selection.includes("Integration tests")) {
|
|
50
|
+
AskUserQuestion({
|
|
51
|
+
questions: [{
|
|
52
|
+
header: "Integration test scope",
|
|
53
|
+
question: "Which environment should host integration tests?",
|
|
54
|
+
options: [
|
|
55
|
+
{ label: "Staging", description: "Use the shared staging cluster." },
|
|
56
|
+
{ label: "Ephemeral env", description: "Provision a one-off test environment." }
|
|
57
|
+
],
|
|
58
|
+
multiSelect: false
|
|
59
|
+
}]
|
|
60
|
+
})
|
|
61
|
+
}
|
|
62
|
+
```
|
|
@@ -1,67 +1,94 @@
|
|
|
1
1
|
---
|
|
2
|
+
|
|
2
3
|
name: moai-claude-code
|
|
3
|
-
description: Claude Code
|
|
4
|
-
템플릿 기반 정확한 파일 생성
|
|
4
|
+
description: Scaffolds and audits Claude Code agents, commands, skills, plugins, and settings with production templates. Use when configuring or reviewing Claude Code automation inside MoAI workflows.
|
|
5
5
|
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Edit
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Edit
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# MoAI Claude Code Manager
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## Skill Metadata
|
|
14
|
+
| Field | Value |
|
|
15
|
+
| ----- | ----- |
|
|
16
|
+
| Allowed tools | Read (read_file), Write (write_file), Edit (edit_file) |
|
|
17
|
+
| Auto-load | SessionStart (Claude Code bootstrap) |
|
|
18
|
+
| Trigger cues | Agent/command/skill/plugin/settings authoring, Claude Code environment setup. |
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
Create and manage Claude Code's five core components according to official standards.
|
|
16
21
|
|
|
17
|
-
|
|
18
|
-
2. **Command** (.claude/commands/) - 슬래시 커맨드
|
|
19
|
-
3. **Skill** (.claude/skills/) - 재사용 기능 모듈
|
|
20
|
-
4. **Plugin** (settings.json의 mcpServers) - MCP 서버 통합
|
|
21
|
-
5. **Settings** (.claude/settings.json) - 권한 및 훅 설정
|
|
22
|
+
## Components covered
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
- **Agents** `.claude/agents/` — Persona, tools, and workflow definition
|
|
25
|
+
- **Commands** `.claude/commands/` — Slash command entry points
|
|
26
|
+
- **Skills** `.claude/skills/` — Reusable instruction capsules
|
|
27
|
+
- **Plugins** `settings.json › mcpServers` — MCP integrations
|
|
28
|
+
- **Settings** `.claude/settings.json` — Tool permissions, hooks, session defaults
|
|
24
29
|
|
|
25
|
-
|
|
30
|
+
## Reference files
|
|
26
31
|
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
32
|
+
- `reference.md` — Writing guide and checklist
|
|
33
|
+
- `examples.md` — Sample completed artifacts
|
|
34
|
+
- `templates/` — Markdown/JSON skeleton for five components
|
|
35
|
+
- `scripts/` — settings validation and template integrity check scripts
|
|
31
36
|
|
|
32
|
-
##
|
|
37
|
+
## Workflow
|
|
33
38
|
|
|
34
|
-
|
|
35
|
-
|
|
39
|
+
1. Analyze user requests to determine required components (Agent/Command/Skill/Plugin/Settings).
|
|
40
|
+
2. Copy the stub from `templates/` and replace the placeholders to suit your project context.
|
|
41
|
+
3. If necessary, run the `scripts/` verifier to check required fields, permissions, and follow-up links.
|
|
36
42
|
|
|
37
|
-
|
|
38
|
-
"Python 프로젝트용 settings.json을 생성해주세요"
|
|
43
|
+
## Guardrails
|
|
39
44
|
|
|
40
|
-
|
|
41
|
-
|
|
45
|
+
- Maintain minimum privileges and progressive disclosure in line with Anthropic official guidelines.
|
|
46
|
+
- Rather than modifying the template directly, only update the hook/field guided by reference.md.
|
|
47
|
+
- The created files and settings.json are included in Git version management and a change history is left.
|
|
42
48
|
|
|
43
|
-
|
|
49
|
+
**Official documentation**: https://docs.claude.com/en/docs/claude-code/skills
|
|
50
|
+
**Version**: 1.0.0
|
|
44
51
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
52
|
+
## Examples
|
|
53
|
+
```markdown
|
|
54
|
+
- Create a spec-builder agent and the /alfred command set in a new project.
|
|
55
|
+
- Review existing settings.json to update allowable tools and hook configurations.
|
|
56
|
+
```
|
|
49
57
|
|
|
50
|
-
##
|
|
58
|
+
## Best Practices
|
|
59
|
+
- The output template is designed to be idempotent so that it is safe even when reapplied.
|
|
60
|
+
- Detailed procedures are separated into reference.md (writing guide) and examples.md (sample artifacts) and loaded only when necessary.
|
|
51
61
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
62
|
+
## When to use
|
|
63
|
+
- Activates when someone asks to scaffold or audit Claude Code components.
|
|
64
|
+
- When bootstrapping a Claude Code configuration to a new project.
|
|
65
|
+
- When reexamining existing agents/commands/skills/plug-ins to meet standards.
|
|
66
|
+
- When verification of settings is required in initialization workflows such as `/alfred:0-project`.
|
|
56
67
|
|
|
57
|
-
##
|
|
68
|
+
## What it does
|
|
69
|
+
- Create and update the five core components as official templates.
|
|
70
|
+
- Verify accepted tools, model selection, and progressive disclosure links.
|
|
71
|
+
- Provides reusable stubs and verification procedures through templates/·scripts/ resources.
|
|
58
72
|
|
|
59
|
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
- **보안 우선**: 민감 정보 환경변수 관리
|
|
73
|
+
## Inputs
|
|
74
|
+
- User configuration requests (e.g. “add new command”, “review settings.json”) and current `.claude/` directory state.
|
|
75
|
+
- Project-specific template requirements or security/permissions policies.
|
|
63
76
|
|
|
64
|
-
|
|
77
|
+
## Outputs
|
|
78
|
+
- Official Markdown definition file under `.claude/agents|commands|skills/`.
|
|
79
|
+
- A summary of `.claude/settings.json` that reflects the latest settings and allowed tools and follow-up TODOs.
|
|
80
|
+
|
|
81
|
+
## Failure Modes
|
|
82
|
+
- If the template path or placeholder is different from the latest version, the result may be damaged.
|
|
83
|
+
- The settings.json permission policy may conflict with project rules or may block verification script execution.
|
|
84
|
+
|
|
85
|
+
## Dependencies
|
|
86
|
+
- When used with cc-manager, doc-syncer, and moai-foundation-git, the creation → verification → distribution flow is completed.
|
|
87
|
+
- You must have versioned resources in the templates/ and scripts/ directories for automation to work properly.
|
|
88
|
+
|
|
89
|
+
## References
|
|
90
|
+
- Anthropic. "Claude Code Style Guide." https://docs.claude.com/ (accessed 2025-03-29).
|
|
91
|
+
- Prettier. "Opinionated Code Formatter." https://prettier.io/docs/en/ (accessed 2025-03-29).
|
|
65
92
|
|
|
66
|
-
|
|
67
|
-
|
|
93
|
+
## Changelog
|
|
94
|
+
- 2025-03-29: Added best practice structure to Claude code formatting skill.
|