Drops the Claude-Session trailer and bare session links from the commit and PR attribution text

A workbench for building software with AI coding agents. Plan the feature, run the agents, see what they did, count what they got wrong.
🌐 regin.ccday.top — the official project site.
⚠️ Early beta. regin is under active development and breaking changes are expected at any time. Database schemas, settings keys, hook contracts, skill bundles, and CLI flags may all change without backward-compatible shims. Pin a commit if you need stability.
regin runs one loop around the coding agent you already use:
Spec → Run → Watch → Count
│ │ │ └─ defects declared against the done-claim; rounds-to-done per feature
│ │ └─ every session traced: tools, edits, tokens, time, grades
│ └─ task runs launched on Claude or Kimi, steered and stopped from /live
└─ a feature row carries the spec, its acceptance tests, and the slices cut from it
It is organized in four layers. The first two are where you spend the day; the last two make the runs inspectable and keep the agent on-spec.
| Layer | What it covers | Dashboard |
|---|---|---|
| Workbench | feature → spec → acceptance tests → tasks → done-claim; the defect ledger | /overview (Pipeline), /inbox |
| Runs | launching task runs, steering live sessions, the agent's messages back to you | /live, /inbox |
| Observability | session traces, time and cost analytics, post-hoc grades, audit | /trace, /audit |
| Guidance | patterns & skills, rule engines in hooks, cross-session memory, topic wikis | /patterns, /rules, /memory, /repos/:name/topics |
A feature is a row. Its spec lives on that row (or on its tracker issue when the feature is tracked remotely), and its acceptance items are named tests in the repo — red before the build, green at ship. The spec is cut into slices; each slice becomes a task with its dependencies, and tasks run in dependency order. When the work is called done, that is a done-claim, and anything found wrong afterwards is a defect declared against the feature.
The number the pipeline is held to is rounds-to-done: one build plus each time a done-claim was walked back. Only declarations feed it — nothing is inferred from prose, branch names or timing.
/overview is the Pipeline — Overview, Features and Tasks behind one tab strip; defects are reached from the Overview and the Features triage rail. /features/:id is a feature's ledger.regin feature (where a feature stands and what it cost), regin task (capture, inspect, check a slice table); runs are armed and launched from the dashboard, regin defects (what a feature got wrong, and what escaped).A task is armed with a provider, a model and a launch mode, then started from the dashboard. Claude runs go through the Python Claude Agent SDK, so regin owns the process and keeps a typed channel to it — an AskUserQuestion is answered from the browser rather than by typing into a terminal. Kimi Code runs over ACP or in a tmux pane on regin's own tmux server.
/live follows a running session: its current state, recent steps, any question it is blocked on, with steer and Stop.send_to_user tool; messages land in /inbox and can fan out to a webhook, Telegram or Lark. CLI: regin messages, regin bridge./live renders a phone-sized card that can answer permission prompts while you are away from the desk. Rough edges and breaking changes are expected; see docs/agent-bridge-design.md.Internals: Agent SDK tier, Provider launch capabilities, Agent Messages.
Hooks and transcripts produce a stream of events: tool calls, model thoughts, file edits, hook decisions, token usage. regin ingests that stream into a session trace you can filter by tool, agent and phase, replay, and roll up (tokens by tool, skill reads, MCP calls).
/trace/sessions lists sessions; each opens into a timeline and a conversation view.regin stats time shows where build time goes (attended vs. agent vs. human); regin stats session <trace-id> ranks why one session was slow; regin stats sessions exports per-session rows.regin grade scores finished sessions against a rubric. /audit is the ops history of regin itself.Internals: Turn & Token Tracing, Session Grader.
The supporting layer: what the agent is told before it acts, and what pushes back when it drifts.
regin pattern promote packages a proven pattern as a versioned skill. Dashboard: /patterns, /skills.PostToolUse hooks, so a violation is reported to the agent in the same turn as the edit. Dashboard: /rules; CLI: regin rules, regin hooks./memory; CLI: regin memory./repos/:name/topics; CLI: regin topics, regin wiki.Internals: Patterns, Rule engines, Agent Memory, docs/topics/proposals.md.
git clone https://github.com/caiuswang/regin && cd regin
./scripts/setup.sh
.venv/bin/python cli/regin.py serve # dashboard on http://localhost:8321
Manual setup, settings, server mode and the CLI reference: docs/setup.md.
| Agent | Status |
|---|---|
| Claude Code | Full: hooks, rule engines, trace, memory, and task runs through the Agent SDK. |
| Kimi Code | Task runs only (ACP or tmux), with known limits — runs are unattended and a steer is cancel-then-re-prompt. See Run a task with Kimi. |
| Codex, generic | Provider adapters exist; cannot be armed for task runs. See Agent provider architecture. |
Not a chat UI, not a model, not a hosted service. It assumes you already have a coding agent and a codebase, and runs locally beside them.
hooks/register.ts 28 lines1import type { Register } from 'claude-code'
2
3const TRAILER = /^\s*Claude-Session:/i
4const SESSION_LINK = /[ \t]*(?:(?<!\S)Claude-Session:[ \t]*|(?<!\S))https:\/\/claude\.ai\/code\/session_[\w-]+(?:[/?#][^\s.,;:)\]]*)?/gi
5
6export function dropSessionLinks(text: string): string {
7 const lines = text.split('\n')
8 const kept: string[] = []
9 for (const line of lines) {
10 if (TRAILER.test(line)) continue
11 const stripped = line.replace(SESSION_LINK, '')
12 if (stripped === line) kept.push(line)
13 else if (stripped.trim()) kept.push(stripped)
14 }
15 if (kept.length === lines.length && kept.every((line, i) => line === lines[i])) return text
16 // A dropped closing line leaves the blank separator that preceded it.
17 const ending = /[\r\n]*$/.exec(text)?.[0] ?? ''
18 return kept.join('\n').replace(/[\r\n]+$/, '') + ending
19}
20
21export const register: Register = (on) => {
22 on('attribution.text', async (_$, e, next) => {
23 if (e.kind !== 'commit' && e.kind !== 'pr') return next(e)
24 const { text } = await next(e)
25 return { text: dropSessionLinks(text) }
26 })
27}
28