thachvd-kit 1.0.15 → 1.0.16

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.
@@ -1,52 +1,30 @@
1
- # 📜 PROMPT RECIPES - Coding Agent Strategy
2
-
3
- Use these templates to enforce modular design, clean architecture, and contextual awareness in any project.
4
-
5
- ---
6
-
7
- ## 🏗️ 1. Project Initiation (Architecture First)
8
- Use this when starting a new project. Force the Agent to design the structure before writing any code.
9
-
10
- > "I want to initialize a new project: [Project Name].
11
- > **Stack:** [e.g., Next.js, FastAPI, Flutter, etc.]
12
- >
13
- > **Architectural Requirements:**
14
- > 1. Follow a **Modular & Scalable** approach. Keep components atomic and logic decoupled.
15
- > 2. **State Management:** Use [e.g., Zustand, Redux, Provier, or none] with a modular pattern.
16
- > 3. **Separation of Concerns:** Keep business logic outside of UI files (use services/use-cases/lib).
17
- > 4. **Resource Management:** Offload heavy computations or system-level tasks to [e.g., Rust, Go, or Backend].
18
- > 5. **Constraints:** Enforce a maximum of **250 lines per file** to ensure atomicity.
19
- >
20
- > Please propose a detailed **File Tree** and explain the responsibility of each directory before implementation."
21
-
22
- ---
23
-
24
- ## ⚡ 2. Complex Feature Implementation
25
- Use this for hard tasks that require deep thinking.
26
-
27
- > "I need to implement the following feature: [Feature Description].
28
- >
29
- > **Execution Workflow:**
30
- > 1. Analyze the project baseline from `PROJECT_CONTEXT.md`.
31
- > 2. Propose a **Data Flow Diagram** or a sequence of operations.
32
- > 3. Break down the task into small, manageable files: State/Store, Logic/Service, and UI/Component.
33
- > 4. Ensure compliance with the project's **Clean Code** standards."
34
-
35
- ---
36
-
37
- ## 🐞 3. Systemic Debugging
38
- Use this when facing logic errors or unexpected behavior.
39
-
40
- > "The application is encountering the following issue: [Error Description].
41
- >
42
- > **Instructions:**
43
- > 1. Identify the **Root Cause** by inspecting logs or using diagnostic tools.
44
- > 2. Verify if this issue impacts the system assumptions defined in `PROJECT_CONTEXT.md`.
45
- > 3. Fix the issue using a sustainable approach. If an architectural refactor is required for a permanent fix, please propose it first."
46
-
47
- ---
48
-
49
- ## 🔄 4. Context Synchronization
50
- Use this at the end of a session or after significant structural changes.
51
-
52
- > "I have completed [Task/Feature]. Please update the **`PROJECT_CONTEXT.md`** file to reflect the latest state of the project, including new files created, technical decisions made, and current progress status."
1
+ # Prompt Recipes
2
+
3
+ Use these prompts after `thachvd-kit init` when you want the AI agent to refine project rules.
4
+
5
+ ## Initial Refinement
6
+
7
+ ```text
8
+ Read AGENTS.md and all files under .agent/docs/.
9
+ Scan the current repository.
10
+ Update .agent/docs/project.md, .agent/docs/architecture.md, and .agent/docs/conventions.md with factual project-specific rules.
11
+ Do not implement product code.
12
+ Remove TODO: refine items only when you have real evidence from the codebase.
13
+ ```
14
+
15
+ ## Before A Feature
16
+
17
+ ```text
18
+ Read AGENTS.md and .agent/docs/workflow.md.
19
+ Check whether .agent/docs/architecture.md and .agent/docs/conventions.md are accurate for this task.
20
+ If they are stale, update the relevant docs first.
21
+ Then define success criteria, implement the smallest coherent change, and verify.
22
+ ```
23
+
24
+ ## After A Task
25
+
26
+ ```text
27
+ Review the files changed in this task.
28
+ If stack, architecture, conventions, commands, or workflow changed, update the relevant .agent/docs/*.md file.
29
+ Summarize verification evidence before claiming done.
30
+ ```
package/kit/README.md CHANGED
@@ -1,33 +1,29 @@
1
- # 🛡️ Cross-Platform Project Kit
2
-
3
- This toolkit helps you build high-quality, modular, and performance-optimized applications by leveraging AI agents with a context-first approach across Antigravity, Claude Code, and Codex-compatible editors.
4
-
5
- ---
6
-
7
- ## 🚀 How to Use
8
-
9
- ### 1. Initialization (Clone & Use)
10
- - Clone this repository.
11
- - Update project metadata (e.g., `package.json`).
12
- - Rename and fill out `PROJECT_CONTEXT.template.md` as `PROJECT_CONTEXT.md` in the root directory.
13
-
14
- ### 2. Working with AI Agents
15
- - Always use the templates provided in `kit/PROMPT_RECIPE.md`.
16
- - Ensure the Agent reads and updates `PROJECT_CONTEXT.md`.
17
- - Use `CLAUDE.md` for Claude Code and `AGENTS.md` for Codex when generating project-specific entry files.
18
- - Enforce file splitting rules (e.g., Max 250 lines) to maintain a clean codebase.
19
-
20
- ### 3. Proposed Structure
21
- - `.agent/rules/GEMINI.md`: Core behavioral rules and protocols.
22
- - `.agent/kit/`: Manuals and templates for project management.
23
- - `PROJECT_CONTEXT.md`: (Manual creation required) The active map of the current project.
24
-
25
- ## 💎 Golden Rules
26
- 1. **Context is King:** Never let the Agent work without a clear Ground Truth.
27
- 2. **Architecture First:** Design the structure before writing any implementation code.
28
- 3. **Keep it Small:** Small files are easier for AI to understand, modify, and keep in context.
29
- 4. **Self-Documenting:** The Agent is responsible for maintaining the project documentation.
30
-
31
- ---
32
-
33
- *Powered by thachvd-kit.*
1
+ # thachvd-kit Kit
2
+
3
+ This kit keeps AI coding behavior consistent across Codex, Antigravity, and Claude Code.
4
+
5
+ ## Entry Files
6
+
7
+ - `AGENTS.md`: shared cross-agent instructions.
8
+ - `CLAUDE.md`: Claude Code entry file that imports `AGENTS.md`.
9
+ - `GEMINI.md`: Antigravity entry file that points to `AGENTS.md`.
10
+
11
+ ## Shared Docs
12
+
13
+ Project-specific knowledge belongs under `.agent/docs/`:
14
+
15
+ - `project.md`: stack, commands, tools, routing, and scan evidence.
16
+ - `architecture.md`: codebase structure, entry points, and boundaries.
17
+ - `conventions.md`: naming, formatting, testing, API, state, and styling patterns.
18
+ - `workflow.md`: repeatable task flow.
19
+
20
+ Agents should update these docs when they discover real project facts. Keep root entry files short.
21
+
22
+ ## Local Kit
23
+
24
+ - `.agent/agents/`: specialist agent guidance.
25
+ - `.agent/skills/`: reusable capability instructions.
26
+ - `.agent/workflows/`: task workflows.
27
+ - `.agent/rules/GEMINI.md`: Antigravity-compatible mirror rules.
28
+
29
+ Powered by thachvd-kit.
package/package.json CHANGED
@@ -1,51 +1,51 @@
1
- {
2
- "name": "thachvd-kit",
3
- "version": "1.0.15",
4
- "description": "Project context bootstrap kit for Antigravity, Claude Code, and Codex",
5
- "bin": {
6
- "thachvd-kit": "./bin/cli.js"
7
- },
8
- "files": [
9
- ".agent",
10
- "agents",
11
- "bin",
12
- "kit",
13
- "rules",
14
- "scripts",
15
- "skills",
16
- "workflows",
17
- "README.md",
18
- "LICENSE"
19
- ],
20
- "preferGlobal": true,
21
- "engines": {
22
- "node": ">=16.7"
23
- },
24
- "scripts": {
25
- "test": "echo \"Error: no test specified\" && exit 1",
26
- "release:patch": "npm version patch",
27
- "release:dry-run": "npm pack --dry-run",
28
- "release:publish": "npm publish"
29
- },
30
- "keywords": [
31
- "ai",
32
- "agent",
33
- "claude",
34
- "antigravity",
35
- "codex"
36
- ],
37
- "author": "thachvd",
38
- "license": "MIT",
39
- "repository": {
40
- "type": "git",
41
- "url": "https://github.com/holdon1996/thachvd-kit.git"
42
- },
43
- "homepage": "https://github.com/holdon1996/thachvd-kit",
44
- "bugs": {
45
- "url": "https://github.com/holdon1996/thachvd-kit/issues"
46
- },
47
- "dependencies": {
48
- "picocolors": "^1.0.0",
49
- "prompts": "^2.4.2"
50
- }
51
- }
1
+ {
2
+ "name": "thachvd-kit",
3
+ "version": "1.0.16",
4
+ "description": "Cross-agent project rules bootstrap kit for Codex, Antigravity, and Claude Code",
5
+ "bin": {
6
+ "thachvd-kit": "./bin/cli.js"
7
+ },
8
+ "files": [
9
+ ".agent",
10
+ "agents",
11
+ "bin",
12
+ "kit",
13
+ "rules",
14
+ "scripts",
15
+ "skills",
16
+ "workflows",
17
+ "README.md",
18
+ "LICENSE"
19
+ ],
20
+ "preferGlobal": true,
21
+ "engines": {
22
+ "node": ">=16.7"
23
+ },
24
+ "scripts": {
25
+ "test": "node test/cli.test.js",
26
+ "release:patch": "npm version patch",
27
+ "release:dry-run": "npm pack --dry-run",
28
+ "release:publish": "npm publish"
29
+ },
30
+ "keywords": [
31
+ "ai",
32
+ "agent",
33
+ "claude",
34
+ "antigravity",
35
+ "codex"
36
+ ],
37
+ "author": "thachvd",
38
+ "license": "MIT",
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "https://github.com/holdon1996/thachvd-kit.git"
42
+ },
43
+ "homepage": "https://github.com/holdon1996/thachvd-kit",
44
+ "bugs": {
45
+ "url": "https://github.com/holdon1996/thachvd-kit/issues"
46
+ },
47
+ "dependencies": {
48
+ "picocolors": "^1.0.0",
49
+ "prompts": "^2.4.2"
50
+ }
51
+ }
package/rules/GEMINI.md CHANGED
@@ -1,209 +1,45 @@
1
- ---
2
- trigger: always_on
3
- ---
4
-
5
- # GEMINI.md — Universal Agent Kit
6
-
7
- > Cross-platform agent protocol. Works with: Antigravity · Claude Code · Codex · OpenCode
8
-
9
- ---
10
-
11
- ## MANDATORY FIRST ACTION
12
-
13
- **At session start — before anything else:**
1
+ ---
2
+ trigger: always_on
3
+ ---
14
4
 
