moai-adk 0.8.0__py3-none-any.whl → 0.8.2__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/cli/commands/update.py +15 -4
- moai_adk/core/issue_creator.py +309 -0
- moai_adk/core/tags/__init__.py +87 -0
- moai_adk/core/tags/ci_validator.py +435 -0
- moai_adk/core/tags/cli.py +283 -0
- moai_adk/core/tags/generator.py +109 -0
- moai_adk/core/tags/inserter.py +99 -0
- moai_adk/core/tags/mapper.py +126 -0
- moai_adk/core/tags/parser.py +76 -0
- moai_adk/core/tags/pre_commit_validator.py +355 -0
- moai_adk/core/tags/reporter.py +959 -0
- moai_adk/core/tags/tags.py +149 -0
- moai_adk/core/tags/validator.py +897 -0
- moai_adk/core/template_engine.py +253 -0
- moai_adk/templates/.claude/agents/alfred/cc-manager.md +25 -2
- moai_adk/templates/.claude/agents/alfred/debug-helper.md +24 -12
- moai_adk/templates/.claude/agents/alfred/doc-syncer.md +19 -12
- moai_adk/templates/.claude/agents/alfred/git-manager.md +45 -14
- moai_adk/templates/.claude/agents/alfred/implementation-planner.md +19 -12
- moai_adk/templates/.claude/agents/alfred/project-manager.md +29 -2
- moai_adk/templates/.claude/agents/alfred/quality-gate.md +25 -2
- moai_adk/templates/.claude/agents/alfred/skill-factory.md +30 -2
- moai_adk/templates/.claude/agents/alfred/spec-builder.md +26 -11
- moai_adk/templates/.claude/agents/alfred/tag-agent.md +30 -8
- moai_adk/templates/.claude/agents/alfred/tdd-implementer.md +27 -12
- moai_adk/templates/.claude/agents/alfred/trust-checker.md +25 -2
- moai_adk/templates/.claude/commands/alfred/0-project.md +5 -0
- moai_adk/templates/.claude/commands/alfred/1-plan.md +17 -4
- moai_adk/templates/.claude/commands/alfred/2-run.md +7 -0
- moai_adk/templates/.claude/commands/alfred/3-sync.md +6 -0
- moai_adk/templates/.claude/commands/alfred/9-feedback.md +149 -0
- moai_adk/templates/.claude/hooks/alfred/.moai/cache/version-check.json +9 -0
- moai_adk/templates/.claude/hooks/alfred/README.md +258 -145
- moai_adk/templates/.claude/hooks/alfred/TROUBLESHOOTING.md +471 -0
- moai_adk/templates/.claude/hooks/alfred/alfred_hooks.py +92 -57
- moai_adk/templates/.claude/hooks/alfred/core/version_cache.py +198 -0
- moai_adk/templates/.claude/hooks/alfred/notification__handle_events.py +102 -0
- moai_adk/templates/.claude/hooks/alfred/post_tool__log_changes.py +102 -0
- moai_adk/templates/.claude/hooks/alfred/pre_tool__auto_checkpoint.py +108 -0
- moai_adk/templates/.claude/hooks/alfred/session_end__cleanup.py +102 -0
- moai_adk/templates/.claude/hooks/alfred/session_start__show_project_info.py +102 -0
- moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/project.py +271 -15
- moai_adk/templates/.claude/hooks/alfred/shared/core/version_cache.py +198 -0
- moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/session.py +21 -7
- moai_adk/templates/.claude/hooks/alfred/stop__handle_interrupt.py +102 -0
- moai_adk/templates/.claude/hooks/alfred/subagent_stop__handle_subagent_end.py +102 -0
- moai_adk/templates/.claude/hooks/alfred/user_prompt__jit_load_docs.py +120 -0
- moai_adk/templates/.claude/settings.json +5 -5
- moai_adk/templates/.claude/skills/moai-foundation-ears/SKILL.md +9 -6
- moai_adk/templates/.claude/skills/moai-spec-authoring/README.md +56 -56
- moai_adk/templates/.claude/skills/moai-spec-authoring/SKILL.md +101 -100
- moai_adk/templates/.claude/skills/moai-spec-authoring/examples/validate-spec.sh +3 -3
- moai_adk/templates/.claude/skills/moai-spec-authoring/examples.md +219 -219
- moai_adk/templates/.claude/skills/moai-spec-authoring/reference.md +287 -287
- moai_adk/templates/.github/ISSUE_TEMPLATE/spec.yml +6 -6
- moai_adk/templates/.github/PULL_REQUEST_TEMPLATE.md +1 -1
- moai_adk/templates/.github/workflows/moai-gitflow.yml +22 -16
- moai_adk/templates/.github/workflows/moai-release-create.yml +100 -0
- moai_adk/templates/.github/workflows/moai-release-pipeline.yml +182 -0
- moai_adk/templates/.github/workflows/release.yml +49 -0
- moai_adk/templates/.github/workflows/spec-issue-sync.yml +10 -6
- moai_adk/templates/.github/workflows/tag-report.yml +261 -0
- moai_adk/templates/.github/workflows/tag-validation.yml +176 -0
- moai_adk/templates/.moai/config.json +18 -1
- moai_adk/templates/.moai/docs/quick-issue-creation-guide.md +219 -0
- moai_adk/templates/.moai/hooks/install.sh +79 -0
- moai_adk/templates/.moai/hooks/pre-commit.sh +66 -0
- moai_adk/templates/.moai/memory/ISSUE-LABEL-MAPPING.md +150 -0
- moai_adk/templates/CLAUDE.md +39 -40
- moai_adk/templates/src/moai_adk/core/__init__.py +5 -0
- moai_adk/templates/src/moai_adk/core/tags/__init__.py +87 -0
- moai_adk/templates/src/moai_adk/core/tags/ci_validator.py +435 -0
- moai_adk/templates/src/moai_adk/core/tags/cli.py +283 -0
- moai_adk/templates/src/moai_adk/core/tags/pre_commit_validator.py +355 -0
- moai_adk/templates/src/moai_adk/core/tags/reporter.py +959 -0
- moai_adk/templates/src/moai_adk/core/tags/validator.py +897 -0
- {moai_adk-0.8.0.dist-info → moai_adk-0.8.2.dist-info}/METADATA +348 -1
- {moai_adk-0.8.0.dist-info → moai_adk-0.8.2.dist-info}/RECORD +89 -52
- moai_adk/templates/.claude/hooks/alfred/HOOK_SCHEMA_VALIDATION.md +0 -313
- moai_adk/templates/.claude/hooks/alfred/test_hook_output.py +0 -175
- moai_adk/templates/.moai/memory/config-schema.md +0 -444
- moai_adk/templates/.moai/memory/gitflow-protection-policy.md +0 -220
- moai_adk/templates/.moai/memory/spec-metadata.md +0 -356
- /moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/__init__.py +0 -0
- /moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/checkpoint.py +0 -0
- /moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/context.py +0 -0
- /moai_adk/templates/.claude/hooks/alfred/{core → shared/core}/tags.py +0 -0
- /moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/__init__.py +0 -0
- /moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/notification.py +0 -0
- /moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/tool.py +0 -0
- /moai_adk/templates/.claude/hooks/alfred/{handlers → shared/handlers}/user.py +0 -0
- {moai_adk-0.8.0.dist-info → moai_adk-0.8.2.dist-info}/WHEEL +0 -0
- {moai_adk-0.8.0.dist-info → moai_adk-0.8.2.dist-info}/entry_points.txt +0 -0
- {moai_adk-0.8.0.dist-info → moai_adk-0.8.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# @CODE:DOC-TAG-004 | Component 1: Pre-commit hook installer
|
|
3
|
+
#
|
|
4
|
+
# This script installs the TAG validation pre-commit hook into .git/hooks/
|
|
5
|
+
#
|
|
6
|
+
# Usage:
|
|
7
|
+
# ./install.sh # Install hook
|
|
8
|
+
# ./install.sh --uninstall # Remove hook
|
|
9
|
+
|
|
10
|
+
set -e
|
|
11
|
+
|
|
12
|
+
# Colors
|
|
13
|
+
GREEN='\033[0;32m'
|
|
14
|
+
YELLOW='\033[1;33m'
|
|
15
|
+
RED='\033[0;31m'
|
|
16
|
+
NC='\033[0m'
|
|
17
|
+
|
|
18
|
+
# Get repository root
|
|
19
|
+
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || echo ".")
|
|
20
|
+
HOOK_SOURCE="${REPO_ROOT}/.moai/hooks/pre-commit.sh"
|
|
21
|
+
HOOK_TARGET="${REPO_ROOT}/.git/hooks/pre-commit"
|
|
22
|
+
|
|
23
|
+
# Function to install hook
|
|
24
|
+
install_hook() {
|
|
25
|
+
echo "🔧 Installing TAG validation pre-commit hook..."
|
|
26
|
+
|
|
27
|
+
# Check if source exists
|
|
28
|
+
if [ ! -f "$HOOK_SOURCE" ]; then
|
|
29
|
+
echo -e "${RED}Error: Hook source not found at $HOOK_SOURCE${NC}"
|
|
30
|
+
exit 1
|
|
31
|
+
fi
|
|
32
|
+
|
|
33
|
+
# Check if target already exists
|
|
34
|
+
if [ -f "$HOOK_TARGET" ]; then
|
|
35
|
+
echo -e "${YELLOW}Warning: Pre-commit hook already exists.${NC}"
|
|
36
|
+
echo "Backing up existing hook to ${HOOK_TARGET}.backup"
|
|
37
|
+
cp "$HOOK_TARGET" "${HOOK_TARGET}.backup"
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
# Create .git/hooks directory if it doesn't exist
|
|
41
|
+
mkdir -p "$(dirname "$HOOK_TARGET")"
|
|
42
|
+
|
|
43
|
+
# Copy hook
|
|
44
|
+
cp "$HOOK_SOURCE" "$HOOK_TARGET"
|
|
45
|
+
chmod +x "$HOOK_TARGET"
|
|
46
|
+
|
|
47
|
+
echo -e "${GREEN}✓ Pre-commit hook installed successfully!${NC}"
|
|
48
|
+
echo ""
|
|
49
|
+
echo "The hook will now validate TAG annotations on every commit."
|
|
50
|
+
echo ""
|
|
51
|
+
echo "To uninstall: $0 --uninstall"
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
# Function to uninstall hook
|
|
55
|
+
uninstall_hook() {
|
|
56
|
+
echo "🔧 Uninstalling TAG validation pre-commit hook..."
|
|
57
|
+
|
|
58
|
+
if [ ! -f "$HOOK_TARGET" ]; then
|
|
59
|
+
echo -e "${YELLOW}No pre-commit hook installed.${NC}"
|
|
60
|
+
exit 0
|
|
61
|
+
fi
|
|
62
|
+
|
|
63
|
+
# Check if backup exists
|
|
64
|
+
if [ -f "${HOOK_TARGET}.backup" ]; then
|
|
65
|
+
echo "Restoring backup..."
|
|
66
|
+
mv "${HOOK_TARGET}.backup" "$HOOK_TARGET"
|
|
67
|
+
echo -e "${GREEN}✓ Backup restored.${NC}"
|
|
68
|
+
else
|
|
69
|
+
rm "$HOOK_TARGET"
|
|
70
|
+
echo -e "${GREEN}✓ Pre-commit hook removed.${NC}"
|
|
71
|
+
fi
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
# Parse command line arguments
|
|
75
|
+
if [ "$1" = "--uninstall" ]; then
|
|
76
|
+
uninstall_hook
|
|
77
|
+
else
|
|
78
|
+
install_hook
|
|
79
|
+
fi
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# @CODE:DOC-TAG-004 | Component 1: Pre-commit hook for TAG validation
|
|
3
|
+
#
|
|
4
|
+
# This hook validates TAG annotations in staged files before commit.
|
|
5
|
+
# It checks:
|
|
6
|
+
# - TAG format (@DOC:DOMAIN-TYPE-NNN)
|
|
7
|
+
# - Duplicate TAG detection
|
|
8
|
+
# - Orphan TAG detection (warnings only)
|
|
9
|
+
#
|
|
10
|
+
# Exit codes:
|
|
11
|
+
# 0 - Validation passed
|
|
12
|
+
# 1 - Validation failed (duplicates or format errors)
|
|
13
|
+
|
|
14
|
+
set -e # Exit on error
|
|
15
|
+
|
|
16
|
+
# Colors for output
|
|
17
|
+
RED='\033[0;31m'
|
|
18
|
+
GREEN='\033[0;32m'
|
|
19
|
+
YELLOW='\033[1;33m'
|
|
20
|
+
NC='\033[0m' # No Color
|
|
21
|
+
|
|
22
|
+
# Get repository root
|
|
23
|
+
REPO_ROOT=$(git rev-parse --show-toplevel)
|
|
24
|
+
|
|
25
|
+
# Check if Python module is available
|
|
26
|
+
if ! python3 -c "import moai_adk.core.tags.pre_commit_validator" 2>/dev/null; then
|
|
27
|
+
echo -e "${YELLOW}Warning: moai_adk TAG validator not found.${NC}"
|
|
28
|
+
echo "Skipping TAG validation. Install moai_adk to enable validation."
|
|
29
|
+
exit 0
|
|
30
|
+
fi
|
|
31
|
+
|
|
32
|
+
# Get staged files
|
|
33
|
+
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM)
|
|
34
|
+
|
|
35
|
+
if [ -z "$STAGED_FILES" ]; then
|
|
36
|
+
echo -e "${GREEN}No staged files to validate.${NC}"
|
|
37
|
+
exit 0
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
echo "🔍 Validating TAG annotations in staged files..."
|
|
41
|
+
|
|
42
|
+
# Run TAG validation
|
|
43
|
+
# Pass staged files as arguments to validator
|
|
44
|
+
python3 -m moai_adk.core.tags.pre_commit_validator \
|
|
45
|
+
--files $STAGED_FILES
|
|
46
|
+
|
|
47
|
+
VALIDATION_RESULT=$?
|
|
48
|
+
|
|
49
|
+
# Check result
|
|
50
|
+
if [ $VALIDATION_RESULT -eq 0 ]; then
|
|
51
|
+
echo -e "${GREEN}✓ TAG validation passed.${NC}"
|
|
52
|
+
exit 0
|
|
53
|
+
else
|
|
54
|
+
echo -e "${RED}✗ TAG validation failed.${NC}"
|
|
55
|
+
echo ""
|
|
56
|
+
echo "Commit blocked due to TAG validation errors."
|
|
57
|
+
echo ""
|
|
58
|
+
echo "To fix:"
|
|
59
|
+
echo " 1. Fix duplicate TAGs or format errors shown above"
|
|
60
|
+
echo " 2. Stage your changes with 'git add'"
|
|
61
|
+
echo " 3. Try committing again"
|
|
62
|
+
echo ""
|
|
63
|
+
echo "To skip this validation (not recommended):"
|
|
64
|
+
echo " git commit --no-verify"
|
|
65
|
+
exit 1
|
|
66
|
+
fi
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# 📌 GitHub Issue Label Mapping Configuration
|
|
2
|
+
|
|
3
|
+
> **MoAI-ADK Label Management** - Centralized configuration for issue type labels and priority indicators
|
|
4
|
+
|
|
5
|
+
**Version**: 1.0.0
|
|
6
|
+
**Related**: `/alfred:9-feedback`
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 🏷️ Issue Type Label Mapping
|
|
11
|
+
|
|
12
|
+
### Bug Issues (`--bug`)
|
|
13
|
+
|
|
14
|
+
**Primary Labels**: `bug`, `reported`
|
|
15
|
+
|
|
16
|
+
**Optional Labels** (based on priority):
|
|
17
|
+
- `priority-critical` - System down, data loss risk
|
|
18
|
+
- `priority-high` - Major feature broken
|
|
19
|
+
- `priority-medium` - Normal bug
|
|
20
|
+
- `priority-low` - Minor issue
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
### Feature Request Issues (`--feature`)
|
|
25
|
+
|
|
26
|
+
**Primary Labels**: `feature-request`, `enhancement`
|
|
27
|
+
|
|
28
|
+
**Optional Labels** (based on priority):
|
|
29
|
+
- `priority-critical` - Blocking, must implement immediately
|
|
30
|
+
- `priority-high` - Important feature
|
|
31
|
+
- `priority-medium` - Normal priority feature (default)
|
|
32
|
+
- `priority-low` - Nice to have
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
### Improvement Issues (`--improvement`)
|
|
37
|
+
|
|
38
|
+
**Primary Labels**: `improvement`, `enhancement`
|
|
39
|
+
|
|
40
|
+
**Optional Labels** (based on priority):
|
|
41
|
+
- `priority-critical` - Critical refactoring needed
|
|
42
|
+
- `priority-high` - Important improvement
|
|
43
|
+
- `priority-medium` - Normal priority (default)
|
|
44
|
+
- `priority-low` - Technical debt, can wait
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
### Question/Discussion Issues (`--question`)
|
|
49
|
+
|
|
50
|
+
**Primary Labels**: `question`, `help-wanted`
|
|
51
|
+
|
|
52
|
+
**Optional Labels** (based on priority):
|
|
53
|
+
- `priority-critical` - Urgent decision needed
|
|
54
|
+
- `priority-high` - Important decision
|
|
55
|
+
- `priority-medium` - Normal discussion (default)
|
|
56
|
+
- `priority-low` - Optional discussion
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## 🎯 Priority Emoji Mapping
|
|
61
|
+
|
|
62
|
+
| Priority | Emoji | Use Case |
|
|
63
|
+
|----------|-------|----------|
|
|
64
|
+
| Critical | 🔴 | System outage, data loss, security breach |
|
|
65
|
+
| High | 🟠 | Major feature broken, significant impact |
|
|
66
|
+
| Medium | 🟡 | Normal bugs/features (default) |
|
|
67
|
+
| Low | 🟢 | Minor issues, nice-to-have features |
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 🚀 Issue Type Emoji Mapping
|
|
72
|
+
|
|
73
|
+
| Type | Emoji | Description |
|
|
74
|
+
|------|-------|-------------|
|
|
75
|
+
| Bug | 🐛 | Defect or unexpected behavior |
|
|
76
|
+
| Feature | ✨ | New functionality or capability |
|
|
77
|
+
| Improvement | ⚡ | Code quality, performance, or design improvement |
|
|
78
|
+
| Question | ❓ | Question, discussion, or decision needed |
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## 🛠️ GitHub Labels Setup
|
|
83
|
+
|
|
84
|
+
To create labels in your GitHub repository, use GitHub CLI:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# Authenticate first
|
|
88
|
+
gh auth login
|
|
89
|
+
|
|
90
|
+
# Create bug labels
|
|
91
|
+
gh label create "bug" \
|
|
92
|
+
--description "Something isn't working" \
|
|
93
|
+
--color "d73a49"
|
|
94
|
+
|
|
95
|
+
gh label create "reported" \
|
|
96
|
+
--description "User-reported issue" \
|
|
97
|
+
--color "fc2929"
|
|
98
|
+
|
|
99
|
+
# Create feature labels
|
|
100
|
+
gh label create "feature-request" \
|
|
101
|
+
--description "New feature or request" \
|
|
102
|
+
--color "a2eeef"
|
|
103
|
+
|
|
104
|
+
gh label create "enhancement" \
|
|
105
|
+
--description "Improvement or enhancement" \
|
|
106
|
+
--color "0075ca"
|
|
107
|
+
|
|
108
|
+
# Create improvement label
|
|
109
|
+
gh label create "improvement" \
|
|
110
|
+
--description "Performance or code quality improvement" \
|
|
111
|
+
--color "5ebcf6"
|
|
112
|
+
|
|
113
|
+
# Create question labels
|
|
114
|
+
gh label create "question" \
|
|
115
|
+
--description "Question for discussion" \
|
|
116
|
+
--color "fbca04"
|
|
117
|
+
|
|
118
|
+
gh label create "help-wanted" \
|
|
119
|
+
--description "We need help with this" \
|
|
120
|
+
--color "fcfc03"
|
|
121
|
+
|
|
122
|
+
# Create priority labels
|
|
123
|
+
gh label create "priority-critical" \
|
|
124
|
+
--description "Critical priority - URGENT" \
|
|
125
|
+
--color "ff0000"
|
|
126
|
+
|
|
127
|
+
gh label create "priority-high" \
|
|
128
|
+
--description "High priority" \
|
|
129
|
+
--color "ff6600"
|
|
130
|
+
|
|
131
|
+
gh label create "priority-medium" \
|
|
132
|
+
--description "Medium priority" \
|
|
133
|
+
--color "ffcc00"
|
|
134
|
+
|
|
135
|
+
gh label create "priority-low" \
|
|
136
|
+
--description "Low priority" \
|
|
137
|
+
--color "00cc00"
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## ✨ Summary
|
|
143
|
+
|
|
144
|
+
This configuration enables:
|
|
145
|
+
- ✅ **Standardized issue labels** across all issue types
|
|
146
|
+
- ✅ **Priority indicators** with emoji for visual identification
|
|
147
|
+
- ✅ **Type emoji** for quick issue categorization
|
|
148
|
+
- ✅ **Automated label assignment** via `/alfred:9-feedback`
|
|
149
|
+
|
|
150
|
+
For more information, see `.moai/docs/quick-issue-creation-guide.md`
|
moai_adk/templates/CLAUDE.md
CHANGED
|
@@ -61,47 +61,43 @@ You are the SuperAgent **🎩 Alfred** of **🗿 MoAI-ADK**. Follow these core p
|
|
|
61
61
|
|
|
62
62
|
## 🌍 Alfred's Language Boundary Rule
|
|
63
63
|
|
|
64
|
-
Alfred operates with a **
|
|
64
|
+
Alfred operates with a **clear two-layer language architecture** to support global users while keeping the infrastructure in English:
|
|
65
65
|
|
|
66
|
-
### Layer 1: User Conversation
|
|
66
|
+
### Layer 1: User Conversation & Dynamic Content
|
|
67
67
|
**ALWAYS use user's `conversation_language` for ALL user-facing content:**
|
|
68
68
|
- 🗣️ **Responses to user**: User's configured language (Korean, Japanese, Spanish, etc.)
|
|
69
69
|
- 📝 **Explanations**: User's language
|
|
70
70
|
- ❓ **Questions to user**: User's language
|
|
71
71
|
- 💬 **All dialogue**: User's language
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
72
|
+
- 📄 **Generated documents**: User's language (SPEC, reports, analysis)
|
|
73
|
+
- 🔧 **Task prompts**: User's language (passed directly to Sub-agents)
|
|
74
|
+
- 📨 **Sub-agent communication**: User's language
|
|
75
|
+
|
|
76
|
+
### Layer 2: Static Infrastructure (English Only)
|
|
77
|
+
**MoAI-ADK package and templates stay in English:**
|
|
78
|
+
- `Skill("skill-name")` → **Skill names always English** (explicit invocation)
|
|
79
|
+
- `.claude/skills/` → **Skill content in English** (technical documentation standard)
|
|
80
|
+
- `.claude/agents/` → **Agent templates in English**
|
|
81
|
+
- `.claude/commands/` → **Command templates in English**
|
|
82
|
+
- Code comments → **English**
|
|
79
83
|
- Git commit messages → **English**
|
|
80
|
-
-
|
|
81
|
-
|
|
82
|
-
### Layer 3: Skills & Code
|
|
83
|
-
**Skills maintain English-only for infinite scalability:**
|
|
84
|
-
- Skill descriptions → **English only**
|
|
85
|
-
- Skill examples → **English only**
|
|
86
|
-
- Skill guides → **English only**
|
|
87
|
-
- Code comments → **English only**
|
|
88
|
-
- No multilingual versions needed! ✅
|
|
84
|
+
- @TAG identifiers → **English**
|
|
85
|
+
- Technical function/variable names → **English**
|
|
89
86
|
|
|
90
87
|
### Execution Flow Example
|
|
91
88
|
|
|
92
89
|
```
|
|
93
|
-
User Input (any language): "
|
|
90
|
+
User Input (any language): "코드 품질 검사해줘" / "Check code quality" / "コード品質をチェック"
|
|
94
91
|
↓
|
|
95
|
-
Alfred (
|
|
92
|
+
Alfred (passes directly): Task(prompt="코드 품질 검사...", subagent_type="trust-checker")
|
|
96
93
|
↓
|
|
97
|
-
|
|
98
|
-
subagent_type="trust-checker")
|
|
94
|
+
Sub-agent (receives Korean): Recognizes quality check task
|
|
99
95
|
↓
|
|
100
|
-
Sub-agent (
|
|
96
|
+
Sub-agent (explicit call): Skill("moai-foundation-trust") ✅
|
|
101
97
|
↓
|
|
102
|
-
|
|
98
|
+
Skill loads (English content): Sub-agent reads English Skill guidance
|
|
103
99
|
↓
|
|
104
|
-
|
|
100
|
+
Sub-agent generates output: Korean report based on user's language
|
|
105
101
|
↓
|
|
106
102
|
User Receives: Response in their configured language
|
|
107
103
|
```
|
|
@@ -109,23 +105,25 @@ User Receives: Response in their configured language
|
|
|
109
105
|
### Why This Pattern Works
|
|
110
106
|
|
|
111
107
|
1. **Scalability**: Support any language without modifying 55 Skills
|
|
112
|
-
2. **Maintainability**: Skills stay in English (single source of truth)
|
|
113
|
-
3. **Reliability**:
|
|
114
|
-
4. **
|
|
115
|
-
5. **Future-proof**: Add new languages instantly
|
|
108
|
+
2. **Maintainability**: Skills stay in English (single source of truth, industry standard for technical docs)
|
|
109
|
+
3. **Reliability**: **Explicit Skill() invocation** = 100% success rate (no keyword matching needed)
|
|
110
|
+
4. **Simplicity**: No translation layer overhead, direct language pass-through
|
|
111
|
+
5. **Future-proof**: Add new languages instantly without code changes
|
|
116
112
|
|
|
117
113
|
### Key Rules for Sub-agents
|
|
118
114
|
|
|
119
|
-
**All 12 Sub-agents
|
|
115
|
+
**All 12 Sub-agents work in user's configured language:**
|
|
120
116
|
|
|
121
117
|
| Sub-agent | Input Language | Output Language | Notes |
|
|
122
118
|
|-----------|---|---|---|
|
|
123
|
-
| spec-builder | **
|
|
124
|
-
| tdd-implementer | **
|
|
125
|
-
| doc-syncer | **
|
|
126
|
-
| implementation-planner | **
|
|
127
|
-
| debug-helper | **
|
|
128
|
-
| All others | **
|
|
119
|
+
| spec-builder | **User's language** | User's language | Invokes Skills explicitly: Skill("moai-foundation-ears") |
|
|
120
|
+
| tdd-implementer | **User's language** | User's language | Code comments in English, narratives in user's language |
|
|
121
|
+
| doc-syncer | **User's language** | User's language | Generated docs in user's language |
|
|
122
|
+
| implementation-planner | **User's language** | User's language | Architecture analysis in user's language |
|
|
123
|
+
| debug-helper | **User's language** | User's language | Error analysis in user's language |
|
|
124
|
+
| All others | **User's language** | User's language | Explicit Skill() invocation regardless of prompt language |
|
|
125
|
+
|
|
126
|
+
**CRITICAL**: Skills are invoked **explicitly** using `Skill("skill-name")` syntax, NOT auto-triggered by keywords.
|
|
129
127
|
|
|
130
128
|
---
|
|
131
129
|
|
|
@@ -305,10 +303,11 @@ Your project is ready. You can now run `/alfred:1-plan` to start planning specs.
|
|
|
305
303
|
- `.moai/memory/`
|
|
306
304
|
- `CLAUDE.md` (this file)
|
|
307
305
|
|
|
308
|
-
**Rationale**: These files define system behavior, tool invocations, and internal
|
|
309
|
-
1.
|
|
310
|
-
2. Global maintainability
|
|
311
|
-
3. Infinite
|
|
306
|
+
**Rationale**: These files define system behavior, tool invocations, and internal infrastructure. English ensures:
|
|
307
|
+
1. **Industry standard**: Technical documentation in English (single source of truth)
|
|
308
|
+
2. **Global maintainability**: No translation burden for 55 Skills, 12 agents, 4 commands
|
|
309
|
+
3. **Infinite scalability**: Support any user language without modifying infrastructure
|
|
310
|
+
4. **Reliable invocation**: Explicit Skill("name") calls work regardless of prompt language
|
|
312
311
|
|
|
313
312
|
---
|
|
314
313
|
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# @CODE:DOC-TAG-004 | TAG validation core module (Components 1, 2, 3 & 4)
|
|
3
|
+
"""TAG validation and management for MoAI-ADK
|
|
4
|
+
|
|
5
|
+
This module provides TAG validation functionality for:
|
|
6
|
+
- Pre-commit hook validation (Component 1)
|
|
7
|
+
- CI/CD pipeline validation (Component 2)
|
|
8
|
+
- Central validation system (Component 3)
|
|
9
|
+
- Documentation & Reporting (Component 4)
|
|
10
|
+
- TAG format checking
|
|
11
|
+
- Duplicate detection
|
|
12
|
+
- Orphan detection
|
|
13
|
+
- Chain integrity validation
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
# Component 1: Pre-commit validator
|
|
17
|
+
from .pre_commit_validator import (
|
|
18
|
+
PreCommitValidator,
|
|
19
|
+
ValidationResult,
|
|
20
|
+
ValidationError,
|
|
21
|
+
ValidationWarning,
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
# Component 2: CI/CD validator
|
|
25
|
+
from .ci_validator import CIValidator
|
|
26
|
+
|
|
27
|
+
# Component 3: Central validation system
|
|
28
|
+
from .validator import (
|
|
29
|
+
ValidationConfig,
|
|
30
|
+
TagValidator,
|
|
31
|
+
DuplicateValidator,
|
|
32
|
+
OrphanValidator,
|
|
33
|
+
ChainValidator,
|
|
34
|
+
FormatValidator,
|
|
35
|
+
CentralValidator,
|
|
36
|
+
CentralValidationResult,
|
|
37
|
+
ValidationIssue,
|
|
38
|
+
ValidationStatistics,
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
# Component 4: Documentation & Reporting
|
|
42
|
+
from .reporter import (
|
|
43
|
+
TagInventory,
|
|
44
|
+
TagMatrix,
|
|
45
|
+
InventoryGenerator,
|
|
46
|
+
MatrixGenerator,
|
|
47
|
+
CoverageAnalyzer,
|
|
48
|
+
StatisticsGenerator,
|
|
49
|
+
ReportFormatter,
|
|
50
|
+
ReportGenerator,
|
|
51
|
+
CoverageMetrics,
|
|
52
|
+
StatisticsReport,
|
|
53
|
+
ReportResult,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
__all__ = [
|
|
57
|
+
# Component 1
|
|
58
|
+
"PreCommitValidator",
|
|
59
|
+
"ValidationResult",
|
|
60
|
+
"ValidationError",
|
|
61
|
+
"ValidationWarning",
|
|
62
|
+
# Component 2
|
|
63
|
+
"CIValidator",
|
|
64
|
+
# Component 3
|
|
65
|
+
"ValidationConfig",
|
|
66
|
+
"TagValidator",
|
|
67
|
+
"DuplicateValidator",
|
|
68
|
+
"OrphanValidator",
|
|
69
|
+
"ChainValidator",
|
|
70
|
+
"FormatValidator",
|
|
71
|
+
"CentralValidator",
|
|
72
|
+
"CentralValidationResult",
|
|
73
|
+
"ValidationIssue",
|
|
74
|
+
"ValidationStatistics",
|
|
75
|
+
# Component 4
|
|
76
|
+
"TagInventory",
|
|
77
|
+
"TagMatrix",
|
|
78
|
+
"InventoryGenerator",
|
|
79
|
+
"MatrixGenerator",
|
|
80
|
+
"CoverageAnalyzer",
|
|
81
|
+
"StatisticsGenerator",
|
|
82
|
+
"ReportFormatter",
|
|
83
|
+
"ReportGenerator",
|
|
84
|
+
"CoverageMetrics",
|
|
85
|
+
"StatisticsReport",
|
|
86
|
+
"ReportResult",
|
|
87
|
+
]
|