abelworkflow 0.9.2 → 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 (134) hide show
  1. package/README.md +54 -182
  2. package/bin/abelworkflow.mjs +5 -3
  3. package/extensions/pi-gpt-responses-compat/index.ts +1 -1
  4. package/lib/cli/args.mjs +76 -0
  5. package/lib/cli/main.mjs +385 -0
  6. package/lib/cli/prompts.mjs +106 -0
  7. package/lib/config/dotenv.mjs +102 -0
  8. package/lib/config/jsonc.mjs +80 -0
  9. package/lib/config/store.mjs +310 -0
  10. package/lib/config/toml.mjs +638 -0
  11. package/lib/installer/assets.mjs +324 -0
  12. package/lib/installer/install.mjs +153 -0
  13. package/lib/installer/links.mjs +427 -0
  14. package/lib/installer/state.mjs +163 -0
  15. package/lib/paths.mjs +99 -0
  16. package/lib/providers/claude.mjs +197 -0
  17. package/lib/providers/codex.mjs +433 -0
  18. package/lib/providers/pi.mjs +577 -0
  19. package/lib/providers/skills.mjs +105 -0
  20. package/lib/templates/codex/agents/default.toml +7 -0
  21. package/lib/templates/codex/agents/explorer.toml +7 -0
  22. package/lib/templates/codex/agents/planner.toml +7 -0
  23. package/lib/templates/codex/agents/reviewer.toml +7 -0
  24. package/lib/templates/codex/agents/worker.toml +7 -0
  25. package/lib/templates/codex/config-base.toml +11 -3
  26. package/lib/templates/workflow/AGENTS.md +50 -0
  27. package/lib/templates/workflow/commands/abel-design.md +175 -0
  28. package/{commands → lib/templates/workflow/commands}/abel-diagnose.md +5 -5
  29. package/lib/templates/workflow/commands/abel-implement.md +170 -0
  30. package/{commands → lib/templates/workflow/commands}/abel-init.md +3 -5
  31. package/{.gitignore → lib/templates/workflow/gitignore.template} +0 -2
  32. package/lib/tools/cli-installer.mjs +277 -0
  33. package/package.json +37 -10
  34. package/skills/context7-auto-research/SKILL.md +5 -5
  35. package/skills/context7-auto-research/{context7-api.js → context7-api.cjs} +5 -8
  36. package/skills/dev-browser/SKILL.md +53 -33
  37. package/skills/dev-browser/dist/scripts/start.d.ts +2 -0
  38. package/skills/dev-browser/dist/scripts/start.d.ts.map +1 -0
  39. package/skills/dev-browser/dist/scripts/start.js +118 -0
  40. package/skills/dev-browser/dist/scripts/start.js.map +1 -0
  41. package/skills/dev-browser/dist/src/client.d.ts +93 -0
  42. package/skills/dev-browser/dist/src/client.d.ts.map +1 -0
  43. package/skills/dev-browser/dist/src/client.js +310 -0
  44. package/skills/dev-browser/dist/src/client.js.map +1 -0
  45. package/skills/dev-browser/dist/src/entrypoint.d.ts +29 -0
  46. package/skills/dev-browser/dist/src/entrypoint.d.ts.map +1 -0
  47. package/skills/dev-browser/dist/src/entrypoint.js +106 -0
  48. package/skills/dev-browser/dist/src/entrypoint.js.map +1 -0
  49. package/skills/dev-browser/dist/src/index.d.ts +4 -0
  50. package/skills/dev-browser/dist/src/index.d.ts.map +1 -0
  51. package/skills/dev-browser/dist/src/index.js +2 -0
  52. package/skills/dev-browser/dist/src/index.js.map +1 -0
  53. package/skills/dev-browser/dist/src/page-api.d.ts +25 -0
  54. package/skills/dev-browser/dist/src/page-api.d.ts.map +1 -0
  55. package/skills/dev-browser/dist/src/page-api.js +104 -0
  56. package/skills/dev-browser/dist/src/page-api.js.map +1 -0
  57. package/skills/dev-browser/dist/src/relay.d.ts +27 -0
  58. package/skills/dev-browser/dist/src/relay.d.ts.map +1 -0
  59. package/skills/dev-browser/dist/src/relay.js +521 -0
  60. package/skills/dev-browser/dist/src/relay.js.map +1 -0
  61. package/skills/dev-browser/dist/src/runtime.d.ts +45 -0
  62. package/skills/dev-browser/dist/src/runtime.d.ts.map +1 -0
  63. package/skills/dev-browser/dist/src/runtime.js +54 -0
  64. package/skills/dev-browser/dist/src/runtime.js.map +1 -0
  65. package/skills/dev-browser/dist/src/snapshot/browser-script.d.ts +23 -0
  66. package/skills/dev-browser/dist/src/snapshot/browser-script.d.ts.map +1 -0
  67. package/skills/dev-browser/{src/snapshot/browser-script.ts → dist/src/snapshot/browser-script.js} +21 -30
  68. package/skills/dev-browser/dist/src/snapshot/browser-script.js.map +1 -0
  69. package/skills/dev-browser/dist/src/snapshot/index.d.ts +14 -0
  70. package/skills/dev-browser/dist/src/snapshot/index.d.ts.map +1 -0
  71. package/skills/dev-browser/{src/snapshot/index.ts → dist/src/snapshot/index.js} +2 -2
  72. package/skills/dev-browser/dist/src/snapshot/index.js.map +1 -0
  73. package/skills/dev-browser/dist/src/snapshot/inject.d.ts +13 -0
  74. package/skills/dev-browser/dist/src/snapshot/inject.d.ts.map +1 -0
  75. package/skills/dev-browser/{src/snapshot/inject.ts → dist/src/snapshot/inject.js} +2 -2
  76. package/skills/dev-browser/dist/src/snapshot/inject.js.map +1 -0
  77. package/skills/dev-browser/dist/src/standalone.d.ts +32 -0
  78. package/skills/dev-browser/dist/src/standalone.d.ts.map +1 -0
  79. package/skills/dev-browser/dist/src/standalone.js +174 -0
  80. package/skills/dev-browser/dist/src/standalone.js.map +1 -0
  81. package/skills/dev-browser/dist/src/startup.d.ts +55 -0
  82. package/skills/dev-browser/dist/src/startup.d.ts.map +1 -0
  83. package/skills/dev-browser/dist/src/startup.js +81 -0
  84. package/skills/dev-browser/dist/src/startup.js.map +1 -0
  85. package/skills/dev-browser/dist/src/target-registry.d.ts +29 -0
  86. package/skills/dev-browser/dist/src/target-registry.d.ts.map +1 -0
  87. package/skills/dev-browser/dist/src/target-registry.js +135 -0
  88. package/skills/dev-browser/dist/src/target-registry.js.map +1 -0
  89. package/skills/dev-browser/dist/src/types.d.ts +27 -0
  90. package/skills/dev-browser/dist/src/types.d.ts.map +1 -0
  91. package/skills/dev-browser/dist/src/types.js +2 -0
  92. package/skills/dev-browser/dist/src/types.js.map +1 -0
  93. package/skills/dev-browser/package-lock.json +67 -1510
  94. package/skills/dev-browser/package.json +18 -14
  95. package/skills/dev-browser/references/scraping.md +94 -105
  96. package/skills/grok-search/.env.example +3 -3
  97. package/skills/grok-search/SKILL.md +1 -1
  98. package/skills/grok-search/defaults.json +3 -0
  99. package/skills/grok-search/gitignore.template +4 -0
  100. package/skills/grok-search/scripts/_dotenv.py +5 -1
  101. package/skills/grok-search/scripts/groksearch_cli.py +15 -33
  102. package/skills/prompt-enhancer/SKILL.md +2 -27
  103. package/skills/prompt-enhancer/TEMPLATE.md +0 -4
  104. package/.skill-lock.json +0 -29
  105. package/AGENTS.md +0 -45
  106. package/commands/abel-implement.md +0 -157
  107. package/commands/abel-plan.md +0 -88
  108. package/commands/abel-research.md +0 -126
  109. package/lib/cli/logic.mjs +0 -213
  110. package/lib/cli.mjs +0 -3016
  111. package/skills/confidence-check/SKILL.md +0 -34
  112. package/skills/confidence-check/confidence.ts +0 -276
  113. package/skills/dev-browser/bun.lock +0 -460
  114. package/skills/dev-browser/scripts/start.ts +0 -280
  115. package/skills/dev-browser/src/client.ts +0 -474
  116. package/skills/dev-browser/src/entrypoint.ts +0 -157
  117. package/skills/dev-browser/src/index.ts +0 -289
  118. package/skills/dev-browser/src/relay.ts +0 -731
  119. package/skills/dev-browser/src/runtime.test.ts +0 -60
  120. package/skills/dev-browser/src/runtime.ts +0 -171
  121. package/skills/dev-browser/src/startup.test.ts +0 -95
  122. package/skills/dev-browser/src/startup.ts +0 -153
  123. package/skills/dev-browser/src/types.ts +0 -35
  124. package/skills/dev-browser/tsconfig.json +0 -36
  125. package/skills/dev-browser/vitest.config.ts +0 -12
  126. package/skills/prompt-enhancer/.env.example +0 -12
  127. package/skills/prompt-enhancer/ADVANCED.md +0 -103
  128. package/skills/prompt-enhancer/requirements.txt +0 -2
  129. package/skills/prompt-enhancer/scripts/_dotenv.py +0 -28
  130. package/skills/prompt-enhancer/scripts/enhance.py +0 -191
  131. package/skills/prompt-enhancer/scripts/prompt_enhancer_entry.py +0 -253
  132. package/skills/sequential-think/SKILL.md +0 -198
  133. package/skills/sequential-think/scripts/.env.example +0 -5
  134. package/skills/sequential-think/scripts/sequential_think_cli.py +0 -253
