diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index eff95a4..2e81b95 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -31,6 +31,9 @@ "privacyPolicyURL": "https://github.com/ADanMan/clueless/blob/main/SECURITY.md", "termsOfServiceURL": "https://github.com/ADanMan/clueless/blob/main/LICENSE", "composerIcon": "./assets/icon.svg", + "screenshots": [ + "./assets/screenshots/signup-example.png" + ], "defaultPrompt": [ "I know nothing about this, set it up properly for me", "What am I not seeing in this plan?" diff --git a/SECURITY.md b/SECURITY.md index 09276b1..ba0a562 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,6 +1,10 @@ # Security policy -clueless is prompt-only. It ships Markdown skills, a Cursor rule, an `AGENTS.md`, and two small Node scripts used only by the test suite. It runs no hooks, starts no processes, makes no network calls, and writes nothing outside its own folder. +clueless ships Markdown skills, a Cursor rule, an `AGENTS.md`, and a small Node.js calibration hook. Claude Code runs `hooks/calibrate.cjs` on `UserPromptSubmit`; Node.js is required for that hook. The Codex, Cursor, and `AGENTS.md` adapters use the skill rules without running the hook. + +The hook reads the host's JSON event, including the prompt, from stdin and emits a fixed reminder for the model to assess review ability in the current task. It does not echo or store prompts, make network calls, write files, execute prompt text, launch other processes, select a mode, or make permission decisions. Malformed or irrelevant events produce no output and do not block the prompt. Set `CLUELESS_CALIBRATION=off` before starting Claude Code to disable the reminder. + +The host agent may use tools while following the skills. Its tool access, data handling, and approvals are controlled by the host, not by this plugin. The reminder grants no permissions; working assumptions and user silence are not approval for consequential actions. ## Reporting a vulnerability @@ -11,5 +15,3 @@ Please do not open public issues for security reports until a fix is published. ## Scope In scope: anything in this repository. Out of scope: the behaviour of the host agent (Claude Code, Codex, Cursor) itself. - -The calibration hook reads its event from stdin and emits static guidance. It makes no network calls, writes no files, does not echo prompts, and does not make permission decisions. diff --git a/assets/screenshots/README.md b/assets/screenshots/README.md new file mode 100644 index 0000000..d863026 --- /dev/null +++ b/assets/screenshots/README.md @@ -0,0 +1,18 @@ +# Catalog preview + +`signup-example.png` is a browser rendering of `signup-example.html`. It shows +the prompt and the published “With clueless” output excerpt from +[`examples/signup-form.md`](../../examples/signup-form.md), with its existing +limitations intact. It is an illustrative example, not a captured live agent +session or a new benchmark result. The image contains only repository content. + +To reproduce it with Chrome, run from the repository root: + +```sh +google-chrome --headless --disable-gpu --hide-scrollbars \ + --window-size=1600,1060 --force-device-scale-factor=1 \ + --screenshot="$PWD/assets/screenshots/signup-example.png" \ + "file://$PWD/assets/screenshots/signup-example.html" +``` + +The Codex manifest references the PNG; keep the image inside the plugin bundle. diff --git a/assets/screenshots/signup-example.html b/assets/screenshots/signup-example.html new file mode 100644 index 0000000..37913ee --- /dev/null +++ b/assets/screenshots/signup-example.html @@ -0,0 +1,19 @@ + +Clueless — published signup example +

?clueless

Published signup example
Illustrative output · not a live session
I'm not a programmer. I need a signup form for my small online course site (Node/Express backend, plain HTML front). Email + password, stores users, that's it. I don't understand any of this, just make it properly for me, I'll copy-paste whatever you give.

Run it

  npm install
+  SESSION_SECRET=$(node -e "console.log(require('crypto').randomBytes(32).toString('hex'))") npm start

Careful

  - users.db is real user data. Back it up before deploying. Never commit it.
+  - No password reset yet. For a course site that is your #1 support ticket.
+  - No HTTPS here. Any normal host gives you HTTPS; don't serve signups over http://.

Check it worked

  Sign up twice with the same email. The second must say "already exists".

Decided for you

  - SQLite over Postgres: one file, zero setup, fine for a small course site.
+  - Cookie sessions over JWT: simpler with a plain HTML front end.
+  - Login included though you asked for signup only: a signup with no way
+    back in isn't useful.

Only you can decide

  - Where this runs permanently (assumed Render/Railway).
+  - Email verification before course access (assumed no, for now).
+  - What happens right after signup (assumed: success message).
diff --git a/assets/screenshots/signup-example.png b/assets/screenshots/signup-example.png new file mode 100644 index 0000000..339a5f1 Binary files /dev/null and b/assets/screenshots/signup-example.png differ diff --git a/tests/rules.test.js b/tests/rules.test.js index a56961b..b120013 100644 --- a/tests/rules.test.js +++ b/tests/rules.test.js @@ -22,3 +22,20 @@ test('plugin manifests agree on version', () => { assert.strictEqual(v('.claude-plugin/plugin.json'), v('package.json')); assert.strictEqual(v('.codex-plugin/plugin.json'), v('package.json')); }); + +test('catalog screenshots resolve to bundled PNG previews', () => { + const { interface: ui } = JSON.parse(fs.readFileSync(path.join(root, '.codex-plugin/plugin.json'), 'utf8')); + assert.ok(Array.isArray(ui.screenshots) && ui.screenshots.length > 0, 'catalog preview is missing'); + const bundleRoot = fs.realpathSync(root) + path.sep; + const ignored = fs.readFileSync(path.join(root, '.codexignore'), 'utf8').split('\n').filter(Boolean); + for (const screenshot of ui.screenshots) { + assert.ok(screenshot.startsWith('./assets/'), 'preview must be a local asset'); + const file = fs.realpathSync(path.join(root, screenshot)); + assert.ok(file.startsWith(bundleRoot), 'preview must stay inside the plugin'); + const relative = path.relative(root, file); + assert.ok(!ignored.some((entry) => entry.endsWith('/') && relative.startsWith(entry)), 'preview is excluded from the bundle'); + const png = fs.readFileSync(file); + assert.deepStrictEqual(png.subarray(0, 8), Buffer.from([137, 80, 78, 71, 13, 10, 26, 10])); + assert.ok(png.readUInt32BE(16) >= 640 && png.readUInt32BE(20) >= 480, 'preview must be readable'); + } +});