@fifine/aim-studio 0.0.4 → 0.0.8

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 (89) hide show
  1. package/README.md +59 -41
  2. package/dist/commands/init.d.ts.map +1 -1
  3. package/dist/commands/init.js +3 -5
  4. package/dist/commands/init.js.map +1 -1
  5. package/dist/commands/update.d.ts.map +1 -1
  6. package/dist/commands/update.js +42 -8
  7. package/dist/commands/update.js.map +1 -1
  8. package/dist/configurators/workflow.d.ts.map +1 -1
  9. package/dist/configurators/workflow.js +4 -104
  10. package/dist/configurators/workflow.js.map +1 -1
  11. package/dist/templates/aim/scripts/export.py +2 -2
  12. package/dist/templates/claude/commands/aim/legitimize.md +268 -0
  13. package/dist/templates/claude/commands/aim/start.md +92 -179
  14. package/dist/templates/claude/commands/aim/story.md +60 -10
  15. package/dist/templates/markdown/index.d.ts +1 -0
  16. package/dist/templates/markdown/index.d.ts.map +1 -1
  17. package/dist/templates/markdown/index.js +1 -0
  18. package/dist/templates/markdown/index.js.map +1 -1
  19. package/dist/templates/markdown/spec/story/style-guide.md.txt +96 -0
  20. package/package.json +1 -1
  21. package/dist/migrations/manifests/0.3.0-rc.2.json +0 -9
  22. package/dist/templates/aim/scripts/multi_agent/__init__.py +0 -5
  23. package/dist/templates/aim/scripts/multi_agent/cleanup.py +0 -403
  24. package/dist/templates/aim/scripts/multi_agent/create_pr.py +0 -329
  25. package/dist/templates/aim/scripts/multi_agent/plan.py +0 -233
  26. package/dist/templates/aim/scripts/multi_agent/start.py +0 -461
  27. package/dist/templates/aim/scripts/multi_agent/status.py +0 -817
  28. package/dist/templates/aim/scripts-shell-archive/add-session.sh +0 -384
  29. package/dist/templates/aim/scripts-shell-archive/common/developer.sh +0 -129
  30. package/dist/templates/aim/scripts-shell-archive/common/git-context.sh +0 -263
  31. package/dist/templates/aim/scripts-shell-archive/common/paths.sh +0 -208
  32. package/dist/templates/aim/scripts-shell-archive/common/phase.sh +0 -150
  33. package/dist/templates/aim/scripts-shell-archive/common/registry.sh +0 -247
  34. package/dist/templates/aim/scripts-shell-archive/common/task-queue.sh +0 -142
  35. package/dist/templates/aim/scripts-shell-archive/common/task-utils.sh +0 -151
  36. package/dist/templates/aim/scripts-shell-archive/common/worktree.sh +0 -128
  37. package/dist/templates/aim/scripts-shell-archive/create-bootstrap.sh +0 -299
  38. package/dist/templates/aim/scripts-shell-archive/get-context.sh +0 -7
  39. package/dist/templates/aim/scripts-shell-archive/get-developer.sh +0 -15
  40. package/dist/templates/aim/scripts-shell-archive/init-developer.sh +0 -34
  41. package/dist/templates/aim/scripts-shell-archive/multi-agent/cleanup.sh +0 -396
  42. package/dist/templates/aim/scripts-shell-archive/multi-agent/create-pr.sh +0 -241
  43. package/dist/templates/aim/scripts-shell-archive/multi-agent/plan.sh +0 -207
  44. package/dist/templates/aim/scripts-shell-archive/multi-agent/start.sh +0 -317
  45. package/dist/templates/aim/scripts-shell-archive/multi-agent/status.sh +0 -828
  46. package/dist/templates/aim/scripts-shell-archive/task.sh +0 -1204
  47. package/dist/templates/claude/agents/check.md +0 -122
  48. package/dist/templates/claude/agents/debug.md +0 -106
  49. package/dist/templates/claude/agents/dispatch.md +0 -230
  50. package/dist/templates/claude/agents/implement.md +0 -96
  51. package/dist/templates/claude/agents/plan.md +0 -396
  52. package/dist/templates/claude/agents/research.md +0 -120
  53. package/dist/templates/claude/commands/aim/before-backend-dev.md +0 -13
  54. package/dist/templates/claude/commands/aim/before-frontend-dev.md +0 -13
  55. package/dist/templates/claude/commands/aim/break-loop.md +0 -153
  56. package/dist/templates/claude/commands/aim/check-backend.md +0 -13
  57. package/dist/templates/claude/commands/aim/check-cross-layer.md +0 -153
  58. package/dist/templates/claude/commands/aim/check-frontend.md +0 -13
  59. package/dist/templates/claude/commands/aim/create-command.md +0 -154
  60. package/dist/templates/claude/commands/aim/integrate-skill.md +0 -219
  61. package/dist/templates/claude/commands/aim/parallel.md +0 -217
  62. package/dist/templates/claude/commands/aim/update-spec.md +0 -285
  63. package/dist/templates/claude/hooks/ralph-loop.py +0 -388
  64. package/dist/templates/markdown/spec/backend/database-guidelines.md.txt +0 -51
  65. package/dist/templates/markdown/spec/backend/directory-structure.md.txt +0 -54
  66. package/dist/templates/markdown/spec/backend/error-handling.md.txt +0 -51
  67. package/dist/templates/markdown/spec/backend/index.md +0 -40
  68. package/dist/templates/markdown/spec/backend/index.md.txt +0 -38
  69. package/dist/templates/markdown/spec/backend/logging-guidelines.md.txt +0 -51
  70. package/dist/templates/markdown/spec/backend/quality-guidelines.md.txt +0 -51
  71. package/dist/templates/markdown/spec/backend/script-conventions.md +0 -467
  72. package/dist/templates/markdown/spec/cli/directory-structure.md.txt +0 -71
  73. package/dist/templates/markdown/spec/cli/error-handling.md.txt +0 -91
  74. package/dist/templates/markdown/spec/cli/index.md.txt +0 -37
  75. package/dist/templates/markdown/spec/cli/options-flags.md.txt +0 -71
  76. package/dist/templates/markdown/spec/cli/output-formatting.md.txt +0 -93
  77. package/dist/templates/markdown/spec/frontend/component-guidelines.md.txt +0 -59
  78. package/dist/templates/markdown/spec/frontend/directory-structure.md.txt +0 -54
  79. package/dist/templates/markdown/spec/frontend/hook-guidelines.md.txt +0 -51
  80. package/dist/templates/markdown/spec/frontend/index.md.txt +0 -39
  81. package/dist/templates/markdown/spec/frontend/quality-guidelines.md.txt +0 -51
  82. package/dist/templates/markdown/spec/frontend/state-management.md.txt +0 -51
  83. package/dist/templates/markdown/spec/frontend/type-safety.md.txt +0 -51
  84. package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md +0 -118
  85. package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +0 -92
  86. package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +0 -94
  87. package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md +0 -394
  88. package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +0 -319
  89. package/dist/templates/markdown/spec/guides/index.md.txt +0 -89
