@musashishao/agent-kit 1.9.0 → 1.9.1
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/.agent/agents/ai-asset-factory.md +700 -0
- package/.agent/agents/ai-audio-factory.md +503 -0
- package/.agent/agents/game-developer.md +4 -4
- package/.agent/agents/orchestrator.md +113 -3
- package/.agent/agents/project-planner.md +67 -0
- package/.agent/agents/unity-mobile-master.md +949 -0
- package/.agent/mcp/config/registry.json +65 -51
- package/.agent/mcp/servers/notebooklm/README.md +114 -0
- package/.agent/mcp/servers/notebooklm/package.json +35 -0
- package/.agent/mcp/servers/notebooklm/src/auth/chrome.ts +225 -0
- package/.agent/mcp/servers/notebooklm/src/auth/index.ts +1 -0
- package/.agent/mcp/servers/notebooklm/src/index.ts +516 -0
- package/.agent/mcp/servers/notebooklm/src/services/index.ts +3 -0
- package/.agent/mcp/servers/notebooklm/src/services/library.ts +217 -0
- package/.agent/mcp/servers/notebooklm/src/services/notebooklm.ts +380 -0
- package/.agent/mcp/servers/notebooklm/tsconfig.json +15 -0
- package/.agent/mcp-gateway/README.md +169 -20
- package/.agent/mcp-gateway/package.json +22 -7
- package/.agent/mcp-gateway/src/auth/index.ts +55 -0
- package/.agent/mcp-gateway/src/auth/middleware.ts +242 -0
- package/.agent/mcp-gateway/src/auth/oauth.ts +462 -0
- package/.agent/mcp-gateway/src/auth/scopes.ts +227 -0
- package/.agent/mcp-gateway/src/index.ts +252 -105
- package/.agent/mcp-gateway/src/observability/index.ts +5 -0
- package/.agent/mcp-gateway/src/observability/otel.ts +405 -0
- package/.agent/mcp-gateway/src/transports/index.ts +5 -0
- package/.agent/mcp-gateway/src/transports/streamableHttp.ts +235 -0
- package/.agent/rules/CODEX.md +89 -0
- package/.agent/rules/CODE_RULES.md +73 -0
- package/.agent/rules/GEMINI.md +25 -0
- package/.agent/rules/MEMORY_STATE.md +110 -0
- package/.agent/rules/REFERENCE.md +33 -141
- package/.agent/rules/REF_SKILLS.md +116 -0
- package/.agent/rules/REF_WORKFLOWS.md +81 -0
- package/.agent/scripts/ak_cli.py +106 -5
- package/.agent/scripts/memory_manager.py +48 -9
- package/.agent/skills/anti-hallucination/SKILL.md +295 -0
- package/.agent/skills/anti-hallucination/scripts/check_hallucination.py +299 -0
- package/.agent/skills/bifurcation-analysis/SKILL.md +56 -0
- package/.agent/skills/brainstorming/SKILL.md +80 -6
- package/.agent/skills/decision-memory/SKILL.md +317 -0
- package/.agent/skills/emergence-detector/SKILL.md +230 -0
- package/.agent/skills/emergence-detector/scripts/check_emergence.py +265 -0
- package/.agent/skills/explained-qa/SKILL.md +142 -0
- package/.agent/skills/explained-qa/game-terminology.md +214 -0
- package/.agent/skills/game-development/ai-dialogue-engine/SKILL.md +442 -0
- package/.agent/skills/game-development/ai-graphics-generator/SKILL.md +463 -0
- package/.agent/skills/game-development/ai-playtest-framework/SKILL.md +570 -0
- package/.agent/skills/game-development/camera-systems/SKILL.md +607 -0
- package/.agent/skills/game-development/card-battle-engine/SKILL.md +618 -0
- package/.agent/skills/game-development/character-controller-3d/SKILL.md +908 -0
- package/.agent/skills/game-development/cloud-save-sync/SKILL.md +527 -0
- package/.agent/skills/game-development/combat-system/SKILL.md +748 -0
- package/.agent/skills/game-development/compliance-rating/SKILL.md +277 -0
- package/.agent/skills/game-development/crossplatform-build/SKILL.md +386 -0
- package/.agent/skills/game-development/cultivation-progression/SKILL.md +520 -0
- package/.agent/skills/game-development/data-driven-balance/SKILL.md +535 -0
- package/.agent/skills/game-development/game-analytics-integrator/SKILL.md +410 -0
- package/.agent/skills/game-development/game-audio-advanced/SKILL.md +646 -0
- package/.agent/skills/game-development/game-economy-designer/SKILL.md +375 -0
- package/.agent/skills/game-development/game-marketing/SKILL.md +85 -0
- package/.agent/skills/game-development/game-state-manager/SKILL.md +883 -0
- package/.agent/skills/game-development/hybrid-game-spec/SKILL.md +220 -0
- package/.agent/skills/game-development/inventory-quest/SKILL.md +747 -0
- package/.agent/skills/game-development/liveops/SKILL.md +308 -0
- package/.agent/skills/game-development/localization/SKILL.md +286 -0
- package/.agent/skills/game-development/mobile-input-patterns/SKILL.md +343 -0
- package/.agent/skills/game-development/monetization-strategy/SKILL.md +94 -0
- package/.agent/skills/game-development/multiplayer-master/SKILL.md +727 -0
- package/.agent/skills/game-development/narrative-branching/SKILL.md +593 -0
- package/.agent/skills/game-development/procedural-level-ai/SKILL.md +367 -0
- package/.agent/skills/game-development/prototyping-rapid/SKILL.md +205 -0
- package/.agent/skills/game-development/spec-ecosystem/SKILL.md +155 -0
- package/.agent/skills/game-development/spec-ecosystem/decision-log-format.md +129 -0
- package/.agent/skills/game-development/spec-ecosystem/templates/PLAN-template.md +178 -0
- package/.agent/skills/game-development/spec-ecosystem/templates/SPEC-template.md +110 -0
- package/.agent/skills/game-development/spec-ecosystem/templates/TASKS-template.md +156 -0
- package/.agent/skills/game-development/survival-systems/SKILL.md +493 -0
- package/.agent/skills/game-development/testing-qa/SKILL.md +270 -0
- package/.agent/skills/game-development/unity-mobile-optimization/SKILL.md +271 -0
- package/.agent/skills/intent-capture/SKILL.md +65 -0
- package/.agent/skills/mcp-composition/SKILL.md +362 -0
- package/.agent/skills/mcp-observability/SKILL.md +323 -0
- package/.agent/skills/mcp-security/SKILL.md +314 -0
- package/.agent/skills/trust-spectrum/SKILL.md +291 -0
- package/.agent/skills/vibe-coding-guard/SKILL.md +328 -0
- package/.agent/templates/AGENTS.game.md +63 -0
- package/.agent/templates/docs/WORKFLOW_GUIDE.en.md +100 -0
- package/.agent/templates/docs/WORKFLOW_GUIDE.vi.md +100 -0
- package/.agent/workflows/ai-agent.md +2 -0
- package/.agent/workflows/autofix.md +1 -0
- package/.agent/workflows/brainstorm.md +1 -0
- package/.agent/workflows/context.md +1 -0
- package/.agent/workflows/create.md +39 -8
- package/.agent/workflows/dashboard.md +1 -0
- package/.agent/workflows/debug.md +14 -0
- package/.agent/workflows/deploy.md +14 -0
- package/.agent/workflows/enhance.md +44 -0
- package/.agent/workflows/gamekit-init.md +177 -0
- package/.agent/workflows/gamekit-launch.md +338 -0
- package/.agent/workflows/gamekit-plan.md +204 -0
- package/.agent/workflows/gamekit-qa.md +153 -0
- package/.agent/workflows/gamekit-spec.md +243 -0
- package/.agent/workflows/gamekit-tasks.md +208 -0
- package/.agent/workflows/marketing.md +2 -0
- package/.agent/workflows/next.md +1 -0
- package/.agent/workflows/orchestrate.md +12 -0
- package/.agent/workflows/pentest.md +2 -0
- package/.agent/workflows/plan.md +42 -0
- package/.agent/workflows/preview.md +1 -0
- package/.agent/workflows/quality.md +1 -0
- package/.agent/workflows/saas.md +2 -0
- package/.agent/workflows/spec.md +42 -0
- package/.agent/workflows/status.md +1 -0
- package/.agent/workflows/test.md +14 -0
- package/.agent/workflows/ui-ux-pro-max.md +1 -0
- package/bin/cli.js +411 -111
- package/package.json +1 -2
- package/.agent/agents/game-asset-curator.md +0 -317
- package/.agent/agents/game-narrative-designer.md +0 -310
- package/.agent/agents/game-qa-agent.md +0 -441
- package/.agent/workflows/game-prototype.md +0 -154
- package/docs/AI_DATA_INFRASTRUCTURE.md +0 -288
- package/docs/CHANGELOG_AI_INFRA.md +0 -141
- package/docs/MIGRATION_GUIDE_V1.9.md +0 -55
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hybrid-game-spec
|
|
3
|
+
description: Templates và hướng dẫn tạo Macro Spec cho game phức tạp. Bao gồm SPEC-architecture và SCHEMA-data patterns.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Hybrid Game Spec Skill
|
|
7
|
+
|
|
8
|
+
> **Purpose**: Cung cấp templates và nguyên tắc để tạo "Macro Spec" cho game trước khi code.
|
|
9
|
+
|
|
10
|
+
## Khi Nào Sử Dụng
|
|
11
|
+
- Bắt đầu dự án game phức tạp (3+ systems)
|
|
12
|
+
- Khi cần định nghĩa architecture trước khi phát triển
|
|
13
|
+
- Khi muốn nhiều agents làm việc song song
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 1. SPEC-architecture.md Template
|
|
18
|
+
|
|
19
|
+
Template đầy đủ tại: [SPEC-architecture-template.md](./templates/SPEC-architecture-template.md)
|
|
20
|
+
|
|
21
|
+
### Nội dung bắt buộc:
|
|
22
|
+
|
|
23
|
+
| Section | Mô tả |
|
|
24
|
+
|---------|-------|
|
|
25
|
+
| **Event Bus** | Liệt kê TẤT CẢ game events (OnPlayerHurt, OnScoreChanged...) |
|
|
26
|
+
| **Manager Sequence** | Thứ tự khởi tạo Singletons |
|
|
27
|
+
| **Save System** | Contract cho save/load data |
|
|
28
|
+
| **Input Abstraction** | Interface cho touch/keyboard |
|
|
29
|
+
|
|
30
|
+
### Event Bus Pattern
|
|
31
|
+
|
|
32
|
+
```csharp
|
|
33
|
+
// GameEvents.cs - Static event bus
|
|
34
|
+
public static class GameEvents
|
|
35
|
+
{
|
|
36
|
+
// Core Events
|
|
37
|
+
public static event Action<int> OnScoreChanged;
|
|
38
|
+
public static event Action<int> OnHealthChanged;
|
|
39
|
+
public static event Action OnPlayerDied;
|
|
40
|
+
public static event Action<int> OnLevelComplete;
|
|
41
|
+
|
|
42
|
+
// UI Events
|
|
43
|
+
public static event Action OnPauseRequested;
|
|
44
|
+
public static event Action OnResumeRequested;
|
|
45
|
+
|
|
46
|
+
// Economy Events
|
|
47
|
+
public static event Action<int> OnCoinCollected;
|
|
48
|
+
public static event Action<string, int> OnItemPurchased;
|
|
49
|
+
|
|
50
|
+
// Invocation helpers
|
|
51
|
+
public static void ScoreChanged(int score) => OnScoreChanged?.Invoke(score);
|
|
52
|
+
public static void PlayerDied() => OnPlayerDied?.Invoke();
|
|
53
|
+
|
|
54
|
+
// Cleanup (call on scene unload)
|
|
55
|
+
public static void ClearAll()
|
|
56
|
+
{
|
|
57
|
+
OnScoreChanged = null;
|
|
58
|
+
OnHealthChanged = null;
|
|
59
|
+
OnPlayerDied = null;
|
|
60
|
+
// ... clear all
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 2. SCHEMA-data.md Template
|
|
68
|
+
|
|
69
|
+
Template đầy đủ tại: [SCHEMA-data-template.md](./templates/SCHEMA-data-template.md)
|
|
70
|
+
|
|
71
|
+
### Nguyên Tắc ScriptableObject
|
|
72
|
+
|
|
73
|
+
| Rule | Lý Do |
|
|
74
|
+
|------|-------|
|
|
75
|
+
| **Mọi số balance phải trong SO** | AI có thể sửa .asset mà không làm hỏng logic |
|
|
76
|
+
| **Nested structs cho complex data** | Tổ chức rõ ràng |
|
|
77
|
+
| **[CreateAssetMenu] attribute** | Dễ tạo asset trong Editor |
|
|
78
|
+
| **Default values có ý nghĩa** | Game chạy được ngay cả khi chưa tune |
|
|
79
|
+
|
|
80
|
+
### ScriptableObject Patterns
|
|
81
|
+
|
|
82
|
+
```csharp
|
|
83
|
+
// CharacterData.cs
|
|
84
|
+
[CreateAssetMenu(fileName = "CharacterData", menuName = "Game/Data/Character")]
|
|
85
|
+
public class CharacterData : ScriptableObject
|
|
86
|
+
{
|
|
87
|
+
[Header("Movement")]
|
|
88
|
+
public float MoveSpeed = 5f;
|
|
89
|
+
public float JumpForce = 10f;
|
|
90
|
+
public float Gravity = 2f;
|
|
91
|
+
|
|
92
|
+
[Header("Combat")]
|
|
93
|
+
public int MaxHealth = 100;
|
|
94
|
+
public int AttackDamage = 10;
|
|
95
|
+
public float AttackCooldown = 0.5f;
|
|
96
|
+
|
|
97
|
+
[Header("Progression")]
|
|
98
|
+
public AnimationCurve LevelUpCurve;
|
|
99
|
+
public int BaseXP = 100;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// EnemyData.cs
|
|
103
|
+
[CreateAssetMenu(fileName = "EnemyData", menuName = "Game/Data/Enemy")]
|
|
104
|
+
public class EnemyData : ScriptableObject
|
|
105
|
+
{
|
|
106
|
+
public string EnemyName;
|
|
107
|
+
public Sprite Icon;
|
|
108
|
+
|
|
109
|
+
[Header("Stats")]
|
|
110
|
+
public int Health = 50;
|
|
111
|
+
public int Damage = 10;
|
|
112
|
+
public float MoveSpeed = 3f;
|
|
113
|
+
|
|
114
|
+
[Header("Behavior")]
|
|
115
|
+
public float DetectionRange = 5f;
|
|
116
|
+
public float AttackRange = 1.5f;
|
|
117
|
+
public float PatrolSpeed = 2f;
|
|
118
|
+
|
|
119
|
+
[Header("Drops")]
|
|
120
|
+
public int MinCoinDrop = 5;
|
|
121
|
+
public int MaxCoinDrop = 15;
|
|
122
|
+
public float DropChance = 0.3f;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// LevelConfig.cs
|
|
126
|
+
[CreateAssetMenu(fileName = "Level_01", menuName = "Game/Data/Level")]
|
|
127
|
+
public class LevelConfig : ScriptableObject
|
|
128
|
+
{
|
|
129
|
+
public int LevelNumber;
|
|
130
|
+
public string LevelName;
|
|
131
|
+
public string SceneName;
|
|
132
|
+
|
|
133
|
+
[Header("Difficulty")]
|
|
134
|
+
public Difficulty Difficulty;
|
|
135
|
+
public int EnemyCount;
|
|
136
|
+
public float TimeLimit;
|
|
137
|
+
|
|
138
|
+
[Header("Rewards")]
|
|
139
|
+
public int StarThreshold1;
|
|
140
|
+
public int StarThreshold2;
|
|
141
|
+
public int StarThreshold3;
|
|
142
|
+
public int CompletionBonus;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
public enum Difficulty { Easy, Normal, Hard, Nightmare }
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## 3. Decoupled System Pattern
|
|
151
|
+
|
|
152
|
+
### Why Decoupling?
|
|
153
|
+
|
|
154
|
+
| Coupled (❌) | Decoupled (✅) |
|
|
155
|
+
|--------------|---------------|
|
|
156
|
+
| Agent A sửa file → Agent B bị conflict | Agents làm song song |
|
|
157
|
+
| Change UI → phải sửa Combat code | Change 1 nơi, không ảnh hưởng nơi khác |
|
|
158
|
+
| Hard to test | Easy to unit test |
|
|
159
|
+
|
|
160
|
+
### Implementation
|
|
161
|
+
|
|
162
|
+
```csharp
|
|
163
|
+
// ✅ Combat KHÔNG biết về UI
|
|
164
|
+
public class CombatSystem : MonoBehaviour
|
|
165
|
+
{
|
|
166
|
+
[SerializeField] private CharacterData _data;
|
|
167
|
+
private int _currentHealth;
|
|
168
|
+
|
|
169
|
+
void Start() => _currentHealth = _data.MaxHealth;
|
|
170
|
+
|
|
171
|
+
public void TakeDamage(int damage)
|
|
172
|
+
{
|
|
173
|
+
_currentHealth -= damage;
|
|
174
|
+
|
|
175
|
+
// Fire event, KHÔNG gọi UI trực tiếp
|
|
176
|
+
GameEvents.HealthChanged(_currentHealth);
|
|
177
|
+
|
|
178
|
+
if (_currentHealth <= 0)
|
|
179
|
+
GameEvents.PlayerDied();
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// ✅ UI SUBSCRIBE to events
|
|
184
|
+
public class HealthUI : MonoBehaviour
|
|
185
|
+
{
|
|
186
|
+
[SerializeField] private Slider _healthBar;
|
|
187
|
+
[SerializeField] private CharacterData _data;
|
|
188
|
+
|
|
189
|
+
void OnEnable() => GameEvents.OnHealthChanged += UpdateHealth;
|
|
190
|
+
void OnDisable() => GameEvents.OnHealthChanged -= UpdateHealth;
|
|
191
|
+
|
|
192
|
+
void UpdateHealth(int current)
|
|
193
|
+
{
|
|
194
|
+
_healthBar.value = (float)current / _data.MaxHealth;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## 4. Checklist Trước Khi Code
|
|
202
|
+
|
|
203
|
+
- [ ] Event Bus defined với TẤT CẢ events
|
|
204
|
+
- [ ] Manager bootstrap sequence documented
|
|
205
|
+
- [ ] Save system contract defined
|
|
206
|
+
- [ ] Character ScriptableObject template created
|
|
207
|
+
- [ ] Enemy ScriptableObject template created
|
|
208
|
+
- [ ] Level ScriptableObject template created
|
|
209
|
+
- [ ] Input abstraction layer designed
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Related Skills
|
|
214
|
+
- `game-development/unity-integration`
|
|
215
|
+
- `game-development/game-design`
|
|
216
|
+
- `clean-code`
|
|
217
|
+
|
|
218
|
+
## Related Workflows
|
|
219
|
+
- `/game-hybrid` - Sử dụng skill này cho Tầng 1
|
|
220
|
+
- `/game-from-idea` - Simplified workflow cho rapid prototyping
|