@votruongdanh/ai-agent-skills 3.2.1 → 3.3.2

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.
Files changed (42) hide show
  1. package/.kiro/skills/_scripts/.ai-memory-template.md +55 -55
  2. package/.kiro/skills/_scripts/checklist.md +35 -34
  3. package/.kiro/skills/_scripts/memory-compact.md +142 -0
  4. package/.kiro/skills/_scripts/memory-dedupe.md +26 -26
  5. package/.kiro/skills/_scripts/pre-deploy.md +42 -42
  6. package/.kiro/skills/_scripts/verify-all.md +28 -28
  7. package/.kiro/skills/agents/SKILL.md +85 -85
  8. package/.kiro/skills/agents/agents/backend-specialist.md +29 -29
  9. package/.kiro/skills/agents/agents/database-architect.md +28 -28
  10. package/.kiro/skills/agents/agents/debugger.md +29 -29
  11. package/.kiro/skills/agents/agents/devops-engineer.md +30 -30
  12. package/.kiro/skills/agents/agents/documentation-writer.md +29 -29
  13. package/.kiro/skills/agents/agents/frontend-specialist.md +30 -30
  14. package/.kiro/skills/agents/agents/orchestrator.md +36 -36
  15. package/.kiro/skills/agents/agents/performance-optimizer.md +29 -29
  16. package/.kiro/skills/agents/agents/project-planner.md +30 -30
  17. package/.kiro/skills/agents/agents/security-auditor.md +30 -30
  18. package/.kiro/skills/agents/agents/test-engineer.md +29 -29
  19. package/.kiro/skills/brainstorm/SKILL.md +66 -66
  20. package/.kiro/skills/clean/SKILL.md +90 -90
  21. package/.kiro/skills/create/SKILL.md +63 -63
  22. package/.kiro/skills/debug/SKILL.md +71 -71
  23. package/.kiro/skills/deploy/SKILL.md +66 -66
  24. package/.kiro/skills/enhance/SKILL.md +58 -58
  25. package/.kiro/skills/explain/SKILL.md +69 -69
  26. package/.kiro/skills/instructions.md +95 -93
  27. package/.kiro/skills/integrate/SKILL.md +50 -50
  28. package/.kiro/skills/motion-ui/SKILL.md +492 -0
  29. package/.kiro/skills/orchestrate/SKILL.md +73 -73
  30. package/.kiro/skills/plan/SKILL.md +69 -69
  31. package/.kiro/skills/preview/SKILL.md +55 -55
  32. package/.kiro/skills/status/SKILL.md +57 -57
  33. package/.kiro/skills/test/SKILL.md +58 -58
  34. package/.kiro/skills/ui-ux-pro-max/SKILL.md +65 -65
  35. package/LICENSE +21 -21
  36. package/README.md +212 -208
  37. package/bin/cli.js +876 -876
  38. package/bin/install-skills.ps1 +30 -30
  39. package/index.js +23 -23
  40. package/lib/skill-bundle.js +741 -725
  41. package/package.json +62 -62
  42. package/scripts/render-targets.js +22 -22
