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
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,17 @@ npm test 2>&1 | clipcase add failing-test --source "npm test" --tag failure
clipcase export failing-test --out handoff.md
```

For a reproducible fixture-backed handoff, run:

```sh
npm run build
bash demo/run-bug-handoff.sh
```

The demo captures repro notes and terminal output from
`examples/bug-handoff`, exports a Markdown handoff, and verifies that
secret-like input is blocked by default.

For a fuller copy-paste support workflow, see
[examples/support-handoff-demo.md](examples/support-handoff-demo.md). A short,
fact-grounded promotion pack lives in
Expand Down
33 changes: 33 additions & 0 deletions demo/run-bug-handoff.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -euo pipefail

repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
tmp="$(mktemp -d)"
trap 'rm -rf "$tmp"' EXIT

cd "$tmp"

node "$repo_root/dist/src/cli.js" init --storage .clipcase
node "$repo_root/dist/src/cli.js" new login-redirect --title "Login redirect loop"
node "$repo_root/dist/src/cli.js" add login-redirect \
--source repro \
--tag auth,repro \
< "$repo_root/examples/bug-handoff/repro.txt"
node "$repo_root/dist/src/cli.js" add login-redirect \
--source "npm test" \
--tag failure \
< "$repo_root/examples/bug-handoff/terminal.txt"

node "$repo_root/dist/src/cli.js" search redirect | grep -q login-redirect
node "$repo_root/dist/src/cli.js" export login-redirect --out handoff.md
grep -q "Login redirect loop" handoff.md
grep -q "clears expired login cookie" handoff.md

if printf 'token=abcdefghijklmnopqrstuvwxyz123456\n' | node "$repo_root/dist/src/cli.js" add login-redirect 2>"$tmp/secret.err"; then
echo "secret-like input was not blocked" >&2
exit 1
fi
grep -q "Refusing to save" "$tmp/secret.err"

echo "Demo casefile: $tmp/handoff.md"

20 changes: 17 additions & 3 deletions docs/promo/social-hooks.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# ClipCase Social Hooks

## Positioning

ClipCase is a local-first CLI for turning copied context, terminal output,
prompts, URLs, and repro notes into Markdown casefiles.
prompts, URLs, and repro notes into Markdown casefiles. Draft posts should stay
grounded in current CLI behavior: transparent `.clipcase` storage,
deterministic Markdown export, offline search, and conservative secret
blocking.

## Short hooks

Expand All @@ -13,6 +14,8 @@ prompts, URLs, and repro notes into Markdown casefiles.
export one deterministic casefile.
- Useful agent handoffs are often just the right repro notes plus the right
terminal output. ClipCase keeps both in plain files.
- The default safety model is local-first: no watcher, no hosted service, and
likely secrets are blocked unless you explicitly allow them.

## Demo beats

Expand All @@ -23,6 +26,17 @@ prompts, URLs, and repro notes into Markdown casefiles.
5. `clipcase export login-redirect --out handoff.md` produces the shareable
Markdown bundle.

## Fixture-backed demo

```sh
npm run build
bash demo/run-bug-handoff.sh
```

The script creates a temporary case, captures repro and terminal fixtures,
exports `handoff.md`, verifies key text, and confirms secret-like input is
blocked.

## Guardrails

- ClipCase is local-first and does not sync cases.
Expand Down
14 changes: 14 additions & 0 deletions examples/bug-handoff/repro.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Steps to reproduce

1. Open the checkout on a feature branch.
2. Run npm test.
3. Observe the failing assertion in the login redirect test.

Observed:

The redirect keeps the expired session cookie and loops back to /login.

Expected:

The redirect clears the expired cookie and lands on /dashboard.

8 changes: 8 additions & 0 deletions examples/bug-handoff/terminal.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
$ npm test

not ok 3 - clears expired login cookie before redirect
---
expected: "/dashboard"
actual: "/login"
...

Loading