abelworkflow 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 (51) hide show
  1. package/.gitignore +13 -0
  2. package/.skill-lock.json +29 -0
  3. package/AGENTS.md +45 -0
  4. package/README.md +147 -0
  5. package/bin/abelworkflow.mjs +2 -0
  6. package/commands/oc/diagnose.md +63 -0
  7. package/commands/oc/implementation.md +157 -0
  8. package/commands/oc/init.md +27 -0
  9. package/commands/oc/plan.md +88 -0
  10. package/commands/oc/research.md +126 -0
  11. package/lib/cli.mjs +222 -0
  12. package/package.json +23 -0
  13. package/skills/confidence-check/SKILL.md +124 -0
  14. package/skills/confidence-check/confidence.ts +335 -0
  15. package/skills/context7-auto-research/.env +4 -0
  16. package/skills/context7-auto-research/.env.example +4 -0
  17. package/skills/context7-auto-research/SKILL.md +83 -0
  18. package/skills/context7-auto-research/context7-api.js +283 -0
  19. package/skills/dev-browser/SKILL.md +225 -0
  20. package/skills/dev-browser/bun.lock +443 -0
  21. package/skills/dev-browser/package-lock.json +2988 -0
  22. package/skills/dev-browser/package.json +31 -0
  23. package/skills/dev-browser/references/scraping.md +155 -0
  24. package/skills/dev-browser/resolve-skill-dir.sh +35 -0
  25. package/skills/dev-browser/scripts/start-relay.ts +32 -0
  26. package/skills/dev-browser/scripts/start-server.ts +117 -0
  27. package/skills/dev-browser/server.sh +24 -0
  28. package/skills/dev-browser/src/client.ts +474 -0
  29. package/skills/dev-browser/src/index.ts +287 -0
  30. package/skills/dev-browser/src/relay.ts +731 -0
  31. package/skills/dev-browser/src/snapshot/browser-script.ts +877 -0
  32. package/skills/dev-browser/src/snapshot/index.ts +14 -0
  33. package/skills/dev-browser/src/snapshot/inject.ts +13 -0
  34. package/skills/dev-browser/src/types.ts +34 -0
  35. package/skills/dev-browser/tsconfig.json +36 -0
  36. package/skills/dev-browser/vitest.config.ts +12 -0
  37. package/skills/git-commit/SKILL.md +124 -0
  38. package/skills/grok-search/.env.example +24 -0
  39. package/skills/grok-search/SKILL.md +114 -0
  40. package/skills/grok-search/requirements.txt +2 -0
  41. package/skills/grok-search/scripts/groksearch_cli.py +1214 -0
  42. package/skills/grok-search/scripts/groksearch_entry.py +116 -0
  43. package/skills/prompt-enhancer/ADVANCED.md +74 -0
  44. package/skills/prompt-enhancer/SKILL.md +71 -0
  45. package/skills/prompt-enhancer/TEMPLATE.md +91 -0
  46. package/skills/prompt-enhancer/scripts/enhance.py +142 -0
  47. package/skills/sequential-think/SKILL.md +198 -0
  48. package/skills/sequential-think/scripts/.env.example +5 -0
  49. package/skills/sequential-think/scripts/sequential_think_cli.py +253 -0
  50. package/skills/time/SKILL.md +116 -0
  51. package/skills/time/scripts/time_cli.py +104 -0
