Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .codex-plugin/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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?"
Expand Down
8 changes: 5 additions & 3 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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.
18 changes: 18 additions & 0 deletions assets/screenshots/README.md
Original file line number Diff line number Diff line change
@@ -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.
19 changes: 19 additions & 0 deletions assets/screenshots/signup-example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!doctype html>
<html lang="en"><meta charset="utf-8"><title>Clueless — published signup example</title>
<style>
*{box-sizing:border-box} body{margin:0;background:#f2f1ed;color:#161616;font-family:Arial,Helvetica,sans-serif}
main{padding:44px 52px;max-width:1600px;margin:auto} header{display:flex;justify-content:space-between;align-items:center;border-bottom:2px solid #161616;padding-bottom:22px}
h1{font-size:42px;margin:0;letter-spacing:-1.5px} .mark{background:#111;color:white;border-radius:12px;font-family:Georgia,serif;font-size:43px;line-height:62px;text-align:center;width:62px;margin-right:18px;display:inline-block;vertical-align:middle}
.meta{font-size:17px;text-align:right;line-height:1.5;color:#555} blockquote{font-size:20px;line-height:1.5;margin:24px 0;padding:18px 24px;background:white;border-left:4px solid #111}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:20px} section{background:white;border:1px solid #deddd8;border-radius:12px;padding:22px 24px;margin-bottom:20px}
h2{font-size:23px;margin:0 0 15px} pre{white-space:pre-wrap;overflow-wrap:anywhere;font:18px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;margin:0}
footer{font-size:17px;line-height:1.5;color:#555;display:flex;justify-content:space-between;border-top:1px solid #cecdc7;padding-top:16px;margin-top:4px}
</style><main><header><h1><span class="mark">?</span>clueless</h1><div class="meta">Published signup example<br>Illustrative output · not a live session</div></header><blockquote>I&#x27;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&#x27;s it. I don&#x27;t understand any of this, just make it properly for me, I&#x27;ll copy-paste whatever you give.</blockquote><div class="grid"><div><section><h2>Run it</h2><pre> npm install
SESSION_SECRET=$(node -e &quot;console.log(require(&#x27;crypto&#x27;).randomBytes(32).toString(&#x27;hex&#x27;))&quot;) npm start</pre></section><section><h2>Careful</h2><pre> - 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&#x27;t serve signups over http://.</pre></section></div><div><section><h2>Check it worked</h2><pre> Sign up twice with the same email. The second must say &quot;already exists&quot;.</pre></section><section><h2>Decided for you</h2><pre> - 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&#x27;t useful.</pre></section><section><h2>Only you can decide</h2><pre> - Where this runs permanently (assumed Render/Railway).
- Email verification before course access (assumed no, for now).
- What happens right after signup (assumed: success message).</pre></section></div></div><footer><span>Excerpt from examples/signup-form.md</span><span>ADanMan/clueless · MIT</span></footer></main></html>
Binary file added assets/screenshots/signup-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions tests/rules.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
});
Loading