15
- ```
16
- 1. Read PROJECT_CONTEXT.md (if exists) → load stack, agents, constraints
17
- 2. If missing → run @[skills/project-onboarding] to create it
18
- 3. Read PROJECT_CONTEXT context.status and context.needs_ai_refinement
19
- 4. If needs_ai_refinement = true → scan project with AI, update PROJECT_CONTEXT.md, set status=refined and needs_ai_refinement=false
20
- 5. Confirm: "Context loaded: [Project Name] | Stack: [Stack] | Ready."
21
- ```
22
-
23
- > All routing decisions below depend on PROJECT_CONTEXT.md.
24
- > Without it, ask user to run: `thachvd-kit init`
25
- > Baseline context must be refined once when `context.needs_ai_refinement = true`.
26
-
27
- ---
28
-
29
- ## STEP 1 — CLASSIFY REQUEST
30
-
31
- | Type | Triggers | Action |
32
- |------|----------|--------|
33
- | **QUESTION** | "what", "how", "explain", "why" | Direct answer |
34
- | **SURVEY** | "analyze", "list", "overview", "check" | Analysis only, no code |
35
- | **SIMPLE FIX** | "fix", "add", "change" (single file) | Inline edit |
36
- | **BUILD** | "build", "create", "implement", "refactor" | Agent + `{task-slug}.md` |
37
- | **DESIGN/UI** | "design", "UI", "page", "dashboard" | Agent + `{task-slug}.md` |
38
-
39
- ---
40
-
41
- ## STEP 2 — AUTO-SELECT AGENT
42
-
43
- **Protocol:**
44
- 1. Read `stack.primary_language` and `stack.frameworks` from PROJECT_CONTEXT.md
45
- 2. Match to agent table below
46
- 3. Announce before responding:
47
-
48
- ```
49
- 🤖 Applying knowledge of `@[agent-name]`...
50
- ```
51
-
52
- ### Agent Routing Table
53
-
54
- | Domain | Agent | Skills to Load |
55
- |--------|-------|---------------|
56
- | Web frontend (any framework) | `frontend-specialist` | `frontend-design` + framework skill from PROJECT_CONTEXT |
57
- | Backend API (any language) | `backend-specialist` | language skill + `api-design` |
58
- | Database / Schema | `database-architect` | `database-design` |
59
- | Mobile / Desktop (Tauri, RN, Flutter) | `mobile-developer` | platform skill from PROJECT_CONTEXT |
60
- | DevOps / Cloud / CI | `devops-engineer` | `docker-patterns`, `deployment-procedures` |
61
- | Security audit | `security-auditor` | `vulnerability-scanner` |
62
- | Debug / RCA | `debugger` | `systematic-debugging` |
63
- | Planning / Discovery | `project-planner` | `brainstorming`, `plan-writing` |
64
- | Multi-domain | `orchestrator` | `dispatching-parallel-agents` |
65
-
66
- **Framework-specific skill mapping** (reference PROJECT_CONTEXT.stack):
67
-
68
- | Framework/Language | Load Skill |
69
- |-------------------|-----------|
70
- | Vue | `frontend-design` (+ Vue-specific if available) |
71
- | React | `react-frontend` |
72
- | Next.js | `nextjs-react-expert` |
73
- | Laravel | `laravel-patterns` + `laravel-security` |
74
- | Node.js | `nodejs-best-practices` |
75
- | Python | `python-patterns` |
76
- | Go | `golang-patterns` |
77
- | Rust | `rust-pro` |
78
- | Tauri | `desktop-design` + `rust-pro` |
79
- | Docker | `docker-patterns` |
80
-
81
- > If stack not in mapping → use agent's general skill set + `clean-code`.
82
-
83
- **MANDATORY checklist before any code:**
84
- - [ ] Agent identified from PROJECT_CONTEXT.md stack?
85
- - [ ] Agent `.md` file read/recalled?
86
- - [ ] Announcement `🤖 Applying knowledge of @[agent]...` written?
87
-
88
- > 🔴 Code without announcement = **PROTOCOL VIOLATION**
89
-
90
- ---
91
-
92
- ## STEP 3 — SOCRATIC GATE
93
-
94
- **Trigger: BUILD or DESIGN/UI requests only**
95
-
96
- | Scenario | Action |
97
- |----------|--------|
98
- | New feature / greenfield | Ask **3 questions**: Purpose · Users · Must-have vs Nice-to-have |
99
- | Code edit / bug fix | Confirm scope + 1 impact question |
100
- | Vague request | Ask Purpose + Constraints |
101
- | User gave full spec | **Proceed immediately** |
102
- | User says "proceed" / "just do it" | **DO IT — no more questions** |
103
-
104
- **Rules:**
105
- - Max 3 questions at once
106
- - Never ask edge case questions after user already answered
107
- - Reference `@[skills/brainstorming]` for question format
108
-
109
- ---
110
-
111
- ## UNIVERSAL RULES (Always Active)
112
-
113
- ### Language
114
- - Respond in user's language (auto-detect from prompt)
115
- - Code comments/variables always in English
116
-
117
- ### Code Quality
118
- - `@[skills/clean-code]` applies to ALL code, ALL languages
119
- - Tests mandatory: Unit > Integration > E2E
120
- - `@[skills/verification-before-completion]` before claiming "done"
121
-
122
- ### File Changes
123
- - Identify dependent files before modifying
124
- - Update ALL affected files together
125
-
126
- ---
127
-
128
- ## EXECUTION WORKFLOW
129
-
130
- **BUILD tasks — 7-step flow:**
131
-
132
- ```
133
- 1. brainstorming → Clarify (Socratic Gate)
134
- 2. plan-writing → Create {task-slug}.md
135
- 3. using-git-worktrees → Isolated workspace
136
- 4. subagent-driven-development → Implement + 2-stage review
137
- 5. requesting-code-review → After each major task
138
- 6. verification-before-completion → Before claiming done
139
- 7. finishing-a-development-branch → Merge / PR / keep
140
- ```
141
-
142
- **SIMPLE FIX:** Skip to step 4, no worktree needed.
143
-
144
- ---
145
-
146
- ## MODE BEHAVIOR
147
-
148
- | Mode | Behavior |
149
- |------|----------|
150
- | **plan** | Analysis → Planning → Architecture → NO CODE until confirmed |
151
- | **ask** | Questions and analysis only |
152
- | **edit** | Execute. Multi-file → create `{task-slug}.md`. Single-file → proceed. |
153
-
154
- ---
155
-
156
- ## FINAL CHECK
157
-
158
- **Trigger:** "final check", "deploy check", "kiểm tra cuối", "done?"
159
-
160
- ```bash
161
- python scripts/checklist.py .
162
- ```
163
-
164
- Priority: Security → Lint → Tests → UX → SEO
165
-
166
- ---
167
-
168
- ## PATHS
169
-
170
- ```
171
- agents/ → agents/{agent}.md
172
- skills/ → skills/{skill}/SKILL.md
173
- workflows/ → workflows/{command}.md
174
- scripts/ → scripts/init.py, checklist.py, verify_all.py
175
- ```
176
-
177
- ---
178
-
179
- ## QUICK SKILL REFERENCE
180
-
181
- | Need | Skill |
182
- |------|-------|
183
- | Clean code (any lang) | `clean-code` |
184
- | Plan a task | `plan-writing` → `executing-plans` |
185
- | Parallel agents | `dispatching-parallel-agents` |
186
- | Code review | `requesting-code-review` / `receiving-code-review` |
187
- | Git isolation | `using-git-worktrees` |
188
- | Agent-based dev | `subagent-driven-development` |
189
- | Verify done | `verification-before-completion` |
190
- | Finish branch | `finishing-a-development-branch` |
191
- | Write new skill | `writing-skills` |
192
- | API design | `api-design` |
193
- | Docker | `docker-patterns` |
194
- | Laravel | `laravel-patterns`, `laravel-security`, `laravel-tdd` |
195
- | Go | `golang-patterns`, `golang-testing` |
196
- | Debugging | `systematic-debugging` |
197
- | Security | `vulnerability-scanner` |
198
-
199
- ---
200
-
201
- ## CROSS-PLATFORM NOTES
202
-
203
- | Platform | Rules File | Skills Dir | Workflows |
204
- |----------|-----------|-----------|-----------|
205
- | **Antigravity** | `rules/GEMINI.md` (this file) | `skills/` | `workflows/` |
206
- | **Claude Code** | `CLAUDE.md` at project root | `.agent/skills/` | `.agent/workflows/` |
207
- | **Codex / OpenCode** | `AGENTS.md` at project root | `.agent/skills/` | `.agent/workflows/` |
5
+ # GEMINI.md
208
6
 
