Threadline is a small toolkit for teams that want to move fast on UI work without losing track of what still needs human attention. It gives you a shared language for saying, “ship the safe part now, and mark the deeper part clearly for later.”
<your-package-manager> add -D @threadline/cli
<your-package-manager> add @threadline/runtime
threadline initinit now follows the repo-first agent-native flow: it detects the repo shape, offers to install @threadline/runtime if it is missing, asks only about unresolved fields, shows the resolved proposal it is about to write, and then installs the pre-push hook and validates the repo so the first run already leaves the repo in a usable state.
For fast local testing in another repo, build a real installable tarball from this workspace:
<your-package-manager> run pack:localThe tarball is written to packages/cli/.pack/ by default. Install that file into your test repo with the equivalent add command for your package manager, pointing at /absolute/path/to/threadline-cli-1.0.0.tgz.
UI work tends to split into two kinds of effort:
- the part that can be done locally and safely right away
- the part that needs a fuller implementation pass, product decision, or extra verification
Without a shared system, those boundaries get fuzzy. Work gets scattered across comments, tickets, and half-finished branches. Threadline keeps that split visible in code, in validation, and in the local workflow around the repo.
Threadline centers on a handoff:
handoffmarks work that should not be implemented directly in the current passfallbackis the safe local behavior that keeps the UI usable meanwhile- local validation checks make sure the handoff stays honest and the surrounding code stays inside the repo's rules
That means a developer or agent can ship the safe path immediately, while the deeper work stays clearly labeled and easy to find later.
- Run
threadline initin a repo. - Threadline detects the repo shape and asks only for any unresolved settings.
- Threadline shows the resolved proposal for confirmation, then writes local config and agent guidance files.
- Use
handoff({ ... })in UI code when a task needs a later implementation pass. - Give the handoff a safe
fallbackso the app still works. - Run
threadline validatelocally orthreadline validate --stagedbefore committing to catch boundary issues before they leave the machine. - Run
threadline scan-handoffswhen you want a structured list of outstanding handoffs. - Run
threadline export-handoffs --tracker githubwhen you want tracker-shaped payloads for follow-up work.
The default threadline init experience is:
- Detect repo conventions.
- Clarify only the fields that are still uncertain.
- Confirm the resolved proposal that will be written.
- Write
.threadline/,.codex/skills/threadline/SKILL.md, repo agent entrypoints, and install the hook.
init is intentionally interactive. It does not expose preview or override flags as the normal setup path because Threadline is meant to inspect the repo, clarify uncertainty, and confirm before changing files.
Install the runtime package in any app code that uses handoff():
<your-package-manager> add @threadline/runtimeimport { handoff } from '@threadline/runtime';
const onExport = handoff({
id: 'settings-export-csv',
title: 'Export Data',
description: 'CSV export should be implemented against the reporting service',
fallback: () => alert('Export coming soon'),
});threadline validatethreadline validate --stagedthreadline export-handoffs --tracker github- Build the UI the team can safely ship now.
- Mark any deeper follow-up as a handoff.
- Keep the fallback usable and explicit.
- Let validation catch imports, state, styling, and path issues before push.
- Export the handoff list when you want the work handed off into a tracker or another follow-up system.
packages/runtime- thehandoff()API used in app codepackages/ast-guard- parsing and validation that keep handoffs and boundaries honestpackages/cli- repo setup, validation, and handoff scanning commandspackages/skill-templates- reusable instruction templates for agent workflows
handoffis the marker for work that needs a deeper implementation passfallbackis the safe local behavior that runs until that work is doneguardrailsare the checks that keep changes aligned with the repo's rulesskill templatesare the reusable instructions that help agents behave consistently
CONTEXT-MAP.mdfor the shared vocabulary mapdocs/adr/for the decisions behind the designspecs/for the package and workflow contracts
Threadline is meant to feel clear, local-first, and dependable. The point is not to create more abstraction for its own sake. The point is to make it obvious what is safe to ship now, what needs more work, and how to keep that distinction visible.