Skip to content

Labeled-Issues-Based-Execution (LIBE)-Coding for GitHub Issues

License

Notifications You must be signed in to change notification settings

sven09/libe-coding

Repository files navigation

libe-coding

libe-coding

Labeled-Issues-Based-Execution (LIBE) for GitHub — Turn GitHub Issues into deterministic workflows for AI agents.

Status: Work in progress. Not ready for production use.

libe-coding maps GitHub Issue labels to scripts and agentic workflows. Instead of hoping an AI gets the task right, you give it a verified call to action so every run follows the same recipe. When a label matches, the right context is applied to the task.

“I thought GitHub Copilot could do this, but the power of Cursor and Claude’s agentic programming is way better.”

I know there are already tools like this out there, but I wanted to create a tool that uses a proven issues process for teams and can be used locally on my machine and in GitHub workflows.


Features

  • Label-triggered execution — Match issue labels to action folders; each action folder’s execute.sh runs when the label is applied. It can also use the context, and if an agentic workflow is used it will use your AGENTS.md / CLAUDE.md, tools, and skills as configured for your agent.

  • Deterministic workflows — Reusable prompts and scripts instead of ad-hoc instructions.

  • Flexible scheduling — Run once or on a cron interval (e.g. every 15 minutes).

  • Run in GitHub workflows — Use the libe-coding package in GitHub Actions workflows.


Prerequisites

  • Node.js (v22+)
  • GitHub token — Create a Personal Access Token with repo scope. Set it as GH_TOKEN in your environment or config.

Installation

git clone <this-repo>
cd libe-coding
npm install
npm run build

Run with npx

You can run libe-coding without installing it globally:

npx libe-coding start --once --repo owner/my-repo

Set GH_TOKEN in your environment (or use gh auth login) before running.


Quick start

  1. Set your token

    export GH_TOKEN=ghp_xxxx
  2. Run once (e.g. for repo owner/my-repo)

    npm start -- --once --repo owner/my-repo
  3. Run on a schedule (default: every 15 minutes)

    npm start -- --repo owner/my-repo

Configuration

Config can come from:

  • CLI options (see below)
  • Config file.libecodingrc, .libecodingrc.json, or libe-sample.json (via cosmiconfig)
  • Environment — e.g. GH_TOKEN

Hint: Copy libe-sample.json to .libecodingrc and set your repo and token (or rely on GH_TOKEN).

CLI options

Option Alias Default Description
--config-folder -c libe Base config folder; actions are under <config-folder>/labels/
--history-folder libe/history Folder for execution history
--repo -r GitHub repo (e.g. owner/name)
--interval -i */15 * * * * Cron expression (default: every 15 min)
--once false Run once and exit (ignores interval)
--verbose -v false Print more details (action paths, per-issue labels, match/no-match results)
--help -h Show help

Label matching

Labels are matched to directory names under <config-folder>/labels/. Matching is case-insensitive. The app appends labels to your config folder, so with default libe it uses libe/labels/.

Example: label libe-improveissue or libe-ImproveIssue runs the action in libe/labels/libe-ImproveIssue/.

Tip: Use a prefix like libe- to avoid clashing with other labels.

Folder structure

Put one folder per label under <config-folder>/labels/ (default: libe/labels/). Each action folder should contain:

  • execute.sh — Script that runs when the label is applied. Receives: $1 = path to CONTEXT.MD, $2 = matched label name.
  • CONTEXT.MD — Instructions and context for the action (and for the script).

Environment variables passed into execute.sh:

  • ISSUE_TITLE, ISSUE_BODY, ISSUE_NUMBER
  • REPO, REPO_OWNER, REPO_NAME
  • MATCHED_LABEL — Label that triggered this action (same as $2)

Example layout (default config folder libe → actions under libe/labels/):

my-repo/
├── libe/
│   ├── labels/
│   │   ├── libe-ImproveIssue/
│   │   │   ├── execute.sh
│   │   │   └── CONTEXT.MD
│   │   └── libe-CreateTest/
│   │       ├── execute.sh
│   │       └── CONTEXT.MD
│   └── history/
│       ├── 2026-02-01T12-30-00-123Z_42.md
│       └── 2026-02-01T13-15-00-456Z_43.md
├── libe-examples/
│   └── labels/
│       └── libe-test/
│           ├── execute.sh
│           └── CONTEXT.MD
├── package.json
└── .libecodingrc

Execution history

Every action execution is automatically logged to the history folder (default libe/history). Each history file is named {timestamp}_{issue_number}.md and contains:

  • Timestamp, issue number, title, and repo
  • Matched label and execution status (success/failure)
  • Issue body and link to the GitHub issue
  • Error details (if the execution failed)

History folders are listed in .gitignore so execution logs stay local.

This repo includes example actions under libe-examples/labels/. To use them, set the config folder to the base so the app uses libe-examples/labels/:

npm start -- --once --repo owner/my-repo -c libe-examples

For hints and your own actions, use the libe folder (not libe-examples). Hint: To get started, copy libe-examples to libe (e.g. cp -r libe-examples libe); then put your action folders under libe/labels/ and run with the default config. You can add libe (or a custom folder) to .gitignore if you want to keep prompts and scripts private.


Usage examples

Run once for a specific repo

npm start -- --once --repo my-org/my-repo

Verbose output (action paths, per-issue labels, match results)

npm start -- --once --repo my-org/my-repo -v

Custom config folder

npm start -- --once --repo my-org/my-repo -c libe-examples

Custom cron interval (e.g. every hour)

npm start -- --interval "0 * * * *" --repo my-org/my-repo

Config file

Copy libe-sample.json to .libecodingrc (or .libecodingrc.json), then set your repo and token:

{
  "repo": "owner/my-repo",
  "configFolder": "libe"
}

Actions go under libe/labels/ (e.g. libe/labels/libe-test/).

Then run:

npm start

Add a comment to an issue (comment-issue)

The comment can be markdown or plain text. Provide it via --body, --file, a positional argument, or stdin. Repo and issue: -r owner/repo, --issue <number> (or env REPO, ISSUE_NUMBER).

Use npm run libe -- when developing locally; use npx libe-coding once the package is published.


Why libe-coding?

The idea came from wanting to keep coding moving while away from the keyboard — for example on a long walk in the snow. AI agents are powerful but inconsistent: the same task can work once and fail the next time. libe-coding applies DRY to agent workflows: you define the recipe once (scripts + context), and the agent runs it every time a labeled issue is picked up. You manage work via GitHub Issues; the agent gets a clear, repeatable playbook.


License

MIT

Screenshots

libe-coding in action

libe-coding libe-coding

About

Labeled-Issues-Based-Execution (LIBE)-Coding for GitHub Issues

Resources

License

Stars

Watchers

Forks

Packages

No packages published