@@ -0,0 +1,14 @@
1
+ /**
2
+ * ARIA Snapshot module for dev-browser.
3
+ *
4
+ * Provides Playwright-compatible ARIA snapshots with cross-connection ref persistence.
5
+ * Refs are stored on window.__devBrowserRefs and survive across Playwright reconnections.
6
+ *
7
+ * Usage:
8
+ * import { getSnapshotScript } from './snapshot';
9
+ * const script = getSnapshotScript();
10
+ * await page.evaluate(script);
11
+ * // Now window.__devBrowser_getAISnapshot() and window.__devBrowser_selectSnapshotRef(ref) are available
12
+ */
13
+
14
+ export { getSnapshotScript, clearSnapshotScriptCache } from "./browser-script";
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Injectable snapshot script for browser context.
3
+ *
4
+ * This module provides the getSnapshotScript function that returns a
5
+ * self-contained JavaScript string for injection into browser contexts.
6
+ *
7
+ * The script is injected via page.evaluate() and exposes:
8
+ * - window.__devBrowser_getAISnapshot(): Returns ARIA snapshot YAML
9
+ * - window.__devBrowser_selectSnapshotRef(ref): Returns element for given ref
10
+ * - window.__devBrowserRefs: Map of ref -> Element (persists across connections)
11
+ */
12
+
13
+ export { getSnapshotScript, clearSnapshotScriptCache } from "./browser-script";
@@ -0,0 +1,34 @@
1
+ // API request/response types - shared between client and server
2
+
3
+ export interface ServeOptions {
4
+ port?: number;
5
+ headless?: boolean;
6
+ cdpPort?: number;
7
+ /** Directory to store persistent browser profiles (cookies, localStorage, etc.) */
8
+ profileDir?: string;
9
+ }
10
+
11
+ export interface ViewportSize {
12
+ width: number;
13
+ height: number;
14
+ }
15
+
16
+ export interface GetPageRequest {
17
+ name: string;
18
+ /** Optional viewport size for new pages */
19
+ viewport?: ViewportSize;
20
+ }
21
+
22
+ export interface GetPageResponse {
23
+ wsEndpoint: string;
24
+ name: string;
25
+ targetId: string; // CDP target ID for reliable page matching
26
+ }
27
+
28
+ export interface ListPagesResponse {
29
+ pages: string[];
30
+ }
31
+
32
+ export interface ServerInfoResponse {
33
+ wsEndpoint: string;
34
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "compilerOptions": {
3
+ // Environment setup & latest features
4
+ "lib": ["ESNext"],
5
+ "target": "ESNext",
6
+ "module": "Preserve",
7
+ "moduleDetection": "force",
8
+ "jsx": "react-jsx",
9
+ "allowJs": true,
10
+
11
+ // Bundler mode
12
+ "moduleResolution": "bundler",
13
+ "allowImportingTsExtensions": true,
14
+ "verbatimModuleSyntax": true,
15
+ "noEmit": true,
16
+
17
+ // Path aliases
18
+ "baseUrl": ".",
19
+ "paths": {
20
+ "@/*": ["./src/*"]
21
+ },
22
+
23
+ // Best practices
24
+ "strict": true,
25
+ "skipLibCheck": true,
26
+ "noFallthroughCasesInSwitch": true,
27
+ "noUncheckedIndexedAccess": true,
28
+ "noImplicitOverride": true,
29
+
30
+ // Some stricter flags (disabled by default)
31
+ "noUnusedLocals": false,
32
+ "noUnusedParameters": false,
33
+ "noPropertyAccessFromIndexSignature": false
34
+ },
35
+ "include": ["src/**/*", "scripts/**/*"]
36
+ }
@@ -0,0 +1,12 @@
1
+ import { defineConfig } from "vitest/config";
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ globals: true,
6
+ environment: "node",
7
+ include: ["src/**/*.test.ts"],
8
+ testTimeout: 60000, // Playwright tests can be slow
9
+ hookTimeout: 60000,
10
+ teardownTimeout: 60000,
11
+ },
12
+ });
@@ -0,0 +1,124 @@
1
+ ---
2
+ name: git-commit
3
+ description: 'Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping'
4
+ license: MIT
5
+ allowed-tools: Bash
6
+ ---
7
+
8
+ # Git Commit with Conventional Commits
9
+
10
+ ## Overview
11
+
12
+ Create standardized, semantic git commits using the Conventional Commits specification. Analyze the actual diff to determine appropriate type, scope, and message.
13
+
14
+ ## Conventional Commit Format
15
+
16
+ ```
17
+ <type>[optional scope]: <description>
18
+
19
+ [optional body]
20
+
21
+ [optional footer(s)]
22
+ ```
23
+
24
+ ## Commit Types
25
+
26
+ | Type | Purpose |
27
+ | ---------- | ------------------------------ |
28
+ | `feat` | New feature |
29
+ | `fix` | Bug fix |
30
+ | `docs` | Documentation only |
31
+ | `style` | Formatting/style (no logic) |
32
+ | `refactor` | Code refactor (no feature/fix) |
33
+ | `perf` | Performance improvement |
34
+ | `test` | Add/update tests |
35
+ | `build` | Build system/dependencies |
36
+ | `ci` | CI/config changes |
37
+ | `chore` | Maintenance/misc |
38
+ | `revert` | Revert commit |
39
+
40
+ ## Breaking Changes
41
+
42
+ ```
43
+ # Exclamation mark after type/scope
44
+ feat!: remove deprecated endpoint
45
+
46
+ # BREAKING CHANGE footer
47
+ feat: allow config to extend other configs
48
+
49
+ BREAKING CHANGE: `extends` key behavior changed
50
+ ```
51
+
52
+ ## Workflow
53
+
54
+ ### 1. Analyze Diff
55
+
56
+ ```bash
57
+ # If files are staged, use staged diff
58
+ git diff --staged
59
+
60
+ # If nothing staged, use working tree diff
61
+ git diff
62
+
63
+ # Also check status
64
+ git status --porcelain
65
+ ```
66
+
67
+ ### 2. Stage Files (if needed)
68
+
69
+ If nothing is staged or you want to group changes differently:
70
+
71
+ ```bash
72
+ # Stage specific files
73
+ git add path/to/file1 path/to/file2
74
+
75
+ # Stage by pattern
76
+ git add *.test.*
77
+ git add src/components/*
78
+
79
+ # Interactive staging
80
+ git add -p
81
+ ```
82
+
83
+ **Never commit secrets** (.env, credentials.json, private keys).
84
+
85
+ ### 3. Generate Commit Message
86
+
87
+ Analyze the diff to determine:
88
+
89
+ - **Type**: What kind of change is this?
90
+ - **Scope**: What area/module is affected?
91
+ - **Description**: One-line summary of what changed (present tense, imperative mood, <72 chars)
92
+
93
+ ### 4. Execute Commit
94
+
95
+ ```bash
96
+ # Single line
97
+ git commit -m "<type>[scope]: <description>"
98
+
99
+ # Multi-line with body/footer
100
+ git commit -m "$(cat <<'EOF'
101
+ <type>[scope]: <description>
102
+
103
+ <optional body>
104
+
105
+ <optional footer>
106
+ EOF
107
+ )"
108
+ ```
109
+
110
+ ## Best Practices
111
+
112
+ - One logical change per commit
113
+ - Present tense: "add" not "added"
114
+ - Imperative mood: "fix bug" not "fixes bug"
115
+ - Reference issues: `Closes #123`, `Refs #456`
116
+ - Keep description under 72 characters
117
+
118
+ ## Git Safety Protocol
119
+
120
+ - NEVER update git config
121
+ - NEVER run destructive commands (--force, hard reset) without explicit request
122
+ - NEVER skip hooks (--no-verify) unless user asks
123
+ - NEVER force push to main/master
124
+ - If commit fails due to hooks, fix and create NEW commit (don't amend)
@@ -0,0 +1,24 @@
1
+ # GrokSearch 命令行工具配置
2
+ # 将此文件复制为 .env 并填入你的配置值
3
+
4
+ # 必填项:Grok API 端点(OpenAI 兼容格式)
5
+ GROK_API_URL=
6
+ # 必填项:你的 API 密钥
7
+ GROK_API_KEY=
8
+
9
+ # 可选项:使用的 Grok 模型(默认:grok-4-fast)
10
+ # 常用选项:grok-4-fast
11
+ GROK_MODEL=
12
+
13
+ # 可选项:启用调试模式(true/false)
14
+ GROK_DEBUG=false
15
+
16
+ # 可选项:重试配置
17
+ # GROK_RETRY_MAX_ATTEMPTS=3
18
+ # GROK_RETRY_MULTIPLIER=1
19
+ # GROK_RETRY_MAX_WAIT=5
20
+
21
+ # 可选项:Tavily(启用高保真 web_fetch/web_map,以及 web_search 的额外来源)
22
+ TAVILY_ENABLED=true
23
+ TAVILY_API_URL=https://api.tavily.com
24
+ TAVILY_API_KEY=
@@ -0,0 +1,114 @@
1
+ ---
2
+ name: grok-search
3
+ description: |
4
+ Enhanced web search and real-time content retrieval via Grok API. Use when: (1) Web search / information retrieval / fact-checking, (2) Webpage content extraction / URL parsing, (3) Breaking knowledge cutoff limits for current information, (4) Real-time news and technical documentation, (5) Multi-source information aggregation. Triggers: "search for", "find information about", "latest news", "current", "fetch webpage", "get content from URL". IMPORTANT: This skill REPLACES built-in WebSearch/WebFetch with CLI commands.
5
+ ---
6
+
7
+ # Grok Search
8
+
9
+ Enhanced web search via Grok API CLI.
10
+
11
+ ## CLI Commands
12
+
13
+ ```bash
14
+ # Canonical entrypoint (agents + cross-platform)
15
+ # - Resolve the installed skill directory first; do not assume the current repo contains skills/grok-search
16
+ # - Prefer user-level skill directories under $HOME first, for example:
17
+ # $HOME/.claude/skills/grok-search
18
+ # $HOME/.codex/skills/grok-search
19
+ # $HOME/.config/agents/skills/grok-search
20
+ # - If not found, check project-level locations:
21
+ # .claude/skills/grok-search
22
+ # .codex/skills/grok-search
23
+ # .agents/skills/grok-search
24
+ # - Use system python only to bootstrap; entry.py creates/reuses repo-local .venv
25
+ # - Never invoke scripts/groksearch_cli.py directly
26
+ #
27
+ # One-time setup:
28
+ # cp .env.example .env
29
+ python "<SKILL_DIR>/scripts/groksearch_entry.py" --help
30
+
31
+ # Environment (required): GROK_API_URL, GROK_API_KEY
32
+ # Environment (optional): GROK_MODEL, GROK_DEBUG, GROK_RETRY_*
33
+ # Environment (optional fetch/map): TAVILY_API_KEY, TAVILY_API_URL, TAVILY_ENABLED
34
+ #
35
+ # .env path:
36
+ # skills/grok-search/.env
37
+ #
38
+ # Bootstrap controls (optional):
39
+ # GROKSEARCH_VENV_DIR=/path/to/venv
40
+ # GROKSEARCH_PYTHON=3.12
41
+ # AGENTS_SKILLS_PYTHON=/abs/path/to/python
42
+
43
+ # Optional if you intentionally change into the installed skill directory first:
44
+ # cd "<SKILL_DIR>" && python scripts/groksearch_entry.py --help
45
+
46
+ # Web search
47
+ python "<SKILL_DIR>/scripts/groksearch_entry.py" web_search --query "search terms" [--platform "GitHub"] [--min-results 3] [--max-results 10] [--model "grok-4-fast"] [--extra-sources 6]
48
+ # If you need broader search coverage, you can add Tavily sources explicitly, for example: --extra-sources 3
49
+
50
+ # Fetch webpage
51
+ python "<SKILL_DIR>/scripts/groksearch_entry.py" web_fetch --url "https://..." [--out file.md] [--fallback-grok]
52
+
53
+ # Map website structure (Tavily)
54
+ python "<SKILL_DIR>/scripts/groksearch_entry.py" web_map --url "https://..." [--max-depth 2] [--limit 80]
55
+
56
+ # Check config
57
+ python "<SKILL_DIR>/scripts/groksearch_entry.py" get_config_info [--no-test]
58
+
59
+ # Toggle built-in tools
60
+ python "<SKILL_DIR>/scripts/groksearch_entry.py" toggle_builtin_tools --action on|off|status [--root /path/to/project]
61
+ ```
62
+
63
+ ## Tool Routing Policy
64
+ ### Forced Replacement Rules
65
+
66
+ | Scenario | Disabled | Use Instead |
67
+ |----------|----------|-------------|
68
+ | Web Search | `WebSearch` | CLI `web_search` via `groksearch_entry.py` |
69
+ | Web Fetch | `WebFetch` | CLI `web_fetch` via `groksearch_entry.py` |
70
+
71
+ ### Tool Capability Matrix
72
+
73
+ | Tool | Parameters | Output |
74
+ |------|------------|--------|
75
+ | `web_search` | `query`(required), `platform`/`min_results`/`max_results`/`model`/`extra_sources`(optional) | `[{title,url,description}]` |
76
+ | `web_fetch` | `url`(required), `out`/`fallback_grok`(optional) | Structured Markdown |
77
+ | `web_map` | `url`(required), `instructions`/`max_depth`/`max_breadth`/`limit`/`timeout`(optional) | JSON string |
78
+ | `get_config_info` | `no_test`(optional) | `{api_url,status,connection_test}` |
79
+ | `toggle_builtin_tools` | `action`(on/off/status), `root`(optional) | `{blocked,deny_list}` |
80
+
81
+ ## Search Workflow
82
+
83
+ ### Phase 1: Query Construction
84
+ - **Intent Recognition**: Broad search → `web_search` | Deep retrieval → `web_fetch`
85
+ - **Parameter Optimization**: Set `platform` for specific sources, adjust result counts; if you need broader source coverage, consider adding `--extra-sources 3`
86
+
87
+ ### Phase 2: Search Execution
88
+ 1. Start with `web_search` for structured summaries
89
+ 2. Use `web_fetch` on key URLs if summaries insufficient
90
+ 3. Retry with adjusted query if first round unsatisfactory
91
+
92
+ ### Phase 3: Result Synthesis
93
+ 1. Cross-reference multiple sources
94
+ 2. **Must annotate source and date** for time-sensitive info
95
+ 3. **Must include source URLs**: `Title [<sup>1</sup>](URL)`
96
+
97
+ ## Error Handling
98
+
99
+ | Error | Recovery |
100
+ |-------|----------|
101
+ | Connection Failure | Run `get_config_info`, verify API URL/Key |
102
+ | No Results | Broaden search terms |
103
+ | Fetch Timeout | Try alternative sources |
104
+ | Tavily unavailable while using `--extra-sources` | Command keeps Grok results and prints a Tavily warning to stderr |
105
+ | Tavily extract failure | Use `--fallback-grok`, or inspect the Tavily warning/error message |
106
+
107
+ ## Anti-Patterns
108
+
109
+ | Prohibited | Correct |
110
+ |------------|---------|
111
+ | No source citation | Include `Source [<sup>1</sup>](URL)` |
112
+ | Assume current repo has `skills/grok-search` | Check global skill directories under `$HOME` first, then project-level `.claude/.codex/.agents`, then call `<SKILL_DIR>/scripts/groksearch_entry.py` |
113
+ | Call `scripts/groksearch_cli.py` directly | Call `python scripts/groksearch_entry.py ...` |
114
+ | Use built-in WebSearch/WebFetch | Use GrokSearch CLI |
@@ -0,0 +1,2 @@
1
+ httpx>=0.24,<1
2
+ tenacity>=8,<10