blamcode 0.4.0__py3-none-any.whl

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 (58) hide show
  1. blamcode/__init__.py +9 -0
  2. blamcode/cli.py +122 -0
  3. blamcode/layer/README.md +43 -0
  4. blamcode/layer/config/agent/build.md +118 -0
  5. blamcode/layer/config/agent/debugger.md +32 -0
  6. blamcode/layer/config/agent/designer.md +31 -0
  7. blamcode/layer/config/agent/vision.md +26 -0
  8. blamcode/layer/config/agent/writer.md +28 -0
  9. blamcode/layer/config/command/ask.md +41 -0
  10. blamcode/layer/config/command/blam.md +24 -0
  11. blamcode/layer/config/command/explore.md +14 -0
  12. blamcode/layer/config/command/fix.md +14 -0
  13. blamcode/layer/config/command/open.md +18 -0
  14. blamcode/layer/config/command/review.md +14 -0
  15. blamcode/layer/config/opencode.json +53 -0
  16. blamcode/layer/config/themes/bangladeshi.json +67 -0
  17. blamcode/layer/config/themes/blamcode.json +217 -0
  18. blamcode/layer/config/tui.json +4 -0
  19. blamcode/layer/install.sh +752 -0
  20. blamcode/layer/scripts/__pycache__/patch-brand.cpython-312.pyc +0 -0
  21. blamcode/layer/scripts/blamcode +518 -0
  22. blamcode/layer/scripts/blamcode-browser +315 -0
  23. blamcode/layer/scripts/blamcode-menu +140 -0
  24. blamcode/layer/scripts/blamcode-uninstall +71 -0
  25. blamcode/layer/scripts/blamcode-vision +542 -0
  26. blamcode/layer/scripts/oc-settings.sh +138 -0
  27. blamcode/layer/scripts/patch-brand.py +267 -0
  28. blamcode/layer/skills/android-app/SKILL.md +53 -0
  29. blamcode/layer/skills/api-integration/SKILL.md +49 -0
  30. blamcode/layer/skills/bash-cli-expert/SKILL.md +48 -0
  31. blamcode/layer/skills/bot-development/SKILL.md +53 -0
  32. blamcode/layer/skills/clean-code-performance/SKILL.md +45 -0
  33. blamcode/layer/skills/database/SKILL.md +56 -0
  34. blamcode/layer/skills/debugging-fixes/SKILL.md +45 -0
  35. blamcode/layer/skills/deploy-hosting/SKILL.md +38 -0
  36. blamcode/layer/skills/docker/SKILL.md +74 -0
  37. blamcode/layer/skills/firebase-supabase/SKILL.md +61 -0
  38. blamcode/layer/skills/git-workflow/SKILL.md +63 -0
  39. blamcode/layer/skills/lets-scroll/SKILL.md +877 -0
  40. blamcode/layer/skills/lets-scroll/references/index-template.html +73 -0
  41. blamcode/layer/skills/lets-scroll/references/knockout.py +89 -0
  42. blamcode/layer/skills/lets-scroll/references/pipeline.md +312 -0
  43. blamcode/layer/skills/lets-scroll/references/prompts.md +194 -0
  44. blamcode/layer/skills/lets-scroll/references/scrub-engine.js +448 -0
  45. blamcode/layer/skills/project-structure/SKILL.md +74 -0
  46. blamcode/layer/skills/python-automation/SKILL.md +52 -0
  47. blamcode/layer/skills/react-next-best-practices/SKILL.md +54 -0
  48. blamcode/layer/skills/security-review/SKILL.md +48 -0
  49. blamcode/layer/skills/seo-basics/SKILL.md +44 -0
  50. blamcode/layer/skills/testing/SKILL.md +58 -0
  51. blamcode/layer/skills/ui-ux-responsive/SKILL.md +53 -0
  52. blamcode/layer/skills/website-builder/SKILL.md +47 -0
  53. blamcode-0.4.0.dist-info/METADATA +62 -0
  54. blamcode-0.4.0.dist-info/RECORD +58 -0
  55. blamcode-0.4.0.dist-info/WHEEL +5 -0
  56. blamcode-0.4.0.dist-info/entry_points.txt +2 -0
  57. blamcode-0.4.0.dist-info/licenses/LICENSE +21 -0
  58. blamcode-0.4.0.dist-info/top_level.txt +1 -0
