clikit-plugin 0.1.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 (156) hide show
  1. package/AGENTS.md +46 -0
  2. package/README.md +282 -0
  3. package/command/commit.md +137 -0
  4. package/command/create.md +150 -0
  5. package/command/debug.md +185 -0
  6. package/command/design.md +82 -0
  7. package/command/handoff.md +95 -0
  8. package/command/import-plan.md +175 -0
  9. package/command/init.md +112 -0
  10. package/command/issue.md +110 -0
  11. package/command/plan.md +205 -0
  12. package/command/pr.md +174 -0
  13. package/command/research.md +103 -0
  14. package/command/resume.md +80 -0
  15. package/command/review-codebase.md +228 -0
  16. package/command/review.md +135 -0
  17. package/command/ship.md +109 -0
  18. package/command/start.md +77 -0
  19. package/command/status.md +123 -0
  20. package/command/verify.md +79 -0
  21. package/command/vision.md +142 -0
  22. package/dist/agents/index.d.ts +4 -0
  23. package/dist/agents/index.d.ts.map +1 -0
  24. package/dist/cli.d.ts +3 -0
  25. package/dist/cli.d.ts.map +1 -0
  26. package/dist/cli.js +103 -0
  27. package/dist/clikit.schema.json +423 -0
  28. package/dist/commands/index.d.ts +4 -0
  29. package/dist/commands/index.d.ts.map +1 -0
  30. package/dist/config.d.ts +118 -0
  31. package/dist/config.d.ts.map +1 -0
  32. package/dist/hooks/auto-format.d.ts +30 -0
  33. package/dist/hooks/auto-format.d.ts.map +1 -0
  34. package/dist/hooks/comment-checker.d.ts +17 -0
  35. package/dist/hooks/comment-checker.d.ts.map +1 -0
  36. package/dist/hooks/compaction.d.ts +60 -0
  37. package/dist/hooks/compaction.d.ts.map +1 -0
  38. package/dist/hooks/empty-message-sanitizer.d.ts +9 -0
  39. package/dist/hooks/empty-message-sanitizer.d.ts.map +1 -0
  40. package/dist/hooks/env-context.d.ts +43 -0
  41. package/dist/hooks/env-context.d.ts.map +1 -0
  42. package/dist/hooks/git-guard.d.ts +14 -0
  43. package/dist/hooks/git-guard.d.ts.map +1 -0
  44. package/dist/hooks/index.d.ts +35 -0
  45. package/dist/hooks/index.d.ts.map +1 -0
  46. package/dist/hooks/ritual-enforcer.d.ts +29 -0
  47. package/dist/hooks/ritual-enforcer.d.ts.map +1 -0
  48. package/dist/hooks/security-check.d.ts +20 -0
  49. package/dist/hooks/security-check.d.ts.map +1 -0
  50. package/dist/hooks/session-notification.d.ts +23 -0
  51. package/dist/hooks/session-notification.d.ts.map +1 -0
  52. package/dist/hooks/subagent-question-blocker.d.ts +11 -0
  53. package/dist/hooks/subagent-question-blocker.d.ts.map +1 -0
  54. package/dist/hooks/swarm-enforcer.d.ts +31 -0
  55. package/dist/hooks/swarm-enforcer.d.ts.map +1 -0
  56. package/dist/hooks/todo-enforcer.d.ts +19 -0
  57. package/dist/hooks/todo-enforcer.d.ts.map +1 -0
  58. package/dist/hooks/truncator.d.ts +28 -0
  59. package/dist/hooks/truncator.d.ts.map +1 -0
  60. package/dist/hooks/typecheck-gate.d.ts +31 -0
  61. package/dist/hooks/typecheck-gate.d.ts.map +1 -0
  62. package/dist/index.d.ts +13 -0
  63. package/dist/index.d.ts.map +1 -0
  64. package/dist/index.js +5785 -0
  65. package/dist/skills/index.d.ts +9 -0
  66. package/dist/skills/index.d.ts.map +1 -0
  67. package/dist/tools/beads-memory-sync.d.ts +17 -0
  68. package/dist/tools/beads-memory-sync.d.ts.map +1 -0
  69. package/dist/tools/context-summary.d.ts +21 -0
  70. package/dist/tools/context-summary.d.ts.map +1 -0
  71. package/dist/tools/index.d.ts +7 -0
  72. package/dist/tools/index.d.ts.map +1 -0
  73. package/dist/tools/memory.d.ts +56 -0
  74. package/dist/tools/memory.d.ts.map +1 -0
  75. package/dist/tools/observation.d.ts +28 -0
  76. package/dist/tools/observation.d.ts.map +1 -0
  77. package/dist/tools/quick-research.d.ts +16 -0
  78. package/dist/tools/quick-research.d.ts.map +1 -0
  79. package/dist/tools/swarm.d.ts +57 -0
  80. package/dist/tools/swarm.d.ts.map +1 -0
  81. package/dist/types.d.ts +32 -0
  82. package/dist/types.d.ts.map +1 -0
  83. package/memory/_templates/handoff.md +114 -0
  84. package/memory/_templates/plan.md +135 -0
  85. package/memory/_templates/prd.md +147 -0
  86. package/memory/_templates/research.md +108 -0
  87. package/memory/_templates/review.md +117 -0
  88. package/memory/_templates/spec.md +116 -0
  89. package/memory/beads/.gitkeep +0 -0
  90. package/memory/handoffs/.gitkeep +0 -0
  91. package/memory/plans/.gitkeep +0 -0
  92. package/memory/prds/.gitkeep +0 -0
  93. package/memory/research/.gitkeep +0 -0
  94. package/memory/reviews/.gitkeep +0 -0
  95. package/memory/specs/.gitkeep +0 -0
  96. package/package.json +64 -0
  97. package/skill/accessibility-audit/SKILL.md +115 -0
  98. package/skill/beads/SKILL.md +56 -0
  99. package/skill/beads-bridge/SKILL.md +45 -0
  100. package/skill/brainstorming/SKILL.md +41 -0
  101. package/skill/chrome-devtools/SKILL.md +36 -0
  102. package/skill/cloudflare/SKILL.md +96 -0
  103. package/skill/condition-based-waiting/SKILL.md +92 -0
  104. package/skill/deep-research/SKILL.md +130 -0
  105. package/skill/defense-in-depth/SKILL.md +89 -0
  106. package/skill/design-system-audit/SKILL.md +136 -0
  107. package/skill/development-lifecycle/SKILL.md +58 -0
  108. package/skill/dispatching-parallel-agents/SKILL.md +94 -0
  109. package/skill/executing-plans/SKILL.md +54 -0
  110. package/skill/figma/SKILL.md +34 -0
  111. package/skill/finishing-a-development-branch/SKILL.md +127 -0
  112. package/skill/frontend-aesthetics/SKILL.md +63 -0
  113. package/skill/gemini-large-context/SKILL.md +80 -0
  114. package/skill/mockup-to-code/SKILL.md +98 -0
  115. package/skill/mqdh/SKILL.md +54 -0
  116. package/skill/notebooklm/SKILL.md +71 -0
  117. package/skill/playwright/SKILL.md +37 -0
  118. package/skill/playwriter/SKILL.md +56 -0
  119. package/skill/polar/SKILL.md +39 -0
  120. package/skill/receiving-code-review/SKILL.md +47 -0
  121. package/skill/requesting-code-review/SKILL.md +47 -0
  122. package/skill/resend/SKILL.md +85 -0
  123. package/skill/ritual-workflow/SKILL.md +101 -0
  124. package/skill/root-cause-tracing/SKILL.md +73 -0
  125. package/skill/session-management/SKILL.md +53 -0
  126. package/skill/sharing-skills/SKILL.md +50 -0
  127. package/skill/source-code-research/SKILL.md +138 -0
  128. package/skill/subagent-driven-development/SKILL.md +69 -0
  129. package/skill/supabase/SKILL.md +80 -0
  130. package/skill/supabase-postgres-best-practices/SKILL.md +168 -0
  131. package/skill/swarm-coordination/SKILL.md +54 -0
  132. package/skill/systematic-debugging/SKILL.md +58 -0
  133. package/skill/test-driven-development/SKILL.md +53 -0
  134. package/skill/testing-anti-patterns/SKILL.md +100 -0
  135. package/skill/testing-skills-with-subagents/SKILL.md +102 -0
  136. package/skill/ui-ux-research/SKILL.md +93 -0
  137. package/skill/using-git-worktrees/SKILL.md +129 -0
  138. package/skill/v0/SKILL.md +67 -0
  139. package/skill/v1-run/SKILL.md +85 -0
  140. package/skill/vercel-react-best-practices/SKILL.md +174 -0
  141. package/skill/verification-before-completion/SKILL.md +55 -0
  142. package/skill/visual-analysis/SKILL.md +113 -0
  143. package/skill/writing-plans/SKILL.md +55 -0
  144. package/skill/writing-skills/SKILL.md +68 -0
  145. package/src/agents/AGENTS.md +46 -0
  146. package/src/agents/build.md +170 -0
  147. package/src/agents/explore.md +113 -0
  148. package/src/agents/general.md +92 -0
  149. package/src/agents/index.ts +64 -0
  150. package/src/agents/librarian.md +116 -0
  151. package/src/agents/looker.md +107 -0
  152. package/src/agents/oracle.md +138 -0
  153. package/src/agents/plan.md +78 -0
  154. package/src/agents/review.md +98 -0
  155. package/src/agents/scout.md +84 -0
  156. package/src/agents/vision.md +159 -0
