moai-adk 0.8.2__py3-none-any.whl → 0.9.0__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.

Files changed (39) hide show
  1. moai_adk/core/config/migration.py +1 -1
  2. moai_adk/core/issue_creator.py +7 -3
  3. moai_adk/core/tags/__init__.py +23 -24
  4. moai_adk/core/tags/ci_validator.py +3 -5
  5. moai_adk/core/tags/cli.py +2 -2
  6. moai_adk/core/tags/pre_commit_validator.py +5 -5
  7. moai_adk/core/tags/reporter.py +3 -5
  8. moai_adk/core/tags/validator.py +3 -3
  9. moai_adk/templates/.claude/commands/alfred/1-plan.md +65 -15
  10. moai_adk/templates/.claude/commands/alfred/2-run.md +65 -15
  11. moai_adk/templates/.claude/commands/alfred/3-sync.md +68 -14
  12. moai_adk/templates/.claude/hooks/alfred/core/project.py +750 -0
  13. moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +1 -1
  14. moai_adk/templates/.claude/hooks/alfred/shared/core/project.py +111 -33
  15. moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +3 -3
  16. moai_adk/templates/.moai/memory/gitflow-protection-policy.md +330 -0
  17. moai_adk/templates/README.md +256 -0
  18. {moai_adk-0.8.2.dist-info → moai_adk-0.9.0.dist-info}/METADATA +347 -48
  19. {moai_adk-0.8.2.dist-info → moai_adk-0.9.0.dist-info}/RECORD +22 -36
  20. moai_adk/templates/.claude/hooks/alfred/.moai/cache/version-check.json +0 -9
  21. moai_adk/templates/.claude/hooks/alfred/README.md +0 -343
  22. moai_adk/templates/.claude/hooks/alfred/TROUBLESHOOTING.md +0 -471
  23. moai_adk/templates/.github/workflows/tag-report.yml +0 -261
  24. moai_adk/templates/.github/workflows/tag-validation.yml +0 -176
  25. moai_adk/templates/.moai/docs/quick-issue-creation-guide.md +0 -219
  26. moai_adk/templates/.moai/hooks/install.sh +0 -79
  27. moai_adk/templates/.moai/hooks/pre-commit.sh +0 -66
  28. moai_adk/templates/.moai/memory/CONFIG-SCHEMA.md +0 -444
  29. moai_adk/templates/.moai/memory/GITFLOW-PROTECTION-POLICY.md +0 -220
  30. moai_adk/templates/src/moai_adk/core/__init__.py +0 -5
  31. moai_adk/templates/src/moai_adk/core/tags/__init__.py +0 -87
  32. moai_adk/templates/src/moai_adk/core/tags/ci_validator.py +0 -435
  33. moai_adk/templates/src/moai_adk/core/tags/cli.py +0 -283
  34. moai_adk/templates/src/moai_adk/core/tags/pre_commit_validator.py +0 -355
  35. moai_adk/templates/src/moai_adk/core/tags/reporter.py +0 -959
  36. moai_adk/templates/src/moai_adk/core/tags/validator.py +0 -897
  37. {moai_adk-0.8.2.dist-info → moai_adk-0.9.0.dist-info}/WHEEL +0 -0
  38. {moai_adk-0.8.2.dist-info → moai_adk-0.9.0.dist-info}/entry_points.txt +0 -0
  39. {moai_adk-0.8.2.dist-info → moai_adk-0.9.0.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,256 @@
1
+ # MoAI-ADK Project Templates
2
+
3
+ This directory contains template files that are copied to new projects when users run `moai-adk init`.
4
+
5
+ ## Directory Structure
6
+
7
+ ```
8
+ templates/
9
+ ├── .claude/ # Claude Code configuration
10
+ │ ├── agents/ # Alfred sub-agents (12 specialists)
11
+ │ ├── commands/ # Slash commands (/alfred:0-4)
12
+ │ ├── skills/ # 55 reusable knowledge capsules
13
+ │ └── hooks/ # Session lifecycle hooks
14
+ ├── .moai/ # MoAI-ADK configuration
15
+ │ ├── config.json # Project settings (language, mode, owner)
16
+ │ ├── docs/ # Internal documentation
17
+ │ ├── memory/ # Session context persistence
18
+ │ ├── reports/ # Quality and sync reports
19
+ │ └── specs/ # SPEC documents directory
20
+ ├── .github/ # GitHub Actions workflows
21
+ │ └── workflows/ # CI/CD automation
22
+ ├── CLAUDE.md # Project guidance for Claude Code
23
+ └── .gitignore # Git ignore patterns
24
+ ```
25
+
26
+ ---
27
+
28
+ ## Template Components
29
+
30
+ ### 1. `.claude/` - Claude Code Configuration (2.0 MB)
31
+
32
+ The complete Alfred SuperAgent system:
33
+
34
+ - **Agents** (12 specialists): spec-builder, tdd-implementer, doc-syncer, tag-agent, trust-checker, debug-helper, implementation-planner, project-manager, quality-gate, git-manager, cc-manager, skill-factory
35
+ - **Commands** (4 workflow commands): `/alfred:0-project`, `/alfred:1-plan`, `/alfred:2-run`, `/alfred:3-sync`
36
+ - **Skills** (55 knowledge capsules): Foundation (5), Essentials (4), Alfred (7), Domain (7), Language (18), CC (14)
37
+ - **Hooks**: SessionStart, PreToolUse, PostToolUse lifecycle guards
38
+
39
+ ### 2. `.moai/` - MoAI-ADK Configuration (120 KB)
40
+
41
+ Project configuration and memory:
42
+
43
+ - **config.json**: Language settings, project owner, team mode
44
+ - **memory/**: Persistent session context and state
45
+ - **docs/**: Internal guides and strategies
46
+ - **reports/**: Sync analysis and quality reports
47
+ - **specs/**: SPEC document directory structure
48
+
49
+ ### 3. `.github/` - GitHub Workflows (80 KB)
50
+
51
+ Continuous integration and deployment:
52
+
53
+ - **workflows/**: Pre-configured GitHub Actions for testing, linting, type checking
54
+ - **ISSUE_TEMPLATE/**: Standard issue templates
55
+
56
+ ### 4. `CLAUDE.md` - Project Guidance (15 KB)
57
+
58
+ The master instruction document for Claude Code:
59
+
60
+ - **Variable substitution**: `{{PROJECT_OWNER}}`, `{{CONVERSATION_LANGUAGE}}`, `{{CODEBASE_LANGUAGE}}`
61
+ - **Customizable**: User-facing project instructions in user's language
62
+
63
+ ---
64
+
65
+ ## How Templates Are Used
66
+
67
+ ### Initialization Flow
68
+
69
+ When a user runs `moai-adk init`, the `TemplateProcessor` class performs:
70
+
71
+ 1. **Template Discovery**: Locates `src/moai_adk/templates/` via package path resolution
72
+ 2. **Directory Copy**: Copies `.claude/`, `.moai/`, `.github/` to target project
73
+ 3. **File Copy**: Copies `CLAUDE.md`, `.gitignore` individually
74
+ 4. **Variable Substitution**: Replaces template placeholders with user values:
75
+ - `{{PROJECT_OWNER}}` → User's configured name
76
+ - `{{CONVERSATION_LANGUAGE}}` → User's language (Korean, Japanese, etc.)
77
+ - `{{CONVERSATION_LANGUAGE_NAME}}` → Language display name
78
+ - `{{CODEBASE_LANGUAGE}}` → Detected or specified project language
79
+
80
+ ### Current Template Processor Logic
81
+
82
+ **File**: `src/moai_adk/core/template/processor.py`
83
+
84
+ **Methods**:
85
+ - `_copy_claude()`: Copy Alfred system (agents, commands, skills, hooks)
86
+ - `_copy_moai()`: Copy MoAI-ADK configuration and structure
87
+ - `_copy_github()`: Copy GitHub Actions workflows
88
+ - `_copy_claude_md()`: Copy and substitute variables in CLAUDE.md
89
+ - `_copy_gitignore()`: Copy Git ignore patterns
90
+
91
+ ---
92
+
93
+ ## @TAG System & Traceability
94
+
95
+ ### What Are @TAG Markers?
96
+
97
+ **@TAG markers** are MoAI-ADK's core traceability feature, linking:
98
+ - `@SPEC:ID` → Requirements
99
+ - `@TEST:ID` → Test cases
100
+ - `@CODE:ID` → Implementation
101
+ - `@DOC:ID` → Documentation
102
+
103
+ **Example**:
104
+ ```python
105
+ # @CODE:AUTH-001 | SPEC: SPEC-AUTH-001/spec.md | Chain: AUTH-001
106
+ def authenticate_user(username, password):
107
+ """Authenticate user credentials (SPEC-AUTH-001)."""
108
+ # Implementation...
109
+ ```
110
+
111
+ ### How @TAGs Work in New Projects
112
+
113
+ **Day 1**: Your project starts with **0 @TAGs**
114
+ - No setup required, no validation needed
115
+ - Tags are created automatically via Alfred commands
116
+
117
+ **Day 30**: Tags grow naturally
118
+ - `/alfred:1-plan "User auth"` → creates `@SPEC:AUTH-001`
119
+ - `/alfred:2-run SPEC-AUTH-001` → creates `@TEST:AUTH-001`, `@CODE:AUTH-001`
120
+ - `/alfred:3-sync` → creates `@DOC:AUTH-001`
121
+
122
+ **Simple & Automatic**: @TAGs are added by Alfred agents, not by you.
123
+
124
+ ### TAG Validation (Advanced, Optional)
125
+
126
+ **MoAI-ADK framework** uses TAG validation (82 files, complex chains)
127
+ **Your new project** does NOT need TAG validation
128
+
129
+ **When you might want TAG validation**:
130
+ - Project has 100+ TAGs
131
+ - Team has 10+ developers
132
+ - Need automated quality gates
133
+
134
+ **How to add TAG validation** (if needed):
135
+ - See MoAI-ADK documentation: "Advanced: TAG Validation Setup"
136
+ - Manual installation from framework source
137
+ - Optional plugin (future): `moai-adk plugin install tag-validation`
138
+
139
+ ---
140
+
141
+ ## Maintenance Guidelines
142
+
143
+ ### Syncing Skills to Templates
144
+
145
+ **Script**: `scripts/sync_allowed_tools.py` (Korean)
146
+
147
+ This script synchronizes `.claude/skills/` to `src/moai_adk/templates/.claude/skills/` to ensure new projects receive the latest skill versions.
148
+
149
+ **When to run**:
150
+ - After adding new skills
151
+ - After updating existing skill content
152
+ - Before releasing a new version
153
+
154
+ ### Template Versioning
155
+
156
+ Templates are versioned with the MoAI-ADK package. When releasing:
157
+
158
+ 1. Update template files in `src/moai_adk/templates/`
159
+ 2. Run skill sync script
160
+ 3. Update this README if structure changes
161
+ 4. Test with `moai-adk init` on a clean directory
162
+ 5. Document breaking changes in CHANGELOG.md
163
+
164
+ ### Testing Template Changes
165
+
166
+ **Integration tests**: `tests/integration/test_phase_executor.py`
167
+
168
+ ```bash
169
+ # Test project initialization
170
+ pytest tests/integration/test_phase_executor.py::test_phase_0_initialization
171
+
172
+ # Test full workflow
173
+ pytest tests/e2e/test_e2e_workflow.py
174
+ ```
175
+
176
+ ---
177
+
178
+ ## Related Documentation
179
+
180
+ - **CLAUDE.md**: Main project guidance (repository root)
181
+ - **CLAUDE-AGENTS-GUIDE.md**: Alfred team structure (repository root)
182
+ - **CLAUDE-RULES.md**: Development rules and conventions (repository root)
183
+ - **Language Configuration**: `.moai/memory/language-config-schema.md`
184
+
185
+ ---
186
+
187
+ ## FAQ
188
+
189
+ ### Q: What is the difference between MoAI-ADK framework and user projects?
190
+
191
+ **A**:
192
+ - **MoAI-ADK framework** = The tool itself (this repository, needs complex validation)
193
+ - **User projects** = Projects created by `moai-adk init` (your apps, simple start)
194
+
195
+ Think of it like Ruby on Rails:
196
+ - Rails framework has complex CI/CD infrastructure
197
+ - `rails new my-app` creates a simple, clean project
198
+
199
+ ### Q: Will my project have @TAG markers?
200
+
201
+ **A**: Yes! @TAG markers are **automatic and core** to MoAI-ADK workflow:
202
+ - Created automatically by `/alfred:1-plan`, `/alfred:2-run`, `/alfred:3-sync`
203
+ - Provide traceability (link requirements → tests → code → docs)
204
+ - No validation needed for small/medium projects (simple grep is enough)
205
+
206
+ ### Q: When do I need TAG validation?
207
+
208
+ **A**: Only for **mature, large-scale projects**:
209
+ - 100+ SPEC documents
210
+ - 10+ team members
211
+ - Complex TAG chains requiring automated integrity checks
212
+
213
+ For most projects, @TAG markers alone are sufficient.
214
+
215
+ ### Q: Will old projects break when templates are updated?
216
+
217
+ **A**: No. Templates only affect **new** projects created via `moai-adk init`. Existing projects are not modified unless explicitly updated via `moai-adk update`.
218
+
219
+ ### Q: How do I customize templates for my organization?
220
+
221
+ **A**: Fork MoAI-ADK and modify files in `src/moai_adk/templates/`. Maintain your fork's template sync script to merge upstream updates.
222
+
223
+ ---
224
+
225
+ ## Design Philosophy
226
+
227
+ ### Framework vs User Projects
228
+
229
+ **What MoAI-ADK framework needs** (this repository):
230
+ - ✅ Complex TAG validation (82 files, orphan/duplicate detection)
231
+ - ✅ Advanced CI/CD workflows
232
+ - ✅ Quality gates for framework development
233
+
234
+ **What new user projects need** (`moai-adk init`):
235
+ - ✅ Alfred SuperAgent (workflow orchestration)
236
+ - ✅ @TAG markers (traceability)
237
+ - ✅ Basic CI/CD (testing, linting)
238
+ - ❌ NO complex TAG validation (not needed until project matures)
239
+
240
+ **Goal**: Start simple, grow as needed.
241
+
242
+ ---
243
+
244
+ ## Change History
245
+
246
+ | Date | Version | Changes |
247
+ |------|---------|---------|
248
+ | 2025-10-29 | 0.8.3 | Removed TAG validation system from templates (design clarification) |
249
+ | 2025-10-29 | 0.7.0 | Language localization complete (5 languages supported) |
250
+ | 2025-10-16 | 0.6.0 | Initial template structure with Alfred system |
251
+
252
+ ---
253
+
254
+ **Last Updated**: 2025-10-29
255
+ **Maintained By**: MoAI-ADK Core Team
256
+ **Design Principle**: Start simple, scale as needed