@kienha/anti-chaotic 1.0.2 → 1.0.5

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 (35) hide show
  1. package/.agent/rules/documentation.md +1 -1
  2. package/.agent/skills/backend-developer/SKILL.md +4 -14
  3. package/.agent/skills/business-analysis/SKILL.md +2 -4
  4. package/.agent/skills/designer/SKILL.md +36 -58
  5. package/.agent/skills/devops-engineer/SKILL.md +0 -9
  6. package/.agent/skills/frontend-developer/SKILL.md +17 -3
  7. package/.agent/skills/frontend-developer/react/SKILL.md +16 -12
  8. package/.agent/skills/lead-architect/SKILL.md +2 -2
  9. package/.agent/skills/rules-workflows/SKILL.md +62 -19
  10. package/.agent/skills/rules-workflows/assets/workflow-basic.md +112 -0
  11. package/.agent/skills/rules-workflows/references/orchestration-patterns.md +15 -3
  12. package/.agent/skills/rules-workflows/references/rules-guide.md +6 -47
  13. package/.agent/skills/rules-workflows/references/workflows-guide.md +12 -20
  14. package/.agent/skills/skill-creator/SKILL.md +18 -20
  15. package/.agent/skills/skill-creator/assets/skill-questionnaire.md +8 -0
  16. package/.agent/workflows/docs-from-codebase.md +104 -0
  17. package/.agent/workflows/implement-feature.md +148 -0
  18. package/.agent/workflows/requirement-analysis.md +113 -249
  19. package/.agent/workflows/setup-codebase.md +51 -58
  20. package/.agent/workflows/ui-ux-design.md +72 -51
  21. package/README.md +23 -343
  22. package/bin/{ag.js → anti-chaotic.js} +17 -0
  23. package/package.json +5 -4
  24. package/.agent/skills/frontend-developer/references/react-next.md +0 -67
  25. package/.agent/skills/frontend-developer/references/react.md +0 -91
  26. package/.agent/skills/rules-workflows/assets/example-workflow.md +0 -37
  27. package/.agent/skills/rules-workflows/assets/templates/rule-project-context.md +0 -26
  28. package/.agent/skills/rules-workflows/assets/templates/workflow-agile-feature.md +0 -62
  29. package/.agent/workflows/generate-docs-from-codebase.md +0 -335
  30. package/.agent/workflows/workflow-rule-from-codebase.md +0 -43
  31. package/.agent/workflows/workflow-rule-from-feedback.md +0 -38
  32. /package/.agent/skills/rules-workflows/assets/{example-rule-always-on.md → rule-always-on.md} +0 -0
  33. /package/.agent/skills/rules-workflows/assets/{example-rule-glob.md → rule-glob.md} +0 -0
  34. /package/.agent/skills/rules-workflows/assets/{example-rule-manual.md → rule-manual.md} +0 -0
  35. /package/.agent/skills/rules-workflows/assets/{example-rule-model-decision.md → rule-model-decision.md} +0 -0
@@ -8,27 +8,9 @@
8
8
 
9
9
  ## Workflow File Template
10
10
 
11
- ```markdown
12
- ---
13
- description: [Brief description for workflow discovery]
14
- ---
15
-
16
- # Workflow Title
17
-
18
- [Optional overview of what this workflow accomplishes]
19
-
20
- ## Step 1: [Action Name]
21
-
22
- [Detailed instructions for this step]
23
-
24
- ## Step 2: [Action Name]
11
+ A basic workflow template is available in `../assets/workflow-basic.md`.
25
12
 
26
- [Detailed instructions for this step]
27
-
28
- ## Step 3: [Action Name]
29
-
30
- [Detailed instructions for this step]
31
- ```
13
+ This template serves as a comprehensive guide for structuring workflows, including tool usage, step definitions, and referencing other skills.
32
14
 
33
15
  ## Calling Other Workflows
34
16
 
@@ -46,6 +28,16 @@ After performing a task manually, ask agent to formalize it:
46
28
 
47
29
  > "Create a workflow from our conversation about deploying to production"
48
30
 
31
+ ## Workflow Design Principles
32
+
33
+ When creating new workflows, strictly follow **"Workflow = Process"**:
34
+
35
+ 1. **Sequence over Standards**: Define _what_ to do and _when_, but delegate _how_ to Skills.
36
+ 2. **Refer to roles**: Use "As [Role]" or "Call [Skill]" instead of hardcoding instructions.
37
+ 3. **Dynamic References**:
38
+ - ❌ `Ensure indentation is 2 spaces.` (Hardcoded knowledge)
39
+ - ✅ `Format code according to project standards defined in [frontend-developer] skill.` (Dynamic reference)
40
+
49
41
  ## Best Practices
