@kienha/anti-chaotic 1.0.2 → 1.0.6

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 (40) hide show
  1. package/.agent/rules/{documentation.md → documents.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 +22 -112
  10. package/.agent/skills/rules-workflows/assets/workflow-basic.md +112 -0
  11. package/.agent/skills/rules-workflows/references/orchestration-patterns.md +13 -3
  12. package/.agent/skills/rules-workflows/references/rules-guide.md +82 -65
  13. package/.agent/skills/rules-workflows/references/workflows-guide.md +95 -26
  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/bootstrap.md +96 -0
  17. package/.agent/workflows/brainstorm.md +81 -0
  18. package/.agent/workflows/custom-behavior.md +64 -0
  19. package/.agent/workflows/documentation.md +123 -0
  20. package/.agent/workflows/implement-feature.md +146 -0
  21. package/.agent/workflows/ui-ux-design.md +70 -51
  22. package/README.md +55 -354
  23. package/bin/{ag.js → anti-chaotic.js} +17 -0
  24. package/package.json +5 -4
  25. package/.agent/skills/frontend-developer/references/react-next.md +0 -67
  26. package/.agent/skills/frontend-developer/references/react.md +0 -91
  27. package/.agent/skills/rules-workflows/assets/example-workflow.md +0 -37
  28. package/.agent/skills/rules-workflows/assets/templates/rule-project-context.md +0 -26
  29. package/.agent/skills/rules-workflows/assets/templates/workflow-agile-feature.md +0 -62
  30. package/.agent/skills/skill-creator/scripts/__pycache__/encoding_utils.cpython-312.pyc +0 -0
  31. package/.agent/skills/skill-creator/scripts/__pycache__/quick_validate.cpython-312.pyc +0 -0
  32. package/.agent/workflows/generate-docs-from-codebase.md +0 -335
  33. package/.agent/workflows/requirement-analysis.md +0 -336
  34. package/.agent/workflows/setup-codebase.md +0 -97
  35. package/.agent/workflows/workflow-rule-from-codebase.md +0 -43
  36. package/.agent/workflows/workflow-rule-from-feedback.md +0 -38
  37. /package/.agent/skills/rules-workflows/assets/{example-rule-always-on.md → rule-always-on.md} +0 -0
  38. /package/.agent/skills/rules-workflows/assets/{example-rule-glob.md → rule-glob.md} +0 -0
  39. /package/.agent/skills/rules-workflows/assets/{example-rule-manual.md → rule-manual.md} +0 -0
  40. /package/.agent/skills/rules-workflows/assets/{example-rule-model-decision.md → rule-model-decision.md} +0 -0
@@ -0,0 +1,123 @@
1
+ ---
2
+ description: Generate comprehensive documentation (Architecture, API, Specs) from either Codebase or Requirements.
3
+ ---
4
+
5
+ # Documentation Workflow
6
+
7
+ > [!IMPORTANT]
8
+ > **MANDATORY**: Apply `.agent/rules/documents.md` for all document creation.
9
+
10
+ ---
11
+
12
+ ## MCP Usage Guidelines
13
+
14
+ | MCP Tool | When to Use |
15
+ | :------------------------------------------- | :--------------------------------------------- |
16
+ | `mcp_sequential-thinking_sequentialthinking` | Analyze complex architecture, design decisions |
17
+ | `mcp_context7_query-docs` | Research framework patterns, diagram syntax |
18
+
19
+ ---
20
+
21
+ ## Step 0: Determine Mode
22
+
23
+ **Determine the source of truth:**
24
+
25
+ 1. **From Codebase**: Reverse engineer docs from existing code.
26
+ 2. **From Requirements**: Forward engineer detailed specs (SDD, Stories) from PRD/Roadmap.
27
+
28
+ ---
29
+
30
+ # MODE A: From Codebase
31
+
32
+ ## Step A1: Codebase Discovery
33
+
34
+ // turbo
35
+
36
+ > 💡 **MCP**: Use `sequential-thinking` to analyze unfamiliar project structures
37
+
38
+ 1. **Invoke `[lead-architect]` skill** to analyze codebase structure
39
+ 2. Identify: tech stack, entry points, API routes, DB schemas
40
+ 3. **WAIT** for user to confirm understanding
41
+
42
+ ---
43
+
44
+ ## Step A2: Legacy Docs Generation (Architecture, API, Schema)
45
+
46
+ // turbo
47
+
48
+ 1. **Invoke `[lead-architect]` skill** to create:
49
+ - System Context (C4 Context Diagram)
50
+ - Component View (C4 Component Diagram)
51
+ 2. **Invoke `[backend-developer]` skill** to:
52
+ - Document API endpoints
53
+ - Generate Entity Relationship Diagram (ERD)
54
+ 3. Save to `docs/030-Specs/` and `docs/030-Specs/Architecture/`
55
+
56
+ ---
57
+
58
+ # MODE B: From Requirements
59
+
60
+ **Prerequisite**: Existing PRD (from `/brainstorm`).
61
+
62
+ ## Step B1: Create SDD (System Design Document)
63
+
64
+ // turbo
65
+
66
+ > 💡 **MCP**:
67
+ >
68
+ > - **MUST** use `sequential-thinking` for architectural decisions
69
+ > - Use `context7` with `/vercel/next.js`, `/supabase/supabase` for tech stack research
70
+
71
+ 1. **Invoke `[lead-architect]` skill** to draft:
72
+ - High-level system architecture
73
+ - Technology stack decisions
74
+ - Component diagram
75
+ - Data flow overview
76
+ 2. Create `draft-sdd.md` artifact
77
+ 3. After approval → Save to `docs/030-Specs/Architecture/SDD-{ProjectName}.md`
78
+
79
+ ---
80
+
81
+ ## Step B2: Create Epics & Use Cases
82
+
83
+ // turbo
84
+
85
+ 1. **Invoke `[business-analysis]` skill** to:
86
+ - Break PRD features into Epics (`docs/022-User-Stories/Epics/`)
87
+ - Define Use Cases with Mermaid diagrams (`docs/020-Requirements/Use-Cases/`)
88
+ 2. Create artifacts for review before saving
89
+
90
+ ---
91
+
92
+ ## Step B3: Create User Stories
93
+
94
+ // turbo
95
+
96
+ 1. **Invoke `[business-analysis]` skill** to create:
97
+ - User Stories with Acceptance Criteria (`docs/022-User-Stories/Backlog/`)
98
+ - Complexity estimates
99
+ 2. Create `draft-user-stories.md` artifact
100
+ 3. After approval → Save
101
+
102
+ ---
103
+
104
+ ## Step B4: Create ADRs (Optional)
105
+
106
+ // turbo
107
+
108
+ **Skip if**: User did not request ADRs.
109
+
110
+ 1. **Invoke `[lead-architect]` skill** to document technical decisions.
111
+ 2. Save to `docs/030-Specs/Architecture/ADR-{NNN}-{Decision}.md`
112
+
113
+ ---
114
+
115
+ # Finalize
116
+
117
+ ## Step X: Finalize
118
+
119
+ // turbo
120
+
121
+ 1. Create/update MOC files
122
+ 2. Validate wiki-links and frontmatter
123
+ 3. Present summary and suggest next steps (`/ui-ux-design` or `/implement-feature`)
@@ -0,0 +1,146 @@
1
+ ---
2
+ description: Orchestrates feature implementation from specification to deployment.
3
+ ---
4
+
5
+ # Feature Implementation Workflow
6
+
7
+ > [!IMPORTANT]
8
+ > **MANDATORY**: Read `.agent/rules/documents.md` before creating any document.
9
+
10
+ ---
11
+
12
+ ## MCP Usage Guidelines
13
+
14
+ | MCP Tool | When to Use | Example Query |
15
+ | -------------------------------------------- | ------------------------------------------------- | ------------------------------ |
16
+ | `mcp_sequential-thinking_sequentialthinking` | Complex decisions, debugging, architecture design | Break down feature into tasks |
17
+ | `mcp_context7_resolve-library-id` | Find library ID before querying docs | "react hook form" |
18
+ | `mcp_context7_query-docs` | Research library patterns, APIs, best practices | "How to setup auth in Next.js" |
19
+
20
+ ---
21
+
22
+ ## Step 0: Quick Specification (Optional)
23
+
24
+ **Skip if**: User Stories or specs already exist in `docs/`.
25
+
26
+ > 💡 **MCP**: Use `sequential-thinking` to analyze ambiguous requirements
27
+
28
+ 1. **Invoke `[product-manager]` skill** to clarify requirements
29
+ 2. Create `feature-spec.md` artifact with: Goal, User, Acceptance Criteria
30
+ 3. **WAIT** for user confirmation
31
+
32
+ ---
33
+
34
+ ## Step 1: Locate Existing Artifacts
35
+
36
+ // turbo
37
+
38
+ > 💡 **MCP**: Use `context7` to research unfamiliar tech in existing codebase
39
+
40
+ 1. Search `docs/` for related: User Stories, SDD, Designs
41
+ 2. **Invoke `[lead-architect]` skill** to identify scope and dependencies
42
+ 3. List files to create/modify
43
+ 4. **WAIT** for user to confirm scope
44
+
45
+ ---
46
+
47
+ ## Step 2: Implementation Plan
48
+
49
+ // turbo
50
+
51
+ > 💡 **MCP**: **MUST** use `sequential-thinking` to break down complex features into atomic tasks
52
+
53
+ 1. **Invoke `[lead-architect]` skill** to create task breakdown
54
+ 2. Create `implementation-plan.md` artifact with phased tasks
55
+ 3. Save to `docs/050-Tasks/Task-{FeatureName}.md` after approval
56
+ 4. **WAIT** for user approval
57
+
58
+ ---
59
+
60
+ ## Step 3: Design Review (If UI Feature)
61
+
62
+ // turbo
63
+
64
+ **Skip if**: Feature is purely backend/API.
65
+
66
+ > 💡 **MCP**: Use `context7` with `/radix-ui/*` or `/shadcn/*` for component patterns
67
+
68
+ 1. Check `docs/040-Design/` for existing designs
69
+ 2. **Invoke `[designer]` skill** for new component specifications
70
+ 3. **WAIT** for user confirmation
71
+
72
+ ---
73
+
74
+ ## Step 4: Backend Implementation
75
+
76
+ // turbo
77
+
78
+ > 💡 **MCP**:
79
+ >
80
+ > - Use `context7` with `/supabase/supabase`, `/prisma/prisma` for DB patterns
81
+ > - Use `sequential-thinking` for complex business logic
82
+
83
+ 1. **Invoke `[backend-developer]` skill** for:
84
+ - Data models/migrations
85
+ - API endpoints/server functions
86
+ - Unit tests (TDD approach)
87
+ 2. Run tests and verify
88
+ 3. **WAIT** for user checkpoint
89
+
90
+ ---
91
+
92
+ ## Step 5: Frontend Implementation
93
+
94
+ // turbo
95
+
96
+ > 💡 **MCP**: Use `context7` with `/vercel/next.js`, `/tanstack/react-query`, `/react-hook-form/*` for patterns
97
+
98
+ 1. **Invoke `[frontend-developer]` skill** for:
99
+ - Components following design specs
100
+ - State management
101
+ - Component tests
102
+ 2. **WAIT** for user checkpoint
103
+
104
+ ---
105
+
106
+ ## Step 6: Integration & QA
107
+
108
+ // turbo
109
+
110
+ > 💡 **MCP**:
111
+ >
112
+ > - Use `context7` with `/vitest-dev/vitest`, `/playwright/*` for testing patterns
113
+ > - Use `sequential-thinking` to analyze test failures
114
+
115
+ 1. **Invoke `[qa-tester]` skill** for:
116
+ - E2E test execution
117
+ - Acceptance criteria verification
118
+ - Edge case testing
119
+ 2. Create `qa-report.md` artifact
120
+ 3. **WAIT** for user to confirm ready
121
+
122
+ ---
123
+
124
+ ## Step 7: Finalize
125
+
126
+ // turbo
127
+
128
+ 1. **Invoke `[lead-architect]` skill** to:
129
+ - Update MOC files
130
+ - Move task to `docs/050-Tasks/Completed/`
131
+ - Update API/changelog if applicable
132
+ 2. Present completion summary with next steps
133
+
134
+ ---
135
+
136
+ ## Quick Reference
137
+
138
+ | Step | Skill | Output |
139
+ | ---- | ------------------ | ---------------------- |
140
+ | 0 | product-manager | feature-spec.md |
141
+ | 1-2 | lead-architect | implementation-plan.md |
142
+ | 3 | designer | Component specs |
143
+ | 4 | backend-developer | API, Models, Tests |
144
+ | 5 | frontend-developer | Components, Tests |
145
+ | 6 | qa-tester | qa-report.md |
146
+ | 7 | lead-architect | Updated docs |
@@ -1,77 +1,96 @@
1
1
  ---
2
- description: Transform a requirements document into a comprehensive UI/UX design.
2
+ description: Transform requirements into comprehensive UI/UX design deliverables.
3
3
  ---
4
4
 
5
5
  # UI/UX Design Workflow
6
6
 
7
- This workflow guides the process of creating a UI/UX design from a requirements document.
7
+ > [!IMPORTANT]
8
+ > **MANDATORY**: Apply `.agent/rules/documents.md` for all documentation structure.
8
9
 
9
- ## Step 1: Analyze Requirements
10
+ ---
11
+
12
+ ## MCP Usage Guidelines
13
+
14
+ | MCP Tool | When to Use |
15
+ | ------------------------- | ----------------------------------------------- |
16
+ | `mcp_context7_query-docs` | Research UI libraries (shadcn, radix, tailwind) |
17
+ | `generate_image` | Create low-fi wireframes or conceptual assets |
18
+
19
+ ---
10
20
 
11
- **Goal**: Extract core design drivers from the input document.
21
+ ## Step 0: Discovery & Context
12
22
 
13
- 1. **Read the Document**: Use `read_file` or `view_file` to inspect the target requirements document.
14
- 2. **Identify Key Elements**:
15
- - **Target Audience**: Who is this for?
16
- - **Problem Statement**: What are we solving?
17
- - **Core Features**: What functionality is required?
18
- - **Constraints**: Technical, brand, or platform limitations?
19
- 3. **Synthesize**: Create a brief summary of the design goals.
23
+ // turbo
20
24
 
21
- ## Step 2: Define Design System
25
+ 1. **Invoke `[designer]` skill** to:
26
+ - Check if Design System exists in `docs/`
27
+ - Analyze requirements/PRD
28
+ - Determine design scope (New System vs New Feature)
29
+ 2. **WAIT** for analysis result
22
30
 
23
- **Goal**: Establish the visual language. **Prioritize the specific design requirements found in the document.**
31
+ ---
24
32
 
25
- 1. **Check Existing Codebase**:
26
- - Scan for existing styles (`app.css`, `tailwind.config.ts`, `globals.css`) or UI components.
27
- - **Condition**:
28
- - **IF Codebase has Design System**: Analyze and extract the current design system (tokens, colors, typography). Use this as the foundation. Then, apply specific user requirements or overrides from the document on top of this existing system.
29
- - **IF New/Empty Codebase**: Create the design system from scratch based strictly on the requirements document.
33
+ ## Step 1: Design System (If Needed)
30
34
 
31
- 2. **Consult Designer Skill**: Use `designer` skill for principles to ensure high quality (Premium, Distinctive), but ensure strict adherence to the document's specific constraints.
35
+ // turbo
32
36
 
33
- 3. **Determine Aesthetic** (derived from Doc or Codebase):
34
- - **Visual Style**: Minimal/Clean vs. Bold/Playful (as defined in Doc).
35
- - **Theme**: Light vs. Dark mode preference.
37
+ **Skip if**: Design system already exists.
36
38
 
37
- 4. **Select Foundations**:
38
- - **Typography**: Adhere to existing fonts if present; otherwise select based on Doc (e.g., Inter, Roboto, Outfit).
39
- - **Color Palette**: Extract from codebase or define new primary/secondary/neutral colors based on Doc.
40
- - **Spacing/Layout**: Harmonize with existing grid or define a new one (e.g., 4px/8px grid).
39
+ > 💡 **MCP**: Use `context7` with `/tailwindcss/tailwindcss` or `/shadcn/ui` for config
41
40
 
42
- ## Step 3: Map User Flows
41
+ 1. **Invoke `[designer]` skill** to define:
42
+ - Typography, Colors, Spacing scale
43
+ - Component primitives (Buttons, Inputs, Cards)
44
+ - Motion principles
45
+ 2. Create/Update Design System documentation
46
+ 3. **WAIT** for user approval
43
47
 
44
- **Goal**: Outline how users interact with the system.
48
+ ---
45
49
 
46
- 1. **Identify Critical Paths**: What are the main tasks (e.g., "Sign Up", "Checkout", "Create Post")?
47
- 2. **Step-by-Step Flow**: List the screens or states users will encounter for each path.
48
- 3. **Information Architecture**: Structure the navigation and hierarchy suitable for the flows.
50
+ ## Step 2: Component & Flow Design
49
51
 
50
- ## Step 4: Create Rapid Prototypes
52
+ // turbo
51
53
 
52
- **Goal**: Create high-fidelity HTML/CSS prototypes for user approval. **Focus on "Look & Feel" and "Flow" rather than production component code.**
54
+ 1. **Invoke `[designer]` skill** to:
55
+ - Map user flows based on User Stories
56
+ - Define necessary components (Reuse vs New)
57
+ - Create component specifications
58
+ 2. Create flow and component documentation
59
+ 3. **WAIT** for user review
53
60
 
54
- 1. **Orchestrate Project Structure**:
55
- - All design artifacts must be contained within a `prototype/` directory at the project root.
56
- - Sub-assets (images, icons, illustrations) must be stored in `prototype/assets/`.
61
+ ---
57
62
 
58
- 2. **Generate Assets First**:
59
- - **Proactively use "Nano Banana" (`generate_image`)** to create high-fidelity demo images, icons, or UI backgrounds.
60
- - **Asset Storage**: Save these generated images directly into `prototype/assets/`.
63
+ ## Step 3: Prototyping
61
64
 
62
- 3. **Build Interactive Prototypes**:
63
- - Create functional **HTML/CSS files** (e.g., `prototype/home.html`, `prototype/dashboard.html`).
64
- - **Focus**: Visual impact, layout, spacing, and responsiveness.
65
- - **Do NOT**: Break down into complex React/Vue components (e.g., `.tsx`, `.vue`) at this stage. Keep it as raw HTML/CSS for easy iteration.
66
- - **Resource Linking**: Ensure all image `src` paths correctly reference the `./assets/` folder relative to the prototype file.
65
+ // turbo
67
66
 
68
- 4. **Review against Principles**: Check against the designer skill's "Core Design Principles" (Intentionality, Distinction, Technical Excellence).
67
+ > 💡 **MCP**: Use `generate_image` for visual concept validation if needed
69
68
 
70
- ## Step 5: Verification & Approval
69
+ 1. **Invoke `[frontend-developer]` skill** to:
70
+ - Build HTML/CSS prototypes in `prototype/` (keep it simple)
71
+ - Or create interactive mockups
72
+ 2. **Invoke `[designer]` skill** to:
73
+ - Review for accessibility (Contrast, Semantic HTML)
74
+ - Check alignment with Design System
75
+
76
+ ---
77
+
78
+ ## Step 4: Review & Handoff
79
+
80
+ // turbo
81
+
82
+ 1. Present prototypes to user
83
+ 2. Collect and apply feedback
84
+ 3. Update MOC files and finalize docs
85
+ 4. **Handoff**: Trigger `/implement-feature` if approved
86
+
87
+ ---
71
88
 
72
- **Goal**: Get user buy-in on the design directives.
89
+ ## Quick Reference
73
90
 
74
- 1. **Present Prototypes**: Show the `prototype/*.html` files to the user for review.
75
- 2. **Iterate**: Refine the HTML/CSS based on feedback.
76
- 3. **Approval Gate**: Explicitly ask: _"Does this prototype meet your expectations?"_
77
- 4. **Handoff Prep**: **ONLY after approval**, verify technical feasibility and prepare for the developer to convert into production components.
91
+ | Step | Skill | Output |
92
+ | ---- | ------------------ | ------------------- |
93
+ | 0 | designer | Scope analysis |
94
+ | 1 | designer | Design System docs |
95
+ | 2 | designer | Flow/Component docs |
96
+ | 3 | frontend-developer | HTML Prototypes |