@@ -1,34 +0,0 @@
1
- ---
2
- name: confidence-check
3
- description: Pre-implementation confidence assessment (≥90% required). Use before starting any implementation to verify readiness with duplicate check, architecture compliance, official docs verification, OSS references, and root cause identification.
4
- ---
5
-
6
- # Confidence Check
7
-
8
- Run this BEFORE implementing to prevent wrong-direction work. Requires ≥90% confidence to proceed.
9
-
10
- ## When to Use
11
-
12
- - Before writing or modifying any implementation code
13
- - Before applying a fix to verify root cause
14
- - When user asks to "check confidence" or "assess readiness"
15
-
16
- ## Assessment (5 checks)
17
-
18
- | Check | Weight | How |
19
- |---|---|---|
20
- | No duplicate implementations | 25% | Grep/Glob for similar code |
21
- | Architecture compliance | 25% | Read CLAUDE.md / AGENTS.md |
22
- | Official docs verified | 20% | Context7 or WebFetch |
23
- | OSS reference found | 15% | WebSearch / GitHub |
24
- | Root cause identified | 15% | Analyze errors and logs |
25
-
26
- ## Thresholds
27
-
28
- - **≥90%**: Proceed with implementation
29
- - **70–89%**: Continue investigation, do not implement yet
30
- - **<70%**: Stop and request more context
31
-
32
- ## Output
33
-
34
- Print the checklist with pass/fail markers, the total score, and the recommended action.
@@ -1,276 +0,0 @@
1
- /**
2
- * Confidence Check - Pre-implementation confidence assessment
3
- *
4
- * Prevents wrong-direction execution by assessing confidence BEFORE starting.
5
- * Requires ≥90% confidence to proceed with implementation.
6
- *
7
- * Token Budget: 100-200 tokens
8
- * ROI: 25-250x token savings when stopping wrong direction
9
- *
10
- * Test Results (2025-10-21):
11
- * - Precision: 1.000 (no false positives)
12
- * - Recall: 1.000 (no false negatives)
13
- * - 8/8 test cases passed
14
- *
15
- * Confidence Levels:
16
- * - High (≥90%): Root cause identified, solution verified, no duplication, architecture-compliant
17
- * - Medium (70-89%): Multiple approaches possible, trade-offs require consideration
18
- * - Low (<70%): Investigation incomplete, unclear root cause, missing official docs
19
- */
20
-
21
- import { existsSync } from 'fs';
22
- import { join, dirname } from 'path';
23
-
24
- export interface Context {
25
- task?: string;
26
- test_file?: string;
27
- test_name?: string;
28
- markers?: string[];
29
- duplicate_check_complete?: boolean;
30
- architecture_check_complete?: boolean;
31
- official_docs_verified?: boolean;
32
- oss_reference_complete?: boolean;
33
- root_cause_identified?: boolean;
34
- confidence_checks?: string[];
35
- [key: string]: any;
36
- }
37
-
38
- /**
39
- * Pre-implementation confidence assessment
40
- *
41
- * Usage:
42
- * const checker = new ConfidenceChecker();
43
- * const confidence = await checker.assess(context);
44
- *
45
- * if (confidence >= 0.9) {
46
- * // High confidence - proceed immediately
47
- * } else if (confidence >= 0.7) {
48
- * // Medium confidence - present options to user
49
- * } else {
50
- * // Low confidence - STOP and request clarification
51
- * }
52
- */
53
- export class ConfidenceChecker {
54
- /**
55
- * Assess confidence level (0.0 - 1.0)
56
- *
57
- * Investigation Phase Checks:
58
- * 1. No duplicate implementations? (25%)
59
- * 2. Architecture compliance? (25%)
60
- * 3. Official documentation verified? (20%)
61
- * 4. Working OSS implementations referenced? (15%)
62
- * 5. Root cause identified? (15%)
63
- *
64
- * @param context - Task context with investigation flags
65
- * @returns Confidence score (0.0 = no confidence, 1.0 = absolute certainty)
66
- */
67
- async assess(context: Context): Promise<number> {
68
- let score = 0.0;
69
- const checks: string[] = [];
70
-
71
- // Check 1: No duplicate implementations (25%)
72
- if (this.noDuplicates(context)) {
73
- score += 0.25;
74
- checks.push("✅ No duplicate implementations found");
75
- } else {
76
- checks.push("❌ Check for existing implementations first");
77
- }
78
-
79
- // Check 2: Architecture compliance (25%)
80
- if (this.architectureCompliant(context)) {
81
- score += 0.25;
82
- checks.push("✅ Uses existing tech stack (e.g., Supabase)");
83
- } else {
84
- checks.push("❌ Verify architecture compliance (avoid reinventing)");
85
- }
86
-
87
- // Check 3: Official documentation verified (20%)
88
- if (this.hasOfficialDocs(context)) {
89
- score += 0.2;
90
- checks.push("✅ Official documentation verified");
91
- } else {
92
- checks.push("❌ Read official docs first");
93
- }
94
-
95
- // Check 4: Working OSS implementations referenced (15%)
96
- if (this.hasOssReference(context)) {
97
- score += 0.15;
98
- checks.push("✅ Working OSS implementation found");
99
- } else {
100
- checks.push("❌ Search for OSS implementations");
101
- }
102
-
103
- // Check 5: Root cause identified (15%)
104
- if (this.rootCauseIdentified(context)) {
105
- score += 0.15;
106
- checks.push("✅ Root cause identified");
107
- } else {
108
- checks.push("❌ Continue investigation to identify root cause");
109
- }
110
-
111
- // Store check results for reporting
112
- context.confidence_checks = checks;
113
-
114
- // Display checks
115
- console.log("📋 Confidence Checks:");
116
- checks.forEach(check => console.log(` ${check}`));
117
- console.log("");
118
-
119
- return score;
120
- }
121
-
122
- /**
123
- * Check if official documentation exists
124
- *
125
- * Looks for:
126
- * - README.md in project
127
- * - CLAUDE.md and AGENTS.md with relevant patterns
128
- * - docs/ directory with related content
129
- */
130
- private hasOfficialDocs(context: Context): boolean {
131
- // Check context flag first (for testing)
132
- if ('official_docs_verified' in context) {
133
- return context.official_docs_verified ?? false;
134
- }
135
-
136
- // Check for test file path
137
- const testFile = context.test_file;
138
- if (!testFile) {
139
- return false;
140
- }
141
-
142
- // Walk up directory tree to find project root (same logic as Python version)
143
- let projectRoot = dirname(testFile);
144
-
145
- while (true) {
146
- // Check for documentation files
147
- if (existsSync(join(projectRoot, 'README.md'))) {
148
- return true;
149
- }
150
- if (existsSync(join(projectRoot, 'CLAUDE.md'))) {
151
- return true;
152
- }
153
- if (existsSync(join(projectRoot, 'AGENTS.md'))) {
154
- return true;
155
- }
156
- if (existsSync(join(projectRoot, 'docs'))) {
157
- return true;
158
- }
159
-
160
- // Move up one directory
161
- const parent = dirname(projectRoot);
162
- if (parent === projectRoot) break; // Reached root (same as Python: parent != project_root)
163
- projectRoot = parent;
164
- }
165
-
166
- return false;
167
- }
168
-
169
- /**
170
- * Check for duplicate implementations
171
- *
172
- * Before implementing, verify:
173
- * - No existing similar functions/modules (Glob/Grep)
174
- * - No helper functions that solve the same problem
175
- * - No libraries that provide this functionality
176
- *
177
- * Returns true if no duplicates found (investigation complete)
178
- */
179
- private noDuplicates(context: Context): boolean {
180
- // This is a placeholder - actual implementation should:
181
- // 1. Search codebase with Glob/Grep for similar patterns
182
- // 2. Check project dependencies for existing solutions
183
- // 3. Verify no helper modules provide this functionality
184
- return context.duplicate_check_complete ?? false;
185
- }
186
-
187
- /**
188
- * Check architecture compliance
189
- *
190
- * Verify solution uses existing tech stack:
191
- * - Supabase project → Use Supabase APIs (not custom API)
192
- * - Next.js project → Use Next.js patterns (not custom routing)
193
- * - Turborepo → Use workspace patterns (not manual scripts)
194
- *
195
- * Returns true if solution aligns with project architecture
196
- */
197
- private architectureCompliant(context: Context): boolean {
198
- // This is a placeholder - actual implementation should:
199
- // 1. Read CLAUDE.md and AGENTS.md for project tech stack
200
- // 2. Verify solution uses existing infrastructure
201
- // 3. Check not reinventing provided functionality
202
- return context.architecture_check_complete ?? false;
203
- }
204
-
205
- /**
206
- * Check if working OSS implementations referenced
207
- *
208
- * Search for:
209
- * - Similar open-source solutions
210
- * - Reference implementations in popular projects
211
- * - Community best practices
212
- *
213
- * Returns true if OSS reference found and analyzed
214
- */
215
- private hasOssReference(context: Context): boolean {
216
- // This is a placeholder - actual implementation should:
217
- // 1. Search GitHub for similar implementations
218
- // 2. Read popular OSS projects solving same problem
219
- // 3. Verify approach matches community patterns
220
- return context.oss_reference_complete ?? false;
221
- }
222
-
223
- /**
224
- * Check if root cause is identified with high certainty
225
- *
226
- * Verify:
227
- * - Problem source pinpointed (not guessing)
228
- * - Solution addresses root cause (not symptoms)
229
- * - Fix verified against official docs/OSS patterns
230
- *
231
- * Returns true if root cause clearly identified
232
- */
233
- private rootCauseIdentified(context: Context): boolean {
234
- // This is a placeholder - actual implementation should:
235
- // 1. Verify problem analysis complete
236
- // 2. Check solution addresses root cause
237
- // 3. Confirm fix aligns with best practices
238
- return context.root_cause_identified ?? false;
239
- }
240
-
241
- /**
242
- * Get recommended action based on confidence level
243
- *
244
- * @param confidence - Confidence score (0.0 - 1.0)
245
- * @returns Recommended action
246
- */
247
- getRecommendation(confidence: number): string {
248
- if (confidence >= 0.9) {
249
- return "✅ High confidence (≥90%) - Proceed with implementation";
250
- } else if (confidence >= 0.7) {
251
- return "⚠️ Medium confidence (70-89%) - Continue investigation, DO NOT implement yet";
252
- } else {
253
- return "❌ Low confidence (<70%) - STOP and continue investigation loop";
254
- }
255
- }
256
- }
257
-
258
- /**
259
- * Legacy function-based API for backward compatibility
260
- *
261
- * @deprecated Use ConfidenceChecker class instead
262
- */
263
- export async function confidenceCheck(context: Context): Promise<number> {
264
- const checker = new ConfidenceChecker();
265
- return checker.assess(context);
266
- }
267
-
268
- /**
269
- * Legacy getRecommendation for backward compatibility
270
- *
271
- * @deprecated Use ConfidenceChecker.getRecommendation() instead
272
- */
273
- export function getRecommendation(confidence: number): string {
274
- const checker = new ConfidenceChecker();
275
- return checker.getRecommendation(confidence);
276
- }