thanh-kit 2.5.2 → 2.5.4

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 (81) hide show
  1. package/dist/index.js +30 -0
  2. package/dist/index.js.map +1 -1
  3. package/package.json +1 -1
  4. package/templates/.env.example +100 -0
  5. package/templates/commands/bootstrap/auto/fast.md +111 -0
  6. package/templates/commands/bootstrap/auto/parallel.md +66 -0
  7. package/templates/commands/bootstrap/auto.md +115 -0
  8. package/templates/commands/bootstrap.md +137 -0
  9. package/templates/commands/code/auto.md +203 -0
  10. package/templates/commands/code/no-test.md +174 -0
  11. package/templates/commands/code/parallel.md +100 -0
  12. package/templates/commands/code.md +205 -0
  13. package/templates/commands/content/cro.md +43 -0
  14. package/templates/commands/content/enhance.md +14 -0
  15. package/templates/commands/content/fast.md +13 -0
  16. package/templates/commands/content/good.md +16 -0
  17. package/templates/commands/cook/auto/fast.md +26 -0
  18. package/templates/commands/cook/auto/parallel.md +49 -0
  19. package/templates/commands/cook/auto.md +15 -0
  20. package/templates/commands/cook.md +105 -0
  21. package/templates/commands/debug.md +13 -0
  22. package/templates/commands/design/3d.md +83 -0
  23. package/templates/commands/design/describe.md +23 -0
  24. package/templates/commands/design/fast.md +31 -0
  25. package/templates/commands/design/good.md +35 -0
  26. package/templates/commands/design/screenshot.md +34 -0
  27. package/templates/commands/design/video.md +34 -0
  28. package/templates/commands/fix/ci.md +17 -0
  29. package/templates/commands/fix/fast.md +19 -0
  30. package/templates/commands/fix/hard.md +39 -0
  31. package/templates/commands/fix/logs.md +26 -0
  32. package/templates/commands/fix/parallel.md +54 -0
  33. package/templates/commands/fix/test.md +20 -0
  34. package/templates/commands/fix/types.md +9 -0
  35. package/templates/commands/fix/ui.md +48 -0
  36. package/templates/commands/fix.md +43 -0
  37. package/templates/commands/plan/ci.md +33 -0
  38. package/templates/commands/plan/cro.md +69 -0
  39. package/templates/commands/plan/fast.md +82 -0
  40. package/templates/commands/plan/hard.md +108 -0
  41. package/templates/commands/plan/parallel.md +145 -0
  42. package/templates/commands/plan/two.md +45 -0
  43. package/templates/commands/plan.md +30 -0
  44. package/templates/commands/scout/ext.md +39 -0
  45. package/templates/commands/scout.md +28 -0
  46. package/templates/commands/skill/add.md +36 -0
  47. package/templates/commands/skill/create.md +29 -0
  48. package/templates/commands/skill/fix-logs.md +22 -0
  49. package/templates/commands/skill/optimize/auto.md +25 -0
  50. package/templates/commands/skill/optimize.md +34 -0
  51. package/templates/commands/skill/update.md +36 -0
  52. package/templates/skills/.env.example +1 -0
  53. package/templates/statusline.cjs +0 -0
  54. package/templates/statusline.sh +0 -0
  55. package/templates/AGENTS.md +0 -104
  56. package/templates/README.md +0 -241
  57. package/templates/command-archive/ask.md +0 -56
  58. package/templates/command-archive/ck-help.md +0 -129
  59. package/templates/command-archive/coding-level.md +0 -48
  60. package/templates/command-archive/docs/init.md +0 -38
  61. package/templates/command-archive/docs/summarize.md +0 -22
  62. package/templates/command-archive/docs/update.md +0 -76
  63. package/templates/command-archive/journal.md +0 -18
  64. package/templates/command-archive/kanban.md +0 -99
  65. package/templates/command-archive/plan/archive.md +0 -57
  66. package/templates/command-archive/plan/red-team.md +0 -200
  67. package/templates/command-archive/plan/validate.md +0 -188
  68. package/templates/command-archive/preview.md +0 -283
  69. package/templates/command-archive/review/codebase/parallel.md +0 -122
  70. package/templates/command-archive/review/codebase.md +0 -49
  71. package/templates/command-archive/test/ui.md +0 -92
  72. package/templates/command-archive/test.md +0 -8
  73. package/templates/command-archive/use-mcp.md +0 -38
  74. package/templates/command-archive/watzup.md +0 -8
  75. package/templates/command-archive/worktree.md +0 -109
  76. package/templates/discord/README.md +0 -274
  77. package/templates/discord/config.json5 +0 -87
  78. package/templates/discord/skills/auto-intent-router/SKILL.md +0 -195
  79. package/templates/discord/skills/train-prompt/SKILL.md +0 -306
  80. package/templates/discord/start-bot.sh +0 -47
  81. package/templates/gemini/settings.json +0 -12