blamcode/__init__.py ADDED
@@ -0,0 +1,9 @@
1
+ """BLAMCODE — ready-to-use AI coding CLI (OpenCode) for Termux.
2
+
3
+ This pip package bundles the full BLAMCODE layer (scripts + config +
4
+ skills + installer). Running `blamcode` unpacks the layer locally and
5
+ hands over to the real installer (install.sh) which does everything
6
+ else (core engine, deps, single-line live progress).
7
+ """
8
+
9
+ __version__ = "0.3.1"
blamcode/cli.py ADDED
@@ -0,0 +1,122 @@
1
+ """blamcode — command-line bootstrap for installing BLAMCODE from PyPI.
2
+
3
+ `pip install blamcode` gives you the `blamcode-boot` command (the name is
4
+ deliberately NOT `blamcode`: on Termux pip writes scripts to $PREFIX/bin,
5
+ where the real installer also puts its `blamcode` wrapper — an alias would
6
+ collide with it). Running it installs the BLAMCODE layer (scripts + config +
7
+ skills + installer) from the wheel's own bundled copy — no network fetch
8
+ for the layer — then hands over to the real installer, which downloads
9
+ the core engine with a single live progress line.
10
+
11
+ Design: the pip package bundles the layer and acts as the launcher;
12
+ all real logic lives in install.sh, so curl-install and pip-install
13
+ behave identically (pip just skips the layer download).
14
+ """
15
+
16
+ import argparse
17
+ import os
18
+ import shutil
19
+ import subprocess
20
+ import sys
21
+
22
+ from . import __version__
23
+
24
+ # bundled layer lives inside the installed package (setuptools package-data)
25
+ _LAYER_SRC = os.path.join(os.path.dirname(__file__), "layer")
26
+ BOOT_DIR = os.path.join(os.path.expanduser("~"), ".local", "blamcode", "boot")
27
+
28
+
29
+ def _extract_layer(dest):
30
+ """Copy the bundled layer into dest (keeps file modes via copytree)."""
31
+ os.makedirs(dest, exist_ok=True)
32
+ for entry in os.listdir(_LAYER_SRC):
33
+ src = os.path.join(_LAYER_SRC, entry)
34
+ shutil.copy2(src, dest, follow_symlinks=True) if os.path.isfile(src) else shutil.copytree(
35
+ src, os.path.join(dest, entry), dirs_exist_ok=True
36
+ )
37
+
38
+
39
+ def _jump_to_installer(boot):
40
+ """Run the real installer with the boot layer as the layer source."""
41
+ installer = os.path.join(boot, "install.sh")
42
+ if not os.path.isfile(installer):
43
+ sys.exit(
44
+ "error: boot layer is incomplete (missing install.sh);\n"
45
+ " rerun: blamcode-boot install"
46
+ )
47
+ if not os.access(installer, os.X_OK):
48
+ os.chmod(installer, 0o755)
49
+ # prefer bash when available (install.sh animates; POSIX sh works too)
50
+ shell = "bash" if shutil.which("bash") else "sh"
51
+ env = dict(os.environ, BLAMCODE_BOOT=boot)
52
+ print("\nblamcode: layer ready — starting the core installer…\n")
53
+ sys.exit(subprocess.call([shell, installer], env=env))
54
+
55
+
56
+ def _configure_rc():
57
+ """Make sure the shell rc points at the boot scripts dir."""
58
+ rc = os.path.join(os.path.expanduser("~"), ".bashrc")
59
+ if not os.path.exists(rc):
60
+ return
61
+ with open(rc, "r", encoding="utf-8", errors="ignore") as f:
62
+ content = f.read()
63
+ marker = "# BLAMCODE PATH"
64
+ if marker in content:
65
+ return
66
+ boot_bin = os.path.join(BOOT_DIR, "scripts")
67
+ with open(rc, "a", encoding="utf-8") as f:
68
+ f.write('\n# BLAMCODE PATH\ncase ":$PATH:" in *":{}:"*) ;; *) export PATH="{}:$PATH";; esac\n'.format(
69
+ boot_bin, boot_bin
70
+ ))
71
+ print("blamcode: added BLAMCODE PATH to {}".format(rc))
72
+
73
+
74
+ def cmd_install(args):
75
+ # always refresh: a stale boot layer (older install.sh) must never
76
+ # survive an upgrade — wipe and re-extract every run (180KB, instant)
77
+ if os.path.isfile(os.path.join(BOOT_DIR, "install.sh")):
78
+ print("blamcode: refreshing layer ({} → {})".format("old", __version__))
79
+ shutil.rmtree(BOOT_DIR, ignore_errors=True)
80
+ print("blamcode: writing layer to {}".format(BOOT_DIR))
81
+ _extract_layer(BOOT_DIR)
82
+ _configure_rc()
83
+ _jump_to_installer(BOOT_DIR)
84
+ return 0
85
+
86
+
87
+ def cmd_uninstall(args):
88
+ if os.path.isdir(BOOT_DIR):
89
+ shutil.rmtree(BOOT_DIR)
90
+ print("blamcode: removed layer {}".format(BOOT_DIR))
91
+ else:
92
+ print("blamcode: no layer found at {}".format(BOOT_DIR))
93
+ print("blamcode: done — your projects and files were left untouched")
94
+ return 0
95
+
96
+
97
+ def cmd_version(args):
98
+ print("blamcode-bootstrap {}".format(__version__))
99
+ return 0
100
+
101
+
102
+ def main(argv=None):
103
+ parser = argparse.ArgumentParser(
104
+ prog="blamcode",
105
+ description="Install BLAMCODE (AI coding CLI for Termux).",
106
+ )
107
+ sub = parser.add_subparsers(dest="command")
108
+ sub.add_parser("install", help="install the BLAMCODE layer + core engine")
109
+ sub.add_parser("uninstall", help="remove the downloaded layer only")
110
+ sub.add_parser("version", help="print the bootstrap version")
111
+ args = parser.parse_args(argv)
112
+
113
+ if args.command == "uninstall":
114
+ return cmd_uninstall(args)
115
+ if args.command == "version":
116
+ return cmd_version(args)
117
+ # default (no command, or "install") → full install
118
+ return cmd_install(args)
119
+
120
+
121
+ if __name__ == "__main__":
122
+ sys.exit(main())
@@ -0,0 +1,43 @@
1
+ # BLAMCODE
2
+
3
+ **Your app, BLAM, done!** — AI coding CLI for Termux.
4
+
5
+ ## Install
6
+
7
+ **Termux (Android):**
8
+ ```bash
9
+ curl -fsSL https://raw.githubusercontent.com/zyvo9/blamcode/main/install.sh | bash
10
+ ```
11
+
12
+ **PyPI (any platform):**
13
+ ```bash
14
+ pip install blamcode
15
+ ```
16
+
17
+ Then run:
18
+ ```bash
19
+ blamcode
20
+ ```
21
+
22
+ ## Features
23
+
24
+ - **Zero config** — installs and works in one command, free AI models included
25
+ - **Native Android** — built for Termux, ARM64, no root, no proot
26
+ - **Talks plainly** — describe what you want in plain words, it builds the whole thing
27
+ - **Builds complete projects** — websites, apps, bots, scripts — end to end
28
+ - **Sees images and videos** — drop a screenshot or clip, it understands it
29
+ - **Live preview** — `blamcode preview` opens your site on the phone with a public link
30
+ - **Projects stay separate** — `blamcode <name>` gives each idea its own folder and chat history
31
+ - **Ask mode** — `/ask` makes the AI check in with you before every big step
32
+
33
+ ## Daily commands
34
+
35
+ | Command | What it does |
36
+ |---|---|
37
+ | `blamcode` | start (opens your `default/` project) |
38
+ | `blamcode coffee-shop` | open/create a project folder |
39
+ | `blamcode session` | list projects |
40
+ | `blamcode preview` | local + public live preview |
41
+ | `blamcode update` | delta update (0 MB if the core is unchanged) |
42
+ | `blamcode doctor` | health check |
43
+ | `blamcode uninstall` | remove (keeps your projects) |
@@ -0,0 +1,118 @@
1
+ ---
2
+ description: BLAMCODE full-power build agent — plan, execute, verify, finish. The default agent for all work.
3
+ mode: primary
4
+ temperature: 0.5
5
+ ---
6
+
7
+ You are BLAMCODE's FULL-POWER build agent. Users are mostly beginners, often
8
+ working from a phone (Termux). Work at maximum capability — never lazy,
9
+ never half-done.
10
+
11
+ ## Communication
12
+ - Talk in clear, simple English
13
+ - Before starting non-trivial work: state the plan in 2-3 lines
14
+ - After finishing: short summary — what was built, where it is, how to run
15
+ or view it. One line.
16
+
17
+ ## YOLO mode (options toggle)
18
+ BLAMCODE has a `/yolo` command that toggles how you work:
19
+ - **YOLO OFF (default)** — normal mode. Work freely: read, edit, run, build,
20
+ fix — pick the best approach yourself and just do it. No options, no
21
+ questions. Only stop if the requirement is genuinely ambiguous.
22
+ - **YOLO ON** — options mode. Before every major step, present **3-4
23
+ options/choices** and let the user pick. Examples:
24
+ - Before editing → "Option 1: do X, Option 2: do Y — which one?"
25
+ - Before choosing tech/framework → list options with pros/cons
26
+ - Before a design decision → show alternatives with reasons
27
+ - Before picking a fix → "3 ways to fix this: A) ..., B) ..., C) ..."
28
+ Simple reads and exploration don't need options.
29
+
30
+ When the user runs `/yolo on` or `/yolo off`, acknowledge the mode change and
31
+ follow it for the rest of the session.
32
+
33
+ ## Working method (MANDATORY — every task)
34
+ 1. **UNDERSTAND** — fully understand the requirement. If ambiguous, ask
35
+ once (politely), then proceed with the best assumption.
36
+ 2. **PLAN** — for non-trivial work, keep the file list + steps in mind
37
+ before starting (no need to write them down).
38
+ 3. **EXECUTE** — read files BEFORE editing them. Never guess content.
39
+ Work in small steps.
40
+ 4. **VERIFY** — check your own work:
41
+ - Code: run it / syntax check / build
42
+ - Website: file structure correct, link/script paths correct, look for
43
+ console-error-type issues (undefined function, missing file)
44
+ - Script: do a test run
45
+ 5. **FINISH** — never stop until the whole task is done. Never say
46
+ "the rest is up to you". No placeholders, TODOs, or "..." in delivered work.
47
+
48
+ ## Full-power rules
49
+ - Use tools aggressively: read/grep/glob to check things yourself,
50
+ websearch/webfetch for current info (versions, APIs, docs) — don't guess
51
+ - If something breaks: fix it, verify again — never hand over broken work
52
+ without fixing it yourself
53
+ - Mobile-first: users view on phones — not responsive = not finished
54
+ - Simple > complex: beginner users — no over-engineering, but high quality
55
+ - Follow existing code/style — not your own preference
56
+ - Database/keys: keep in .env files, never hardcode; ship an .env.example
57
+ when delivering .env-based projects
58
+
59
+ ## Skill auto-routing (MANDATORY — every task)
60
+ Installed skills live under `~/.config/opencode/skills/` (mirrored from this
61
+ repo's `skills/` folder). Whenever a task starts, **automatically select and
62
+ apply the matching skill(s)** — no user prompt needed:
63
+
64
+ | Task type | Skill(s) to apply |
65
+ |-----------|-------------------|
66
+ | Create/redesign any website | `website-builder` (+ `ui-ux-responsive`, `seo-basics`) |
67
+ | Any styling/layout/design work | `ui-ux-responsive` |
68
+ | Any React/Next.js work | `react-next-best-practices` |
69
+ | Any Python script/automation | `python-automation` |
70
+ | Any shell command/script | `bash-cli-expert` |
71
+ | Debugging an error/crash | `debugging-fixes` |
72
+ | Fixing a bug | `debugging-fixes` + `testing` |
73
+ | Reviewing code | `security-review` + `clean-code-performance` |
74
+ | Any database work | `database` |
75
+ | Live data / API integration | `api-integration` |
76
+ | Bot (Telegram/WhatsApp/etc.) | `bot-development` |
77
+ | Android app / website→app | `android-app` |
78
+ | Backend without a server | `firebase-supabase` |
79
+ | Writing/running tests | `testing` |
80
+ | Docker/containers | `docker` |
81
+ | Git/GitHub work | `git-workflow` |
82
+ | Deploying/hosting | `deploy-hosting` |
83
+ | Search visibility/SEO | `seo-basics` |
84
+ | New project structure | `project-structure` |
85
+ | Opening a page in the browser | `open` command — `blamcode preview` |
86
+ | Scroll-driven landing / 3D world / diorama / cinematic scroll | `lets-scroll` |
87
+
88
+ To apply a skill, **read its SKILL.md first** (find it with
89
+ `find ~/.config/opencode/skills -name SKILL.md`, or in the repo
90
+ `skills/<name>/SKILL.md`), then follow its instructions for that task.
91
+ - For `lets-scroll`: Setup the base website structure first, generate copy-pasteable AI video prompts in chat for the user, and wire their `.mp4` videos from `videos/` into `scrub-engine.js`.
92
+
93
+ ## 🔮 Vision (seeing images)
94
+
95
+ You are text-only — you cannot see images directly. **Delegate EVERY image-viewing task to the `vision` subagent** (task tool). It runs BLAMCODE's vision pipeline (MiMo) behind its own block — the user sees a subagent at work, not raw command output in the chat.
96
+
97
+ **When to delegate (automatically):**
98
+ - User shares an image path (`.jpg`, `.png`, `.webp`, `.gif`, `.bmp`)
99
+ - User asks about a UI, design, error, or anything visual
100
+ - User says "see this", "look at this", "check this image", "explain this screenshot"
101
+
102
+ **How:**
103
+ 1. One subagent task with ALL the paths and the question together — never split a multi-image request into several tasks
104
+ 2. Use the returned description as if you saw the images yourself — reply naturally, describe, build, fix
105
+ 3. For errors/bugs in screenshots: explain the error and provide the fix
106
+ 4. For design screenshots: describe the layout and recreate it in code
107
+ 5. If the subagent reports a key/diagnostic failure, tell the user to run `blamcode-vision --status`
108
+
109
+ **Fallback:** if the vision subagent is unavailable, run it yourself —
110
+ `blamcode-vision <all-paths> "question"` in ONE call (never parallel; the tool queues and retries on its own).
111
+
112
+ **Never** invent image content you could not actually see. If vision fails, tell the user honestly that you could not see it.
113
+
114
+ ## When stuck
115
+ - Read the full error message — then decide
116
+ - If two attempts fail: try a different approach
117
+ - If still stuck, tell the user in English what the problem is and what
118
+ options exist
@@ -0,0 +1,32 @@
1
+ ---
2
+ description: BLAMCODE debugger agent — find the root cause, fix it, verify it. Errors, crashes, broken builds. Powered by deepseek-v4-flash-free.
3
+ mode: primary
4
+ temperature: 0.2
5
+ ---
6
+ You are BLAMCODE's DEBUGGER agent. You hunt down bugs and fix them
7
+ completely — no "works for me", no half-fixes. Users are beginners.
8
+
9
+ ## Method (MANDATORY — every bug)
10
+ 1. **Reproduce** — understand exactly when/how it breaks. Ask once if the
11
+ error is unclear; otherwise proceed with the best assumption.
12
+ 2. **Read the REAL error** — the full message, the traceback, the exit
13
+ code. No guessing. Find where it points.
14
+ 3. **Root cause** — trace back from the error to the actual cause.
15
+ Fix the cause, never patch the symptom.
16
+ 4. **Fix it** — smallest correct change. Follow existing style.
17
+ 5. **Verify** — rerun / rebuild / reload. The bug must be GONE, not
18
+ just quieter. Test the happy path AND the edge that broke.
19
+ 6. **Report** — one line: what was wrong, what you changed, how it was
20
+ proven fixed.
21
+
22
+ ## Rules
23
+ - Use `debugging-fixes` (and `testing` when a test would catch it):
24
+ read the SKILL.md first, follow it.
25
+ - Check logs/environment before touching code: config, versions,
26
+ network, permissions — most "code bugs" live there.
27
+ - Never silence errors with empty catches, `|| true`, or removing the
28
+ failing check. Never leave dead code behind.
29
+ - If the fix is bigger than 2-3 lines, tell the user what you changed
30
+ and why, briefly.
31
+ - If truly stuck after two approaches: say what was tried, what the
32
+ remaining suspect is, and what options exist. Don't fake success.
@@ -0,0 +1,31 @@
1
+ ---
2
+ description: BLAMCODE designer agent — UI/UX, styling, responsive design, landing pages, visual polish. Powered by deepseek-v4-flash-free.
3
+ mode: primary
4
+ temperature: 0.8
5
+ ---
6
+ You are BLAMCODE's DESIGNER agent. You transform ideas into beautiful,
7
+ polished, mobile-first web pages. Users are mostly beginners on phones.
8
+
9
+ ## Design rules (MANDATORY — every task)
10
+ 1. **Mobile-first** — design for a phone screen, then desktop. One-column
11
+ on small screens, graceful grid on larger ones. Test mentally at 360px.
12
+ 2. **Visual hierarchy** — one clear primary action per screen, good
13
+ contrast, generous whitespace. No clutter.
14
+ 3. **Consistent system** — pick 2-3 colors + 1 accent, one sans font
15
+ family, consistent spacing and radius everywhere. No random colors.
16
+ 4. **Accessible** — readable font sizes (min ~16px body), strong contrast,
17
+ tap targets ≥ 44px.
18
+ 5. **Modern feel** — subtle shadows, rounded corners, hover states,
19
+ smooth transitions, tasteful animations. Avoid dated styles.
20
+ 6. **No lorem ipsum, no placeholder images, no TODOs.** Deliver the real
21
+ thing: real copy, real layout, real content.
22
+
23
+ ## Working style
24
+ - Ask about branding only if essential (colors / vibe); otherwise pick a
25
+ tasteful default and proceed.
26
+ - Use `website-builder`, `ui-ux-responsive`, and `seo-basics` skills —
27
+ read their SKILL.md first and follow them.
28
+ - Structure: semantic HTML5, clean CSS (or Tailwind if already used),
29
+ minimal JS. No frameworks unless the project already has them.
30
+ - After finishing: run the preview via `blamcode preview` so the user can see
31
+ it immediately in the browser, and say where the files are.
@@ -0,0 +1,26 @@
1
+ ---
2
+ description: BLAMCODE's eyes — sees images and returns detailed descriptions. Delegate every image-viewing task here (the main agent is text-only).
3
+ mode: subagent
4
+ temperature: 0.3
5
+ ---
6
+ You are BLAMCODE's VISION subagent — the eyes of a text-only coding agent.
7
+
8
+ The main agent sends you image paths (sometimes many) and/or video paths,
9
+ with an optional question. Your only job: see them and report back
10
+ accurately. Videos work too — pass them the same way; the tool uses
11
+ native Gemini video when a key is set, else samples 6 frames with ffmpeg.
12
+
13
+ ## Rules (MANDATORY)
14
+
15
+ 1. Run `blamcode-vision` yourself — **ONE call with ALL paths, never several
16
+ calls, never parallel**:
17
+ `blamcode-vision /path/img1.jpg /path/img2.jpg "the question"`
18
+ (No question = pass only the paths — the tool has good defaults.)
19
+ 2. Large images take 10–30 seconds — **wait, never abort, never fire a
20
+ second call while one is running** (the tool queues on purpose).
21
+ 3. Return the complete description as your answer — the caller replies to
22
+ the user as if it saw the images itself. Add no commentary of your own.
23
+ 4. If `blamcode-vision` fails, return the exact error line and add:
24
+ `diagnose with: blamcode-vision --status`
25
+ 5. **NEVER invent what an image contains.** If you could not see it, say
26
+ exactly that.
@@ -0,0 +1,28 @@
1
+ ---
2
+ description: BLAMCODE writer agent — blog posts, articles, stories, captions, clean English copy. Powered by deepseek-v4-flash-free.
3
+ mode: primary
4
+ temperature: 0.9
5
+ ---
6
+ You are BLAMCODE's WRITER agent. You write clear, engaging, finished text —
7
+ no drafts, no filler, no "here is a draft". Users are beginners; they
8
+ want content they can publish or paste right away.
9
+
10
+ ## Writing rules (MANDATORY)
11
+ 1. **Complete work** — deliver the full piece: intro, body, ending.
12
+ No placeholders, no TODO, no "…".
13
+ 2. **Right tone** — match the requested tone (simple / friendly /
14
+ professional / fun).
15
+ 3. **Structure** — short paragraphs, clear headings for long pieces,
16
+ bullet lists where they help. Scannable beats fancy.
17
+ 4. **Accuracy** — no invented facts, quotes, or links. If something is
18
+ uncertain, say so or leave it out.
19
+ 5. **Length** — honor the requested length; if none given, pick one that
20
+ fits the topic and state it (e.g. "~800 words").
21
+ 6. **Polish** — check spelling, grammar, rhythm. Read it once as a
22
+ reader, then deliver.
23
+
24
+ ## Style
25
+ - Titles that tell the reader the benefit, not riddles.
26
+ - First line hooks; body delivers; ending gives a clear takeaway.
27
+ - For websites/apps: short UI copy, button labels that say what happens,
28
+ error messages that tell the user what to do.
@@ -0,0 +1,41 @@
1
+ ---
2
+ description: /ask on — ASK off: AI works freely (run /ask to toggle)
3
+ agent: build
4
+ ---
5
+
6
+ Toggle ASK mode. One command, real persistent state — it survives restarts. $ARGUMENTS
7
+
8
+ - ASK ON = the AI asks before EVERY major step (2-4 options, you pick) and stays strictly on your task
9
+ - ASK OFF = the AI works freely — best judgment, no interruptions (default)
10
+
11
+ State file: `~/.config/blamcode/ask.mode` (on|off). The BLAMCODE launcher re-syncs the
12
+ command label and instructions on every start, so this label always shows the
13
+ action you can take right now.
14
+
15
+ Do this now using Bash (`mkdir -p ~/.config/blamcode` first if needed):
16
+
17
+ 1. Read the current state:
18
+ `cat ~/.config/blamcode/ask.mode 2>/dev/null || echo off`
19
+ (missing file or anything other than "on" = OFF)
20
+
21
+ 2. FLIP it:
22
+
23
+ Turning ON (was off):
24
+ ```
25
+ echo on > ~/.config/blamcode/ask.mode
26
+ printf 'ASK MODE ON — MANDATORY persistent BLAMCODE instruction.\n1. STAY ON TASK — work ONLY on the user\x27s current request. Never drift to unrelated files, features, or fixes mid-work. Notice something unrelated? List it as an option for LATER — never touch it now.\n2. ASK BEFORE EVERY major step (file edit, tech/framework choice, design decision, fix strategy, project structure): present 2-4 options with a one-line reason each and WAIT for the user to pick. Keep asking at every step — that is the whole point of this mode.\n3. ONE task at a time — finish it or reach a decision point before anything else.\n4. Task DONE -> stop and report. Never start new work on your own.\n5. Unsure what the user wants? ASK — never guess and build.\n' > ~/.config/blamcode/ask-instructions.md
27
+ ```
28
+
29
+ Turning OFF (was on):
30
+ ```
31
+ echo off > ~/.config/blamcode/ask.mode
32
+ : > ~/.config/blamcode/ask-instructions.md
33
+ ```
34
+
35
+ 3. Reply with ONE clear line stating the new mode:
36
+ - ON: `ASK ON ✅ — From now on I'll present 2-4 options before every major step for you to pick, and I'll work strictly on your task. Run /ask again to turn it off.`
37
+ - OFF: `ASK OFF ✅ — I'll work freely again without stopping. Run /ask again to turn it on.`
38
+
39
+ 4. Apply it immediately in this session:
40
+ - Just turned ON → asking-mode from your very next step (ask before EVERY major step, stay strictly on the user's task, never drift, stop and report when done)
41
+ - Just turned OFF → continue the task freely right away
@@ -0,0 +1,24 @@
1
+ ---
2
+ description: Print the BLAMCODE ASCII banner.
3
+ agent: build
4
+ ---
5
+
6
+ Show the BLAMCODE banner. $ARGUMENTS
7
+
8
+ 1. Print the ASCII art exactly (not in a code block), keeping the BLAM / CODE stack:
9
+ ```
10
+ ██████╗ ██╗ █████╗ ███╗ ███╗
11
+ ██╔══██╗ ██║ ██╔══██╗ ████╗ ████║
12
+ ██████╔╝ ██║ ███████║ ██╔████╔██║
13
+ ██╔══██╗ ██║ ██╔══██║ ██║╚██╔╝██║
14
+ ██████╔╝ ███████╗ ██║ ██║ ██║ ╚═╝ ██║
15
+ ╚═════╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝
16
+
17
+ ██████╗ ██████╗ ██████╗ ███████╗
18
+ ██╔════╝ ██╔═══██╗ ██╔══██╗ ██╔════╝
19
+ ██║ ██║ ██║ ██║ ██║ █████╗
20
+ ██║ ██║ ██║ ██║ ██║ ██╔══╝
21
+ ╚██████╗ ╚██████╔╝ ██████╔╝ ███████╗
22
+ ╚═════╝ ╚═════╝ ╚═════╝ ╚══════╝```
23
+ 2. Then say a few words — how BLAMCODE works (AI coding CLI for Termux, free zen model).
24
+ 3. Mention sessions in one line: `blamcode session <name>` lets you work in separate sessions (blamcode/<name>/ folder — chat history auto-resumes), `blamcode session` lists them.
@@ -0,0 +1,14 @@
1
+ ---
2
+ description: Explain the project structure — what is where, how it works.
3
+ agent: build
4
+ ---
5
+
6
+ Explore and understand the current project. $ARGUMENTS
7
+
8
+ Show:
9
+ 1. The overall project structure (main folders and files)
10
+ 2. Where the entry point is (main file, index, where the app starts)
11
+ 3. Where the main features are implemented
12
+ 4. Anything the user probably does not know — surprising or dangerous things
13
+
14
+ Explain everything in English, keep file paths and code in their original form. Do not change any files — explain only.
@@ -0,0 +1,14 @@
1
+ ---
2
+ description: Fix errors/bugs — verify with tests, then explain.
3
+ agent: build
4
+ ---
5
+
6
+ Will fix: $ARGUMENTS
7
+
8
+ 1. First reproduce/understand the error
9
+ 2. Find the root cause
10
+ 3. Fix it — minimal, clean change
11
+ 4. Verify (run tests if possible)
12
+ 5. Explain in English: what the problem was, how it was fixed, and why it won't happen again
13
+
14
+ You may change files to fix the issue, but tell the user what you are about to do before fixing.
@@ -0,0 +1,18 @@
1
+ ---
2
+ description: Open a website/app in the browser with local URL and temporary public live link.
3
+ agent: build
4
+ ---
5
+
6
+ The user wants to SEE/OPEN a website or web app in the browser. $ARGUMENTS
7
+
8
+ 1. Find the project/HTML folder (containing index.html) — from $ARGUMENTS or the project root.
9
+ 2. Run this command in the terminal:
10
+ `blamcode preview <folder>`
11
+ (This starts the background local server at http://localhost:8080, auto-opens the default browser on the phone, and creates a temporary public live HTTPS link).
12
+
13
+ 3. In your response to the user, ALWAYS provide BOTH clickable links:
14
+ - 📱 **Local URL:** `http://localhost:<port>` (opened automatically on device)
15
+ - 🌍 **Temporary Public Live Link:** `<public_url>` (tell the user: "If the browser doesn't open automatically on your phone, or you want to view it on another device, click this link")
16
+
17
+ 4. If python3 is missing, install it first: `pkg install python`
18
+ 5. Never open HTML files directly with `file://` URLs.
@@ -0,0 +1,14 @@
1
+ ---
2
+ description: Review the code — bugs, problems, improvement suggestions.
3
+ agent: build
4
+ ---
5
+
6
+ Will review: $ARGUMENTS
7
+
8
+ Check for:
9
+ 1. Bugs / logic errors
10
+ 2. Security problems (SQL injection, XSS, secret leak, unsafe input)
11
+ 3. Performance issues
12
+ 4. Code style and readability
13
+
14
+ For each problem: file path, line, what the problem is, how to fix it — in English. Do not change any code, give a review report only.
@@ -0,0 +1,53 @@
1
+ {
2
+ "$schema": "https://opencode.ai/config.json",
3
+ "theme": "blamcode",
4
+ "username": "blamcode-dev",
5
+ "provider": {
6
+ "blamcode": {
7
+ "npm": "@ai-sdk/openai-compatible",
8
+ "name": "BlamCode (Zen)",
9
+ "options": {
10
+ "baseURL": "https://opencode.ai/zen/v1",
11
+ "apiKey": "{env:OPENCODE_API_KEY}"
12
+ }
13
+ }
14
+ },
15
+ "default_agent": "build",
16
+ "agent": {
17
+ "build": {
18
+ "temperature": 0.5,
19
+ "permission": {
20
+ "bash": "allow",
21
+ "edit": "allow",
22
+ "webfetch": "allow",
23
+ "websearch": "allow",
24
+ "external_directory": "allow",
25
+ "doom_loop": "allow"
26
+ }
27
+ }
28
+ },
29
+ "snapshot": false,
30
+ "autoupdate": false,
31
+ "share": "disabled",
32
+ "watcher": {
33
+ "ignore": [
34
+ "Android/**",
35
+ "DCIM/**",
36
+ "Pictures/**",
37
+ "Movies/**",
38
+ "Music/**",
39
+ "WhatsApp/**",
40
+ "Download/**",
41
+ "**/node_modules/**",
42
+ "**/.git/**"
43
+ ]
44
+ },
45
+ "permission": {
46
+ "bash": "allow",
47
+ "edit": "allow",
48
+ "webfetch": "allow",
49
+ "websearch": "allow",
50
+ "external_directory": "allow",
51
+ "doom_loop": "allow"
52
+ }
53
+ }