@@ -0,0 +1,79 @@
1
+ ---
2
+ description: Run full verification suite. Typecheck, tests, lint, build.
3
+ agent: build
4
+ subtask: true
5
+ ---
6
+
7
+ You are the **Build Agent**. Execute the `/verify` command.
8
+
9
+ ## Your Task
10
+
11
+ Run the full verification suite and report results.
12
+
13
+ ## Process
14
+
15
+ ### 1. Detect Project Tools
16
+
17
+ Check which tools are available:
18
+
19
+ ```bash
20
+ # Check package manager
21
+ ls package.json && cat package.json | head -5
22
+ ls bun.lockb && echo "bun" || ls pnpm-lock.yaml && echo "pnpm" || ls yarn.lock && echo "yarn" || echo "npm"
23
+ ```
24
+
25
+ Read `package.json` scripts to determine available commands.
26
+
27
+ ### 2. Run Verification Gates
28
+
29
+ Execute in order, collecting results:
30
+
31
+ | Gate | Commands (try in order) | Required |
32
+ |------|------------------------|----------|
33
+ | **Typecheck** | `pnpm typecheck`, `npm run typecheck`, `tsc --noEmit` | Yes |
34
+ | **Tests** | `pnpm test`, `npm test`, `bun test` | Yes |
35
+ | **Lint** | `pnpm lint`, `npm run lint`, `eslint .` | Yes |
36
+ | **Build** | `pnpm build`, `npm run build`, `bun run build` | Yes |
37
+
38
+ Run each gate. If a gate fails, continue to the next but record the failure.
39
+
40
+ ### 3. Report Results
41
+
42
+ Format results clearly:
43
+
44
+ ```
45
+ ## Verification Report
46
+
47
+ | Gate | Status | Details |
48
+ |------------|--------|------------------|
49
+ | Typecheck | ✅/❌ | [error count] |
50
+ | Tests | ✅/❌ | [pass/fail/skip] |
51
+ | Lint | ✅/❌ | [warning/error] |
52
+ | Build | ✅/❌ | [output] |
53
+
54
+ ### Overall: PASS / FAIL
55
+
56
+ ### Failures (if any)
57
+ [Detailed error output for each failing gate]
58
+
59
+ ### Recommended Fixes
60
+ 1. [Fix suggestion]
61
+ ```
62
+
63
+ ### 4. Fix Mode (Optional)
64
+
65
+ If the user asks to fix issues:
66
+ - Fix typecheck errors first (most foundational)
67
+ - Then lint errors
68
+ - Then test failures
69
+ - Re-run verification after fixes
70
+
71
+ ## Rules
72
+
73
+ - ✅ ALWAYS run all 4 gates even if one fails
74
+ - ✅ ALWAYS report detailed error output
75
+ - ✅ ALWAYS suggest fixes for failures
76
+ - ❌ NEVER auto-fix without user confirmation
77
+ - ❌ NEVER report passing if any gate fails
78
+
79
+ Now, running verification...
@@ -0,0 +1,142 @@
1
+ ---
2
+ description: Review UI implementation for design quality, accessibility, and responsiveness.
3
+ agent: vision
4
+ subtask: true
5
+ ---
6
+
7
+ You are the **Vision Agent**. Execute the `/vision` command.
8
+
9
+ ## Your Task
10
+
11
+ Review the UI implementation for design quality, accessibility, responsiveness, and visual consistency.
12
+
13
+ ## Process
14
+
15
+ ### 1. Gather Context
16
+
17
+ - Identify changed/target UI files (components, styles, layouts)
18
+ - Load spec.md if it has UI requirements
19
+ - Check existing design system, tokens, component patterns
20
+ - Read `package.json` for CSS framework/library in use
21
+
22
+ ### 2. Design Quality Review
23
+
24
+ | Aspect | Check |
25
+ |--------|-------|
26
+ | **Typography** | Font choices, hierarchy, readability, line-height |
27
+ | **Color** | Palette consistency, contrast, semantic usage |
28
+ | **Spacing** | Consistent gaps, padding, margins (tokens?) |
29
+ | **Layout** | Grid alignment, responsiveness, overflow handling |
30
+ | **Motion** | Appropriate animations, `prefers-reduced-motion` |
31
+ | **Consistency** | Components match existing patterns |
32
+
33
+ ### 3. Accessibility Audit
34
+
35
+ | Check | Standard |
36
+ |-------|----------|
37
+ | Color contrast | WCAG AA (4.5:1 text, 3:1 large text) |
38
+ | Focus indicators | Visible, styled, keyboard-navigable |
39
+ | ARIA attributes | Labels, roles, states for interactive elements |
40
+ | Semantic HTML | Proper elements (button, nav, main, aside) |
41
+ | Screen readers | Alt text, aria-label, sr-only text |
42
+ | Reduced motion | `prefers-reduced-motion` media query |
43
+ | Touch targets | Minimum 44x44px on mobile |
44
+
45
+ ### 4. Responsive Review
46
+
47
+ Check at minimum these breakpoints:
48
+ - Mobile: 375px
49
+ - Tablet: 768px
50
+ - Desktop: 1024px
51
+ - Wide: 1440px
52
+
53
+ Look for:
54
+ - Content overflow
55
+ - Illegible text sizes
56
+ - Touch target sizes
57
+ - Layout breakage
58
+ - Hidden content accessibility
59
+
60
+ ### 5. Implementation Quality
61
+
62
+ | Aspect | Check |
63
+ |--------|-------|
64
+ | CSS architecture | Custom properties, naming conventions, specificity |
65
+ | Component patterns | Props, composition, reusability |
66
+ | Hard-coded values | Should use tokens/variables |
67
+ | `!important` usage | Should be minimal/justified |
68
+ | Unused styles | Dead CSS, redundant rules |
69
+ | Performance | Layout thrashing, heavy animations, large images |
70
+
71
+ ### 6. Generate Report
72
+
73
+ Save to `.opencode/memory/reviews/YYYY-MM-DD-ui-review.md`
74
+
75
+ ```markdown
76
+ ---
77
+ type: UI
78
+ date: YYYY-MM-DD
79
+ reviewer: Vision Agent
80
+ artifact: [paths reviewed]
81
+ verdict: approved | changes_required | blocked
82
+ ---
83
+
84
+ # UI Review: [Feature/Component]
85
+
86
+ ## Summary
87
+ [2-3 sentence overview]
88
+
89
+ ## Design Quality
90
+ | Aspect | Rating | Notes |
91
+ |--------|--------|-------|
92
+ | Typography | ✅/⚠️/❌ | [Details] |
93
+ | Color | ✅/⚠️/❌ | [Details] |
94
+ | Spacing | ✅/⚠️/❌ | [Details] |
95
+ | Layout | ✅/⚠️/❌ | [Details] |
96
+ | Motion | ✅/⚠️/❌ | [Details] |
97
+ | Consistency | ✅/⚠️/❌ | [Details] |
98
+
99
+ ## Accessibility
100
+ | Check | Pass | Notes |
101
+ |-------|------|-------|
102
+ | Contrast | ✅/❌ | [Ratio if failing] |
103
+ | Focus | ✅/❌ | [Details] |
104
+ | ARIA | ✅/❌ | [Missing attrs] |
105
+ | Semantic HTML | ✅/❌ | [Details] |
106
+ | Keyboard | ✅/❌ | [Details] |
107
+
108
+ ## Responsive
109
+ | Breakpoint | Status | Issues |
110
+ |------------|--------|--------|
111
+ | Mobile 375px | ✅/❌ | [Issues] |
112
+ | Tablet 768px | ✅/❌ | [Issues] |
113
+ | Desktop 1024px | ✅/❌ | [Issues] |
114
+
115
+ ## Required Changes
116
+ 1. [Change with file:line reference]
117
+
118
+ ## Suggestions
119
+ - [Optional improvement]
120
+
121
+ ## Verdict
122
+ [Why this verdict]
123
+ ```
124
+
125
+ ## Verdict Rules
126
+
127
+ | Verdict | Criteria |
128
+ |---------|----------|
129
+ | `approved` | No critical a11y issues, responsive OK, design consistent |
130
+ | `changes_required` | A11y issues OR responsive breakage OR design inconsistency |
131
+ | `blocked` | Critical a11y failures, major design system violations |
132
+
133
+ ## Rules
134
+
135
+ - ✅ ALWAYS check accessibility (non-negotiable)
136
+ - ✅ ALWAYS check responsive behavior
137
+ - ✅ ALWAYS reference specific file:line locations
138
+ - ✅ ALWAYS provide actionable fix suggestions
139
+ - ❌ NEVER approve with accessibility failures
140
+ - ❌ NEVER block on subjective style preferences alone
141
+
142
+ Now, gathering UI files to review...
@@ -0,0 +1,4 @@
1
+ import type { AgentConfig } from "../types";
2
+ export declare function loadAgents(): Record<string, AgentConfig>;
3
+ export declare function getBuiltinAgents(): Record<string, AgentConfig>;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAuC5C,wBAAgB,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAoBxD;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAE9D"}
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bun
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,103 @@
1
+ #!/usr/bin/env bun
2
+ // @bun
3
+
4
+ // src/cli.ts
5
+ import * as fs from "fs";
6
+ import * as path from "path";
7
+ var VERSION = "0.1.0";
8
+ function getCwd() {
9
+ return process.cwd();
10
+ }
11
+ async function install() {
12
+ const cwd = getCwd();
13
+ const opencodeDir = path.join(cwd, ".opencode");
14
+ console.log(`\uD83D\uDE80 Installing CliKit...
15
+ `);
16
+ if (!fs.existsSync(opencodeDir)) {
17
+ fs.mkdirSync(opencodeDir, { recursive: true });
18
+ console.log("\u2705 Created .opencode directory");
19
+ }
20
+ const indexPath = path.join(opencodeDir, "index.ts");
21
+ if (!fs.existsSync(indexPath)) {
22
+ fs.writeFileSync(indexPath, `import CliKitPlugin from "clikit-plugin";
23
+ export default CliKitPlugin;
24
+ `);
25
+ console.log("\u2705 Created .opencode/index.ts");
26
+ } else {
27
+ console.log("\u2139\uFE0F .opencode/index.ts already exists");
28
+ }
29
+ const configPath = path.join(opencodeDir, "clikit.config.json");
30
+ if (!fs.existsSync(configPath)) {
31
+ fs.writeFileSync(configPath, JSON.stringify({
32
+ $schema: "https://unpkg.com/clikit-plugin/schema.json",
33
+ disabled_agents: [],
34
+ disabled_commands: [],
35
+ agents: {},
36
+ hooks: {}
37
+ }, null, 2));
38
+ console.log("\u2705 Created .opencode/clikit.config.json");
39
+ } else {
40
+ console.log("\u2139\uFE0F .opencode/clikit.config.json already exists");
41
+ }
42
+ const memoryDir = path.join(opencodeDir, "memory");
43
+ const memorySubdirs = ["specs", "plans", "research", "reviews", "handoffs", "beads", "prds"];
44
+ for (const subdir of memorySubdirs) {
45
+ const dir = path.join(memoryDir, subdir);
46
+ if (!fs.existsSync(dir)) {
47
+ fs.mkdirSync(dir, { recursive: true });
48
+ console.log(`\u2705 Created .opencode/memory/${subdir}/`);
49
+ }
50
+ }
51
+ console.log(`
52
+ \u2705 CliKit installed successfully!`);
53
+ console.log(`
54
+ Next steps:`);
55
+ console.log(" 1. Run: bun add -d clikit-plugin");
56
+ console.log(" 2. Restart OpenCode");
57
+ console.log(`
58
+ Available commands: /create, /start, /plan, /ship, /verify, /review, /debug, /pr`);
59
+ }
60
+ function help() {
61
+ console.log(`
62
+ CliKit - OpenCode Plugin
63
+
64
+ Usage:
65
+ clikit <command>
66
+
67
+ Commands:
68
+ install Install CliKit in current project
69
+ help Show this help message
70
+ version Show version
71
+
72
+ Examples:
73
+ bunx clikit install
74
+ `);
75
+ }
76
+ function version() {
77
+ console.log(`clikit-plugin v${VERSION}`);
78
+ }
79
+ async function main() {
80
+ const args = process.argv.slice(2);
81
+ const command = args[0] || "help";
82
+ switch (command) {
83
+ case "install":
84
+ case "i":
85
+ await install();
86
+ break;
87
+ case "help":
88
+ case "-h":
89
+ case "--help":
90
+ help();
91
+ break;
92
+ case "version":
93
+ case "-v":
94
+ case "--version":
95
+ version();
96
+ break;
97
+ default:
98
+ console.error(`Unknown command: ${command}`);
99
+ help();
100
+ process.exit(1);
101
+ }
102
+ }
103
+ main().catch(console.error);