@immediately-run/dibber 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -1
- package/SPEC.md +11 -5
- package/package.json +4 -3
- package/skills/dibber-overview/SKILL.md +1 -1
- package/src/cli.mjs +11 -5
- package/src/init.mjs +43 -3
- package/src/tickets.mjs +6 -2
- package/templates/immediately-run/_layout.mdx +14 -0
- package/templates/immediately-run/home.mdx +22 -0
- package/templates/immediately-run/immediately.run.json +4 -0
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Dibber
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Git as your issue tracker. An open format built on Markdown.**
|
|
4
|
+
|
|
5
|
+
Dibber is a format for keeping a project's tickets in its own
|
|
4
6
|
repository: one Markdown file per ticket, YAML frontmatter for its fields, the body for the
|
|
5
7
|
record of the work, and a status that says when it's closed. No server, no database, no tool
|
|
6
8
|
required — a ticket is a file you can read, diff, review and merge like any other.
|
|
@@ -12,6 +14,13 @@ call dibs on a piece of work — though making the dibs stick, one holder at a t
|
|
|
12
14
|
coordinator such as [Baton](https://github.com/immediately-run/baton): a file in git can say who
|
|
13
15
|
is on it, but cannot stop two people writing their names at once.
|
|
14
16
|
|
|
17
|
+
## Status
|
|
18
|
+
|
|
19
|
+
Dibber is in active development, and its work is tracked in Dibber itself. The
|
|
20
|
+
[board](https://immediately.run/present/github/immediately-run/dibber/main/bundle/tickets/)
|
|
21
|
+
shows every ticket by status — what is ready, in progress and in review, and what is done —
|
|
22
|
+
read straight from [`tickets/`](tickets/).
|
|
23
|
+
|
|
15
24
|
## A ticket
|
|
16
25
|
|
|
17
26
|
`tickets/B-7.md`:
|
package/SPEC.md
CHANGED
|
@@ -89,7 +89,7 @@ ticket file.
|
|
|
89
89
|
| `title` | text | its title, conventionally `<id> — <what>` |
|
|
90
90
|
| `status` | a status ([R-DIB-6](#3-frontmatter)) | live, done or withdrawn |
|
|
91
91
|
| `description` | text | one paragraph, what and why, for a list or a search |
|
|
92
|
-
| `depends_on` | a list of ids, local or qualified | tickets this one waits for: it is ready only once each is done ([R-DIB-8](#4-relations)) |
|
|
92
|
+
| `depends_on` | a list of ids, local or qualified | tickets this one waits for: it is ready only once each is done or superseded ([R-DIB-8](#4-relations)) |
|
|
93
93
|
| `parent` | a local id | the ticket this one is a child of ([R-DIB-8](#4-relations)) |
|
|
94
94
|
| `order` | a number | rank among ready tickets, lower first |
|
|
95
95
|
| `tags` | a list of words | free labels ([R-DIB-9](#5-tags-and-projects)) |
|
|
@@ -125,7 +125,11 @@ ticket file.
|
|
|
125
125
|
file written — a ticket's list of children, a reverse dependency — is derived by reading, never
|
|
126
126
|
stored, except as the body's courtesy line `**Used by:**` ([R-DIB-11](#6-the-body)).
|
|
127
127
|
- **R-DIB-8 (dependencies and children).** `depends_on` is the ticket's whole list of waits on
|
|
128
|
-
other tickets: a dependency written only in prose is one no reader can see. A
|
|
128
|
+
other tickets: a dependency written only in prose is one no reader can see. A ticket is ready
|
|
129
|
+
when it is `available` and every ticket it depends on is `done` or `superseded`: a superseded
|
|
130
|
+
ticket's work goes on in the ticket that replaced it, so it no longer holds anyone. A
|
|
131
|
+
`withdrawn` or `deferred` dependency still holds the ticket, since nothing did that work; drop
|
|
132
|
+
it from `depends_on`, or depend on what replaced it. A dependency on
|
|
129
133
|
another repository's ticket is a qualified id; `parent` is always local. A ticket is a child of
|
|
130
134
|
the ticket its `parent` names: filing children is how a large ticket is split. Dependencies form
|
|
131
135
|
no cycle.
|
|
@@ -194,9 +198,11 @@ store moves to it.
|
|
|
194
198
|
Amended in place since Dibber 1 was first published: `.dibber/config.json`
|
|
195
199
|
([R-DIB-14](#1-the-store)), the optional `assignee` key, `.md` as the default file name, and the
|
|
196
200
|
one-writer allocation rule ([R-DIB-4](#2-ids)), and closing in place
|
|
197
|
-
([R-DIB-2](#1-the-store)), which replaced moving a closed ticket to `archive
|
|
198
|
-
|
|
199
|
-
|
|
201
|
+
([R-DIB-2](#1-the-store)), which replaced moving a closed ticket to `archive/`, and a
|
|
202
|
+
`superseded` dependency counting as done for readiness ([R-DIB-8](#4-relations)). Every store
|
|
203
|
+
valid before stays valid; a reader that took closure from the `archive/` path reads `status`
|
|
204
|
+
instead, as R-DIB-6 always said it should, and a reader that counts only `done` holds a ticket
|
|
205
|
+
on a superseded dependency longer than it need, never starting work too early.
|
|
200
206
|
|
|
201
207
|
## Readers
|
|
202
208
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@immediately-run/dibber",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Git as your issue tracker, in an open format built on Markdown: the Dibber format's validator and command-line tool, plus agent skills.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"repository": {
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
"test": "node --test",
|
|
33
33
|
"check": "node bin/dibber.mjs check",
|
|
34
34
|
"check:release": "node scripts/check-release.mjs",
|
|
35
|
-
"version": "node scripts/check-release.mjs --sync && git add .claude-plugin"
|
|
35
|
+
"version": "node scripts/check-release.mjs --sync && git add .claude-plugin",
|
|
36
|
+
"site": "node scripts/build-site.mjs"
|
|
36
37
|
},
|
|
37
38
|
"dependencies": {
|
|
38
39
|
"ajv": "^8.17.1",
|
|
@@ -37,4 +37,4 @@ Read the frontmatter of every `*.md` and `*.mdx` file under `tickets/`. A file i
|
|
|
37
37
|
has an `id` and no `kind` other than `ticket`. Whether it is open or closed is its `status`, one
|
|
38
38
|
of available, in-progress, in-review, deprioritized (live) or done, withdrawn,
|
|
39
39
|
superseded, deferred (closed). A ticket is ready when it is `available` and every id in its
|
|
40
|
-
`depends_on` is done.
|
|
40
|
+
`depends_on` is done or superseded.
|
package/src/cli.mjs
CHANGED
|
@@ -8,14 +8,17 @@ import { checkStore } from './check.mjs';
|
|
|
8
8
|
import { Refusal, newTicket, setStatus, claim, listTickets, STATUSES } from './tickets.mjs';
|
|
9
9
|
import { init, defaultPrefix } from './init.mjs';
|
|
10
10
|
|
|
11
|
-
const HELP = `dibber —
|
|
11
|
+
const HELP = `dibber — Git as your issue tracker: an open format built on Markdown (https://github.com/immediately-run/dibber)
|
|
12
12
|
|
|
13
13
|
Usage: dibber <command> [options] (every command takes --json and --root <dir>)
|
|
14
14
|
|
|
15
15
|
init [--prefix P] [--store DIR] [--yes] [--no-agents] [--update-skills] [--link-skills]
|
|
16
|
-
|
|
17
|
-
a first ticket, AGENTS.md
|
|
18
|
-
|
|
16
|
+
[--no-immediately-run] set this repository up: .dibber/config.json, the store,
|
|
17
|
+
a first ticket, AGENTS.md, the agent skills, and the files
|
|
18
|
+
that open the store as a board on immediately.run;
|
|
19
|
+
--link-skills links .claude/skills/ to .agents/skills/
|
|
20
|
+
instead of copying; --no-immediately-run leaves the board
|
|
21
|
+
files out
|
|
19
22
|
check [--strict] check the store against the Dibber spec; --strict fails
|
|
20
23
|
on warnings too
|
|
21
24
|
list [--ready] [--status S] [--all]
|
|
@@ -151,7 +154,7 @@ export async function run(argv, { cwd = process.cwd(), interactive = true } = {}
|
|
|
151
154
|
} else if (cmd === 'init') {
|
|
152
155
|
let prefix = flags.prefix;
|
|
153
156
|
if (!prefix && !flags.yes && interactive) prefix = (await ask('Ticket id prefix (e.g. APP for APP-1)?', defaultPrefix(root))).toUpperCase();
|
|
154
|
-
const r = init(root, { prefix, store: flags.store, agents: !flags['no-agents'], updateSkills: flags['update-skills'], linkSkills: flags['link-skills'] });
|
|
157
|
+
const r = init(root, { prefix, store: flags.store, agents: !flags['no-agents'], updateSkills: flags['update-skills'], linkSkills: flags['link-skills'], immediatelyRun: !flags['no-immediately-run'] });
|
|
155
158
|
if (flags.json) json(r);
|
|
156
159
|
else {
|
|
157
160
|
for (const f of r.created) stdout.push(` created ${f}`);
|
|
@@ -159,6 +162,9 @@ export async function run(argv, { cwd = process.cwd(), interactive = true } = {}
|
|
|
159
162
|
for (const f of r.repaired) stdout.push(` repaired ${f} (it was broken; written again)`);
|
|
160
163
|
for (const f of r.skipped) stdout.push(` kept ${f} (already there)`);
|
|
161
164
|
stdout.push(`\nDibber is set up: tickets in ${r.store}/, ids ${r.prefix}-1, ${r.prefix}-2, …\nNext: ask your agent "what's on the board?", or run: dibber list`);
|
|
165
|
+
if (r.created.includes(`${r.store}/immediately.run.json`)) {
|
|
166
|
+
stdout.push(`Once pushed to a public GitHub repository, the board opens at https://immediately.run/present/github/${r.repo ?? '<owner>/<repo>'}/main/bundle/${r.store}/home.mdx`);
|
|
167
|
+
}
|
|
162
168
|
}
|
|
163
169
|
} else {
|
|
164
170
|
throw new Refusal(`unknown command \`${cmd}\`; dibber --help lists them`);
|
package/src/init.mjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// a first ticket, and the agent instructions and skills every supported harness
|
|
3
3
|
// discovers. It never overwrites a file; it says what it skipped.
|
|
4
4
|
|
|
5
|
+
import { execFileSync } from 'node:child_process';
|
|
5
6
|
import { existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync, appendFileSync, statSync, symlinkSync } from 'node:fs';
|
|
6
7
|
import { basename, dirname, join, relative } from 'node:path';
|
|
7
8
|
import { fileURLToPath } from 'node:url';
|
|
@@ -12,6 +13,12 @@ const HERE = dirname(fileURLToPath(import.meta.url));
|
|
|
12
13
|
export const PACKAGE_ROOT = join(HERE, '..');
|
|
13
14
|
export const SKILLS_DIR = join(PACKAGE_ROOT, 'skills');
|
|
14
15
|
const TEMPLATES = join(PACKAGE_ROOT, 'templates');
|
|
16
|
+
/** The files that open the store as a board on immediately.run, written into the store by
|
|
17
|
+
* default, unless `--no-immediately-run` ([DIB-13](../tickets/DIB-13.md),
|
|
18
|
+
* [DIB-32](../tickets/DIB-32.md)): the descriptor naming the board
|
|
19
|
+
* viewer, a home page holding the board, and the page shell that heads each ticket. */
|
|
20
|
+
const IMMEDIATELY_RUN = join(TEMPLATES, 'immediately-run');
|
|
21
|
+
export const IMMEDIATELY_RUN_FILES = ['immediately.run.json', 'home.mdx', '_layout.mdx'];
|
|
15
22
|
|
|
16
23
|
/**
|
|
17
24
|
* Where each agent harness discovers a repository's skills: `.agents/skills/` is read by
|
|
@@ -47,6 +54,22 @@ function clearBroken(path, report) {
|
|
|
47
54
|
|
|
48
55
|
export const AGENTS_MARKER = '<!-- dibber:agents -->';
|
|
49
56
|
|
|
57
|
+
/**
|
|
58
|
+
* The GitHub `owner/repo` that `root`'s `origin` remote points at, or `null` when there is no
|
|
59
|
+
* such remote or it is not on github.com. It names the repository on the board's home page and
|
|
60
|
+
* in the board's link, so a reader landing on the board knows whose tickets these are.
|
|
61
|
+
*/
|
|
62
|
+
export function githubRepo(root) {
|
|
63
|
+
let url;
|
|
64
|
+
try {
|
|
65
|
+
url = execFileSync('git', ['remote', 'get-url', 'origin'], { cwd: root, encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }).trim();
|
|
66
|
+
} catch {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
const m = /^(?:https?:\/\/(?:[^@/]+@)?github\.com\/|(?:ssh:\/\/)?git@github\.com[:/])([A-Za-z0-9-]+)\/([A-Za-z0-9._-]+?)(?:\.git)?\/?$/.exec(url);
|
|
70
|
+
return m ? `${m[1]}/${m[2]}` : null;
|
|
71
|
+
}
|
|
72
|
+
|
|
50
73
|
/** A prefix from the repository's folder name: initials of its words, else its first letters. */
|
|
51
74
|
export function defaultPrefix(root) {
|
|
52
75
|
const words = basename(root).toUpperCase().split(/[^A-Z0-9]+/).filter(Boolean);
|
|
@@ -104,9 +127,11 @@ function writeOnce(path, content, report, overwrite = false) {
|
|
|
104
127
|
/**
|
|
105
128
|
* Set up `root`. Options: `prefix`, `store` (default `tickets`), `agents` (default true),
|
|
106
129
|
* `updateSkills` (overwrite the installed skills with this version's), `linkSkills` (link
|
|
107
|
-
* `.claude/skills/<name>` to `.agents/skills/<name>` instead of copying)
|
|
130
|
+
* `.claude/skills/<name>` to `.agents/skills/<name>` instead of copying), `immediatelyRun`
|
|
131
|
+
* (default true: add the files that open the store as a board on immediately.run).
|
|
108
132
|
* A broken skill install (see `skillInstallProblem`) is always repaired.
|
|
109
|
-
* Returns `{ created, updated, skipped, repaired }` as paths relative to `root
|
|
133
|
+
* Returns `{ created, updated, skipped, repaired }` as paths relative to `root`, with `prefix`,
|
|
134
|
+
* `store`, and `repo` (the GitHub `owner/repo` of the `origin` remote, or `null`).
|
|
110
135
|
*/
|
|
111
136
|
export function init(root, opts = {}) {
|
|
112
137
|
const report = { created: [], updated: [], skipped: [], repaired: [] };
|
|
@@ -132,6 +157,21 @@ export function init(root, opts = {}) {
|
|
|
132
157
|
writeOnce(join(store, `${id}.md`), sample, report);
|
|
133
158
|
}
|
|
134
159
|
|
|
160
|
+
const repo = githubRepo(root);
|
|
161
|
+
if (opts.immediatelyRun !== false) {
|
|
162
|
+
// The home page's welcome line names the repository and links the board's edit mode on
|
|
163
|
+
// immediately.run; with no GitHub remote there is no repository to name or link.
|
|
164
|
+
const repoText = repo ? `the [${repo}](https://github.com/${repo}) repository` : 'this repository';
|
|
165
|
+
const editText = repo ? `[here on immediately.run](https://immediately.run/edit/github/${repo}/main/bundle/${config.store}/)` : 'on immediately.run';
|
|
166
|
+
for (const name of IMMEDIATELY_RUN_FILES) {
|
|
167
|
+
const text = readFileSync(join(IMMEDIATELY_RUN, name), 'utf8')
|
|
168
|
+
.replaceAll('{{REPO}}', repoText)
|
|
169
|
+
.replaceAll('{{EDIT}}', editText)
|
|
170
|
+
.replaceAll('{{STORE}}', config.store);
|
|
171
|
+
writeOnce(join(store, name), text, report);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
135
175
|
if (opts.agents !== false) {
|
|
136
176
|
for (const name of skillNames()) {
|
|
137
177
|
const agentsDir = join(root, SKILL_HOME, name);
|
|
@@ -164,5 +204,5 @@ export function init(root, opts = {}) {
|
|
|
164
204
|
}
|
|
165
205
|
|
|
166
206
|
const relp = (p) => p.slice(root.length + 1).split('\\').join('/');
|
|
167
|
-
return { created: report.created.map(relp), updated: report.updated.map(relp), skipped: report.skipped.map(relp), repaired: report.repaired.map(relp), prefix: config.prefix, store: config.store };
|
|
207
|
+
return { created: report.created.map(relp), updated: report.updated.map(relp), skipped: report.skipped.map(relp), repaired: report.repaired.map(relp), prefix: config.prefix, store: config.store, repo };
|
|
168
208
|
}
|
package/src/tickets.mjs
CHANGED
|
@@ -123,7 +123,11 @@ export function findTicket(store, id) {
|
|
|
123
123
|
return t;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
/**
|
|
126
|
+
/** What satisfies a dependency (R-DIB-8): done, or superseded, whose work goes on in the
|
|
127
|
+
* ticket that replaced it ([DIB-20](../tickets/DIB-20.md)). */
|
|
128
|
+
export const SATISFIES_DEPENDENCY = ['done', 'superseded'];
|
|
129
|
+
|
|
130
|
+
/** Ready: live, available, and every local dependency done or superseded (R-DIB-8). */
|
|
127
131
|
export function readiness(store, t) {
|
|
128
132
|
const waits = [];
|
|
129
133
|
for (const d of asList(t.meta.depends_on)) {
|
|
@@ -133,7 +137,7 @@ export function readiness(store, t) {
|
|
|
133
137
|
}
|
|
134
138
|
const dep = store.tickets.find((x) => x.meta.id === d);
|
|
135
139
|
if (!dep) waits.push({ id: d, why: 'not found' });
|
|
136
|
-
else if (dep.meta.status
|
|
140
|
+
else if (!SATISFIES_DEPENDENCY.includes(dep.meta.status)) waits.push({ id: d, why: dep.meta.status });
|
|
137
141
|
}
|
|
138
142
|
return { ready: t.meta.status === 'available' && waits.length === 0, waits };
|
|
139
143
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
layoutRole: root
|
|
3
|
+
description: "The board's page shell: the wiki's nav, sidebar and footer, with each ticket's header line above it and its relations below, and a project's tickets below a project page. Each component shows only on its own kind of page, so the board and other pages pass through untouched."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<GroveNav />
|
|
7
|
+
<GroveSidebar />
|
|
8
|
+
<main className="grove-content">
|
|
9
|
+
<RoadmapMeta />
|
|
10
|
+
<Outlet />
|
|
11
|
+
<Dependencies />
|
|
12
|
+
<ProjectMembers />
|
|
13
|
+
</main>
|
|
14
|
+
<GroveFooter />
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Tickets
|
|
3
|
+
description: Every open ticket, by status, with the next one to start. A query over this folder, never a hand-kept list.
|
|
4
|
+
nav: Board
|
|
5
|
+
order: 0
|
|
6
|
+
render: safe
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Welcome. This is a [Dibber](https://github.com/immediately-run/dibber) board for {{REPO}}.
|
|
10
|
+
Tickets are updated by your agent, but you can also edit them {{EDIT}} or in your favorite
|
|
11
|
+
editor: tickets are just files in your git repository, one Markdown file per ticket in
|
|
12
|
+
`{{STORE}}/`. This page is a query over that folder, so a new ticket shows up here with no edit.
|
|
13
|
+
|
|
14
|
+
## Next to start
|
|
15
|
+
|
|
16
|
+
The ready ticket with the lowest `order`: `available`, and everything it depends on done.
|
|
17
|
+
|
|
18
|
+
<NextAvailable />
|
|
19
|
+
|
|
20
|
+
## The board
|
|
21
|
+
|
|
22
|
+
<RoadmapBoard />
|