Skip to content

Instantly share code, notes, and snippets.

View humorless's full-sized avatar

Laurence Chen humorless

View GitHub Profile
@humorless
humorless / color-prompt.md
Created October 28, 2026 12:26
policy/mechanism coloring tips

任務:產生依 mechanism / policy 著色的 Clojure call graph

背景

clj-kondo 的 analysis 功能(:analysis {:var-definitions true :var-usages true}) 可以抽出「哪個 var 呼叫了哪個 var」。我想用它畫出本專案的 call graph, 並依照 https://replware.substack.com/p/811 (Arne Brasseur 的 mechanism vs policy 定義) 把每個節點著色。

範圍

  • 只分析 src/(不含 test/、dev/、repl namespace)
@humorless
humorless / coding-agent-tutorial.md
Last active October 21, 2026 05:46
自建小系統:12 道關卡,從零做出並上線一個補習班 web app

自建小系統:12 道關卡,從零做出並上線一個補習班 web app

作者:Laurence Chen(REPLWARE 睿博資訊)|授權:CC BY-NC 4.0

這份教材原本是寫給一位補習班經營者朋友的。他想把補習班的行政電子化,也想做一些教學用的小工具,於是開始學寫程式。整理之後公開出來,給同樣想「用 AI 自己做出小系統」的人:補習班、工作室、小店的經營者,或任何不是工程師、但想親手做出一個能上線使用的系統的人。

你不需要先會寫程式,但需要:一台 Mac 或 Windows 電腦、Claude Code 的付費方案、大約 30–36 小時,以及願意在每一關停下來想清楚「為什麼」。可以搭配 AI 自學;若想要有人陪你走完,請看文末的陪跑方案。

課程設計說明

@humorless
humorless / Coding-Agent-tips.md
Last active September 30, 2026 09:09
Coding Agent Tips
flowchart TD
    I["Instructions for Claude<br/>貫穿全程的回答規範"]
    P1["1. 初始規畫<br/>web AI 對話 → SPEC.md"]
    P2["2. 開發環境<br/>CLAUDE.md、nREPL + tmux、skills、<br/>docker-compose、本地模型、假資料"]
    P3["3. Coding Agents 的開發過程<br/>每個 Phase 重複"]
    P4["4. 收尾<br/>Purpose, Rationale, Guides、Mermaid、Diataxis"]

    I -.->|"影響所有對話 (區分事實/推論)"| P1
 P1 --&gt;|"SPEC 為 Claude Code 而寫"| P2
@humorless
humorless / library-extraction-prompt.md
Last active September 23, 2026 12:19
Library Extraction Prompt from an Existing Codebase

Please scan the target codebase, identify the mechanisms and policies within it, and organize the parts worth extracting into candidate options. Once the user decides, package them into a library and refactor the original codebase.

Parameters

To be filled in by the user before execution; if left blank, ask in Phase 0.

Parameter Description Default
TARGET Path of the repo to scan Current working directory
SCOPE Scan scope, excluding generated code and vendored code src/; if the repo has no src/, identify the actual source directory in Phase 0 (e.g., for a Python flat layout, the top-level package, determinable from the packages setting in pyproject.toml or __init__.py); adopt and record it if it can be clearly determined, otherwise ask the user
@humorless
humorless / project_instructions_generator.md
Last active May 22, 2026 08:32
A prompt used to generate a project prompt for AI strategy consultant

你是一個 project instructions 生成器。

你的任務是:透過向使用者提問,收集足夠的資訊,最終生成一份「策略副手 project instructions」,讓 AI 能夠扮演該使用者公司的策略副手角色。


工作方式

逐區塊提問,每次問 2~3 個問題,確認回答後再繼續。不要一次把所有問題丟出去。

@humorless
humorless / basic_command.md
Last active March 9, 2026 21:05
Claude Note
  1. 常見指令

claude "task" ;; task
claude -p "query" ;; query
claude -c ;; continue

  1. CLI 內建指令

/init
/exit

@humorless
humorless / CLAUDE.md
Last active March 5, 2026 14:04
CLAUDE.md extension for a new Clojure empty project (which is created by "Clojure Stack Lite")

Dev Workflow

  • After editing source files, use brepl to require the changed namespace with :reload and test interactively, rather than relying solely on curl or bb test.

Interactive Development Techniques

  • Call handlers directly — Ring handlers are pure functions (request map → response map). Test them in brepl without going through HTTP or middleware: (handlers/home-handler {}), (handlers/inspect-handler {}). Inspect response structure with (keys resp) before dumping the full body.
  • Verify routes with Reitit — Use reitit.core/match-by-path to check route matching interactively without a browser: (reitit.core/match-by-path (reitit.ring/router app-routes/routes) "/"). Useful for verifying newly added routes before integration testing.
  • Compose and inspect HoneySQL queries — Build queries incrementally as data and preview the generated SQL with (honey.sql/format query {:quoted true}) before sending to the database. This lets you verify correctness without executing a

set permission

chmod -R 777 /tmp/kestra-wd/tmp

@humorless
humorless / metlano.yml
Created December 8, 2025 16:32
Very quick meltano test
version: 1
default_environment: dev
project_id: 019afeb1-bcc4-7481-b40a-1010c0ab4fc4
environments:
- name: dev
- name: staging
- name: prod
plugins:
extractors:
- name: tap-smoke-test
@humorless
humorless / oranment_example.clj
Created November 27, 2025 14:22
Example of using ornament
;; Example of using
;;
;; - #{...}
;; - "&:not()"
;; - "&:has()"
(o/defstyled form :form
...
[#{:input :textarea :select} ["&:not([type=checkbox])"
:w-full :mb-3]]