@fro.bot/systematic 1.0.0

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 (73) hide show
  1. package/README.md +158 -0
  2. package/agents/research/framework-docs-researcher.md +19 -0
  3. package/agents/review/architecture-strategist.md +23 -0
  4. package/agents/review/code-simplicity-reviewer.md +30 -0
  5. package/agents/review/pattern-recognition-specialist.md +24 -0
  6. package/agents/review/performance-oracle.md +25 -0
  7. package/agents/review/security-sentinel.md +25 -0
  8. package/commands/agent-native-audit.md +277 -0
  9. package/commands/create-agent-skill.md +8 -0
  10. package/commands/deepen-plan.md +546 -0
  11. package/commands/lfg.md +19 -0
  12. package/commands/workflows/brainstorm.md +115 -0
  13. package/commands/workflows/compound.md +202 -0
  14. package/commands/workflows/plan.md +551 -0
  15. package/commands/workflows/review.md +514 -0
  16. package/commands/workflows/work.md +363 -0
  17. package/dist/cli.js +360 -0
  18. package/dist/index-v8dhd5s2.js +194 -0
  19. package/dist/index.js +297 -0
  20. package/package.json +69 -0
  21. package/skills/agent-browser/SKILL.md +223 -0
  22. package/skills/agent-native-architecture/SKILL.md +435 -0
  23. package/skills/agent-native-architecture/references/action-parity-discipline.md +409 -0
  24. package/skills/agent-native-architecture/references/agent-execution-patterns.md +467 -0
  25. package/skills/agent-native-architecture/references/agent-native-testing.md +582 -0
  26. package/skills/agent-native-architecture/references/architecture-patterns.md +478 -0
  27. package/skills/agent-native-architecture/references/dynamic-context-injection.md +338 -0
  28. package/skills/agent-native-architecture/references/files-universal-interface.md +301 -0
  29. package/skills/agent-native-architecture/references/from-primitives-to-domain-tools.md +359 -0
  30. package/skills/agent-native-architecture/references/mcp-tool-design.md +506 -0
  31. package/skills/agent-native-architecture/references/mobile-patterns.md +871 -0
  32. package/skills/agent-native-architecture/references/product-implications.md +443 -0
  33. package/skills/agent-native-architecture/references/refactoring-to-prompt-native.md +317 -0
  34. package/skills/agent-native-architecture/references/self-modification.md +269 -0
  35. package/skills/agent-native-architecture/references/shared-workspace-architecture.md +680 -0
  36. package/skills/agent-native-architecture/references/system-prompt-design.md +250 -0
  37. package/skills/brainstorming/SKILL.md +190 -0
  38. package/skills/compound-docs/SKILL.md +510 -0
  39. package/skills/compound-docs/assets/critical-pattern-template.md +34 -0
  40. package/skills/compound-docs/assets/resolution-template.md +93 -0
  41. package/skills/compound-docs/references/yaml-schema.md +65 -0
  42. package/skills/compound-docs/schema.yaml +176 -0
  43. package/skills/create-agent-skills/SKILL.md +299 -0
  44. package/skills/create-agent-skills/references/api-security.md +226 -0
  45. package/skills/create-agent-skills/references/be-clear-and-direct.md +531 -0
  46. package/skills/create-agent-skills/references/best-practices.md +404 -0
  47. package/skills/create-agent-skills/references/common-patterns.md +595 -0
  48. package/skills/create-agent-skills/references/core-principles.md +437 -0
  49. package/skills/create-agent-skills/references/executable-code.md +175 -0
  50. package/skills/create-agent-skills/references/iteration-and-testing.md +474 -0
  51. package/skills/create-agent-skills/references/official-spec.md +185 -0
  52. package/skills/create-agent-skills/references/recommended-structure.md +168 -0
  53. package/skills/create-agent-skills/references/skill-structure.md +372 -0
  54. package/skills/create-agent-skills/references/using-scripts.md +113 -0
  55. package/skills/create-agent-skills/references/using-templates.md +112 -0
  56. package/skills/create-agent-skills/references/workflows-and-validation.md +510 -0
  57. package/skills/create-agent-skills/templates/router-skill.md +73 -0
  58. package/skills/create-agent-skills/templates/simple-skill.md +33 -0
  59. package/skills/create-agent-skills/workflows/add-reference.md +96 -0
  60. package/skills/create-agent-skills/workflows/add-script.md +93 -0
  61. package/skills/create-agent-skills/workflows/add-template.md +74 -0
  62. package/skills/create-agent-skills/workflows/add-workflow.md +120 -0
  63. package/skills/create-agent-skills/workflows/audit-skill.md +138 -0
  64. package/skills/create-agent-skills/workflows/create-domain-expertise-skill.md +605 -0
  65. package/skills/create-agent-skills/workflows/create-new-skill.md +191 -0
  66. package/skills/create-agent-skills/workflows/get-guidance.md +121 -0
  67. package/skills/create-agent-skills/workflows/upgrade-to-router.md +161 -0
  68. package/skills/create-agent-skills/workflows/verify-skill.md +204 -0
  69. package/skills/file-todos/SKILL.md +251 -0
  70. package/skills/file-todos/assets/todo-template.md +155 -0
  71. package/skills/git-worktree/SKILL.md +302 -0
  72. package/skills/git-worktree/scripts/worktree-manager.sh +345 -0
  73. package/skills/using-systematic/SKILL.md +94 -0