209
- > Run `thachvd-kit init` to generate project context and platform entry files automatically.
7
+ Antigravity-compatible entry rules for thachvd-kit projects.
8
+
9
+ ## Startup
10
+
11
+ 1. Read `AGENTS.md` at the project root.
12
+ 2. Read `.agent/docs/project.md` for stack, commands, and routing.
13
+ 3. Read `.agent/docs/workflow.md` before editing.
14
+ 4. Read `.agent/docs/architecture.md` and `.agent/docs/conventions.md` before planning non-trivial code changes.
15
+ 5. If any `.agent/docs/*.md` file contains `TODO: refine`, update that doc from the real code before product code changes.
16
+
17
+ ## Routing
18
+
19
+ - Frontend/UI: `.agent/agents/frontend-specialist.md`
20
+ - Backend/API: `.agent/agents/backend-specialist.md`
21
+ - Database/schema: `.agent/agents/database-architect.md`
22
+ - Mobile/desktop: `.agent/agents/mobile-developer.md`
23
+ - DevOps/CI/deploy: `.agent/agents/devops-engineer.md`
24
+ - Debug/RCA: `.agent/agents/debugger.md`
25
+ - Security: `.agent/agents/security-auditor.md`
26
+ - Multi-domain: `.agent/agents/orchestrator.md`
27
+
28
+ Load only the agent, skill, or workflow files relevant to the current task.
29
+
30
+ ## Execution
31
+
32
+ - Questions and analysis: answer directly; do not edit code.
33
+ - Simple fix: inspect dependencies, make the smallest change, verify.
34
+ - Feature or refactor: state assumptions, define success criteria, plan, implement, verify.
35
+ - UI work: use relevant frontend design skills before editing.
36
+ - Security or deploy work: run the matching checklist before claiming done.
37
+
38
+ ## Standards
39
+
40
+ - Respond in the user's language.
41
+ - Keep code, identifiers, and code comments in English.
42
+ - Prefer existing project patterns over new abstractions.
43
+ - Keep changes surgical.
44
+ - Tests or equivalent verification are mandatory.
45
+ - Update `.agent/docs/*` when stack, architecture, workflow, or conventions change.
@@ -1,25 +1,25 @@
1
- ---
2
- name: desktop-design
3
- description: Desktop and cross-platform app design guidance for Tauri and similar desktop shells. Use when building desktop-first interfaces, windowed workflows, keyboard-heavy UX, or cross-platform desktop UI behavior.
4
- allowed-tools: Read, Write, Edit, Glob, Grep, Bash
5
- ---
6
-
7
- # Desktop Design
8
-
9
- This skill covers desktop-first product thinking where `mobile-design` is the wrong default.
10
-
11
- Use it for Tauri and other desktop-oriented apps with window management, keyboard shortcuts, dense layouts, or multi-panel workflows.
12
-
13
- ## Guidance
14
-
15
- - Design for pointer + keyboard, not touch-first.
16
- - Use information density deliberately; desktop screens can support richer sidebars and multi-column layouts.
17
- - Respect platform conventions for menus, shortcuts, dialogs, file pickers, and drag/drop.
18
- - Assume resizing, multiple windows, and long-running sessions are normal.
19
- - Pair with `rust-pro` for Tauri backend/native concerns and `frontend-design` for UI execution.
20
-
21
- ## Related Skills
22
-
23
- - `mobile-design` for touch-first mobile products
24
- - `frontend-design` for visual and interaction design
25
- - `rust-pro` for Rust and Tauri implementation details
1
+ ---
2
+ name: desktop-design
3
+ description: Desktop and cross-platform app design guidance for Tauri and similar desktop shells. Use when building desktop-first interfaces, windowed workflows, keyboard-heavy UX, or cross-platform desktop UI behavior.
4
+ allowed-tools: Read, Write, Edit, Glob, Grep, Bash
5
+ ---
6
+
7
+ # Desktop Design
8
+
9
+ This skill covers desktop-first product thinking where `mobile-design` is the wrong default.
10
+
11
+ Use it for Tauri and other desktop-oriented apps with window management, keyboard shortcuts, dense layouts, or multi-panel workflows.
12
+
13
+ ## Guidance
14
+
15
+ - Design for pointer + keyboard, not touch-first.
16
+ - Use information density deliberately; desktop screens can support richer sidebars and multi-column layouts.
17
+ - Respect platform conventions for menus, shortcuts, dialogs, file pickers, and drag/drop.
18
+ - Assume resizing, multiple windows, and long-running sessions are normal.
19
+ - Pair with `rust-pro` for Tauri backend/native concerns and `frontend-design` for UI execution.
20
+
21
+ ## Related Skills
22
+
23
+ - `mobile-design` for touch-first mobile products
24
+ - `frontend-design` for visual and interaction design
25
+ - `rust-pro` for Rust and Tauri implementation details
@@ -1,62 +1,42 @@
1
- ---
2
- name: project-onboarding
3
- description: Skill for project reconnaissance and Ground Truth establishment. Automatically scans project structure, tech stack, and logic to create or update PROJECT_CONTEXT.md.
4
- allowed-tools: list_dir, grep_search, find_by_name, view_file, write_to_file
5
- ---
6
-
7
- # Project Onboarding Skill
8
-
9
- > Establish a Ground Truth map for any project before writing code.
10
-
11
- ---
12
-
13
- ## 🎯 Objectives
14
- - **Reconnaissance:** Understand the directory structure, technology stack, and core business logic.
15
- - **Ground Truth:** Create `PROJECT_CONTEXT.md` to serve as the project's primary reference.
16
- - **Continuity:** Ensure all future sessions have a map to follow.
17
-
18
- ---
19
-
20
- ## 📑 Process
21
-
22
- 1. **Scan Filesystem:**
23
- - Run `list_dir` on root.
24
- - Run `find_by_name` for configuration files (`package.json`, `tsconfig.json`, `tailwind.config.js`, etc.).
25
- 2. **Identify Tech Stack:**
26
- - Detect frameworks (React, Next.js, Vite, etc.).
27
- - Detect database/storage (SQL, NoSQL, client-side DB).
28
- - Detect styling and UI libraries.
29
- 3. **Analyze Structure:**
30
- - Identify where pages, components, logic, and state management live.
31
- 4. **Identify Core Logic:**
32
- - `grep` for main keywords (e.g., patient, pharmacy, etc.) to find business rules.
33
- 5. **Create/Update Map:**
34
- - Generate `PROJECT_CONTEXT.md` in root using the `PROJECT_CONTEXT.template.md` as a guide.
35
-
36
- ---
37
-
38
- ## ✅ Onboarding Checklist
39
-
40
- Before completing onboarding:
41
-
42
- - [ ] **Scanned root directory?**
43
- - [ ] **Identified Frontend/Backend stack?**
44
- - [ ] **Mapped primary folder structure?**
45
- - [ ] **Found core business logic entry points?**
46
- - [ ] **Created/Updated PROJECT_CONTEXT.md?**
47
- - [ ] **Stated: "Ground Truth identified/established. Ready to proceed."?**
48
-
49
- ---
50
-
51
- ## ❌ Anti-Patterns
52
-
53
- **DON'T:**
54
- - Skip onboarding for "simple" fixes.
55
- - Assume structure based on generic templates.
56
- - Start writing code before `PROJECT_CONTEXT.md` exists.
57
- - Leave the context file empty or vague.
58
-
59
- **DO:**
60
- - Perform deep directory analysis.
61
- - Read core configuration files.
62
- - Document any project-specific constraints found in existing code.
1
+ ---
2
+ name: project-onboarding
3
+ description: Scan the repository and refine `.agent/docs/*` so all supported AI tools share accurate project rules.
4
+ ---
5
+
6
+ # Project Onboarding
7
+
8
+ Use this skill when a project has just run `thachvd-kit init`, when `.agent/docs/*` contains `TODO: refine`, or when the stack/architecture has changed.
9
+
10
+ ## Goal
11
+
12
+ Create or update the shared project docs used by Codex, Antigravity, and Claude Code:
13
+
14
+ - `.agent/docs/project.md`
15
+ - `.agent/docs/architecture.md`
16
+ - `.agent/docs/conventions.md`
17
+ - `.agent/docs/workflow.md`
18
+
19
+ Do not create a legacy root context file.
20
+
21
+ ## Process
22
+
23
+ 1. Read `AGENTS.md`.
24
+ 2. Inspect repository structure, package/build config, test config, entry points, and representative source files.
25
+ 3. Update `.agent/docs/project.md` with stack, app root, commands, test/lint tooling, and routing.
26
+ 4. Update `.agent/docs/architecture.md` with major directories, entry points, boundaries, and important decisions.
27
+ 5. Update `.agent/docs/conventions.md` with real naming, formatting, API, state, styling, and testing patterns.
28
+ 6. Update `.agent/docs/workflow.md` only when the repository needs project-specific workflow steps.
29
+
30
+ ## Rules
31
+
32
+ - Keep docs concise and factual.
33
+ - Mark unknowns as `TODO: refine` only when the codebase does not provide evidence.
34
+ - Do not implement product code during onboarding.
35
+ - Do not overwrite unrelated user-maintained notes.
36
+
37
+ ## Completion Checklist
38
+
39
+ - [ ] `.agent/docs/project.md` reflects actual stack and commands.
40
+ - [ ] `.agent/docs/architecture.md` maps the current codebase.
41
+ - [ ] `.agent/docs/conventions.md` captures observed patterns.
42
+ - [ ] `.agent/docs/workflow.md` has the task flow agents should follow.