@@ -0,0 +1,45 @@
1
+ ---
2
+ description: ⚡⚡⚡⚡ Research & create an implementation plan with 2 approaches
3
+ argument-hint: [task]
4
+ ---
5
+
6
+ Think harder.
7
+ Activate `planning` skill.
8
+
9
+ ## Your mission
10
+ Use the `planner` subagent to create 2 detailed implementation plans for this following task:
11
+ <task>
12
+ $ARGUMENTS
13
+ </task>
14
+
15
+ ## Workflow
16
+ 1. First: Create a directory using naming pattern from `## Naming` section in injected context.
17
+ Make sure you pass the directory path to every subagent during the process.
18
+ 2. Follow strictly to the "Plan Creation & Organization" rules of `planning` skill.
19
+ 3. Use multiple `researcher` agents in parallel to research for this task, each agent research for a different aspect of the task and perform max 5 researches (max 5 tool calls).
20
+ 4. Use `scout` agent to search the codebase for files needed to complete the task.
21
+ 5. Main agent gathers all research and scout report filepaths, and pass them to `planner` subagent with the detailed instructions prompt to create an implementation plan of this task.
22
+ **Output:** Provide at least 2 implementation approaches with clear trade-offs, and explain the pros and cons of each approach, and provide a recommended approach.
23
+ 1. Main agent receives the implementation plan from `planner` subagent, and ask user to review the plan
24
+
25
+ ## Plan File Specification
26
+ - Every `plan.md` MUST start with YAML frontmatter:
27
+ ```yaml
28
+ ---
29
+ title: "{Brief title}"
30
+ description: "{One sentence for card preview}"
31
+ status: pending
32
+ priority: P2
33
+ effort: {sum of phases, e.g., 4h}
34
+ branch: {current git branch}
35
+ tags: [relevant, tags]
36
+ created: {YYYY-MM-DD}
37
+ ---
38
+ ```
39
+
40
+ ## Important Notes
41
+ **IMPORTANT:** Analyze the skills catalog and activate the skills that are needed for the task during the process.
42
+ **IMPORTANT:** Sacrifice grammar for the sake of concision when writing reports.
43
+ **IMPORTANT:** Ensure token efficiency while maintaining high quality.
44
+ **IMPORTANT:** In reports, list any unresolved questions at the end, if any.
45
+ **IMPORTANT**: **Do not** start implementing.
@@ -0,0 +1,30 @@
1
+ ---
2
+ description: ⚡⚡⚡ Intelligent plan creation with prompt enhancement
3
+ argument-hint: [task]
4
+ ---
5
+
6
+ ## Your mission
7
+ <task>
8
+ $ARGUMENTS
9
+ </task>
10
+
11
+ ## Pre-Creation Check (Active vs Suggested Plan Detection)
12
+
13
+ Check the `## Plan Context` section in the injected context:
14
+ - If "Plan:" shows a path → Active plan exists. Ask user: "Active plan found: {path}. Continue with this? [Y/n]"
15
+ - If "Suggested:" shows a path → Branch-matched plan hint only. Ask user if they want to activate it or create new.
16
+ - If "Plan: none" → Proceed to create new plan using naming pattern from `## Naming` section.
17
+
18
+ ## Workflow
19
+ - Analyze the given task and use `AskUserQuestion` tool to ask for more details if needed.
20
+ - Decide to use `/plan:fast` or `/plan:hard` SlashCommands based on the complexity.
21
+ - Execute SlashCommand: `/plan:fast <detailed-instructions-prompt>` or `/plan:hard <detailed-instructions-prompt>`
22
+ - Activate `planning` skill.
23
+ - Note: `detailed-instructions-prompt` is **an enhanced prompt** that describes the task in detail based on the provided task description.
24
+
25
+ ## Important Notes
26
+ **IMPORTANT:** Analyze the skills catalog and activate the skills that are needed for the task during the process.
27
+ **IMPORTANT:** Sacrifice grammar for the sake of concision when writing reports.
28
+ **IMPORTANT:** Ensure token efficiency while maintaining high quality.
29
+ **IMPORTANT:** In reports, list any unresolved questions at the end, if any.
30
+ **IMPORTANT**: **Do not** start implementing.
@@ -0,0 +1,39 @@
1
+ ---
2
+ description: ⚡ Use external agentic tools to scout given directories
3
+ argument-hint: [user-prompt] [scale]
4
+ ---
5
+
6
+ ## Purpose
7
+
8
+ Utilize external agentic tools to scout given directories or explore the codebase for files needed to complete the task using a fast, token efficient agent.
9
+
10
+ ## Variables
11
+
12
+ USER_PROMPT: $1
13
+ SCALE: $2 (defaults to 3)
14
+ RELEVANT_FILE_OUTPUT_DIR: Use `Report:` from `## Naming` section
15
+
16
+ ## Configuration
17
+
18
+ Read Gemini model from `.claude/.ck.json`: `gemini.model` (default: `gemini-3-flash-preview`)
19
+
20
+ ## Workflow:
21
+ - Write a prompt for 'SCALE' number of agents to the `Task` tool that will immediately call the `Bash` tool to run these commands to kick off your agents to conduct the search:
22
+ - `gemini -y -m <gemini.model> "[prompt]"` (if count <= 3)
23
+ - `opencode run "[prompt]" --model opencode/grok-code` (if count > 3 and count < 6)
24
+ - if count >= 6, spawn `Explore` subagents to search the codebase in parallel
25
+
26
+ **Why use external agentic tools?**
27
+ - External agentic tools are faster and more efficient when using LLMs with large context windows (1M+ tokens).
28
+
29
+ **How to prompt the agents:**
30
+ - If `gemini` or `opencode` is not available, ask the user if they want to install it:
31
+ - If **yes**, install it (if there are permission issues, instruct the user to install it manually, including authentication steps)
32
+ - If **no**, use the default `Explore` subagents.
33
+ - IMPORTANT: Kick these agents off in parallel using the `Task` tool, analyze and divide folders for each agent to scout intelligently and quickly.
34
+ - IMPORTANT: These agents are calling OTHER agentic coding tools to search the codebase. DO NOT call any search tools yourself.
35
+ - IMPORTANT: That means with the `Task` tool, you'll immediately call the Bash tool to run the respective agentic coding tool (gemini, opencode, claude, etc.)
36
+ - IMPORTANT: Instruct the agents to quickly search the codebase for files needed to complete the task. This isn't about a full blown search, just a quick search to find the files needed to complete the task.
37
+ - Instruct the subagent to use a timeout of 3 minutes for each agent's bash call. Skip any agents that don't return within the timeout, don't restart them.
38
+ - **IMPORTANT:** Sacrifice grammar for the sake of concision when writing reports.
39
+ - **IMPORTANT:** In reports, list any unresolved questions at the end, if any.
@@ -0,0 +1,28 @@
1
+ ---
2
+ description: ⚡⚡ Scout given directories to respond to the user's requests
3
+ argument-hint: [user-prompt] [scale]
4
+ ---
5
+
6
+ ## Purpose
7
+
8
+ Search the codebase for files needed to complete the task using a fast, token efficient agent.
9
+
10
+ ## Variables
11
+
12
+ USER_PROMPT: $1
13
+ SCALE: $2 (defaults to 3)
14
+ REPORT_OUTPUT_DIR: Use `Report:` from `## Naming` section
15
+
16
+ ## Workflow:
17
+
18
+ - Write a prompt for 'SCALE' number of agents to the `Task` tool that will immediately call the `Bash` tool to run these commands to kick off your agents to conduct the search: spawn many `Explore` subagents to search the codebase in parallel based on the user's prompt.
19
+
20
+ **How to prompt the agents:**
21
+ - IMPORTANT: Kick these agents off in parallel using the `Task` tool, analyze and divide folders for each agent to scout intelligently and quickly.
22
+ - IMPORTANT: Instruct the agents to quickly search the codebase for files needed to complete the task. This isn't about a full blown search, just a quick search to find the files needed to complete the task.
23
+ - Instruct the subagent to use a timeout of 3 minutes for each agent's bash call. Skip any agents that don't return within the timeout, don't restart them.
24
+
25
+ **How to write reports:**
26
+
27
+ - **IMPORTANT:** Sacrifice grammar for the sake of concision when writing reports.
28
+ - **IMPORTANT:** In reports, list any unresolved questions at the end, if any.
@@ -0,0 +1,36 @@
1
+ ---
2
+ description: Add new reference files or scripts to a skill
3
+ argument-hint: [skill-name] [reference-or-script-prompt]
4
+ ---
5
+
6
+ Think harder.
7
+ Use `skill-creator` skill and `claude-code-guide` subagent.
8
+ Use `docs-seeker` skills to search for documentation if needed.
9
+
10
+ ## Arguments
11
+ $1: skill name (required, default: "")
12
+ $2: reference or script prompt (required, default: "")
13
+ If $1 or $2 is not provided, ask the user to provide it.
14
+
15
+ ## Your mission
16
+ Add new reference files or scripts to a skill at `.claude/skills/$1` directory.
17
+
18
+ ## Requirements
19
+ <reference-or-script-prompt>
20
+ $2
21
+ </reference-or-script-prompt>
22
+
23
+ ## Rules of Skill Creation:
24
+ Base on the requirements:
25
+ - Always keep in mind that `SKILL.md` and reference files should be token consumption efficient, so that **progressive disclosure** can be leveraged at best.
26
+ - `SKILL.md` is always short and concise, straight to the point, treat it as a quick reference guide.
27
+ - If you're given nothing, use `AskUserQuestion` tool for clarifications and `researcher` subagent to research about the topic.
28
+ - If you're given an URL, it's documentation page, use `Explore` subagent to explore every internal link and report back to main agent, don't skip any link.
29
+ - If you receive a lot of URLs, use multiple `Explore` subagents to explore them in parallel, then report back to main agent.
30
+ - If you receive a lot of files, use multiple `Explore` subagents to explore them in parallel, then report back to main agent.
31
+ - If you're given a Github URL, use [`repomix`](https://repomix.com/guide/usage) command to summarize ([install it](https://repomix.com/guide/installation) if needed) and spawn multiple `Explore` subagents to explore it in parallel, then report back to main agent.
32
+
33
+ **IMPORTANT:**
34
+ - Skills are not documentation, they are practical instructions for Claude Code to use the tools, packages, plugins or APIs to achieve the tasks.
35
+ - Each skill teaches Claude how to perform a specific development task, not what a tool does.
36
+ - Claude Code can activate multiple skills automatically to achieve the user's request.
@@ -0,0 +1,29 @@
1
+ ---
2
+ description: Create a new agent skill
3
+ argument-hint: [prompt-or-llms-or-github-url]
4
+ ---
5
+
6
+ Ultrathink.
7
+ Use `skill-creator` skill and `claude-code-guide` subagent.
8
+ Use `docs-seeker` skills to search for documentation if needed.
9
+
10
+ ## Your mission
11
+ Create a new skill in `.claude/skills/` directory.
12
+
13
+ ## Requirements
14
+ <user-prompt>$ARGUMENTS</user-prompt>
15
+
16
+ ## Rules of Skill Creation:
17
+ Base on the requirements:
18
+ - Always keep in mind that `SKILL.md` and reference files should be token consumption efficient, so that **progressive disclosure** can be leveraged at best.
19
+ - `SKILL.md` is always short and concise, straight to the point, treat it as a quick reference guide.
20
+ - If you're given nothing, use `AskUserQuestion` tool for clarifications and `researcher` subagent to research about the topic.
21
+ - If you're given an URL, it's documentation page, use `Explore` subagent to explore every internal link and report back to main agent, don't skip any link.
22
+ - If you receive a lot of URLs, use multiple `Explore` subagents to explore them in parallel, then report back to main agent.
23
+ - If you receive a lot of files, use multiple `Explore` subagents to explore them in parallel, then report back to main agent.
24
+ - If you're given a Github URL, use [`repomix`](https://repomix.com/guide/usage) command to summarize ([install it](https://repomix.com/guide/installation) if needed) and spawn multiple `Explore` subagents to explore it in parallel, then report back to main agent.
25
+
26
+ **IMPORTANT:**
27
+ - Skills are not documentation, they are practical instructions for Claude Code to use the tools, packages, plugins or APIs to achieve the tasks.
28
+ - Each skill teaches Claude how to perform a specific development task, not what a tool does.
29
+ - Claude Code can activate multiple skills automatically to achieve the user's request.
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: Fix the agent skill based on `logs.txt` file.
3
+ argument-hint: [prompt-or-path-to-skill]
4
+ ---
5
+
6
+ Think harder.
7
+ Use `skill-creator` skill and `claude-code-guide` subagent.
8
+ Use `docs-seeker` skills to search for documentation if needed.
9
+
10
+ ## Your mission
11
+ Fix the agent skill based on the current `logs.txt` file (in the project root directory).
12
+
13
+ ## Requirements
14
+ <user-prompt>$ARGUMENTS</user-prompt>
15
+
16
+ ## Rules of Skill Fixing:
17
+ Base on the requirements:
18
+ - If you're given nothing, use `AskUserQuestion` tool for clarifications and `researcher` subagent to research about the topic.
19
+ - If you're given an URL, it's documentation page, use `Explorer` subagent to explore every internal link and report back to main agent, don't skip any link.
20
+ - If you receive a lot of URLs, use multiple `Explorer` subagents to explore them in parallel, then report back to main agent.
21
+ - If you receive a lot of files, use multiple `Explorer` subagents to explore them in parallel, then report back to main agent.
22
+ - If you're given a Github URL, use [`repomix`](https://repomix.com/guide/usage) command to summarize ([install it](https://repomix.com/guide/installation) if needed) and spawn multiple `Explorer` subagents to explore it in parallel, then report back to main agent.
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: Optimize an existing agent skill [auto]
3
+ argument-hint: [skill-name] [prompt]
4
+ ---
5
+
6
+ Think harder.
7
+ Use `skill-creator` skill and `claude-code-guide` subagent.
8
+ Use `docs-seeker` skills to search for documentation if needed.
9
+
10
+ ## Arguments
11
+ SKILL: $1 (default: `*`)
12
+ PROMPT: $2 (default: empty)
13
+
14
+ ## Your mission
15
+ Optimize an existing skill in `.claude/skills/${SKILL}` directory.
16
+ Always keep in mind that `SKILL.md` and reference files should be token consumption efficient, so that **progressive disclosure** can be leveraged at best.
17
+ `SKILL.md` is always short and concise, straight to the point, treat it as a quick reference guide.
18
+
19
+ **IMPORTANT:**
20
+ - Skills are not documentation, they are practical instructions for Claude Code to use the tools, packages, plugins or APIs to achieve the tasks.
21
+ - Each skill teaches Claude how to perform a specific development task, not what a tool does.
22
+ - Claude Code can activate multiple skills automatically to achieve the user's request.
23
+
24
+ ## Additional instructions
25
+ <additional-instructions>$PROMPT</additional-instructions>
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: Optimize an existing agent skill
3
+ argument-hint: [skill-name] [prompt]
4
+ ---
5
+
6
+ Think harder.
7
+ Use `skill-creator` skill and `claude-code-guide` subagent.
8
+ Use `docs-seeker` skills to search for documentation if needed.
9
+
10
+ ## Arguments
11
+ SKILL: $1 (default: `*`)
12
+ PROMPT: $2 (default: empty)
13
+
14
+ ## Your mission
15
+ Propose a plan to optimize an existing skill in `.claude/skills/${SKILL}` directory.
16
+ When you finish, ask user to review your plan:
17
+ - If the user approve: Write down a plan follow "Output Requirements", then ask user if they want to start implementing.
18
+ - If the user reject: Revise the plan or ask more questions to clarify more about the user's request (ask one question at the time), then repeat the review process.
19
+
20
+ ## Additional instructions
21
+ <additional-instructions>$PROMPT</additional-instructions>
22
+
23
+ ## Output Requirements
24
+ An output implementation plan must also follow the progressive disclosure structure:
25
+ - Always keep in mind that `SKILL.md` and reference files should be token consumption efficient, so that **progressive disclosure** can be leveraged at best.
26
+ - `SKILL.md` is always short and concise, straight to the point, treat it as a quick reference guide.
27
+ - Create a directory using naming pattern from `## Naming` section.
28
+ - Save the overview access point at `plan.md`, keep it generic, under 80 lines, and list each phase with status/progress and links.
29
+ - For each phase, add `phase-XX-phase-name.md` files containing sections (Context links, Overview with date/priority/statuses, Key Insights, Requirements, Architecture, Related code files, Implementation Steps, Todo list, Success Criteria, Risk Assessment, Security Considerations, Next steps).
30
+
31
+ **IMPORTANT:**
32
+ - Skills are not documentation, they are practical instructions for Claude Code to use the tools, packages, plugins or APIs to achieve the tasks.
33
+ - Each skill teaches Claude how to perform a specific development task, not what a tool does.
34
+ - Claude Code can activate multiple skills automatically to achieve the user's request.
@@ -0,0 +1,36 @@
1
+ ---
2
+ description: Update an existing agent skill [auto]
3
+ argument-hint: [skill-name] [prompt]
4
+ ---
5
+
6
+ Think harder.
7
+ Use `skill-creator` skill and `claude-code-guide` subagent.
8
+ Use `docs-seeker` skills to search for documentation if needed.
9
+
10
+ ## Arguments
11
+ SKILL: $1 (default: `*`)
12
+ PROMPT: $2 (default: empty)
13
+
14
+ ## Your mission
15
+ Update an existing skill or its reference files in `.claude/skills/${SKILL}` directory based on the user's prompt.
16
+ Always keep in mind that `SKILL.md` and reference files should be token consumption efficient, so that **progressive disclosure** can be leveraged at best.
17
+ `SKILL.md` is always short and concise, straight to the point, treat it as a quick reference guide.
18
+
19
+ ### Scopes
20
+ - Project-scope: Current working project directory (e.g. `.claude/`)
21
+ - User-scope: Home/user directory (e.g. `~/.claude/`)
22
+
23
+ ## IMPORTANT NOTES:
24
+ - ALWAYS make changes to skills in the project-scope `.claude/skills/` directory (UNLESS you're allowed to).
25
+ - DO NOT make any changes to skills in the home/user-scope `~/.claude/skills/` directory (UNLESS you're allowed to).
26
+ - If you're given nothing, use `AskUserQuestion` tool for clarifications and `researcher` subagent to research about the topic.
27
+ - If you're given an URL, it's documentation page, use `Explore` subagent to explore every internal link and report back to main agent, don't skip any link.
28
+ - If you receive a lot of URLs, use multiple `Explore` subagents to explore them in parallel, then report back to main agent.
29
+ - If you receive a lot of files, use multiple `Explore` subagents to explore them in parallel, then report back to main agent.
30
+ - If you're given a Github URL, use [`repomix`](https://repomix.com/guide/usage) command to summarize ([install it](https://repomix.com/guide/installation) if needed) and spawn multiple `Explore` subagents to explore it in parallel, then report back to main agent.
31
+ - Skills are not documentation, they are practical instructions for Claude Code to use the tools, packages, plugins or APIs to achieve the tasks.
32
+ - Each skill teaches Claude how to perform a specific development task, not what a tool does.
33
+ - Claude Code can activate multiple skills automatically to achieve the user's request.
34
+
35
+ ## Additional instructions
36
+ <additional-instructions>$PROMPT</additional-instructions>
@@ -47,6 +47,7 @@ GEMINI_API_KEY=
47
47
  # ============================================
48
48
  # Context7 MCP (Documentation search)
49
49
  # Skill: docs-seeker, mcp-management
50
+ # Get your API key from https://context7.com/dashboard/api-keys
50
51
  # CONTEXT7_API_KEY=
51
52
 
52
53
  # ============================================
File without changes
File without changes
@@ -1,104 +0,0 @@
1
- # AGENTS.md - Working Conventions
2
-
3
- ---
4
-
5
- ## 1) Language
6
- - **Repository artifacts (mandatory)**: All documentation/guides, code comments, and any text written into files must be in **English**.
7
- - **Conversation**: Replies in the chat should be in **Vietnamese**.
8
-
9
- ---
10
-
11
- ## 2) Core Principles (Non-negotiable)
12
- - Clarify Ambiguity First: If a requirement is unclear or incomplete, ask 1-2 clarifying questions before proceeding. Never guess.
13
- - Code Only What Was Asked: Follow the PRD/ticket scope strictly; no extra features.
14
- - Minimum Viable Change: Deliver the simplest, most idempotent fix that works; avoid over-engineering.
15
- - Reuse Before Rewriting: Prefer existing modules or utilities; avoid duplication.
16
- - File Length Limit: Keep every file under 300 LOC; if a change would exceed this, pause and propose a refactor or split plan.
17
- - Configuration and Secrets: Load all secrets or config from environment variables only; never hardcode.
18
- - When writing code, aim for simplicity and readability, not just brevity. Short code that is hard to read is worse than slightly longer code that is clear.
19
- - Clean Up Temporary Files: Delete any temporary test files immediately after use.
20
-
21
- ### Core Directives
22
- - WRITE CODE ONLY TO SPEC.
23
- - MINIMUM, NOT MAXIMUM.
24
- - ONE SIMPLE SOLUTION.
25
- - CLARIFY, DON'T ASSUME.
26
-
27
- ### Philosophy (Non-negotiables)
28
- - Do not add unnecessary files or modules; if a new file is unavoidable, justify it.
29
- - Do not change architecture or patterns unless explicitly required and justified.
30
- - Prioritize readability and maintainability over clever or complex code.
31
-
32
- ---
33
-
34
- ## 3) File-reading Rules (Mandatory)
35
- - **Before editing/creating files**: Read all relevant files in full to understand context.
36
- - **Before starting a task**: Read at minimum `README.md` and relevant files in `docs/*` (if present).
37
- - **If docs are missing or likely stale**: Use `rg` to locate the source of truth quickly.
38
-
39
- ---
40
-
41
- ## 4) Project Structure Index
42
-
43
- > **File**: `docs/structure.md` - Single source of truth for project layout.
44
-
45
- ### When to use `docs/structure.md`
46
- - **Hard-to-locate tasks** (large repo/monorepo): read it first to get the map and narrow the search area.
47
- - **Very broad keywords** (e.g., auth/payment/logging): use structure to pick the right folder before searching deeper.
48
- - **New project / onboarding**: structure gives a fast overview of the main areas.
49
-
50
- ### When to use `rg`
51
- - **Normal tasks**: use `rg` directly to find the real implementation (does not depend on whether structure is up to date).
52
- - **You already have concrete identifiers** (file name / function / class / route / endpoint): `rg` is faster than structure.
53
- - **You suspect structure is stale**: prefer `rg` first, then refresh structure if needed.
54
-
55
- ### When to Update
56
- - **Project has no `docs/structure.md`**: Generate it using `skills/project-index/SKILL.md`.
57
- - **After major changes**: Added/removed modules, restructured folders.
58
- - **Periodic refresh**: Weekly or when index feels outdated.
59
- - **User says**: "update structure", "refresh index", "scan project".
60
-
61
- ### How to Generate/Update
62
- ```
63
- Load: skills/project-index/SKILL.md
64
- - Scan project tree
65
- - Identify key files and patterns
66
- - Write to docs/structure.md
67
- ```
68
-
69
- ---
70
-
71
- ## 5) Dynamic Context Loading
72
-
73
- > **Golden Rule**: Only load context when matching triggers are detected.
74
-
75
- ### Automatic Context Triggers
76
- - **Keywords**: If the request matches a domain (e.g., "debug", "test", "plan", "review"), ALWAYS load the corresponding **Skill** (`skills/**/SKILL.md`) or **Agent** (`agents/**`) first.
77
- - **Slash Commands**: Treat `/command` as an explicit instruction to load `commands/<command>.md` (e.g., `/fix`, `/plan`, `/test`).
78
- - **Complex Tasks**: For multi-step objectives, load `workflows/**` to orchestrate the process.
79
-
80
- ### Hierarchy of Context
81
- 1. **Workflows** (`workflows/**`): High-level orchestration for multi-step processes.
82
- 2. **Agents** (`agents/**`): Specific personas/mindsets for a task type.
83
- 3. **Skills** (`skills/**`): Domain-specific knowledge and playbooks.
84
- 4. **Commands** (`commands/**`): Reusable execution scripts/procedures.
85
-
86
- ### Discovery
87
- If a request is unclear, check `router/decision-flow.md` or scan `skills/` and `commands/` directories to find the best tool for the job. Never guess if a specialized tool exists.
88
-
89
- ---
90
-
91
- ## 6) Execution Discipline
92
- - **Run only necessary commands**; avoid destructive commands (`rm`, `git reset`...) unless explicitly requested.
93
- - **Timeout**: Default 60s; cap at 70-80s for potentially long-running commands.
94
- - **Permission errors**: Explain clearly and propose safe manual steps.
95
- - **New dependencies**: Do not add unless truly necessary and user agrees.
96
-
97
- ---
98
-
99
- ## 7) Auto-Documentation
100
- After completing impactful changes (feature/bugfix/schema/architecture), update briefly:
101
- - `README.md`: If stable info (stack/versions/overview) affected.
102
- - `HANDOFF.md`: Current status + next steps + latest test results.
103
- - `CHANGELOG.md`: Add one line: `YYYY-MM-DD: <Fix|Add|Change|Remove> <what> at <path> - <impact> (completed).`
104
- - `docs/structure.md`: If added/removed files or restructured folders.