50
42
 
51
43
  1. **Clear step names** - Describe the action in step title
@@ -60,10 +60,24 @@ Markdown instructions for the agent. Keep under **5000 tokens** for optimal cont
60
60
 
61
61
  Include:
62
62
 
63
- - Step-by-step workflows
63
+ - **Tool Usage Standards**: Standard patterns for using Antigravity tools (`run_command`, `read_file`) within this domain.
64
+ - Step-by-step workflows (Procedures, not Lifecycle Workflows)
64
65
  - Code examples
65
66
  - Edge cases and troubleshooting
66
67
 
68
+ ## Skill Design Principles
69
+
70
+ **Strict Separation of Concerns**:
71
+
72
+ - **Skill = Knowledge**: Capabilities, Standards, Best Practices, Reference Data.
73
+ - **Workflow = Process**: Steps, Sequences, Lifecycles, Timelines.
74
+
75
+ > [!WARNING]
76
+ > **Do NOT embed Workflows in Skills.**
77
+ >
78
+ > - ❌ Bad: A `backend-developer` skill defining a "Feature Implementation" lifecycle.
79
+ > - ✅ Good: A `backend-developer` skill defining "API Design Standards" and asking the user to use a generic Workflow to execute it.
80
+
67
81
  ## Progressive Disclosure
68
82
 
69
83
  Skills use three-level loading to manage context efficiently:
@@ -88,29 +102,12 @@ Skills use three-level loading to manage context efficiently:
88
102
  Use available tools to understand the full picture:
89
103
 
90
104
  1. **Search tools**: Use `search_web`, `read_url_content` to research official documentation
91
- 2. **MCP servers**: Query relevant MCP servers (e.g., `context7` for library docs) if available
92
- 3. **Codebase analysis**: Use `grep_search`, `find_by_name` to understand existing patterns
93
-
94
- **Use MCP Sequential Thinking for complex analysis:**
95
-
96
- For complex problems, use `mcp_sequential-thinking_sequentialthinking` to:
97
-
98
- - Break down problems into reasoning steps
99
- - Consider multiple angles, revise if needed
100
- - Generate hypotheses and verify step-by-step
101
- - Ensure no edge cases are missed
102
-
103
- ```
104
- Thought 1: Identify core requirements
105
- Thought 2: Analyze dependencies
106
- Thought 3: Consider edge cases
107
- ...
108
- Final: Synthesize conclusions
109
- ```
105
+ 2. **Codebase analysis**: Use `grep_search`, `find_by_name` to understand existing patterns
110
106
 
111
107
  **Analyze step-by-step:**
112
108
 
113
109
  - What are the core capabilities needed?
110
+ - **What standard Antigravity tools are most relevant?** (e.g., read_file for docs, run_command for CLI)
114
111
  - What are common use cases and edge cases?
115
112
  - What scripts or references would be reusable?
116
113
 
@@ -196,6 +193,7 @@ Instead of generic "What constraints?", ask specific questions like:
196
193
 
197
194
  - What is the specific domain? (frontend, backend, devops, AI, etc.)
198
195
  - What tech stack or frameworks are involved?
196
+ - **What standard tool patterns apply?** (e.g., File system ops vs Command line ops)
199
197
  - What constraints must be followed? (time, resources, team size)
200
198
 
201
199
  ### Phase 3: Scope (Define Boundaries)
@@ -73,6 +73,14 @@
73
73
 
74
74
  <!-- Options: junior, senior, expert (20+ years) -->
75
75
 
76
+ ### Design Principle: Separation of Concerns
77
+
78
+ <!-- Reminder:
79
+ - Skill = Knowledge (Capabilities, Standards, Best Practices)
80
+ - Workflow = Process (Steps, Sequences, Lifecycles)
81
+ Do NOT ask for "Process" definitions here. Focus on "Knowledge".
82
+ -->
83
+
76
84
  ### Which best practices must be followed?
77
85
 
78
86
  <!-- Example: "Follow Testing Trophy pattern, AAA structure for tests" -->
