liteagents 2.4.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.
- package/CHANGELOG.md +441 -0
- package/LICENSE +21 -0
- package/README.md +179 -0
- package/cli.js +230 -0
- package/docs/.gitkeep +1 -0
- package/docs/CONTRIBUTING.md +739 -0
- package/docs/DUAL_PUBLISH_SUMMARY.md +177 -0
- package/docs/ERROR_HANDLING_IMPLEMENTATION.md +327 -0
- package/docs/GITHUB_PACKAGES.md +181 -0
- package/docs/GITHUB_SETUP.md +158 -0
- package/docs/INSTALLATION_DEMO.md +691 -0
- package/docs/INSTALLATION_LOCATIONS.md +299 -0
- package/docs/INSTALLER_GUIDE.md +1586 -0
- package/docs/INTEGRATION_ISSUES_9.1.md +341 -0
- package/docs/KNOWLEDGE_BASE.md +727 -0
- package/docs/MIGRATION.md +384 -0
- package/docs/PACKAGE_BASELINE.md +557 -0
- package/docs/PACKAGE_VALIDATION_REPORT.md +427 -0
- package/docs/PASS_INTEGRATION.md +307 -0
- package/docs/PASS_QUICK_START.md +150 -0
- package/docs/PRIVACY.md +203 -0
- package/docs/PUBLISHING.md +494 -0
- package/docs/QUICK-START.md +318 -0
- package/docs/RELEASE_NOTES_1.2.0.md +323 -0
- package/docs/SECURITY.md +317 -0
- package/docs/SILENT_MODE_GUIDE.md +526 -0
- package/docs/SKILLS_CONVERSION.md +154 -0
- package/docs/TESTING.md +582 -0
- package/docs/TEST_COVERAGE.md +347 -0
- package/docs/TROUBLESHOOTING.md +788 -0
- package/docs/UPDATED_VARIANT_CONFIGURATION.md +274 -0
- package/docs/VARIANT_CONFIGURATION.md +440 -0
- package/installer/cli.js +761 -0
- package/installer/installation-engine.js +1536 -0
- package/installer/package-manager.js +640 -0
- package/installer/path-manager.js +427 -0
- package/installer/report-template.js +298 -0
- package/installer/verification-system.js +274 -0
- package/package.json +83 -0
- package/packages/ampcode/AGENT.md +58 -0
- package/packages/ampcode/README.md +17 -0
- package/packages/ampcode/agents/1-create-prd.md +175 -0
- package/packages/ampcode/agents/2-generate-tasks.md +190 -0
- package/packages/ampcode/agents/3-process-task-list.md +225 -0
- package/packages/ampcode/agents/code-developer.md +198 -0
- package/packages/ampcode/agents/context-builder.md +142 -0
- package/packages/ampcode/agents/feature-planner.md +199 -0
- package/packages/ampcode/agents/market-researcher.md +89 -0
- package/packages/ampcode/agents/orchestrator.md +116 -0
- package/packages/ampcode/agents/quality-assurance.md +115 -0
- package/packages/ampcode/agents/system-architect.md +135 -0
- package/packages/ampcode/agents/ui-designer.md +184 -0
- package/packages/ampcode/commands/brainstorming.md +56 -0
- package/packages/ampcode/commands/code-review.md +107 -0
- package/packages/ampcode/commands/condition-based-waiting/example.ts +158 -0
- package/packages/ampcode/commands/condition-based-waiting.md +122 -0
- package/packages/ampcode/commands/debug.md +20 -0
- package/packages/ampcode/commands/docs-builder/templates.md +572 -0
- package/packages/ampcode/commands/docs-builder.md +106 -0
- package/packages/ampcode/commands/explain.md +18 -0
- package/packages/ampcode/commands/git-commit.md +14 -0
- package/packages/ampcode/commands/optimize.md +20 -0
- package/packages/ampcode/commands/refactor.md +21 -0
- package/packages/ampcode/commands/review.md +18 -0
- package/packages/ampcode/commands/root-cause-tracing/find-polluter.sh +63 -0
- package/packages/ampcode/commands/root-cause-tracing.md +176 -0
- package/packages/ampcode/commands/security.md +21 -0
- package/packages/ampcode/commands/ship.md +18 -0
- package/packages/ampcode/commands/skill-creator/scripts/init_skill.py +303 -0
- package/packages/ampcode/commands/skill-creator/scripts/package_skill.py +110 -0
- package/packages/ampcode/commands/skill-creator/scripts/quick_validate.py +65 -0
- package/packages/ampcode/commands/skill-creator.md +211 -0
- package/packages/ampcode/commands/stash.md +45 -0
- package/packages/ampcode/commands/systematic-debugging.md +297 -0
- package/packages/ampcode/commands/test-driven-development.md +390 -0
- package/packages/ampcode/commands/test-generate.md +18 -0
- package/packages/ampcode/commands/testing-anti-patterns.md +304 -0
- package/packages/ampcode/commands/verification-before-completion.md +152 -0
- package/packages/ampcode/settings.json +13 -0
- package/packages/ampcode/variants.json +8 -0
- package/packages/claude/CLAUDE.md +58 -0
- package/packages/claude/README.md +23 -0
- package/packages/claude/agents/1-create-prd.md +175 -0
- package/packages/claude/agents/2-generate-tasks.md +190 -0
- package/packages/claude/agents/3-process-task-list.md +225 -0
- package/packages/claude/agents/code-developer.md +198 -0
- package/packages/claude/agents/context-builder.md +142 -0
- package/packages/claude/agents/feature-planner.md +199 -0
- package/packages/claude/agents/market-researcher.md +89 -0
- package/packages/claude/agents/orchestrator.md +117 -0
- package/packages/claude/agents/quality-assurance.md +115 -0
- package/packages/claude/agents/system-architect.md +135 -0
- package/packages/claude/agents/ui-designer.md +184 -0
- package/packages/claude/commands/debug.md +20 -0
- package/packages/claude/commands/explain.md +18 -0
- package/packages/claude/commands/git-commit.md +14 -0
- package/packages/claude/commands/optimize.md +20 -0
- package/packages/claude/commands/refactor.md +21 -0
- package/packages/claude/commands/review.md +18 -0
- package/packages/claude/commands/security.md +21 -0
- package/packages/claude/commands/ship.md +18 -0
- package/packages/claude/commands/stash.md +45 -0
- package/packages/claude/commands/test-generate.md +18 -0
- package/packages/claude/skills/brainstorming/SKILL.md +56 -0
- package/packages/claude/skills/code-review/SKILL.md +107 -0
- package/packages/claude/skills/code-review/code-reviewer.md +146 -0
- package/packages/claude/skills/condition-based-waiting/SKILL.md +122 -0
- package/packages/claude/skills/condition-based-waiting/example.ts +158 -0
- package/packages/claude/skills/docs-builder/SKILL.md +106 -0
- package/packages/claude/skills/docs-builder/references/templates.md +572 -0
- package/packages/claude/skills/root-cause-tracing/SKILL.md +176 -0
- package/packages/claude/skills/root-cause-tracing/find-polluter.sh +63 -0
- package/packages/claude/skills/skill-creator/LICENSE.txt +202 -0
- package/packages/claude/skills/skill-creator/SKILL.md +211 -0
- package/packages/claude/skills/skill-creator/scripts/init_skill.py +303 -0
- package/packages/claude/skills/skill-creator/scripts/package_skill.py +110 -0
- package/packages/claude/skills/skill-creator/scripts/quick_validate.py +65 -0
- package/packages/claude/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/packages/claude/skills/systematic-debugging/SKILL.md +296 -0
- package/packages/claude/skills/systematic-debugging/test-academic.md +14 -0
- package/packages/claude/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/packages/claude/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/packages/claude/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/packages/claude/skills/test-driven-development/SKILL.md +392 -0
- package/packages/claude/skills/testing-anti-patterns/SKILL.md +304 -0
- package/packages/claude/skills/verification-before-completion/SKILL.md +152 -0
- package/packages/claude/variants.json +9 -0
- package/packages/droid/AGENTS.md +52 -0
- package/packages/droid/README.md +17 -0
- package/packages/droid/change_settings.json +61 -0
- package/packages/droid/commands/brainstorming.md +56 -0
- package/packages/droid/commands/code-review.md +107 -0
- package/packages/droid/commands/condition-based-waiting/example.ts +158 -0
- package/packages/droid/commands/condition-based-waiting.md +122 -0
- package/packages/droid/commands/debug.md +20 -0
- package/packages/droid/commands/docs-builder/templates.md +572 -0
- package/packages/droid/commands/docs-builder.md +106 -0
- package/packages/droid/commands/explain.md +18 -0
- package/packages/droid/commands/git-commit.md +14 -0
- package/packages/droid/commands/optimize.md +20 -0
- package/packages/droid/commands/refactor.md +21 -0
- package/packages/droid/commands/review.md +18 -0
- package/packages/droid/commands/root-cause-tracing/find-polluter.sh +63 -0
- package/packages/droid/commands/root-cause-tracing.md +176 -0
- package/packages/droid/commands/security.md +21 -0
- package/packages/droid/commands/ship.md +18 -0
- package/packages/droid/commands/skill-creator/scripts/init_skill.py +303 -0
- package/packages/droid/commands/skill-creator/scripts/package_skill.py +110 -0
- package/packages/droid/commands/skill-creator/scripts/quick_validate.py +65 -0
- package/packages/droid/commands/skill-creator.md +211 -0
- package/packages/droid/commands/stash.md +45 -0
- package/packages/droid/commands/systematic-debugging.md +297 -0
- package/packages/droid/commands/test-driven-development.md +390 -0
- package/packages/droid/commands/test-generate.md +18 -0
- package/packages/droid/commands/testing-anti-patterns.md +304 -0
- package/packages/droid/commands/verification-before-completion.md +152 -0
- package/packages/droid/droids/1-create-prd.md +170 -0
- package/packages/droid/droids/2-generate-tasks.md +190 -0
- package/packages/droid/droids/3-process-task-list.md +225 -0
- package/packages/droid/droids/code-developer.md +198 -0
- package/packages/droid/droids/context-builder.md +142 -0
- package/packages/droid/droids/feature-planner.md +199 -0
- package/packages/droid/droids/market-researcher.md +89 -0
- package/packages/droid/droids/orchestrator.md +116 -0
- package/packages/droid/droids/quality-assurance.md +115 -0
- package/packages/droid/droids/system-architect.md +135 -0
- package/packages/droid/droids/ui-designer.md +184 -0
- package/packages/droid/variants.json +8 -0
- package/packages/opencode/AGENTS.md +52 -0
- package/packages/opencode/README.md +17 -0
- package/packages/opencode/agent/1-create-prd.md +179 -0
- package/packages/opencode/agent/2-generate-tasks.md +194 -0
- package/packages/opencode/agent/3-process-task-list.md +229 -0
- package/packages/opencode/agent/code-developer.md +202 -0
- package/packages/opencode/agent/context-builder.md +146 -0
- package/packages/opencode/agent/feature-planner.md +203 -0
- package/packages/opencode/agent/market-researcher.md +93 -0
- package/packages/opencode/agent/orchestrator.md +120 -0
- package/packages/opencode/agent/quality-assurance.md +119 -0
- package/packages/opencode/agent/system-architect.md +139 -0
- package/packages/opencode/agent/ui-designer.md +188 -0
- package/packages/opencode/command/brainstorming.md +56 -0
- package/packages/opencode/command/code-review.md +107 -0
- package/packages/opencode/command/condition-based-waiting/example.ts +158 -0
- package/packages/opencode/command/condition-based-waiting.md +122 -0
- package/packages/opencode/command/debug.md +20 -0
- package/packages/opencode/command/docs-builder/templates.md +572 -0
- package/packages/opencode/command/docs-builder.md +106 -0
- package/packages/opencode/command/explain.md +18 -0
- package/packages/opencode/command/git-commit.md +14 -0
- package/packages/opencode/command/optimize.md +20 -0
- package/packages/opencode/command/refactor.md +21 -0
- package/packages/opencode/command/review.md +18 -0
- package/packages/opencode/command/root-cause-tracing/find-polluter.sh +63 -0
- package/packages/opencode/command/root-cause-tracing.md +176 -0
- package/packages/opencode/command/security.md +21 -0
- package/packages/opencode/command/ship.md +18 -0
- package/packages/opencode/command/skill-creator/scripts/init_skill.py +303 -0
- package/packages/opencode/command/skill-creator/scripts/package_skill.py +110 -0
- package/packages/opencode/command/skill-creator/scripts/quick_validate.py +65 -0
- package/packages/opencode/command/skill-creator.md +211 -0
- package/packages/opencode/command/stash.md +45 -0
- package/packages/opencode/command/systematic-debugging.md +297 -0
- package/packages/opencode/command/test-driven-development.md +390 -0
- package/packages/opencode/command/test-generate.md +18 -0
- package/packages/opencode/command/testing-anti-patterns.md +304 -0
- package/packages/opencode/command/verification-before-completion.md +152 -0
- package/packages/opencode/opencode.jsonc +201 -0
- package/packages/opencode/variants.json +8 -0
- package/packages/subagentic-manual.md +349 -0
- package/postinstall.js +21 -0
- package/tools/ampcode/manifest-template.json +14 -0
- package/tools/claude/manifest-template.json +14 -0
- package/tools/droid/manifest-template.json +14 -0
- package/tools/opencode/manifest-template.json +14 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verification-before-completion
|
|
3
|
+
description: Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
|
|
4
|
+
usage: /verification-before-completion <work-to-verify>
|
|
5
|
+
auto_trigger: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Verification Before Completion
|
|
9
|
+
|
|
10
|
+
## Auto-Trigger
|
|
11
|
+
|
|
12
|
+
**APPLIES WHEN:**
|
|
13
|
+
- About to say: done, fixed, complete, passing, success
|
|
14
|
+
- About to commit, push, create PR
|
|
15
|
+
- About to mark task [x]
|
|
16
|
+
|
|
17
|
+
**APPLIES TO:** All agents, all invocation paths
|
|
18
|
+
|
|
19
|
+
**NEVER SKIP:** Even for "obvious" tasks
|
|
20
|
+
|
|
21
|
+
## Overview
|
|
22
|
+
|
|
23
|
+
Claiming work is complete without verification is dishonesty, not efficiency.
|
|
24
|
+
|
|
25
|
+
**Core principle:** Evidence before claims, always.
|
|
26
|
+
|
|
27
|
+
**Violating the letter of this rule is violating the spirit of this rule.**
|
|
28
|
+
|
|
29
|
+
## The Iron Law
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If you haven't run the verification command in this message, you cannot claim it passes.
|
|
36
|
+
|
|
37
|
+
## The Gate Function
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
BEFORE claiming any status or expressing satisfaction:
|
|
41
|
+
|
|
42
|
+
1. IDENTIFY: What command proves this claim?
|
|
43
|
+
2. RUN: Execute the FULL command (fresh, complete)
|
|
44
|
+
3. READ: Full output, check exit code, count failures
|
|
45
|
+
4. VERIFY: Does output confirm the claim?
|
|
46
|
+
- If NO: State actual status with evidence
|
|
47
|
+
- If YES: State claim WITH evidence
|
|
48
|
+
5. ONLY THEN: Make the claim
|
|
49
|
+
|
|
50
|
+
Skip any step = lying, not verifying
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Common Failures
|
|
54
|
+
|
|
55
|
+
| Claim | Requires | Not Sufficient |
|
|
56
|
+
|-------|----------|----------------|
|
|
57
|
+
| Tests pass | Test command output: 0 failures | Previous run, "should pass" |
|
|
58
|
+
| Linter clean | Linter output: 0 errors | Partial check, extrapolation |
|
|
59
|
+
| Build succeeds | Build command: exit 0 | Linter passing, logs look good |
|
|
60
|
+
| Bug fixed | Test original symptom: passes | Code changed, assumed fixed |
|
|
61
|
+
| Regression test works | Red-green cycle verified | Test passes once |
|
|
62
|
+
| Agent completed | VCS diff shows changes | Agent reports "success" |
|
|
63
|
+
| Requirements met | Line-by-line checklist | Tests passing |
|
|
64
|
+
|
|
65
|
+
## Red Flags - STOP
|
|
66
|
+
|
|
67
|
+
- Using "should", "probably", "seems to"
|
|
68
|
+
- Expressing satisfaction before verification ("Great!", "Perfect!", "Done!", etc.)
|
|
69
|
+
- About to commit/push/PR without verification
|
|
70
|
+
- Trusting agent success reports
|
|
71
|
+
- Relying on partial verification
|
|
72
|
+
- Thinking "just this once"
|
|
73
|
+
- Tired and wanting work over
|
|
74
|
+
- **ANY wording implying success without having run verification**
|
|
75
|
+
|
|
76
|
+
## Rationalization Prevention
|
|
77
|
+
|
|
78
|
+
| Excuse | Reality |
|
|
79
|
+
|--------|---------|
|
|
80
|
+
| "Should work now" | RUN the verification |
|
|
81
|
+
| "I'm confident" | Confidence ≠ evidence |
|
|
82
|
+
| "Just this once" | No exceptions |
|
|
83
|
+
| "Linter passed" | Linter ≠ compiler |
|
|
84
|
+
| "Agent said success" | Verify independently |
|
|
85
|
+
| "I'm tired" | Exhaustion ≠ excuse |
|
|
86
|
+
| "Partial check is enough" | Partial proves nothing |
|
|
87
|
+
| "Different words so rule doesn't apply" | Spirit over letter |
|
|
88
|
+
|
|
89
|
+
## Key Patterns
|
|
90
|
+
|
|
91
|
+
**Tests:**
|
|
92
|
+
```
|
|
93
|
+
✅ [Run test command] [See: 34/34 pass] "All tests pass"
|
|
94
|
+
❌ "Should pass now" / "Looks correct"
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Regression tests (TDD Red-Green):**
|
|
98
|
+
```
|
|
99
|
+
✅ Write → Run (pass) → Revert fix → Run (MUST FAIL) → Restore → Run (pass)
|
|
100
|
+
❌ "I've written a regression test" (without red-green verification)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Build:**
|
|
104
|
+
```
|
|
105
|
+
✅ [Run build] [See: exit 0] "Build passes"
|
|
106
|
+
❌ "Linter passed" (linter doesn't check compilation)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
**Requirements:**
|
|
110
|
+
```
|
|
111
|
+
✅ Re-read plan → Create checklist → Verify each → Report gaps or completion
|
|
112
|
+
❌ "Tests pass, phase complete"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Agent delegation:**
|
|
116
|
+
```
|
|
117
|
+
✅ Agent reports success → Check VCS diff → Verify changes → Report actual state
|
|
118
|
+
❌ Trust agent report
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Why This Matters
|
|
122
|
+
|
|
123
|
+
From 24 failure memories:
|
|
124
|
+
- your human partner said "I don't believe you" - trust broken
|
|
125
|
+
- Undefined functions shipped - would crash
|
|
126
|
+
- Missing requirements shipped - incomplete features
|
|
127
|
+
- Time wasted on false completion → redirect → rework
|
|
128
|
+
- Violates: "Honesty is a core value. If you lie, you'll be replaced."
|
|
129
|
+
|
|
130
|
+
## When To Apply
|
|
131
|
+
|
|
132
|
+
**ALWAYS before:**
|
|
133
|
+
- ANY variation of success/completion claims
|
|
134
|
+
- ANY expression of satisfaction
|
|
135
|
+
- ANY positive statement about work state
|
|
136
|
+
- Committing, PR creation, task completion
|
|
137
|
+
- Moving to next task
|
|
138
|
+
- Delegating to agents
|
|
139
|
+
|
|
140
|
+
**Rule applies to:**
|
|
141
|
+
- Exact phrases
|
|
142
|
+
- Paraphrases and synonyms
|
|
143
|
+
- Implications of success
|
|
144
|
+
- ANY communication suggesting completion/correctness
|
|
145
|
+
|
|
146
|
+
## The Bottom Line
|
|
147
|
+
|
|
148
|
+
**No shortcuts for verification.**
|
|
149
|
+
|
|
150
|
+
Run the command. Read the output. THEN claim the result.
|
|
151
|
+
|
|
152
|
+
This is non-negotiable.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Global Droid CLI
|
|
2
|
+
|
|
3
|
+
Droid is a lightweight CLI tool that provides workflow automation commands.
|
|
4
|
+
|
|
5
|
+
## Droid Subagents (Reference)
|
|
6
|
+
|
|
7
|
+
These subagents are available when using Claude Code CLI. Droid can reference them but doesn't implement them directly.
|
|
8
|
+
|
|
9
|
+
### Subagents (11 total)
|
|
10
|
+
|
|
11
|
+
| ID | Title | When To Use |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| 1-create-prd | 1-Create PRD | Define Scope - use to clearly outline what needs to be built with a Product Requirement Document (PRD) |
|
|
14
|
+
| 2-generate-tasks | 2-Generate Tasks | Detailed Planning - use to break down the PRD into a granular, actionable task list |
|
|
15
|
+
| 3-process-task-list | 3-Process Task List | Iterative Implementation - use to guide the AI to tackle one task at a time, allowing you to review and approve each change |
|
|
16
|
+
| code-developer | Full Stack Developer | Use for code implementation, debugging, refactoring, and development best practices |
|
|
17
|
+
| context-builder | Context Initializer | Use to initialize project context for new/existing projects, discover and organize documentation, create CLAUDE.md and KNOWLEDGE_BASE.md for optimal token-efficient memory |
|
|
18
|
+
| feature-planner | Product Manager | Use for creating epics and user stories, prioritization, backlog navigation, story refinement, and retrospectives |
|
|
19
|
+
| market-researcher | Business Analyst | Use for market research, brainstorming, competitive analysis, project briefs, and initial project discovery |
|
|
20
|
+
| orchestrator | Master Orchestrator | Use for workflow coordination, multi-agent tasks, role switching guidance, and when unsure which specialist to consult |
|
|
21
|
+
| quality-assurance | Test Architect & Quality Advisor | Use for comprehensive test architecture review, quality gate decisions, and code improvement. Provides thorough analysis including requirements traceability, risk assessment, and test strategy. Advisory only - teams choose their quality bar |
|
|
22
|
+
| system-architect | Architect | Use for system design, architecture documents, technology selection, API design, and infrastructure planning |
|
|
23
|
+
| ui-designer | UX Expert | Use for UI/UX design, wireframes, prototypes, front-end specifications, and user experience optimization |
|
|
24
|
+
|
|
25
|
+
## Droid Commands (20 total)
|
|
26
|
+
|
|
27
|
+
| ID | Description | Usage | Auto |
|
|
28
|
+
|---|---|---|---|
|
|
29
|
+
| brainstorming | Refines rough ideas into fully-formed designs through collaborative questioning | /brainstorming <session-type> <topic> | false |
|
|
30
|
+
| code-review | Reviews implementation against plan or requirements before proceeding | /code-review <review-scope> <focus-areas> | false |
|
|
31
|
+
| condition-based-waiting | Replaces arbitrary timeouts with condition polling to wait for actual state changes | /condition-based-waiting <condition-type> <timeout-specs> | false |
|
|
32
|
+
| debug | Debug an issue systematically using structured investigation techniques | /debug <issue-description> | - |
|
|
33
|
+
| docs-builder | Create comprehensive project documentation with structured /docs hierarchy | /docs-builder | false |
|
|
34
|
+
| explain | Explain code for someone new to the codebase | /explain <code-section> | - |
|
|
35
|
+
| git-commit | Analyze changes and create intelligent git commits | /git-commit | - |
|
|
36
|
+
| optimize | Analyze and optimize performance issues | /optimize <target-area> | - |
|
|
37
|
+
| refactor | Refactor code while maintaining behavior and tests | /refactor <code-section> | - |
|
|
38
|
+
| review | Comprehensive code review including quality, tests, and architecture | /review | - |
|
|
39
|
+
| root-cause-tracing | Systematically traces bugs backward through call stack to identify source | /root-cause-tracing <issue-description> | false |
|
|
40
|
+
| security | Security vulnerability scan and analysis | /security | - |
|
|
41
|
+
| ship | Pre-deployment verification checklist | /ship | - |
|
|
42
|
+
| skill-creator | Guide for creating effective skills and extending Claude capabilities | /skill-creator <skill-type> <skill-description> | false |
|
|
43
|
+
| stash | Save session context for compaction recovery or handoffs | /stash ["optional-name"] | - |
|
|
44
|
+
| systematic-debugging | Four-phase debugging framework - investigate root cause before any fixes | /systematic-debugging <bug-or-error-description> | false |
|
|
45
|
+
| test-driven-development | Write test first, watch it fail, write minimal code to pass | /test-driven-development <feature-or-behavior-to-test> | true |
|
|
46
|
+
| test-generate | Generate comprehensive test suites for existing code | /test-generate <code-section> | - |
|
|
47
|
+
| testing-anti-patterns | Prevents testing mock behavior and production pollution with test-only methods | /testing-anti-patterns <testing-scenario> | true |
|
|
48
|
+
| verification-before-completion | Requires running verification commands before making any success claims | /verification-before-completion <work-to-verify> | true |
|
|
49
|
+
|
|
50
|
+
All resources are auto-discovered from frontmatter in their respective directories:
|
|
51
|
+
- **Agents**: `./droids/*.md`
|
|
52
|
+
- **Commands**: `./commands/*.md`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Droid Packages
|
|
2
|
+
|
|
3
|
+
Droid AI codegen tool packages specialized for mobile development.
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
- `lite/` - Basic mobile codegen setup
|
|
7
|
+
- `standard/` - Mobile-focused agents with core development skills
|
|
8
|
+
- `pro/` - Complete mobile AI codegen toolkit with platform integration
|
|
9
|
+
|
|
10
|
+
## Optimization Focus
|
|
11
|
+
- Mobile development patterns
|
|
12
|
+
- Android/iOS codegen
|
|
13
|
+
- Platform-specific workflows
|
|
14
|
+
- Mobile-first development
|
|
15
|
+
|
|
16
|
+
## Status: Placeholder
|
|
17
|
+
Content to be developed based on Claude packages with mobile-specific optimizations.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// Factory CLI Settings
|
|
2
|
+
// This file contains your Factory CLI configuration.
|
|
3
|
+
{
|
|
4
|
+
"model": "custom:hf:deepseek-ai/DeepSeek-V3.1",
|
|
5
|
+
"reasoningEffort": "none",
|
|
6
|
+
"cloudSessionSync": true,
|
|
7
|
+
"diffMode": "github",
|
|
8
|
+
"ideExtensionPromptedAt": {},
|
|
9
|
+
"autonomyLevel": "auto-high",
|
|
10
|
+
"ideActivationNudgedForVersion": {},
|
|
11
|
+
"enableCompletionBell": false,
|
|
12
|
+
"completionSound": "off",
|
|
13
|
+
"completionSoundFocusMode": "always",
|
|
14
|
+
// Commands that will be automatically allowed without confirmation.
|
|
15
|
+
// Add commands here that you trust and use frequently.
|
|
16
|
+
// Examples: "npm test", "git commit", "yarn build"
|
|
17
|
+
"commandAllowlist": [
|
|
18
|
+
"ls",
|
|
19
|
+
"pwd",
|
|
20
|
+
"dir"
|
|
21
|
+
],
|
|
22
|
+
// Commands that will ALWAYS require confirmation, regardless of autonomy level.
|
|
23
|
+
// These are dangerous commands that could cause data loss or system damage.
|
|
24
|
+
// Add any additional dangerous commands specific to your environment.
|
|
25
|
+
"commandDenylist": [
|
|
26
|
+
"rm -rf /",
|
|
27
|
+
"rm -rf /*",
|
|
28
|
+
"rm -rf .",
|
|
29
|
+
"rm -rf ~",
|
|
30
|
+
"rm -rf ~/*",
|
|
31
|
+
"rm -rf $HOME",
|
|
32
|
+
"rm -r /",
|
|
33
|
+
"rm -r /*",
|
|
34
|
+
"rm -r ~",
|
|
35
|
+
"rm -r ~/*",
|
|
36
|
+
"mkfs",
|
|
37
|
+
"mkfs.ext4",
|
|
38
|
+
"mkfs.ext3",
|
|
39
|
+
"mkfs.vfat",
|
|
40
|
+
"mkfs.ntfs",
|
|
41
|
+
"dd if=/dev/zero of=/dev",
|
|
42
|
+
"dd of=/dev",
|
|
43
|
+
"shutdown",
|
|
44
|
+
"reboot",
|
|
45
|
+
"halt",
|
|
46
|
+
"poweroff",
|
|
47
|
+
"init 0",
|
|
48
|
+
"init 6",
|
|
49
|
+
":(){ :|: & };:",
|
|
50
|
+
":() { :|:& };:",
|
|
51
|
+
"chmod -R 777 /",
|
|
52
|
+
"chmod -R 000 /",
|
|
53
|
+
"chown -R",
|
|
54
|
+
"format",
|
|
55
|
+
"powershell Remove-Item -Recurse -Force"
|
|
56
|
+
],
|
|
57
|
+
"enableCustomDroids": true,
|
|
58
|
+
"includeCoAuthoredByDroid": true,
|
|
59
|
+
"enableDroidShield": true,
|
|
60
|
+
"enableReadinessReport": false
|
|
61
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: brainstorming
|
|
3
|
+
description: Use when creating or developing, before writing code or implementation plans - refines rough ideas into fully-formed designs through collaborative questioning, alternative exploration, and incremental validation. Don't use during clear 'mechanical' processes
|
|
4
|
+
usage: /brainstorming <session-type> <topic>
|
|
5
|
+
auto_trigger: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Brainstorming Ideas Into Designs
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
|
|
13
|
+
|
|
14
|
+
Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design in small sections (200-300 words), checking after each section whether it looks right so far.
|
|
15
|
+
|
|
16
|
+
## The Process
|
|
17
|
+
|
|
18
|
+
**Understanding the idea:**
|
|
19
|
+
- Check out the current project state first (files, docs, recent commits)
|
|
20
|
+
- Ask questions one at a time to refine the idea
|
|
21
|
+
- Prefer multiple choice questions when possible, but open-ended is fine too
|
|
22
|
+
- Only one question per message - if a topic needs more exploration, break it into multiple questions
|
|
23
|
+
- Focus on understanding: purpose, constraints, success criteria
|
|
24
|
+
|
|
25
|
+
**Exploring approaches:**
|
|
26
|
+
- Propose 2-3 different approaches with trade-offs
|
|
27
|
+
- Present options conversationally with your recommendation and reasoning
|
|
28
|
+
- Lead with your recommended option and explain why
|
|
29
|
+
|
|
30
|
+
**Presenting the design:**
|
|
31
|
+
- Once you believe you understand what you're building, present the design
|
|
32
|
+
- Break it into sections of 200-300 words
|
|
33
|
+
- Ask after each section whether it looks right so far
|
|
34
|
+
- Cover: architecture, components, data flow, error handling, testing
|
|
35
|
+
- Be ready to go back and clarify if something doesn't make sense
|
|
36
|
+
|
|
37
|
+
## After the Design
|
|
38
|
+
|
|
39
|
+
**Documentation:**
|
|
40
|
+
- Write the validated design to `docs/plans/YYYY-MM-DD-<topic>-design.md`
|
|
41
|
+
- Use elements-of-style:writing-clearly-and-concisely skill if available
|
|
42
|
+
- Commit the design document to git
|
|
43
|
+
|
|
44
|
+
**Implementation (if continuing):**
|
|
45
|
+
- Ask: "Ready to set up for implementation?"
|
|
46
|
+
- Create isolated workspace (use git worktrees if needed)
|
|
47
|
+
- Create detailed implementation plan
|
|
48
|
+
|
|
49
|
+
## Key Principles
|
|
50
|
+
|
|
51
|
+
- **One question at a time** - Don't overwhelm with multiple questions
|
|
52
|
+
- **Multiple choice preferred** - Easier to answer than open-ended when possible
|
|
53
|
+
- **YAGNI ruthlessly** - Remove unnecessary features from all designs
|
|
54
|
+
- **Explore alternatives** - Always propose 2-3 approaches before settling
|
|
55
|
+
- **Incremental validation** - Present design in sections, validate each
|
|
56
|
+
- **Be flexible** - Go back and clarify when something doesn't make sense
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-review
|
|
3
|
+
description: Use when completing tasks, implementing major features, or before merging to verify work meets requirements - reviews implementation against plan or requirements before proceeding
|
|
4
|
+
usage: /code-review <review-scope> <focus-areas>
|
|
5
|
+
auto_trigger: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Requesting Code Review
|
|
9
|
+
|
|
10
|
+
Review code thoroughly to catch issues before they cascade.
|
|
11
|
+
|
|
12
|
+
**Core principle:** Review early, review often.
|
|
13
|
+
|
|
14
|
+
## When to Request Review
|
|
15
|
+
|
|
16
|
+
**Mandatory:**
|
|
17
|
+
- After each task in subagent-driven development
|
|
18
|
+
- After completing major feature
|
|
19
|
+
- Before merge to main
|
|
20
|
+
|
|
21
|
+
**Optional but valuable:**
|
|
22
|
+
- When stuck (fresh perspective)
|
|
23
|
+
- Before refactoring (baseline check)
|
|
24
|
+
- After fixing complex bug
|
|
25
|
+
|
|
26
|
+
## How to Request
|
|
27
|
+
|
|
28
|
+
**1. Get git SHAs:**
|
|
29
|
+
```bash
|
|
30
|
+
BASE_SHA=$(git rev-parse HEAD~1) # or origin/main
|
|
31
|
+
HEAD_SHA=$(git rev-parse HEAD)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**2. Conduct code review:**
|
|
35
|
+
|
|
36
|
+
Review implementation against requirements and plan
|
|
37
|
+
|
|
38
|
+
**Placeholders:**
|
|
39
|
+
- `{WHAT_WAS_IMPLEMENTED}` - What you just built
|
|
40
|
+
- `{PLAN_OR_REQUIREMENTS}` - What it should do
|
|
41
|
+
- `{BASE_SHA}` - Starting commit
|
|
42
|
+
- `{HEAD_SHA}` - Ending commit
|
|
43
|
+
- `{DESCRIPTION}` - Brief summary
|
|
44
|
+
|
|
45
|
+
**3. Act on feedback:**
|
|
46
|
+
- Fix Critical issues immediately
|
|
47
|
+
- Fix Important issues before proceeding
|
|
48
|
+
- Note Minor issues for later
|
|
49
|
+
- Push back if reviewer is wrong (with reasoning)
|
|
50
|
+
|
|
51
|
+
## Example
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
[Just completed Task 2: Add verification function]
|
|
55
|
+
|
|
56
|
+
You: Let me request code review before proceeding.
|
|
57
|
+
|
|
58
|
+
BASE_SHA=$(git log --oneline | grep "Task 1" | head -1 | awk '{print $1}')
|
|
59
|
+
HEAD_SHA=$(git rev-parse HEAD)
|
|
60
|
+
|
|
61
|
+
[Conduct code review]
|
|
62
|
+
WHAT_WAS_IMPLEMENTED: Verification and repair functions for conversation index
|
|
63
|
+
PLAN_OR_REQUIREMENTS: Task 2 from docs/plans/deployment-plan.md
|
|
64
|
+
BASE_SHA: a7981ec
|
|
65
|
+
HEAD_SHA: 3df7661
|
|
66
|
+
DESCRIPTION: Added verifyIndex() and repairIndex() with 4 issue types
|
|
67
|
+
|
|
68
|
+
[Subagent returns]:
|
|
69
|
+
Strengths: Clean architecture, real tests
|
|
70
|
+
Issues:
|
|
71
|
+
Important: Missing progress indicators
|
|
72
|
+
Minor: Magic number (100) for reporting interval
|
|
73
|
+
Assessment: Ready to proceed
|
|
74
|
+
|
|
75
|
+
You: [Fix progress indicators]
|
|
76
|
+
[Continue to Task 3]
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## Integration with Workflows
|
|
80
|
+
|
|
81
|
+
**Subagent-Driven Development:**
|
|
82
|
+
- Review after EACH task
|
|
83
|
+
- Catch issues before they compound
|
|
84
|
+
- Fix before moving to next task
|
|
85
|
+
|
|
86
|
+
**Executing Plans:**
|
|
87
|
+
- Review after each batch (3 tasks)
|
|
88
|
+
- Get feedback, apply, continue
|
|
89
|
+
|
|
90
|
+
**Ad-Hoc Development:**
|
|
91
|
+
- Review before merge
|
|
92
|
+
- Review when stuck
|
|
93
|
+
|
|
94
|
+
## Red Flags
|
|
95
|
+
|
|
96
|
+
**Never:**
|
|
97
|
+
- Skip review because "it's simple"
|
|
98
|
+
- Ignore Critical issues
|
|
99
|
+
- Proceed with unfixed Important issues
|
|
100
|
+
- Argue with valid technical feedback
|
|
101
|
+
|
|
102
|
+
**If reviewer wrong:**
|
|
103
|
+
- Push back with technical reasoning
|
|
104
|
+
- Show code/tests that prove it works
|
|
105
|
+
- Request clarification
|
|
106
|
+
|
|
107
|
+
See template at: requesting-code-review/code-reviewer.md
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
// Complete implementation of condition-based waiting utilities
|
|
2
|
+
// From: Lace test infrastructure improvements (2025-10-03)
|
|
3
|
+
// Context: Fixed 15 flaky tests by replacing arbitrary timeouts
|
|
4
|
+
|
|
5
|
+
import type { ThreadManager } from '~/threads/thread-manager';
|
|
6
|
+
import type { LaceEvent, LaceEventType } from '~/threads/types';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Wait for a specific event type to appear in thread
|
|
10
|
+
*
|
|
11
|
+
* @param threadManager - The thread manager to query
|
|
12
|
+
* @param threadId - Thread to check for events
|
|
13
|
+
* @param eventType - Type of event to wait for
|
|
14
|
+
* @param timeoutMs - Maximum time to wait (default 5000ms)
|
|
15
|
+
* @returns Promise resolving to the first matching event
|
|
16
|
+
*
|
|
17
|
+
* Example:
|
|
18
|
+
* await waitForEvent(threadManager, agentThreadId, 'TOOL_RESULT');
|
|
19
|
+
*/
|
|
20
|
+
export function waitForEvent(
|
|
21
|
+
threadManager: ThreadManager,
|
|
22
|
+
threadId: string,
|
|
23
|
+
eventType: LaceEventType,
|
|
24
|
+
timeoutMs = 5000
|
|
25
|
+
): Promise<LaceEvent> {
|
|
26
|
+
return new Promise((resolve, reject) => {
|
|
27
|
+
const startTime = Date.now();
|
|
28
|
+
|
|
29
|
+
const check = () => {
|
|
30
|
+
const events = threadManager.getEvents(threadId);
|
|
31
|
+
const event = events.find((e) => e.type === eventType);
|
|
32
|
+
|
|
33
|
+
if (event) {
|
|
34
|
+
resolve(event);
|
|
35
|
+
} else if (Date.now() - startTime > timeoutMs) {
|
|
36
|
+
reject(new Error(`Timeout waiting for ${eventType} event after ${timeoutMs}ms`));
|
|
37
|
+
} else {
|
|
38
|
+
setTimeout(check, 10); // Poll every 10ms for efficiency
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
check();
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Wait for a specific number of events of a given type
|
|
48
|
+
*
|
|
49
|
+
* @param threadManager - The thread manager to query
|
|
50
|
+
* @param threadId - Thread to check for events
|
|
51
|
+
* @param eventType - Type of event to wait for
|
|
52
|
+
* @param count - Number of events to wait for
|
|
53
|
+
* @param timeoutMs - Maximum time to wait (default 5000ms)
|
|
54
|
+
* @returns Promise resolving to all matching events once count is reached
|
|
55
|
+
*
|
|
56
|
+
* Example:
|
|
57
|
+
* // Wait for 2 AGENT_MESSAGE events (initial response + continuation)
|
|
58
|
+
* await waitForEventCount(threadManager, agentThreadId, 'AGENT_MESSAGE', 2);
|
|
59
|
+
*/
|
|
60
|
+
export function waitForEventCount(
|
|
61
|
+
threadManager: ThreadManager,
|
|
62
|
+
threadId: string,
|
|
63
|
+
eventType: LaceEventType,
|
|
64
|
+
count: number,
|
|
65
|
+
timeoutMs = 5000
|
|
66
|
+
): Promise<LaceEvent[]> {
|
|
67
|
+
return new Promise((resolve, reject) => {
|
|
68
|
+
const startTime = Date.now();
|
|
69
|
+
|
|
70
|
+
const check = () => {
|
|
71
|
+
const events = threadManager.getEvents(threadId);
|
|
72
|
+
const matchingEvents = events.filter((e) => e.type === eventType);
|
|
73
|
+
|
|
74
|
+
if (matchingEvents.length >= count) {
|
|
75
|
+
resolve(matchingEvents);
|
|
76
|
+
} else if (Date.now() - startTime > timeoutMs) {
|
|
77
|
+
reject(
|
|
78
|
+
new Error(
|
|
79
|
+
`Timeout waiting for ${count} ${eventType} events after ${timeoutMs}ms (got ${matchingEvents.length})`
|
|
80
|
+
)
|
|
81
|
+
);
|
|
82
|
+
} else {
|
|
83
|
+
setTimeout(check, 10);
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
check();
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Wait for an event matching a custom predicate
|
|
93
|
+
* Useful when you need to check event data, not just type
|
|
94
|
+
*
|
|
95
|
+
* @param threadManager - The thread manager to query
|
|
96
|
+
* @param threadId - Thread to check for events
|
|
97
|
+
* @param predicate - Function that returns true when event matches
|
|
98
|
+
* @param description - Human-readable description for error messages
|
|
99
|
+
* @param timeoutMs - Maximum time to wait (default 5000ms)
|
|
100
|
+
* @returns Promise resolving to the first matching event
|
|
101
|
+
*
|
|
102
|
+
* Example:
|
|
103
|
+
* // Wait for TOOL_RESULT with specific ID
|
|
104
|
+
* await waitForEventMatch(
|
|
105
|
+
* threadManager,
|
|
106
|
+
* agentThreadId,
|
|
107
|
+
* (e) => e.type === 'TOOL_RESULT' && e.data.id === 'call_123',
|
|
108
|
+
* 'TOOL_RESULT with id=call_123'
|
|
109
|
+
* );
|
|
110
|
+
*/
|
|
111
|
+
export function waitForEventMatch(
|
|
112
|
+
threadManager: ThreadManager,
|
|
113
|
+
threadId: string,
|
|
114
|
+
predicate: (event: LaceEvent) => boolean,
|
|
115
|
+
description: string,
|
|
116
|
+
timeoutMs = 5000
|
|
117
|
+
): Promise<LaceEvent> {
|
|
118
|
+
return new Promise((resolve, reject) => {
|
|
119
|
+
const startTime = Date.now();
|
|
120
|
+
|
|
121
|
+
const check = () => {
|
|
122
|
+
const events = threadManager.getEvents(threadId);
|
|
123
|
+
const event = events.find(predicate);
|
|
124
|
+
|
|
125
|
+
if (event) {
|
|
126
|
+
resolve(event);
|
|
127
|
+
} else if (Date.now() - startTime > timeoutMs) {
|
|
128
|
+
reject(new Error(`Timeout waiting for ${description} after ${timeoutMs}ms`));
|
|
129
|
+
} else {
|
|
130
|
+
setTimeout(check, 10);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
check();
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// Usage example from actual debugging session:
|
|
139
|
+
//
|
|
140
|
+
// BEFORE (flaky):
|
|
141
|
+
// ---------------
|
|
142
|
+
// const messagePromise = agent.sendMessage('Execute tools');
|
|
143
|
+
// await new Promise(r => setTimeout(r, 300)); // Hope tools start in 300ms
|
|
144
|
+
// agent.abort();
|
|
145
|
+
// await messagePromise;
|
|
146
|
+
// await new Promise(r => setTimeout(r, 50)); // Hope results arrive in 50ms
|
|
147
|
+
// expect(toolResults.length).toBe(2); // Fails randomly
|
|
148
|
+
//
|
|
149
|
+
// AFTER (reliable):
|
|
150
|
+
// ----------------
|
|
151
|
+
// const messagePromise = agent.sendMessage('Execute tools');
|
|
152
|
+
// await waitForEventCount(threadManager, threadId, 'TOOL_CALL', 2); // Wait for tools to start
|
|
153
|
+
// agent.abort();
|
|
154
|
+
// await messagePromise;
|
|
155
|
+
// await waitForEventCount(threadManager, threadId, 'TOOL_RESULT', 2); // Wait for results
|
|
156
|
+
// expect(toolResults.length).toBe(2); // Always succeeds
|
|
157
|
+
//
|
|
158
|
+
// Result: 60% pass rate → 100%, 40% faster execution
|