@@ -0,0 +1,345 @@
1
+ #!/bin/bash
2
+
3
+ # Git Worktree Manager
4
+ # Handles creating, listing, switching, and cleaning up Git worktrees
5
+ # KISS principle: Simple, interactive, opinionated
6
+
7
+ set -e
8
+
9
+ # Colors for output
10
+ RED='\033[0;31m'
11
+ GREEN='\033[0;32m'
12
+ YELLOW='\033[1;33m'
13
+ BLUE='\033[0;34m'
14
+ NC='\033[0m' # No Color
15
+
16
+ # Get repo root
17
+ GIT_ROOT=$(git rev-parse --show-toplevel)
18
+ WORKTREE_DIR="$GIT_ROOT/.worktrees"
19
+
20
+ # Ensure .worktrees is in .gitignore
21
+ ensure_gitignore() {
22
+ if ! grep -q "^\.worktrees$" "$GIT_ROOT/.gitignore" 2>/dev/null; then
23
+ echo ".worktrees" >> "$GIT_ROOT/.gitignore"
24
+ fi
25
+ }
26
+
27
+ # Copy .env files from main repo to worktree
28
+ copy_env_files() {
29
+ local worktree_path="$1"
30
+
31
+ echo -e "${BLUE}Copying environment files...${NC}"
32
+
33
+ # Find all .env* files in root (excluding .env.example which should be in git)
34
+ local env_files=()
35
+ for f in "$GIT_ROOT"/.env*; do
36
+ if [[ -f "$f" ]]; then
37
+ local basename=$(basename "$f")
38
+ # Skip .env.example (that's typically committed to git)
39
+ if [[ "$basename" != ".env.example" ]]; then
40
+ env_files+=("$basename")
41
+ fi
42
+ fi
43
+ done
44
+
45
+ if [[ ${#env_files[@]} -eq 0 ]]; then
46
+ echo -e " ${YELLOW}ℹ️ No .env files found in main repository${NC}"
47
+ return
48
+ fi
49
+
50
+ local copied=0
51
+ for env_file in "${env_files[@]}"; do
52
+ local source="$GIT_ROOT/$env_file"
53
+ local dest="$worktree_path/$env_file"
54
+
55
+ if [[ -f "$dest" ]]; then
56
+ echo -e " ${YELLOW}⚠️ $env_file already exists, backing up to ${env_file}.backup${NC}"
57
+ cp "$dest" "${dest}.backup"
58
+ fi
59
+
60
+ cp "$source" "$dest"
61
+ echo -e " ${GREEN}✓ Copied $env_file${NC}"
62
+ copied=$((copied + 1))
63
+ done
64
+
65
+ echo -e " ${GREEN}✓ Copied $copied environment file(s)${NC}"
66
+ }
67
+
68
+ # Create a new worktree
69
+ create_worktree() {
70
+ local branch_name="$1"
71
+ local from_branch="${2:-main}"
72
+
73
+ if [[ -z "$branch_name" ]]; then
74
+ echo -e "${RED}Error: Branch name required${NC}"
75
+ exit 1
76
+ fi
77
+
78
+ local worktree_path="$WORKTREE_DIR/$branch_name"
79
+
80
+ # Check if worktree already exists
81
+ if [[ -d "$worktree_path" ]]; then
82
+ echo -e "${YELLOW}Worktree already exists at: $worktree_path${NC}"
83
+ echo -e "Switch to it instead? (y/n)"
84
+ read -r response
85
+ if [[ "$response" == "y" ]]; then
86
+ switch_worktree "$branch_name"
87
+ fi
88
+ return
89
+ fi
90
+
91
+ echo -e "${BLUE}Creating worktree: $branch_name${NC}"
92
+ echo " From: $from_branch"
93
+ echo " Path: $worktree_path"
94
+ echo ""
95
+ echo "Proceed? (y/n)"
96
+ read -r response
97
+
98
+ if [[ "$response" != "y" ]]; then
99
+ echo -e "${YELLOW}Cancelled${NC}"
100
+ return
101
+ fi
102
+
103
+ # Update main branch
104
+ echo -e "${BLUE}Updating $from_branch...${NC}"
105
+ git checkout "$from_branch"
106
+ git pull origin "$from_branch" || true
107
+
108
+ # Create worktree
109
+ mkdir -p "$WORKTREE_DIR"
110
+ ensure_gitignore
111
+
112
+ echo -e "${BLUE}Creating worktree...${NC}"
113
+ git worktree add -b "$branch_name" "$worktree_path" "$from_branch"
114
+
115
+ # Copy environment files
116
+ copy_env_files "$worktree_path"
117
+
118
+ echo -e "${GREEN}✓ Worktree created successfully!${NC}"
119
+ echo ""
120
+ echo "To switch to this worktree:"
121
+ echo -e "${BLUE}cd $worktree_path${NC}"
122
+ echo ""
123
+ }
124
+
125
+ # List all worktrees
126
+ list_worktrees() {
127
+ echo -e "${BLUE}Available worktrees:${NC}"
128
+ echo ""
129
+
130
+ if [[ ! -d "$WORKTREE_DIR" ]]; then
131
+ echo -e "${YELLOW}No worktrees found${NC}"
132
+ return
133
+ fi
134
+
135
+ local count=0
136
+ for worktree_path in "$WORKTREE_DIR"/*; do
137
+ if [[ -d "$worktree_path" && -d "$worktree_path/.git" ]]; then
138
+ count=$((count + 1))
139
+ local worktree_name=$(basename "$worktree_path")
140
+ local branch=$(git -C "$worktree_path" rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown")
141
+
142
+ if [[ "$PWD" == "$worktree_path" ]]; then
143
+ echo -e "${GREEN}✓ $worktree_name${NC} (current) → branch: $branch"
144
+ else
145
+ echo -e " $worktree_name → branch: $branch"
146
+ fi
147
+ fi
148
+ done
149
+
150
+ if [[ $count -eq 0 ]]; then
151
+ echo -e "${YELLOW}No worktrees found${NC}"
152
+ else
153
+ echo ""
154
+ echo -e "${BLUE}Total: $count worktree(s)${NC}"
155
+ fi
156
+
157
+ echo ""
158
+ echo -e "${BLUE}Main repository:${NC}"
159
+ local main_branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown")
160
+ echo " Branch: $main_branch"
161
+ echo " Path: $GIT_ROOT"
162
+ }
163
+
164
+ # Switch to a worktree
165
+ switch_worktree() {
166
+ local worktree_name="$1"
167
+
168
+ if [[ -z "$worktree_name" ]]; then
169
+ list_worktrees
170
+ echo -e "${BLUE}Switch to which worktree? (enter name)${NC}"
171
+ read -r worktree_name
172
+ fi
173
+
174
+ local worktree_path="$WORKTREE_DIR/$worktree_name"
175
+
176
+ if [[ ! -d "$worktree_path" ]]; then
177
+ echo -e "${RED}Error: Worktree not found: $worktree_name${NC}"
178
+ echo ""
179
+ list_worktrees
180
+ exit 1
181
+ fi
182
+
183
+ echo -e "${GREEN}Switching to worktree: $worktree_name${NC}"
184
+ cd "$worktree_path"
185
+ echo -e "${BLUE}Now in: $(pwd)${NC}"
186
+ }
187
+
188
+ # Copy env files to an existing worktree (or current directory if in a worktree)
189
+ copy_env_to_worktree() {
190
+ local worktree_name="$1"
191
+ local worktree_path
192
+
193
+ if [[ -z "$worktree_name" ]]; then
194
+ # Check if we're currently in a worktree
195
+ local current_dir=$(pwd)
196
+ if [[ "$current_dir" == "$WORKTREE_DIR"/* ]]; then
197
+ worktree_path="$current_dir"
198
+ worktree_name=$(basename "$worktree_path")
199
+ echo -e "${BLUE}Detected current worktree: $worktree_name${NC}"
200
+ else
201
+ echo -e "${YELLOW}Usage: worktree-manager.sh copy-env [worktree-name]${NC}"
202
+ echo "Or run from within a worktree to copy to current directory"
203
+ list_worktrees
204
+ return 1
205
+ fi
206
+ else
207
+ worktree_path="$WORKTREE_DIR/$worktree_name"
208
+
209
+ if [[ ! -d "$worktree_path" ]]; then
210
+ echo -e "${RED}Error: Worktree not found: $worktree_name${NC}"
211
+ list_worktrees
212
+ return 1
213
+ fi
214
+ fi
215
+
216
+ copy_env_files "$worktree_path"
217
+ echo ""
218
+ }
219
+
220
+ # Clean up completed worktrees
221
+ cleanup_worktrees() {
222
+ if [[ ! -d "$WORKTREE_DIR" ]]; then
223
+ echo -e "${YELLOW}No worktrees to clean up${NC}"
224
+ return
225
+ fi
226
+
227
+ echo -e "${BLUE}Checking for completed worktrees...${NC}"
228
+ echo ""
229
+
230
+ local found=0
231
+ local to_remove=()
232
+
233
+ for worktree_path in "$WORKTREE_DIR"/*; do
234
+ if [[ -d "$worktree_path" && -d "$worktree_path/.git" ]]; then
235
+ local worktree_name=$(basename "$worktree_path")
236
+
237
+ # Skip if current worktree
238
+ if [[ "$PWD" == "$worktree_path" ]]; then
239
+ echo -e "${YELLOW}(skip) $worktree_name - currently active${NC}"
240
+ continue
241
+ fi
242
+
243
+ found=$((found + 1))
244
+ to_remove+=("$worktree_path")
245
+ echo -e "${YELLOW}• $worktree_name${NC}"
246
+ fi
247
+ done
248
+
249
+ if [[ $found -eq 0 ]]; then
250
+ echo -e "${GREEN}No inactive worktrees to clean up${NC}"
251
+ return
252
+ fi
253
+
254
+ echo ""
255
+ echo -e "Remove $found worktree(s)? (y/n)"
256
+ read -r response
257
+
258
+ if [[ "$response" != "y" ]]; then
259
+ echo -e "${YELLOW}Cleanup cancelled${NC}"
260
+ return
261
+ fi
262
+
263
+ echo -e "${BLUE}Cleaning up worktrees...${NC}"
264
+ for worktree_path in "${to_remove[@]}"; do
265
+ local worktree_name=$(basename "$worktree_path")
266
+ git worktree remove "$worktree_path" --force 2>/dev/null || true
267
+ echo -e "${GREEN}✓ Removed: $worktree_name${NC}"
268
+ done
269
+
270
+ # Clean up empty directory if nothing left
271
+ if [[ -z "$(ls -A "$WORKTREE_DIR" 2>/dev/null)" ]]; then
272
+ rmdir "$WORKTREE_DIR" 2>/dev/null || true
273
+ fi
274
+
275
+ echo -e "${GREEN}Cleanup complete!${NC}"
276
+ }
277
+
278
+ # Main command handler
279
+ main() {
280
+ local command="${1:-list}"
281
+
282
+ case "$command" in
283
+ create)
284
+ create_worktree "$2" "$3"
285
+ ;;
286
+ list|ls)
287
+ list_worktrees
288
+ ;;
289
+ switch|go)
290
+ switch_worktree "$2"
291
+ ;;
292
+ copy-env|env)
293
+ copy_env_to_worktree "$2"
294
+ ;;
295
+ cleanup|clean)
296
+ cleanup_worktrees
297
+ ;;
298
+ help)
299
+ show_help
300
+ ;;
301
+ *)
302
+ echo -e "${RED}Unknown command: $command${NC}"
303
+ echo ""
304
+ show_help
305
+ exit 1
306
+ ;;
307
+ esac
308
+ }
309
+
310
+ show_help() {
311
+ cat << EOF
312
+ Git Worktree Manager
313
+
314
+ Usage: worktree-manager.sh <command> [options]
315
+
316
+ Commands:
317
+ create <branch-name> [from-branch] Create new worktree (copies .env files automatically)
318
+ (from-branch defaults to main)
319
+ list | ls List all worktrees
320
+ switch | go [name] Switch to worktree
321
+ copy-env | env [name] Copy .env files from main repo to worktree
322
+ (if name omitted, uses current worktree)
323
+ cleanup | clean Clean up inactive worktrees
324
+ help Show this help message
325
+
326
+ Environment Files:
327
+ - Automatically copies .env, .env.local, .env.test, etc. on create
328
+ - Skips .env.example (should be in git)
329
+ - Creates .backup files if destination already exists
330
+ - Use 'copy-env' to refresh env files after main repo changes
331
+
332
+ Examples:
333
+ worktree-manager.sh create feature-login
334
+ worktree-manager.sh create feature-auth develop
335
+ worktree-manager.sh switch feature-login
336
+ worktree-manager.sh copy-env feature-login
337
+ worktree-manager.sh copy-env # copies to current worktree
338
+ worktree-manager.sh cleanup
339
+ worktree-manager.sh list
340
+
341
+ EOF
342
+ }
343
+
344
+ # Run
345
+ main "$@"
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: using-systematic
3
+ description: Use when starting any conversation - establishes how to find and use skills, requiring skill tool invocation before ANY response including clarifying questions
4
+ ---
5
+
6
+ <EXTREMELY-IMPORTANT>
7
+ If you think there is even a 1% chance a skill might apply to what you are doing, you ABSOLUTELY MUST invoke the skill.
8
+
9
+ IF A SKILL APPLIES TO YOUR TASK, YOU DO NOT HAVE A CHOICE. YOU MUST USE IT.
10
+
11
+ This is not negotiable. This is not optional. You cannot rationalize your way out of this.
12
+ </EXTREMELY-IMPORTANT>
13
+
14
+ ## How to Access Skills
15
+
16
+ Use the `skill` tool. When you invoke a skill, its content is loaded and presented to you—follow it directly.
17
+
18
+ # Using Skills
19
+
20
+ ## The Rule
21
+
22
+ **Invoke relevant or requested skills BEFORE any response or action.** Even a 1% chance a skill might apply means that you should invoke the skill to check. If an invoked skill turns out to be wrong for the situation, you don't need to use it.
23
+
24
+ ```dot
25
+ digraph skill_flow {
26
+ "User message received" [shape=doublecircle];
27
+ "Might any skill apply?" [shape=diamond];
28
+ "Invoke `skill` tool" [shape=box];
29
+ "Announce: 'Using [skill] to [purpose]'" [shape=box];
30
+ "Has checklist?" [shape=diamond];
31
+ "Create todo per item" [shape=box];
32
+ "Follow skill exactly" [shape=box];
33
+ "Respond (including clarifications)" [shape=doublecircle];
34
+
35
+ "User message received" -> "Might any skill apply?";
36
+ "Might any skill apply?" -> "Invoke `skill` tool" [label="yes, even 1%"];
37
+ "Might any skill apply?" -> "Respond (including clarifications)" [label="definitely not"];
38
+ "Invoke `skill` tool" -> "Announce: 'Using [skill] to [purpose]'";
39
+ "Announce: 'Using [skill] to [purpose]'" -> "Has checklist?";
40
+ "Has checklist?" -> "Create todo per item" [label="yes"];
41
+ "Has checklist?" -> "Follow skill exactly" [label="no"];
42
+ "Create todo per item" -> "Follow skill exactly";
43
+ }
44
+ ```
45
+
46
+ ## Red Flags
47
+
48
+ These thoughts mean STOP—you're rationalizing:
49
+
50
+ | Thought | Reality |
51
+ |---------|---------|
52
+ | "This is just a simple question" | Questions are tasks. Check for skills. |
53
+ | "I need more context first" | Skill check comes BEFORE clarifying questions. |
54
+ | "Let me explore the codebase first" | Skills tell you HOW to explore. Check first. |
55
+ | "I can check git/files quickly" | Files lack conversation context. Check for skills. |
56
+ | "Let me gather information first" | Skills tell you HOW to gather information. |
57
+ | "This doesn't need a formal skill" | If a skill exists, use it. |
58
+ | "I remember this skill" | Skills evolve. Read current version. |
59
+ | "This doesn't count as a task" | Action = task. Check for skills. |
60
+ | "The skill is overkill" | Simple things become complex. Use it. |
61
+ | "I'll just do this one thing first" | Check BEFORE doing anything. |
62
+ | "This feels productive" | Undisciplined action wastes time. Skills prevent this. |
63
+ | "I know what that means" | Knowing the concept != using the skill. Invoke it. |
64
+
65
+ ## Skill Priority
66
+
67
+ When multiple skills could apply, use this order:
68
+
69
+ 1. **Process skills first** (brainstorming, debugging) - these determine HOW to approach the task
70
+ 2. **Implementation skills second** (frontend-design, mcp-builder) - these guide execution
71
+
72
+ "Let's build X" -> brainstorming first, then implementation skills.
73
+ "Fix this bug" -> debugging first, then domain-specific skills.
74
+
75
+ ## Skill Types
76
+
77
+ **Rigid** (TDD, debugging): Follow exactly. Don't adapt away discipline.
78
+
79
+ **Flexible** (patterns): Adapt principles to context.
80
+
81
+ The skill itself tells you which.
82
+
83
+ ## User Instructions
84
+
85
+ Instructions say WHAT, not HOW. "Add X" or "Fix Y" doesn't mean skip workflows.
86
+
87
+ ## Skill Resolution
88
+
89
+ Skills are resolved in priority order:
90
+ 1. **Project skills**: `.opencode/skills/` in current project
91
+ 2. **User skills**: `~/.config/opencode/skills/`
92
+ 3. **Bundled skills**: Provided by systematic plugin
93
+
94
+ Use `systematic_find_skills` to see all available skills and their sources.