@@ -1,69 +1,69 @@
1
- ---
2
- name: explain
3
- description: "Explain code, walk through logic, and help understand architecture or behavior. Use when the user asks what code does, how something works, or wants a walkthrough. Triggers: explain, what does this do, how does this work, giải thích, giải thích code, code này làm gì."
4
- agents: [documentation-writer, backend-specialist, frontend-specialist]
5
- related-skills: [debug, enhance, status]
6
- ---
7
-
8
- ## Memory Protocol
9
- **START**: Read `.ai-memory.md` from project root. Check tech stack, architecture notes, past explanations, and domain context.
10
- **END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: what was explained, key insights, misconceptions clarified, and follow-ups.
11
-
12
- ## Goal
13
- Help the user deeply understand code, logic, architecture, or behavior — at the level of detail they need.
14
-
15
- ## Agent Routing
16
- - If explaining backend/API logic → read `.kiro/skills/agents/agents/backend-specialist.md` and apply its knowledge
17
- - If explaining UI/component behavior → read `.kiro/skills/agents/agents/frontend-specialist.md` and apply its knowledge
18
- - If explaining database schema/queries → read `.kiro/skills/agents/agents/database-architect.md` and apply its knowledge
19
- - If explaining security mechanisms → read `.kiro/skills/agents/agents/security-auditor.md` and apply its knowledge
20
- - Default → read `.kiro/skills/agents/agents/documentation-writer.md` for clear, structured explanation
21
-
22
- ## Socratic Gate
23
- Before explaining, verify:
24
- 1. Which file, function, or code block should be explained?
25
- 2. What level of detail? (high-level overview vs line-by-line walkthrough)
26
- 3. What is the user's familiarity level with this area?
27
- If any answer is unclear, ASK before proceeding.
28
-
29
- ## Workflow
30
- 1. **Read Memory** — Load `.ai-memory.md` for project context, tech stack, and architecture.
31
- 2. Read the target code thoroughly — understand intent, not just syntax.
32
- 3. Identify the explanation scope: single function, module, data flow, or architecture.
33
- 4. Explain at the requested level:
34
- - **High-level**: Purpose, inputs/outputs, how it fits in the system.
35
- - **Detailed**: Step-by-step logic, control flow, edge cases, design decisions.
36
- - **Line-by-line**: What each line does and why.
37
- 5. Highlight non-obvious logic, hidden side effects, and design trade-offs.
38
- 6. Use analogies or diagrams if the concept is complex.
39
- 7. Suggest follow-up topics if relevant (e.g., "you may also want to understand X").
40
- 8. **Quality Gate** — Read `.kiro/skills/_scripts/checklist.md` for cross-cutting checks.
41
- 9. **Update Memory** — Save explanation context and insights to `.ai-memory.md`.
42
-
43
- ## Output format
44
- - **What it does**: One-sentence summary
45
- - **How it works**: Step-by-step explanation at the requested level
46
- - **Key design decisions**: Why it was built this way
47
- - **Non-obvious details**: Edge cases, side effects, gotchas
48
- - **Related context**: Connected files/modules worth understanding
49
-
50
- ## Checklist
51
- - [ ] Target code identified and read
52
- - [ ] Explanation level matches user need
53
- - [ ] Logic explained clearly, not just syntax described
54
- - [ ] Non-obvious details highlighted
55
- - [ ] Design decisions explained
56
- - [ ] Follow-up suggestions provided
57
- - [ ] Memory file updated
58
-
59
- ## Rules
60
- - Explain the WHY, not just the WHAT — developers can read syntax themselves.
61
- - Match explanation depth to the user's familiarity level.
62
- - If the code is unclear or has issues, mention them without derailing the explanation.
63
- - Avoid proposing wide changes mid-explanation; if improvement requires broader edits, ASK before switching to implementation.
64
- - Always read and update the memory file.
65
-
66
- ## Related Skills
67
- - `/debug` → read `.kiro/skills/debug/SKILL.md` — If explanation reveals bugs
68
- - `/enhance` → read `.kiro/skills/enhance/SKILL.md` — If explanation reveals improvement opportunities
69
- - `/status` → read `.kiro/skills/status/SKILL.md` — For project-wide understanding
1
+ ---
2
+ name: explain
3
+ description: "Explain code, walk through logic, and help understand architecture or behavior. Use when the user asks what code does, how something works, or wants a walkthrough. Triggers: explain, what does this do, how does this work, giải thích, giải thích code, code này làm gì."
4
+ agents: [documentation-writer, backend-specialist, frontend-specialist]
5
+ related-skills: [debug, enhance, status]
6
+ ---
7
+
8
+ ## Memory Protocol
9
+ **START**: Read `.ai-memory.md` from project root. Check tech stack, architecture notes, past explanations, and domain context.
10
+ **END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: what was explained, key insights, misconceptions clarified, and follow-ups.
11
+
12
+ ## Goal
13
+ Help the user deeply understand code, logic, architecture, or behavior — at the level of detail they need.
14
+
15
+ ## Agent Routing
16
+ - If explaining backend/API logic → read `.kiro/skills/agents/agents/backend-specialist.md` and apply its knowledge
17
+ - If explaining UI/component behavior → read `.kiro/skills/agents/agents/frontend-specialist.md` and apply its knowledge
18
+ - If explaining database schema/queries → read `.kiro/skills/agents/agents/database-architect.md` and apply its knowledge
19
+ - If explaining security mechanisms → read `.kiro/skills/agents/agents/security-auditor.md` and apply its knowledge
20
+ - Default → read `.kiro/skills/agents/agents/documentation-writer.md` for clear, structured explanation
21
+
22
+ ## Socratic Gate
23
+ Before explaining, verify:
24
+ 1. Which file, function, or code block should be explained?
25
+ 2. What level of detail? (high-level overview vs line-by-line walkthrough)
26
+ 3. What is the user's familiarity level with this area?
27
+ If any answer is unclear, ASK before proceeding.
28
+
29
+ ## Workflow
30
+ 1. **Read Memory** — Load `.ai-memory.md` for project context, tech stack, and architecture.
31
+ 2. Read the target code thoroughly — understand intent, not just syntax.
32
+ 3. Identify the explanation scope: single function, module, data flow, or architecture.
33
+ 4. Explain at the requested level:
34
+ - **High-level**: Purpose, inputs/outputs, how it fits in the system.
35
+ - **Detailed**: Step-by-step logic, control flow, edge cases, design decisions.
36
+ - **Line-by-line**: What each line does and why.
37
+ 5. Highlight non-obvious logic, hidden side effects, and design trade-offs.
38
+ 6. Use analogies or diagrams if the concept is complex.
39
+ 7. Suggest follow-up topics if relevant (e.g., "you may also want to understand X").
40
+ 8. **Quality Gate** — Read `.kiro/skills/_scripts/checklist.md` for cross-cutting checks.
41
+ 9. **Update Memory** — Save explanation context and insights to `.ai-memory.md`.
42
+
43
+ ## Output format
44
+ - **What it does**: One-sentence summary
45
+ - **How it works**: Step-by-step explanation at the requested level
46
+ - **Key design decisions**: Why it was built this way
47
+ - **Non-obvious details**: Edge cases, side effects, gotchas
48
+ - **Related context**: Connected files/modules worth understanding
49
+
50
+ ## Checklist
51
+ - [ ] Target code identified and read
52
+ - [ ] Explanation level matches user need
53
+ - [ ] Logic explained clearly, not just syntax described
54
+ - [ ] Non-obvious details highlighted
55
+ - [ ] Design decisions explained
56
+ - [ ] Follow-up suggestions provided
57
+ - [ ] Memory file updated
58
+
59
+ ## Rules
60
+ - Explain the WHY, not just the WHAT — developers can read syntax themselves.
61
+ - Match explanation depth to the user's familiarity level.
62
+ - If the code is unclear or has issues, mention them without derailing the explanation.
63
+ - Avoid proposing wide changes mid-explanation; if improvement requires broader edits, ASK before switching to implementation.
64
+ - Always read and update the memory file.
65
+
66
+ ## Related Skills
67
+ - `/debug` → read `.kiro/skills/debug/SKILL.md` — If explanation reveals bugs
68
+ - `/enhance` → read `.kiro/skills/enhance/SKILL.md` — If explanation reveals improvement opportunities
69
+ - `/status` → read `.kiro/skills/status/SKILL.md` — For project-wide understanding
@@ -1,93 +1,95 @@
1
- ## AI Agent Skills — System Bootstrap
2
-
3
- This project uses an **AI Skills system** with 13 skills, 11 specialist agents, and a memory protocol.
4
-
5
- ### On EVERY request, follow this flow:
6
-
7
- 0. **Validate input**:
8
- - If the message is empty or contains no meaningful content → Respond with a friendly greeting, list the available skills below with one-line descriptions, and ask what the user would like to work on. Do NOT proceed to classification.
9
- - If the message is a greeting ("hi", "hello", "hey", "xin chào", "chào") → Respond warmly, briefly list what you can help with (the skills below), and ask how you can help. Do NOT proceed to classification.
10
-
11
- 1. **Read memory**:
12
- - If `.ai-memory.md` exists in project root, read it first for context.
13
- - If Codex memory directories exist (`memories/`, `memories/session/`, `memories/repo/`), read relevant notes from `memories/repo/`.
14
- - If `.ai-memory.md` doesn't exist, create it after completing the first task using the template at the end of this file.
15
-
16
- 2. **Classify the request** — Match to one of these skills:
17
-
18
- | Command | Skill file to read | When to use |
19
- |---------|-------------------|-------------|
20
- | `/brainstorm` | `.kiro/skills/brainstorm/SKILL.md` | Explore options, ideate solutions |
21
- | `/plan` | `.kiro/skills/plan/SKILL.md` | Create implementation plan with milestones |
22
- | `/create` | `.kiro/skills/create/SKILL.md` | Build new feature/file/component |
23
- | `/debug` | `.kiro/skills/debug/SKILL.md` | Fix bugs, analyze errors |
24
- | `/test` | `.kiro/skills/test/SKILL.md` | Write tests, improve coverage |
25
- | `/enhance` | `.kiro/skills/enhance/SKILL.md` | Improve existing code without breaking it |
26
- | `/deploy` | `.kiro/skills/deploy/SKILL.md` | Deployment and release guidance |
27
- | `/clean` | `.kiro/skills/clean/SKILL.md` | Remove junk files, clean up |
28
- | `/status` | `.kiro/skills/status/SKILL.md` | Project status summary |
29
- | `/preview` | `.kiro/skills/preview/SKILL.md` | Preview output/UX before implementing |
30
- | `/orchestrate` | `.kiro/skills/orchestrate/SKILL.md` | Coordinate multi-step workflows |
31
- | `/ui-ux-pro-max` | `.kiro/skills/ui-ux-pro-max/SKILL.md` | Advanced UI/UX improvements |
32
- | `/explain` | `.kiro/skills/explain/SKILL.md` | Explain code, walk through logic, understand architecture |
33
- | `/integrate` | `.kiro/skills/integrate/SKILL.md` | Integrate provided sample code with minimal impact |
34
-
35
- 3. **If the request is vague/general** (no clear skill match):
36
- - "Help me with this project" → Read `.kiro/skills/status/SKILL.md` first, then suggest next steps
37
- - "Review my code" → Read `.kiro/skills/enhance/SKILL.md` with all agents (not just performance)
38
- - "I'm stuck" / "What should I do?" → Read `.kiro/skills/status/SKILL.md` then `.kiro/skills/plan/SKILL.md`
39
- - "Make this better" → Read `.kiro/skills/enhance/SKILL.md`
40
- - "Explain this code" / "What does this do?" / "giải thích code" → Read `.kiro/skills/explain/SKILL.md`
41
- - Complaints about code quality ("too long", "messy", "sao dài quá", "rối quá") → Read `.kiro/skills/enhance/SKILL.md` or `.kiro/skills/clean/SKILL.md`
42
- - Any multi-step or complex request → Read `.kiro/skills/orchestrate/SKILL.md`
43
- - If still unclear → Read `.kiro/skills/agents/SKILL.md` and use @orchestrator to triage
44
-
45
- 4. **Load the agent**: Each skill specifies agents. To load an agent persona, read its file:
46
-
47
- | Agent handle | File to read |
48
- |-------------|-------------|
49
- | `@debugger` | `.kiro/skills/agents/agents/debugger.md` |
50
- | `@backend-specialist` | `.kiro/skills/agents/agents/backend-specialist.md` |
51
- | `@frontend-specialist` | `.kiro/skills/agents/agents/frontend-specialist.md` |
52
- | `@database-architect` | `.kiro/skills/agents/agents/database-architect.md` |
53
- | `@security-auditor` | `.kiro/skills/agents/agents/security-auditor.md` |
54
- | `@devops-engineer` | `.kiro/skills/agents/agents/devops-engineer.md` |
55
- | `@test-engineer` | `.kiro/skills/agents/agents/test-engineer.md` |
56
- | `@performance-optimizer` | `.kiro/skills/agents/agents/performance-optimizer.md` |
57
- | `@documentation-writer` | `.kiro/skills/agents/agents/documentation-writer.md` |
58
- | `@orchestrator` | `.kiro/skills/agents/agents/orchestrator.md` |
59
- | `@project-planner` | `.kiro/skills/agents/agents/project-planner.md` |
60
-
61
- 5. **Execute the skill workflow** — Follow the steps in the SKILL.md file.
62
-
63
- 6. **Run quality checks**: Read `.kiro/skills/_scripts/checklist.md` for cross-cutting checks.
64
-
65
- 7. **Update memory**:
66
- - Save findings to `.ai-memory.md` using the **Memory Compaction Rules** in `.ai-memory.md` (short bullets, dedupe, enforce section limits).
67
- - If `memories/repo/` exists (Codex layout), mirror the most important 1-3 bullets into a repo memory note.
68
- - If you notice duplicates, apply `.kiro/skills/_scripts/memory-dedupe.md` and merge bullets instead of appending.
69
-
70
- ### .ai-memory.md Template (create if not exists)
71
-
72
- ```markdown
73
- # Project Memory
74
-
75
- ## Tech Stack
76
- - Language: (detected)
77
- - Framework: (detected)
78
- - Database: (if any)
79
- - Package manager: (detected)
80
-
81
- ## Architecture
82
- - Pattern: (detected)
83
- - Key directories: (discovered)
84
-
85
- ## Decisions
86
- - (date) Decision and rationale
87
-
88
- ## Known Issues
89
- - (none yet)
90
-
91
- ## Recent Work
92
- - (none yet)
93
- ```
1
+ ## AI Agent Skills — System Bootstrap
2
+
3
+ This project uses an **AI Skills system** with 16 skills, 11 specialist agents, and a memory protocol.
4
+
5
+ ### On EVERY request, follow this flow:
6
+
7
+ 0. **Validate input**:
8
+ - If the message is empty or contains no meaningful content → Respond with a friendly greeting, list the available skills below with one-line descriptions, and ask what the user would like to work on. Do NOT proceed to classification.
9
+ - If the message is a greeting ("hi", "hello", "hey", "xin chào", "chào") → Respond warmly, briefly list what you can help with (the skills below), and ask how you can help. Do NOT proceed to classification.
10
+
11
+ 1. **Read memory**:
12
+ - If `.ai-memory.md` exists in project root, read it first for context.
13
+ - If Codex memory directories exist (`memories/`, `memories/session/`, `memories/repo/`), read relevant notes from `memories/repo/`.
14
+ - If `.ai-memory.md` doesn't exist, create it after completing the first task using the template at the end of this file.
15
+
16
+ 2. **Classify the request** — Match to one of these skills:
17
+
18
+ | Command | Skill file to read | When to use |
19
+ |---------|-------------------|-------------|
20
+ | `/brainstorm` | `.kiro/skills/brainstorm/SKILL.md` | Explore options, ideate solutions |
21
+ | `/plan` | `.kiro/skills/plan/SKILL.md` | Create implementation plan with milestones |
22
+ | `/create` | `.kiro/skills/create/SKILL.md` | Build new feature/file/component |
23
+ | `/debug` | `.kiro/skills/debug/SKILL.md` | Fix bugs, analyze errors |
24
+ | `/test` | `.kiro/skills/test/SKILL.md` | Write tests, improve coverage |
25
+ | `/enhance` | `.kiro/skills/enhance/SKILL.md` | Improve existing code without breaking it |
26
+ | `/deploy` | `.kiro/skills/deploy/SKILL.md` | Deployment and release guidance |
27
+ | `/clean` | `.kiro/skills/clean/SKILL.md` | Remove junk files, clean up |
28
+ | `/status` | `.kiro/skills/status/SKILL.md` | Project status summary |
29
+ | `/preview` | `.kiro/skills/preview/SKILL.md` | Preview output/UX before implementing |
30
+ | `/orchestrate` | `.kiro/skills/orchestrate/SKILL.md` | Coordinate multi-step workflows |
31
+ | `/ui-ux-pro-max` | `.kiro/skills/ui-ux-pro-max/SKILL.md` | Advanced UI/UX improvements |
32
+ | `/motion-ui` | `.kiro/skills/motion-ui/SKILL.md` | Motion UI with Framer Motion micro-interactions |
33
+ | `/explain` | `.kiro/skills/explain/SKILL.md` | Explain code, walk through logic, understand architecture |
34
+ | `/integrate` | `.kiro/skills/integrate/SKILL.md` | Integrate provided sample code with minimal impact |
35
+
36
+ 3. **If the request is vague/general** (no clear skill match):
37
+ - "Help me with this project" → Read `.kiro/skills/status/SKILL.md` first, then suggest next steps
38
+ - "Review my code" → Read `.kiro/skills/enhance/SKILL.md` with all agents (not just performance)
39
+ - "I'm stuck" / "What should I do?" → Read `.kiro/skills/status/SKILL.md` then `.kiro/skills/plan/SKILL.md`
40
+ - "Make this better" → Read `.kiro/skills/enhance/SKILL.md`
41
+ - "Explain this code" / "What does this do?" / "giải thích code" → Read `.kiro/skills/explain/SKILL.md`
42
+ - Complaints about code quality ("too long", "messy", "sao dài quá", "rối quá") → Read `.kiro/skills/enhance/SKILL.md` or `.kiro/skills/clean/SKILL.md`
43
+ - Any multi-step or complex request → Read `.kiro/skills/orchestrate/SKILL.md`
44
+ - If still unclear → Read `.kiro/skills/agents/SKILL.md` and use @orchestrator to triage
45
+
46
+ 4. **Load the agent**: Each skill specifies agents. To load an agent persona, read its file:
47
+
48
+ | Agent handle | File to read |
49
+ |-------------|-------------|
50
+ | `@debugger` | `.kiro/skills/agents/agents/debugger.md` |
51
+ | `@backend-specialist` | `.kiro/skills/agents/agents/backend-specialist.md` |
52
+ | `@frontend-specialist` | `.kiro/skills/agents/agents/frontend-specialist.md` |
53
+ | `@database-architect` | `.kiro/skills/agents/agents/database-architect.md` |
54
+ | `@security-auditor` | `.kiro/skills/agents/agents/security-auditor.md` |
55
+ | `@devops-engineer` | `.kiro/skills/agents/agents/devops-engineer.md` |
56
+ | `@test-engineer` | `.kiro/skills/agents/agents/test-engineer.md` |
57
+ | `@performance-optimizer` | `.kiro/skills/agents/agents/performance-optimizer.md` |
58
+ | `@documentation-writer` | `.kiro/skills/agents/agents/documentation-writer.md` |
59
+ | `@orchestrator` | `.kiro/skills/agents/agents/orchestrator.md` |
60
+ | `@project-planner` | `.kiro/skills/agents/agents/project-planner.md` |
61
+
62
+ 5. **Execute the skill workflow** — Follow the steps in the SKILL.md file.
63
+
64
+ 6. **Run quality checks**: Read `.kiro/skills/_scripts/checklist.md` for cross-cutting checks.
65
+
66
+ 7. **Update memory**:
67
+ - Save findings to `.ai-memory.md` using the **Memory Compaction Rules** in `.ai-memory.md` (short bullets, dedupe, enforce section limits).
68
+ - If `memories/repo/` exists (Codex layout), mirror the most important 1-3 bullets into a repo memory note.
69
+ - If you notice duplicates, apply `.kiro/skills/_scripts/memory-dedupe.md` and merge bullets instead of appending.
70
+ - If `.ai-memory.md` exceeds 500 lines or sections exceed limits, apply `.kiro/skills/_scripts/memory-compact.md` to compact it.
71
+
72
+ ### .ai-memory.md Template (create if not exists)
73
+
74
+ ```markdown
75
+ # Project Memory
76
+
77
+ ## Tech Stack
78
+ - Language: (detected)
79
+ - Framework: (detected)
80
+ - Database: (if any)
81
+ - Package manager: (detected)
82
+
83
+ ## Architecture
84
+ - Pattern: (detected)
85
+ - Key directories: (discovered)
86
+
87
+ ## Decisions
88
+ - (date) Decision and rationale
89
+
90
+ ## Known Issues
91
+ - (none yet)
92
+
93
+ ## Recent Work
94
+ - (none yet)
95
+ ```
@@ -1,50 +1,50 @@
1
- ---
2
- name: integrate
3
- description: "Integrate provided sample code/snippets into the existing system with minimal changes and minimal risk. Use when the user gives a code mẫu and wants to merge it into current project. Triggers: integrate, merge snippet, gộp code mẫu, ghép code, áp code mẫu vào hệ thống."
4
- agents: [backend-specialist, frontend-specialist, debugger]
5
- related-skills: [plan, test, debug, enhance]
6
- ---
7
-
8
- ## Memory Protocol
9
- **START**: Read `.ai-memory.md` from project root. Focus on: entry points, key directories, conventions, and any integration decisions already logged.
10
- **END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: integration points, files touched, behavior changes (if any), and verification notes.
11
-
12
- ## Goal
13
- Merge the requested sample code into the current codebase **without broad refactors**, keeping behavior stable and avoiding changes to unrelated files.
14
-
15
- ## Socratic Gate (ask if missing)
16
- Before editing, verify these inputs exist. If any is missing or ambiguous, ASK:
17
- 1. The **sample code** to integrate (full snippet + expected behavior).
18
- 2. The **target location** in this project (file/module/feature area).
19
- 3. Constraints: must keep API stable? must keep UI stable? backward compatible?
20
-
21
- ## Rules (Blast-radius control)
22
- - Touch the **smallest** possible set of files.
23
- - Do **not** reformat or restructure unrelated code.
24
- - Prefer **adapters/wrappers** over rewriting existing modules.
25
- - If the integration requires changing shared interfaces, introduce compatibility shims (or feature flag) instead of breaking changes.
26
- - If uncertain about side effects, **stop and ask** rather than guessing.
27
-
28
- ## Workflow
29
- 1. **Read Memory** — Load `.ai-memory.md` for architecture + conventions.
30
- 2. **Locate Integration Point** — Identify the narrowest place to hook in (entry, router, service, component, util).
31
- 3. **Diff the Concepts** — Map sample code concepts → existing abstractions (types, services, routes, state).
32
- 4. **Design Minimal Bridge**:
33
- - Prefer adding a thin adapter layer rather than changing existing call sites.
34
- - Prefer dependency injection/config wiring over global edits.
35
- 5. **Implement in Small Steps**:
36
- - Add new file(s) when that reduces risk (e.g., `adapter/`, `integrations/`).
37
- - Modify existing files only where the integration connects.
38
- 6. **Verification**:
39
- - Run/adjust existing tests if present; otherwise add a minimal smoke test when feasible.
40
- - Ensure no unrelated behavior changes.
41
- 7. **Quality Gate** — Read `.kiro/skills/_scripts/checklist.md`.
42
- 8. **Update Memory** — Log only high-signal bullets (integration point, key decision, files touched, outcome).
43
-
44
- ## Output Format
45
- - Integration target (what feature/module)
46
- - Files touched (added/modified)
47
- - Minimal change strategy (1–3 bullets)
48
- - Verification performed (commands/tests)
49
- - Risks / follow-ups (if any)
50
-
1
+ ---
2
+ name: integrate
3
+ description: "Integrate provided sample code/snippets into the existing system with minimal changes and minimal risk. Use when the user gives a code mẫu and wants to merge it into current project. Triggers: integrate, merge snippet, gộp code mẫu, ghép code, áp code mẫu vào hệ thống."
4
+ agents: [backend-specialist, frontend-specialist, debugger]
5
+ related-skills: [plan, test, debug, enhance]
6
+ ---
7
+
8
+ ## Memory Protocol
9
+ **START**: Read `.ai-memory.md` from project root. Focus on: entry points, key directories, conventions, and any integration decisions already logged.
10
+ **END**: Update `.ai-memory.md` using **Memory Compaction Rules** with: integration points, files touched, behavior changes (if any), and verification notes.
11
+
12
+ ## Goal
13
+ Merge the requested sample code into the current codebase **without broad refactors**, keeping behavior stable and avoiding changes to unrelated files.
14
+
15
+ ## Socratic Gate (ask if missing)
16
+ Before editing, verify these inputs exist. If any is missing or ambiguous, ASK:
17
+ 1. The **sample code** to integrate (full snippet + expected behavior).
18
+ 2. The **target location** in this project (file/module/feature area).
19
+ 3. Constraints: must keep API stable? must keep UI stable? backward compatible?
20
+
21
+ ## Rules (Blast-radius control)
22
+ - Touch the **smallest** possible set of files.
23
+ - Do **not** reformat or restructure unrelated code.
24
+ - Prefer **adapters/wrappers** over rewriting existing modules.
25
+ - If the integration requires changing shared interfaces, introduce compatibility shims (or feature flag) instead of breaking changes.
26
+ - If uncertain about side effects, **stop and ask** rather than guessing.
27
+
28
+ ## Workflow
29
+ 1. **Read Memory** — Load `.ai-memory.md` for architecture + conventions.
30
+ 2. **Locate Integration Point** — Identify the narrowest place to hook in (entry, router, service, component, util).
31
+ 3. **Diff the Concepts** — Map sample code concepts → existing abstractions (types, services, routes, state).
32
+ 4. **Design Minimal Bridge**:
33
+ - Prefer adding a thin adapter layer rather than changing existing call sites.
34
+ - Prefer dependency injection/config wiring over global edits.
35
+ 5. **Implement in Small Steps**:
36
+ - Add new file(s) when that reduces risk (e.g., `adapter/`, `integrations/`).
37
+ - Modify existing files only where the integration connects.
38
+ 6. **Verification**:
39
+ - Run/adjust existing tests if present; otherwise add a minimal smoke test when feasible.
40
+ - Ensure no unrelated behavior changes.
41
+ 7. **Quality Gate** — Read `.kiro/skills/_scripts/checklist.md`.
42
+ 8. **Update Memory** — Log only high-signal bullets (integration point, key decision, files touched, outcome).
43
+
44
+ ## Output Format
45
+ - Integration target (what feature/module)
46
+ - Files touched (added/modified)
47
+ - Minimal change strategy (1–3 bullets)
48
+ - Verification performed (commands/tests)
49
+ - Risks / follow-ups (if any)
50
+