@@ -1,71 +0,0 @@
1
- # CLI Options & Flags
2
-
3
- > How command-line options and flags are defined.
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- Document your CLI's options, flags, and environment variables.
10
-
11
- ---
12
-
13
- ## Global Options
14
-
15
- | Option | Alias | Description | Default |
16
- |--------|-------|-------------|---------|
17
- | `--help` | `-h` | Show help | - |
18
- | `--version` | `-v` | Show version | - |
19
- | `--verbose` | - | Enable verbose output | `false` |
20
-
21
- ---
22
-
23
- ## Environment Variables
24
-
25
- | Variable | Description | Default |
26
- |----------|-------------|---------|
27
- | `AIM_HOME` | AIM Studio home directory | `~/.aim-studio` |
28
- | `AIM_CONFIG` | Config file path | `~/.aim-studio/config.json` |
29
-
30
- ---
31
-
32
- ## Command-Specific Options
33
-
34
- ### init Command
35
-
36
- ```bash
37
- aim init -u username --template react
38
- ```
39
-
40
- | Option | Alias | Description |
41
- |--------|-------|-------------|
42
- | `--user` | `-u` | Developer username |
43
- | `--template` | - | Template to use |
44
- | `--force` | - | Overwrite existing files |
45
-
46
- ---
47
-
48
- ## Patterns
49
-
50
- ### Option Definition
51
-
52
- ```typescript
53
- // Example: using commander.js
54
- program
55
- .option('-u, --user <name>', 'Developer username')
56
- .option('-t, --template <template>', 'Template name')
57
- .option('-f, --force', 'Overwrite existing files');
58
- ```
59
-
60
- ---
61
-
62
- ## Anti-Patterns
63
-
64
- - ❌ Too many required options
65
- - ❌ Inconsistent option names (`--user` vs `--username`)
66
-
67
- ---
68
-
69
- ## Add Your Examples
70
-
71
- Replace with your actual option definitions.
@@ -1,93 +0,0 @@
1
- # CLI Output Formatting
2
-
3
- > How the CLI formats and presents output to users.
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- Document your CLI's output conventions including colors, formatting, and user feedback.
10
-
11
- ---
12
-
13
- ## Output Types
14
-
15
- | Type | Use Case |
16
- |------|----------|
17
- | `console.log` | Normal output, confirmations |
18
- | `console.error` | Errors, warnings |
19
- | `chalk` | Colored output for emphasis |
20
-
21
- ---
22
-
23
- ## Color Conventions
24
-
25
- | Color | Usage |
26
- |-------|-------|
27
- | `cyan` | Primary information, headers |
28
- | `green` | Success messages, confirmations |
29
- | `yellow` | Warnings |
30
- | `red` | Errors |
31
- | `gray` | Secondary information |
32
-
33
- ---
34
-
35
- ## Example Output
36
-
37
- ### Success
38
-
39
- ```
40
- ✅ Project initialized successfully!
41
- ```
42
-
43
- ### Error
44
-
45
- ```
46
- ❌ Error: Directory already exists
47
- Use --force to overwrite
48
- ```
49
-
50
- ### Progress
51
-
52
- ```
53
- 📦 Downloading template...
54
- 345.2 KB / 345.2 KB
55
- ```
56
-
57
- ---
58
-
59
- ## Patterns
60
-
61
- ### Using Chalk
62
-
63
- ```typescript
64
- import chalk from 'chalk';
65
-
66
- console.log(chalk.green('✓ ') + 'Success message');
67
- console.log(chalk.red('✗ ') + 'Error message');
68
- console.log(chalk.cyan('ℹ ') + 'Info message');
69
- ```
70
-
71
- ### Progress Indicators
72
-
73
- ```typescript
74
- // Using ora for spinners
75
- import ora from 'ora';
76
-
77
- const spinner = ora('Loading...').start();
78
- spinner.succeed('Done!');
79
- ```
80
-
81
- ---
82
-
83
- ## Anti-Patterns
84
-
85
- - ❌ No error messages
86
- - ❌ Inconsistent colors
87
- - ❌ Too much output (noise)
88
-
89
- ---
90
-
91
- ## Add Your Examples
92
-
93
- Replace with your actual output patterns.
@@ -1,59 +0,0 @@
1
- # Component Guidelines
2
-
3
- > How components are built in this project.
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- <!--
10
- Document your project's component conventions here.
11
-
12
- Questions to answer:
13
- - What component patterns do you use?
14
- - How are props defined?
15
- - How do you handle composition?
16
- - What accessibility standards apply?
17
- -->
18
-
19
- (To be filled by the team)
20
-
21
- ---
22
-
23
- ## Component Structure
24
-
25
- <!-- Standard structure of a component file -->
26
-
27
- (To be filled by the team)
28
-
29
- ---
30
-
31
- ## Props Conventions
32
-
33
- <!-- How props should be defined and typed -->
34
-
35
- (To be filled by the team)
36
-
37
- ---
38
-
39
- ## Styling Patterns
40
-
41
- <!-- How styles are applied (CSS modules, styled-components, Tailwind, etc.) -->
42
-
43
- (To be filled by the team)
44
-
45
- ---
46
-
47
- ## Accessibility
48
-
49
- <!-- A11y requirements and patterns -->
50
-
51
- (To be filled by the team)
52
-
53
- ---
54
-
55
- ## Common Mistakes
56
-
57
- <!-- Component-related mistakes your team has made -->
58
-
59
- (To be filled by the team)
@@ -1,54 +0,0 @@
1
- # Directory Structure
2
-
3
- > How frontend code is organized in this project.
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- <!--
10
- Document your project's frontend directory structure here.
11
-
12
- Questions to answer:
13
- - Where do components live?
14
- - How are features/modules organized?
15
- - Where are shared utilities?
16
- - How are assets organized?
17
- -->
18
-
19
- (To be filled by the team)
20
-
21
- ---
22
-
23
- ## Directory Layout
24
-
25
- ```
26
- <!-- Replace with your actual structure -->
27
- src/
28
- ├── ...
29
- └── ...
30
- ```
31
-
32
- ---
33
-
34
- ## Module Organization
35
-
36
- <!-- How should new features be organized? -->
37
-
38
- (To be filled by the team)
39
-
40
- ---
41
-
42
- ## Naming Conventions
43
-
44
- <!-- File and folder naming rules -->
45
-
46
- (To be filled by the team)
47
-
48
- ---
49
-
50
- ## Examples
51
-
52
- <!-- Link to well-organized modules as examples -->
53
-
54
- (To be filled by the team)
@@ -1,51 +0,0 @@
1
- # Hook Guidelines
2
-
3
- > How hooks are used in this project.
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- <!--
10
- Document your project's hook conventions here.
11
-
12
- Questions to answer:
13
- - What custom hooks do you have?
14
- - How do you handle data fetching?
15
- - What are the naming conventions?
16
- - How do you share stateful logic?
17
- -->
18
-
19
- (To be filled by the team)
20
-
21
- ---
22
-
23
- ## Custom Hook Patterns
24
-
25
- <!-- How to create and structure custom hooks -->
26
-
27
- (To be filled by the team)
28
-
29
- ---
30
-
31
- ## Data Fetching
32
-
33
- <!-- How data fetching is handled (React Query, SWR, etc.) -->
34
-
35
- (To be filled by the team)
36
-
37
- ---
38
-
39
- ## Naming Conventions
40
-
41
- <!-- Hook naming rules (use*, etc.) -->
42
-
43
- (To be filled by the team)
44
-
45
- ---
46
-
47
- ## Common Mistakes
48
-
49
- <!-- Hook-related mistakes your team has made -->
50
-
51
- (To be filled by the team)
@@ -1,39 +0,0 @@
1
- # Frontend Development Guidelines
2
-
3
- > Best practices for frontend development in this project.
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- This directory contains guidelines for frontend development. Fill in each file with your project's specific conventions.
10
-
11
- ---
12
-
13
- ## Guidelines Index
14
-
15
- | Guide | Description | Status |
16
- |-------|-------------|--------|
17
- | [Directory Structure](./directory-structure.md) | Module organization and file layout | To fill |
18
- | [Component Guidelines](./component-guidelines.md) | Component patterns, props, composition | To fill |
19
- | [Hook Guidelines](./hook-guidelines.md) | Custom hooks, data fetching patterns | To fill |
20
- | [State Management](./state-management.md) | Local state, global state, server state | To fill |
21
- | [Quality Guidelines](./quality-guidelines.md) | Code standards, forbidden patterns | To fill |
22
- | [Type Safety](./type-safety.md) | Type patterns, validation | To fill |
23
-
24
- ---
25
-
26
- ## How to Fill These Guidelines
27
-
28
- For each guideline file:
29
-
30
- 1. Document your project's **actual conventions** (not ideals)
31
- 2. Include **code examples** from your codebase
32
- 3. List **forbidden patterns** and why
33
- 4. Add **common mistakes** your team has made
34
-
35
- The goal is to help AI assistants and new team members understand how YOUR project works.
36
-
37
- ---
38
-
39
- **Language**: All documentation should be written in **English**.
@@ -1,51 +0,0 @@
1
- # Quality Guidelines
2
-
3
- > Code quality standards for frontend development.
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- <!--
10
- Document your project's quality standards here.
11
-
12
- Questions to answer:
13
- - What patterns are forbidden?
14
- - What linting rules do you enforce?
15
- - What are your testing requirements?
16
- - What code review standards apply?
17
- -->
18
-
19
- (To be filled by the team)
20
-
21
- ---
22
-
23
- ## Forbidden Patterns
24
-
25
- <!-- Patterns that should never be used and why -->
26
-
27
- (To be filled by the team)
28
-
29
- ---
30
-
31
- ## Required Patterns
32
-
33
- <!-- Patterns that must always be used -->
34
-
35
- (To be filled by the team)
36
-
37
- ---
38
-
39
- ## Testing Requirements
40
-
41
- <!-- What level of testing is expected -->
42
-
43
- (To be filled by the team)
44
-
45
- ---
46
-
47
- ## Code Review Checklist
48
-
49
- <!-- What reviewers should check -->
50
-
51
- (To be filled by the team)
@@ -1,51 +0,0 @@
1
- # State Management
2
-
3
- > How state is managed in this project.
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- <!--
10
- Document your project's state management conventions here.
11
-
12
- Questions to answer:
13
- - What state management solution do you use?
14
- - How is local vs global state decided?
15
- - How do you handle server state?
16
- - What are the patterns for derived state?
17
- -->
18
-
19
- (To be filled by the team)
20
-
21
- ---
22
-
23
- ## State Categories
24
-
25
- <!-- Local state, global state, server state, URL state -->
26
-
27
- (To be filled by the team)
28
-
29
- ---
30
-
31
- ## When to Use Global State
32
-
33
- <!-- Criteria for promoting state to global -->
34
-
35
- (To be filled by the team)
36
-
37
- ---
38
-
39
- ## Server State
40
-
41
- <!-- How server data is cached and synchronized -->
42
-
43
- (To be filled by the team)
44
-
45
- ---
46
-
47
- ## Common Mistakes
48
-
49
- <!-- State management mistakes your team has made -->
50
-
51
- (To be filled by the team)
@@ -1,51 +0,0 @@
1
- # Type Safety
2
-
3
- > Type safety patterns in this project.
4
-
5
- ---
6
-
7
- ## Overview
8
-
9
- <!--
10
- Document your project's type safety conventions here.
11
-
12
- Questions to answer:
13
- - What type system do you use?
14
- - How are types organized?
15
- - What validation library do you use?
16
- - How do you handle type inference?
17
- -->
18
-
19
- (To be filled by the team)
20
-
21
- ---
22
-
23
- ## Type Organization
24
-
25
- <!-- Where types are defined, shared types vs local types -->
26
-
27
- (To be filled by the team)
28
-
29
- ---
30
-
31
- ## Validation
32
-
33
- <!-- Runtime validation patterns (Zod, Yup, io-ts, etc.) -->
34
-
35
- (To be filled by the team)
36
-
37
- ---
38
-
39
- ## Common Patterns
40
-
41
- <!-- Type utilities, generics, type guards -->
42
-
43
- (To be filled by the team)
44
-
45
- ---
46
-
47
- ## Forbidden Patterns
48
-
49
- <!-- any, type assertions, etc. -->
50
-
51
- (To be filled by the team)
@@ -1,118 +0,0 @@
1
- # Code Reuse Thinking Guide
2
-
3
- > **Purpose**: Stop and think before creating new code - does it already exist?
4
-
5
- ---
6
-
7
- ## The Problem
8
-
9
- **Duplicated code is the #1 source of inconsistency bugs.**
10
-
11
- When you copy-paste or rewrite existing logic:
12
- - Bug fixes don't propagate
13
- - Behavior diverges over time
14
- - Codebase becomes harder to understand
15
-
16
- ---
17
-
18
- ## Before Writing New Code
19
-
20
- ### Step 1: Search First
21
-
22
- ```bash
23
- # Search for similar function names
24
- grep -r "functionName" .
25
-
26
- # Search for similar logic
27
- grep -r "keyword" .
28
- ```
29
-
30
- ### Step 2: Ask These Questions
31
-
32
- | Question | If Yes... |
33
- |----------|-----------|
34
- | Does a similar function exist? | Use or extend it |
35
- | Is this pattern used elsewhere? | Follow the existing pattern |
36
- | Could this be a shared utility? | Create it in the right place |
37
- | Am I copying code from another file? | **STOP** - extract to shared |
38
-
39
- ---
40
-
41
- ## Common Duplication Patterns
42
-
43
- ### Pattern 1: Copy-Paste Functions
44
-
45
- **Bad**: Copying a validation function to another file
46
-
47
- **Good**: Extract to shared utilities, import where needed
48
-
49
- ### Pattern 2: Similar Components
50
-
51
- **Bad**: Creating a new component that's 80% similar to existing
52
-
53
- **Good**: Extend existing component with props/variants
54
-
55
- ### Pattern 3: Repeated Constants
56
-
57
- **Bad**: Defining the same constant in multiple files
58
-
59
- **Good**: Single source of truth, import everywhere
60
-
61
- ---
62
-
63
- ## When to Abstract
64
-
65
- **Abstract when**:
66
- - Same code appears 3+ times
67
- - Logic is complex enough to have bugs
68
- - Multiple people might need this
69
-
70
- **Don't abstract when**:
71
- - Only used once
72
- - Trivial one-liner
73
- - Abstraction would be more complex than duplication
74
-
75
- ---
76
-
77
- ## After Batch Modifications
78
-
79
- When you've made similar changes to multiple files:
80
-
81
- 1. **Review**: Did you catch all instances?
82
- 2. **Search**: Run grep to find any missed
83
- 3. **Consider**: Should this be abstracted?
84
-
85
- ---
86
-
87
- ## Checklist Before Commit
88
-
89
- - [ ] Searched for existing similar code
90
- - [ ] No copy-pasted logic that should be shared
91
- - [ ] Constants defined in one place
92
- - [ ] Similar patterns follow same structure
93
-
94
- ---
95
-
96
- ## Template File Registration (Trellis-specific)
97
-
98
- When adding new files to `src/templates/trellis/scripts/`:
99
-
100
- **CRITICAL**: New script files must be registered in THREE places:
101
-
102
- 1. **`src/templates/trellis/index.ts`**:
103
- - Add `export const xxxScript = readTemplate("scripts/path/file.py");`
104
- - Add to `getAllScripts()` Map
105
-
106
- 2. **`src/commands/update.ts`**:
107
- - Add to import statement
108
- - Add to `collectTemplateFiles()` Map
109
-
110
- **Why this matters**: Without registration, `trellis update` won't sync the file to user projects. Bug fixes and features won't propagate.
111
-
112
- ### Quick Checklist for New Scripts
113
-
114
- ```bash
115
- # After adding a new .py file, verify:
116
- grep -l "newFileName" src/templates/trellis/index.ts # Should match
117
- grep -l "newFileName" src/commands/update.ts # Should match
118
- ```