@@ -0,0 +1,104 @@
1
+ ---
2
+ description: Generate comprehensive documentation from existing codebase (Architecture, API, Specs).
3
+ ---
4
+
5
+ # Generate Documentation from Codebase
6
+
7
+ Automatically generates structured documentation from an existing codebase.
8
+
9
+ > [!IMPORTANT]
10
+ > **MANDATORY**: Apply `.agent/rules/documentation.md` for all document creation.
11
+
12
+ ---
13
+
14
+ ## MCP Usage Guidelines
15
+
16
+ | MCP Tool | When to Use |
17
+ | -------------------------------------------- | ---------------------------------------------- |
18
+ | `mcp_sequential-thinking_sequentialthinking` | Analyze complex architecture, design decisions |
19
+ | `mcp_context7_query-docs` | Research framework patterns, diagram syntax |
20
+
21
+ ---
22
+
23
+ ## Step 1: Codebase Discovery
24
+
25
+ // turbo
26
+
27
+ > 💡 **MCP**: Use `sequential-thinking` to analyze unfamiliar project structures
28
+
29
+ 1. **Invoke `[lead-architect]` skill** to analyze codebase structure
30
+ 2. Identify: tech stack, entry points, API routes, DB schemas
31
+ 3. **WAIT** for user to confirm understanding
32
+
33
+ ---
34
+
35
+ ## Step 2: Determine Scope
36
+
37
+ // turbo
38
+
39
+ Ask user which documentation to generate:
40
+
41
+ - System Architecture
42
+ - API Documentation
43
+ - Database Schema
44
+ - Component Reference
45
+
46
+ **Default**: Generate all if not specified.
47
+
48
+ ---
49
+
50
+ ## Step 3: Generate Architecture Documentation
51
+
52
+ // turbo
53
+
54
+ > 💡 **MCP**: Use `sequential-thinking` + `context7` with `/mermaid-js/mermaid` for C4 diagrams
55
+
56
+ 1. **Invoke `[lead-architect]` skill** to create:
57
+ - System Context (C4 Context Diagram)
58
+ - Component View (C4 Component Diagram)
59
+ - Data Flow documentation
60
+
61
+ ---
62
+
63
+ ## Step 4: Generate API Documentation
64
+
65
+ // turbo
66
+
67
+ > 💡 **MCP**: Use `context7` for framework-specific API patterns
68
+
69
+ 1. **Invoke `[backend-developer]` skill** to:
70
+ - Scan and document API routes
71
+ - Create endpoint specifications
72
+
73
+ ---
74
+
75
+ ## Step 5: Generate Database Schema Documentation
76
+
77
+ // turbo
78
+
79
+ > 💡 **MCP**: Use `context7` with `/drizzle-team/*` or `/prisma/*` + `/mermaid-js/mermaid` for ERD
80
+
81
+ 1. **Invoke `[backend-developer]` skill** to:
82
+ - Document entities and relationships
83
+ - Generate ERD diagram
84
+
85
+ ---
86
+
87
+ ## Step 6: Finalize
88
+
89
+ // turbo
90
+
91
+ 1. Create/update MOC files
92
+ 2. Validate wiki-links and frontmatter
93
+ 3. Present summary and suggest next steps
94
+
95
+ ---
96
+
97
+ ## Quick Reference
98
+
99
+ | Step | Skill | Output |
100
+ | ---- | ----------------- | ----------------- |
101
+ | 1 | lead-architect | Codebase analysis |
102
+ | 3 | lead-architect | Architecture docs |
103
+ | 4 | backend-developer | API docs |
104
+ | 5 | backend-developer | Schema docs |
@@ -0,0 +1,148 @@
1
+ ---
2
+ description: End-to-end feature implementation workflow (Spec → Design → Code → Test → Deploy)
3
+ ---
4
+
5
+ # Feature Implementation Workflow
6
+
7
+ Orchestrates feature implementation from specification to deployment.
8
+
9
+ > [!IMPORTANT]
10
+ > **MANDATORY**: Read `.agent/rules/documentation.md` before creating any document.
11
+
12
+ ---
13
+
14
+ ## MCP Usage Guidelines
15
+
16
+ | MCP Tool | When to Use | Example Query |
17
+ | -------------------------------------------- | ------------------------------------------------- | ------------------------------ |
18
+ | `mcp_sequential-thinking_sequentialthinking` | Complex decisions, debugging, architecture design | Break down feature into tasks |
19
+ | `mcp_context7_resolve-library-id` | Find library ID before querying docs | "react hook form" |
20
+ | `mcp_context7_query-docs` | Research library patterns, APIs, best practices | "How to setup auth in Next.js" |
21
+
22
+ ---
23
+
24
+ ## Step 0: Quick Specification (Optional)
25
+
26
+ **Skip if**: User Stories or specs already exist in `docs/`.
27
+
28
+ > 💡 **MCP**: Use `sequential-thinking` to analyze ambiguous requirements
29
+
30
+ 1. **Invoke `[product-manager]` skill** to clarify requirements
31
+ 2. Create `feature-spec.md` artifact with: Goal, User, Acceptance Criteria
32
+ 3. **WAIT** for user confirmation
33
+
34
+ ---
35
+
36
+ ## Step 1: Locate Existing Artifacts
37
+
38
+ // turbo
39
+
40
+ > 💡 **MCP**: Use `context7` to research unfamiliar tech in existing codebase
41
+
42
+ 1. Search `docs/` for related: User Stories, SDD, Designs
43
+ 2. **Invoke `[lead-architect]` skill** to identify scope and dependencies
44
+ 3. List files to create/modify
45
+ 4. **WAIT** for user to confirm scope
46
+
47
+ ---
48
+
49
+ ## Step 2: Implementation Plan
50
+
51
+ // turbo
52
+
53
+ > 💡 **MCP**: **MUST** use `sequential-thinking` to break down complex features into atomic tasks
54
+
55
+ 1. **Invoke `[lead-architect]` skill** to create task breakdown
56
+ 2. Create `implementation-plan.md` artifact with phased tasks
57
+ 3. Save to `docs/050-Tasks/Task-{FeatureName}.md` after approval
58
+ 4. **WAIT** for user approval
59
+
60
+ ---
61
+
62
+ ## Step 3: Design Review (If UI Feature)
63
+
64
+ // turbo
65
+
66
+ **Skip if**: Feature is purely backend/API.
67
+
68
+ > 💡 **MCP**: Use `context7` with `/radix-ui/*` or `/shadcn/*` for component patterns
69
+
70
+ 1. Check `docs/040-Design/` for existing designs
71
+ 2. **Invoke `[designer]` skill** for new component specifications
72
+ 3. **WAIT** for user confirmation
73
+
74
+ ---
75
+
76
+ ## Step 4: Backend Implementation
77
+
78
+ // turbo
79
+
80
+ > 💡 **MCP**:
81
+ >
82
+ > - Use `context7` with `/supabase/supabase`, `/prisma/prisma` for DB patterns
83
+ > - Use `sequential-thinking` for complex business logic
84
+
85
+ 1. **Invoke `[backend-developer]` skill** for:
86
+ - Data models/migrations
87
+ - API endpoints/server functions
88
+ - Unit tests (TDD approach)
89
+ 2. Run tests and verify
90
+ 3. **WAIT** for user checkpoint
91
+
92
+ ---
93
+
94
+ ## Step 5: Frontend Implementation
95
+
96
+ // turbo
97
+
98
+ > 💡 **MCP**: Use `context7` with `/vercel/next.js`, `/tanstack/react-query`, `/react-hook-form/*` for patterns
99
+
100
+ 1. **Invoke `[frontend-developer]` skill** for:
101
+ - Components following design specs
102
+ - State management
103
+ - Component tests
104
+ 2. **WAIT** for user checkpoint
105
+
106
+ ---
107
+
108
+ ## Step 6: Integration & QA
109
+
110
+ // turbo
111
+
112
+ > 💡 **MCP**:
113
+ >
114
+ > - Use `context7` with `/vitest-dev/vitest`, `/playwright/*` for testing patterns
115
+ > - Use `sequential-thinking` to analyze test failures
116
+
117
+ 1. **Invoke `[qa-tester]` skill** for:
118
+ - E2E test execution
119
+ - Acceptance criteria verification
120
+ - Edge case testing
121
+ 2. Create `qa-report.md` artifact
122
+ 3. **WAIT** for user to confirm ready
123
+
124
+ ---
125
+
126
+ ## Step 7: Finalize
127
+
128
+ // turbo
129
+
130
+ 1. **Invoke `[lead-architect]` skill** to:
131
+ - Update MOC files
132
+ - Move task to `docs/050-Tasks/Completed/`
133
+ - Update API/changelog if applicable
134
+ 2. Present completion summary with next steps
135
+
136
+ ---
137
+
138
+ ## Quick Reference
139
+
140
+ | Step | Skill | Output |
141
+ | ---- | ------------------ | ---------------------- |
142
+ | 0 | product-manager | feature-spec.md |
143
+ | 1-2 | lead-architect | implementation-plan.md |
144
+ | 3 | designer | Component specs |
145
+ | 4 | backend-developer | API, Models, Tests |
146
+ | 5 | frontend-developer | Components, Tests |
147
+ | 6 | qa-tester | qa-report.md |
148
+ | 7 | lead-architect | Updated docs |