this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

initial commit

ansxor 5f29a9dc

+626
+80
README.md
··· 1 + # Chainlink for Pi 2 + 3 + Pi integration for [Chainlink](https://github.com/darienreese/chainlink) — a local issue tracker for AI coding sessions. 4 + 5 + This folder contains two components: 6 + 7 + | Component | Path | What it does | 8 + |-----------|------|--------------| 9 + | **Skill** | `chainlink/` | Teaches Pi how to use chainlink: commands, workflow, issue titles, sessions | 10 + | **Extension** | `chainlink-extension/` | Enforces chainlink usage: injects context, gates tool calls, detects stubs | 11 + 12 + You can use the skill alone (lightweight, instructions only) or add the extension for full behavioral parity with the Claude Code integration. 13 + 14 + --- 15 + 16 + ## Skill — `chainlink/` 17 + 18 + A [Pi skill](https://pi.dev/docs/skills) following the [Agent Skills standard](https://agentskills.io). Loaded on demand when you ask Pi about tasks, issues, or sessions. 19 + 20 + **Install (project-local):** 21 + ```bash 22 + cp -r chainlink .pi/skills/chainlink 23 + ``` 24 + 25 + **Install (global):** 26 + ```bash 27 + cp -r chainlink ~/.pi/agent/skills/chainlink 28 + ``` 29 + 30 + **Use:** 31 + ``` 32 + /skill:chainlink 33 + ``` 34 + Or just ask Pi about tasks — it will load the skill automatically when relevant. 35 + 36 + --- 37 + 38 + ## Extension — `chainlink-extension/` 39 + 40 + A [Pi extension](https://pi.dev/docs/extensions) (TypeScript) that ports the four Claude Code hooks: 41 + 42 + | Claude Code hook | Pi event | Behaviour | 43 + |-----------------|----------|-----------| 44 + | `session-start.py` | `session_start` | Injects previous handoff notes and open issues at startup | 45 + | `prompt-guard.py` | `before_agent_start` | Injects code quality rules and project tree into every agent run | 46 + | `work-check.py` | `tool_call` | Blocks write/edit/bash when no chainlink issue is active | 47 + | `post-edit-check.py` | `tool_execution_end` | Warns when stub patterns are detected after file edits | 48 + 49 + **Install:** 50 + 51 + ```bash 52 + cd chainlink-extension 53 + npm install 54 + cd .. 55 + 56 + # Project-local 57 + cp -r chainlink-extension .pi/extensions/chainlink-extension 58 + 59 + # Or global 60 + cp -r chainlink-extension ~/.pi/agent/extensions/chainlink-extension 61 + ``` 62 + 63 + The extension reads rules from `.chainlink/rules/` (same directory structure used by Claude Code), so any rules you've already written work without changes. 64 + 65 + --- 66 + 67 + ## Requirements 68 + 69 + - [Pi](https://pi.dev) installed 70 + - [Chainlink CLI](https://github.com/darienreese/chainlink) installed (`chainlink` on PATH) 71 + - A project initialised with `chainlink init` (creates `.chainlink/`) 72 + - Node.js 18+ (for the extension only) 73 + 74 + --- 75 + 76 + ## How it works 77 + 78 + Chainlink stores issues in `.chainlink/issues.db` (SQLite). Both the skill and extension shell out to the `chainlink` CLI — no API keys or network access required. 79 + 80 + The extension's `before_agent_start` handler reads language-specific rules from `.chainlink/rules/*.md` (e.g. `rust.md`, `typescript.md`) and appends them to Pi's system prompt, exactly as `prompt-guard.py` does for Claude Code. You can add project-specific rules to `.chainlink/rules/project.md`.
+136
chainlink/SKILL.md
··· 1 + --- 2 + name: chainlink 3 + description: Issue tracking for AI coding sessions using chainlink. Use when starting work on a project, creating tasks, tracking progress, managing issues, or when the project has a .chainlink directory. Handles session management, issue lifecycle, subissues, dependencies, and handoff notes between sessions. 4 + compatibility: Requires chainlink CLI installed. Install via: cargo install chainlink-tracker, or download a release binary from the project repository. 5 + metadata: 6 + author: darienreese 7 + version: "1.0" 8 + --- 9 + 10 + # Chainlink Issue Tracker 11 + 12 + Chainlink is a local SQLite-backed issue tracker built for AI coding sessions. Data lives in `.chainlink/issues.db`. 13 + 14 + ## Mandatory Workflow 15 + 16 + **YOU MUST CREATE A CHAINLINK ISSUE BEFORE WRITING ANY CODE. NO EXCEPTIONS.** 17 + 18 + 1. Run `chainlink session start` at the start of a session (usually auto-started by the SessionStart hook) 19 + 2. Create an issue BEFORE your first file edit or bash command: `chainlink quick "title" -p <priority> -l <label>` 20 + 3. Mark focus: `chainlink session work <id>` 21 + 4. Work, add comments as you discover things 22 + 5. End with: `chainlink session end --notes "what was done, what's next"` 23 + 24 + ## Commands 25 + 26 + ```bash 27 + # Create and start working in one step (preferred) 28 + chainlink quick "Fix login validation error" -p medium -l bug 29 + 30 + # Issues 31 + chainlink create "title" [-p high] [-d "desc"] [--label bug] [--work] 32 + chainlink list [-s all|open|closed] [-l label] [-p priority] 33 + chainlink show <id> 34 + chainlink update <id> [-t "new title"] [-d "new desc"] [-p high] 35 + chainlink close <id> # closes and adds to CHANGELOG.md 36 + chainlink close <id> --no-changelog 37 + chainlink reopen <id> 38 + chainlink delete <id> 39 + 40 + # Hierarchy 41 + chainlink subissue <parent-id> "subtask title" 42 + 43 + # Organization 44 + chainlink comment <id> "text" [--kind plan|decision|observation|result] 45 + chainlink label <id> <label> 46 + chainlink unlabel <id> <label> 47 + chainlink block <id> <blocking-id> # id is blocked by blocking-id 48 + chainlink unblock <id> <blocking-id> 49 + chainlink blocked # show blocked issues 50 + chainlink ready # show unblocked issues 51 + 52 + # Sessions 53 + chainlink session start 54 + chainlink session status 55 + chainlink session work <id> 56 + chainlink session action "brief description" # breadcrumb before context compression 57 + chainlink session end --notes "handoff notes" 58 + chainlink session last-handoff 59 + ``` 60 + 61 + ## Issue Titles (Changelog-Ready) 62 + 63 + Titles are auto-added to CHANGELOG.md when closed. Write them as: 64 + - Start with a verb: "Add", "Fix", "Update", "Remove", "Improve" 65 + - Describe the user-visible change, not implementation details 66 + - Example: "Fix authentication timeout on slow connections" 67 + - Bad: "auth.ts changes", "Fix bug", "WIP" 68 + 69 + ## Labels → Changelog Sections 70 + 71 + | Label | CHANGELOG section | 72 + |-------|-------------------| 73 + | `bug`, `fix` | Fixed | 74 + | `feature`, `enhancement` | Added | 75 + | `breaking`, `breaking-change` | Changed | 76 + | `security` | Security | 77 + | `deprecated` | Deprecated | 78 + | `removed` | Removed | 79 + | (none) | Changed | 80 + 81 + ## Priority Guide 82 + 83 + - `critical` — blocking other work, security issue, production down 84 + - `high` — user-requested, core functionality 85 + - `medium` — standard features, improvements 86 + - `low` — nice-to-have, cleanup 87 + 88 + ## Session Management 89 + 90 + Sessions track what you're working on across context resets. **Always end sessions properly.** 91 + 92 + End a session when: 93 + - The conversation is getting long (30–40 messages) 94 + - The user says goodbye or indicates stopping 95 + - You've completed a significant piece of work 96 + 97 + Handoff notes must include: what was accomplished, what's in progress or blocked, and what to do next. 98 + 99 + ```bash 100 + chainlink session end --notes "Implemented retry queue (#3). Dead-letter table still needed (#4). Start with chainlink show 4." 101 + ``` 102 + 103 + ## Multi-Step Work 104 + 105 + For features spanning multiple files or sessions: 106 + 107 + ```bash 108 + # Create epic + subissues 109 + chainlink create "Add user authentication system" -p high -l feature 110 + chainlink subissue 1 "Add registration endpoint" 111 + chainlink subissue 1 "Add login endpoint with JWT" 112 + chainlink subissue 1 "Add session middleware" 113 + 114 + # Work one subissue at a time 115 + chainlink session work 2 116 + # ... implement ... 117 + chainlink close 2 118 + chainlink session work 3 119 + ``` 120 + 121 + ## Dependencies 122 + 123 + ```bash 124 + chainlink block 3 2 # Issue 3 is blocked by issue 2 125 + chainlink ready # Show what can be worked on now 126 + ``` 127 + 128 + ## Comments as Working Notes 129 + 130 + Add typed comments as you discover things — these survive context compression and help future sessions: 131 + 132 + ```bash 133 + chainlink comment 1 "Found existing auth helper in utils/auth.ts — reuse it" --kind observation 134 + chainlink comment 1 "Decided to use JWT over sessions: stateless, fits the API design" --kind decision 135 + chainlink comment 1 "Next: wire up middleware to /api/protected routes" --kind plan 136 + ```