Skip to content

Commit 5f22c8a

Browse files
CopilotDiTo97claude
authored
Align git-tasks with knowledge-backed planning workflows (#14)
* Initial plan * Tighten git-tasks planning workflow Agent-Logs-Url: https://github.com/Atena-IT/git-tasks/sessions/a01c1929-9198-400a-8e66-bf98867ac651 Co-authored-by: DiTo97 <40361744+DiTo97@users.noreply.github.com> * Replace wiki init with repo init Agent-Logs-Url: https://github.com/Atena-IT/git-tasks/sessions/95059cca-d6d4-4192-b9e9-fe4f040ab859 Co-authored-by: DiTo97 <40361744+DiTo97@users.noreply.github.com> * Handle git worktrees in init Agent-Logs-Url: https://github.com/Atena-IT/git-tasks/sessions/95059cca-d6d4-4192-b9e9-fe4f040ab859 Co-authored-by: DiTo97 <40361744+DiTo97@users.noreply.github.com> * Align git-tasks with knowledge-backed planning workflows Switch the shipped workflow to the inbox/knowledge model, link backlog items to knowledge docs, tighten reviewer handoff and PR context sync, and keep skill eval artifacts out of published installs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Address review thread follow-ups Agent-Logs-Url: https://github.com/Atena-IT/git-tasks/sessions/3d02f50d-1b4f-44ff-b1c7-c3d948d526d8 Co-authored-by: DiTo97 <40361744+DiTo97@users.noreply.github.com> * Address second review thread Agent-Logs-Url: https://github.com/Atena-IT/git-tasks/sessions/06259a5c-12d1-461b-999b-99a46f09f14a Co-authored-by: DiTo97 <40361744+DiTo97@users.noreply.github.com> * Address validation follow-ups Agent-Logs-Url: https://github.com/Atena-IT/git-tasks/sessions/06259a5c-12d1-461b-999b-99a46f09f14a Co-authored-by: DiTo97 <40361744+DiTo97@users.noreply.github.com> * Refine validation cleanup Agent-Logs-Url: https://github.com/Atena-IT/git-tasks/sessions/06259a5c-12d1-461b-999b-99a46f09f14a Co-authored-by: DiTo97 <40361744+DiTo97@users.noreply.github.com> * Tighten managed PR matcher Agent-Logs-Url: https://github.com/Atena-IT/git-tasks/sessions/06259a5c-12d1-461b-999b-99a46f09f14a Co-authored-by: DiTo97 <40361744+DiTo97@users.noreply.github.com> * Polish review feedback Agent-Logs-Url: https://github.com/Atena-IT/git-tasks/sessions/06259a5c-12d1-461b-999b-99a46f09f14a Co-authored-by: DiTo97 <40361744+DiTo97@users.noreply.github.com> * Resolve final review nits Agent-Logs-Url: https://github.com/Atena-IT/git-tasks/sessions/06259a5c-12d1-461b-999b-99a46f09f14a Co-authored-by: DiTo97 <40361744+DiTo97@users.noreply.github.com> * Handle final review thread Agent-Logs-Url: https://github.com/Atena-IT/git-tasks/sessions/ea17ee26-74fa-4436-906f-0c1512463c0b Co-authored-by: DiTo97 <40361744+DiTo97@users.noreply.github.com> * Fix wiki repo-root resolution Agent-Logs-Url: https://github.com/Atena-IT/git-tasks/sessions/cf8602dd-ecc7-4017-b6ca-71d9aee47d82 Co-authored-by: DiTo97 <40361744+DiTo97@users.noreply.github.com> * Clarify nested wiki test setup Agent-Logs-Url: https://github.com/Atena-IT/git-tasks/sessions/cf8602dd-ecc7-4017-b6ca-71d9aee47d82 Co-authored-by: DiTo97 <40361744+DiTo97@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: DiTo97 <40361744+DiTo97@users.noreply.github.com> Co-authored-by: DiTo97 <fede97.minutoli@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3992f62 commit 5f22c8a

25 files changed

Lines changed: 2029 additions & 157 deletions

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules/
22
*.log
33
.DS_Store
4+
test/evals/git-tasks-workspace/

README.md

Lines changed: 55 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,23 +79,23 @@ Labels created automatically: `epic`, `sprint`, `user-story`
7979

8080
### Epics
8181
```bash
82-
git-tasks epic create "Title" [-d <desc>] [-p <points>] [--start <date>] [--end <date>] [-a <user>]
82+
git-tasks epic create "Title" -d <desc> -p <points> --start <date> --end <date> [-k <wiki/knowledge/file.md>] [-a <user>]
8383
git-tasks epic list [--state open|closed|all] [--short]
8484
git-tasks epic show <number> [--comments]
8585
git-tasks epic update <number> [--title <text>] [--points <n>] [--status open|closed]
8686
```
8787

8888
### Sprints
8989
```bash
90-
git-tasks sprint create "Title" [-e <epic>] [-d <desc>] [-p <points>] [--start <date>] [--end <date>]
90+
git-tasks sprint create "Title" -e <epic> -d <desc> -p <points> --start <date> --end <date> [-k <wiki/knowledge/file.md>] [-a <user>]
9191
git-tasks sprint list [--epic <n>] [--state open|closed|all] [--short]
9292
git-tasks sprint show <number> [--comments]
9393
git-tasks sprint update <number> [--title <text>] [--status open|closed]
9494
```
9595

9696
### User Stories
9797
```bash
98-
git-tasks story create "Title" [-s <sprint>] [-e <epic>] [-p <points>] [--priority low|medium|high]
98+
git-tasks story create "Title" -s <sprint> -e <epic> -d <desc> -p <points> --priority low|medium|high [-k <wiki/knowledge/file.md>] [-a <user>]
9999
git-tasks story list [--sprint <n>] [--epic <n>] [--assignee <user>] [--state open|closed|all] [--short]
100100
git-tasks story show <number> [--comments]
101101
git-tasks story update <number> [--status open|in-progress|ready-for-review|closed] [--reviewer <user>]
@@ -109,27 +109,75 @@ git-tasks overview [--depth 1|2|3] [--state open|closed|all]
109109

110110
### Wiki
111111
```bash
112-
git-tasks wiki init
112+
git-tasks init
113113
git-tasks wiki list
114-
git-tasks wiki show <file>
114+
git-tasks wiki show inbox/<file>
115+
git-tasks wiki show knowledge/index
115116
```
116117

117118
## Agent-friendly usage
118119

119120
```bash
121+
git-tasks init --owner octocat --reviewer octocat
120122
git-tasks overview --depth 2
121123
git-tasks epic list --short
122124
git-tasks story list --short --sprint 5
123-
git-tasks story update 42 --status in-progress
125+
git-tasks story update 42 --status in-progress --knowledge wiki/knowledge/auth-plan.md
124126
git-tasks story update 42 --status ready-for-review --reviewer octocat
125127
```
126128

129+
## AI-native planning granularity
130+
131+
- **Stories** are agent-sized atomic slices: independently executable work that should usually take from a few hours up to one day.
132+
- **Sprints** are short execution windows and should usually stay within three days.
133+
- **Epics** are the largest planning bucket and should usually stay within two weeks.
134+
- `.git-tasks/config.json` can override these defaults with repo-specific `planningHorizons` for agents to read.
135+
- Always keep dependencies explicit: stories belong to a sprint and epic, sprints belong to an epic, and each item should carry enough metadata to be auditable without extra chat context.
136+
137+
## Wiki-first knowledge workflow
138+
139+
- Initialize the repository once with `git-tasks init`.
140+
- Put inbound human or system inputs in `wiki/inbox/` exactly as they arrive: meeting notes, pasted chats, TODO dumps, transcripts, uploads, or scratch notes.
141+
- Read `wiki/knowledge/index.md` before opening individual knowledge files so you reuse existing context instead of creating duplicate nodes.
142+
- Keep `wiki/knowledge/` flat. The semantic kind belongs in frontmatter `type`, not in subdirectories.
143+
- Use dash-case frontmatter keys for knowledge nodes. A practical minimum is `id`, `type`, `title`, `timestamp`, `status`, `tags`, `sources`, `issue-refs`, `neighbours`, and `supersedes`.
144+
- Knowledge node bodies should capture the context/source, interpretation, planning changes, rationale, and consequences.
145+
- Update or create knowledge nodes only when durable understanding changes. Then update epics, sprints, and stories from that compiled knowledge when the plan actually changed.
146+
- When backlog items are tied to specific knowledge docs, store repo-relative `wiki/knowledge/...` paths in issue `Knowledge Links` metadata.
147+
- Legacy `wiki/raw/` and `wiki/processed/` content may still be read for historical context, but new writes should target `wiki/inbox/` and `wiki/knowledge/`.
148+
149+
## Configuration
150+
151+
Run `git-tasks init --owner <user> --reviewer <user>` to create `.git-tasks/config.json` at the repository root. Commit this file so human teammates and AI agents share the same defaults.
152+
153+
```json
154+
{
155+
"owner": "octocat",
156+
"defaultReviewers": ["octocat"],
157+
"planningHorizons": {
158+
"storyMaxDays": 1,
159+
"sprintMaxDays": 3,
160+
"epicMaxWeeks": 2
161+
}
162+
}
163+
```
164+
165+
- `defaultReviewers` is the repo-level fallback when `--reviewer` is not passed and `GIT_TASKS_REVIEWERS` is not set.
166+
- `owner` is the last reviewer fallback when `defaultReviewers` is empty.
167+
- `planningHorizons` is for AI guidance, not CLI enforcement. It lets each repo tighten or relax the default story/sprint/epic sizing without editing the shipped skill text.
168+
127169
## Task lifecycle automation
128170

171+
- New material in `wiki/inbox/` by itself does **not** create or update issues, branches, or pull requests.
172+
- New or updated knowledge in `wiki/knowledge/` may lead to epic, sprint, or story create/update operations when the planning delta is real.
129173
- `story update --status in-progress` keeps the story open, updates its workflow status, and ensures a draft PR exists for the current branch.
130-
- `story update --status ready-for-review` promotes the linked draft PR to ready for review and can request reviewers via `--reviewer` or `GIT_TASKS_REVIEWERS=user1,user2`.
174+
- Agents should pick up stories in an isolated worktree with a named branch and attached draft PR so execution stays reviewable and self-contained.
175+
- Routine execution should not create new knowledge nodes unless durable understanding or planning changed.
176+
- `story update --status ready-for-review` promotes the linked draft PR to ready for review and requires reviewers via `--reviewer`, `GIT_TASKS_REVIEWERS=user1,user2`, or the repo-level defaults in `.git-tasks/config.json`.
177+
- When a story is tied to knowledge docs, surface those docs via issue `Knowledge Links` metadata and in the story PR body for reviewer context.
131178
- `story update --status closed` closes the story and automatically closes the parent sprint and epic when all of their children are closed.
132179
- `sprint update --status closed` also cascades closure up to the parent epic when appropriate.
180+
- Branches and draft PRs are execution artifacts for stories, not wiki entities.
133181

134182
## Adding a Backend
135183

bin/git-tasks.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { makeSprintCommand } from '../src/commands/sprint.js';
77
import { makeStoryCommand } from '../src/commands/story.js';
88
import { makeOverviewCommand } from '../src/commands/overview.js';
99
import { makeSkillCommand } from '../src/commands/skill.js';
10+
import { makeInitCommand } from '../src/commands/init.js';
1011
import { makeWikiCommand } from '../src/commands/wiki.js';
1112

1213
const require = createRequire(import.meta.url);
@@ -19,6 +20,7 @@ program
1920
.description('AI-native GitHub issue planning via epics, sprints, and user stories')
2021
.version(pkg.version);
2122

23+
program.addCommand(makeInitCommand());
2224
program.addCommand(makeEpicCommand());
2325
program.addCommand(makeSprintCommand());
2426
program.addCommand(makeStoryCommand());

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"scripts": {
1010
"test": "node --test test/cli.test.js",
1111
"test:coverage": "node --test --experimental-test-coverage test/cli.test.js",
12+
"test:evals": "node --test test/evals/eval.js",
1213
"pack:dry-run": "npm pack --dry-run"
1314
},
1415
"files": [

skills/git-tasks/SKILL.md

Lines changed: 63 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
name: git-tasks
3-
description: AI-native project management CLI for GitHub. Use when the user wants to inspect or update the planning hierarchy (epics, sprints, user stories), drive story lifecycle transitions (start work, ready for review, close), or integrate raw inputs such as client meeting notes or feature transcripts into the existing plan — either by updating open items or creating new ones as a diff. Do not use for reading a single issue or PR without any project-management intent; prefer standard gh commands for those one-off lookups. Triggers include "what's the current sprint status", "create a story for this feature", "move this story to in-progress", "close out the sprint", "update the plan based on today's meeting notes", or any request involving epics, sprints, or story lifecycle management.
3+
description: AI-native project management CLI for GitHub. Use when the user wants to inspect or update the planning hierarchy (epics, sprints, user stories), drive story lifecycle transitions (start work, ready for review, close), or compile inbound notes, transcripts, uploads, and feature requests into structured wiki knowledge before changing the plan. Do not use for reading a single issue or PR without project-management intent; prefer standard gh commands for those one-off lookups. Triggers include "what's the current sprint status", "create a story for this feature", "move this story to in-progress", "close out the sprint", "update the plan based on today's meeting notes", or any request involving epics, sprints, story lifecycle, or wiki-backed planning updates.
44
allowed-tools: Bash(git-tasks:*), Bash(npx @atena-reply/git-tasks:*)
55
hidden: true
66
---
77

88
# git-tasks
99

10-
**Use when** you are acting as an AI project manager — inspecting or updating epics, sprints, and user stories, driving story lifecycle transitions, or translating raw inputs (meeting notes, feature requests, transcripts) into structured project plan changes.
10+
**Use when** you are acting as an AI project manager — inspecting or updating epics, sprints, and user stories, driving story lifecycle transitions, or translating inbound inputs (meeting notes, feature requests, transcripts, uploaded files) into structured project-plan changes.
1111

1212
**Do not use** for one-off issue or PR lookups without project-management intent. For those, use standard `gh` commands:
1313
```bash
@@ -21,25 +21,61 @@ gh pr list
2121

2222
- Ensure `gh auth status` succeeds.
2323
- Prefer `--short` output unless you need full issue bodies or comments.
24+
- Run `git-tasks init` at the repository root if `wiki/` is missing.
25+
- If `.git-tasks/config.json` exists, read it before planning. Use `planningHorizons` as repo-specific sizing guidance and `defaultReviewers` (or `owner`) as the default review handoff target.
26+
- If `wiki/knowledge/index.md` exists, read it before opening individual knowledge nodes.
27+
- If the repo still has legacy `wiki/raw/` or `wiki/processed/` content, it is fine to read it for historical context, but write new material into `wiki/inbox/` and `wiki/knowledge/`.
28+
- If the repo is being initialized for the first time, prefer `git-tasks init --owner <user> --reviewer <user>` so the repo contract is explicit from the start.
2429
- Start with `git-tasks overview --depth 2` before drilling into individual issues.
2530
- Install the skill anywhere with `npx @atena-reply/git-tasks skill install --target all`.
2631

32+
## AI-native planning granularity
33+
34+
- **Stories** are agent-sized atomic units: large enough for one coding agent to finish independently, but usually no more than a few hours to one day.
35+
- **Sprints** should usually span no more than three days.
36+
- **Epics** should usually span no more than two weeks.
37+
- If `.git-tasks/config.json` defines `planningHorizons`, treat those values as repo-specific overrides for the default sizing guidance above.
38+
- Keep dependencies explicit and current: every story should point at its sprint and epic, and every sprint should point at its epic.
39+
2740
## Recommended workflow
2841

29-
1. Inspect the hierarchy with `git-tasks overview --depth 2`.
30-
2. Find the right epic with `git-tasks epic list --short`.
31-
3. Find the right sprint with `git-tasks sprint list --epic <n> --short`.
32-
4. Inspect or update stories with `git-tasks story list --sprint <n> --short`.
33-
5. Use `show` only when you need full body text or comments.
42+
1. Initialize the repository once with `git-tasks init`.
43+
2. If the user gives you notes in chat or hands you uploaded files, capture the inbound material in `wiki/inbox/` first.
44+
3. If inbound material is already on disk, treat `wiki/inbox/` as the intake layer and preserve the source wording there.
45+
4. Read `wiki/knowledge/index.md` before planning so you reuse or refine existing knowledge instead of creating duplicates.
46+
5. Update or create knowledge nodes in `wiki/knowledge/` only when durable understanding changes.
47+
6. After the knowledge layer is current, inspect and update epics, sprints, and stories.
48+
7. Use issue `Knowledge Links` metadata whenever backlog items are tied to specific knowledge docs.
49+
8. Use `show` only when you need full body text or comments.
50+
51+
Keep `wiki/knowledge/` flat. The semantic kind belongs in frontmatter `type`, not in subdirectories.
52+
Use dash-case frontmatter keys. A practical minimum is:
53+
- `id`
54+
- `type`
55+
- `title`
56+
- `timestamp`
57+
- `status`
58+
- `tags`
59+
- `sources`
60+
- `issue-refs`
61+
- `neighbours`
62+
- `supersedes`
63+
64+
Keep the body focused on human-readable reasoning. Each knowledge node should normally include:
65+
- **Context/Source:** what changed or arrived
66+
- **Interpretation:** the durable understanding extracted from it
67+
- **Planning changes:** the backlog changes that should follow, if any
68+
- **Rationale:** why that decomposition or update is the right one
69+
- **Consequences:** downstream effects or follow-up implications
3470

3571
## Core commands
3672

3773
### Create
3874

3975
```bash
40-
git-tasks epic create "Epic title" -d "description" -p 13
41-
git-tasks sprint create "Sprint title" --epic <n> --start YYYY-MM-DD --end YYYY-MM-DD
42-
git-tasks story create "Story title" --sprint <n> --epic <n> -p 3 --priority high -a <username>
76+
git-tasks epic create "Epic title" -d "description" -p 13 --start YYYY-MM-DD --end YYYY-MM-DD --knowledge wiki/knowledge/example.md
77+
git-tasks sprint create "Sprint title" --epic <n> -d "description" -p 8 --start YYYY-MM-DD --end YYYY-MM-DD --knowledge wiki/knowledge/example.md
78+
git-tasks story create "Story title" --sprint <n> --epic <n> -d "description" -p 3 --priority high -a <username> --knowledge wiki/knowledge/example.md
4379
```
4480

4581
### Inspect
@@ -56,9 +92,9 @@ git-tasks story show <n>
5692
### Update
5793

5894
```bash
59-
git-tasks epic update <n> --status closed --points 21
60-
git-tasks sprint update <n> --status closed
61-
git-tasks story update <n> --status in-progress
95+
git-tasks epic update <n> --status closed --knowledge wiki/knowledge/example.md
96+
git-tasks sprint update <n> --status closed --knowledge wiki/knowledge/example.md
97+
git-tasks story update <n> --status in-progress --knowledge wiki/knowledge/example.md
6298
git-tasks story update <n> --status ready-for-review --reviewer octocat
6399
git-tasks story update <n> --status closed
64100
git-tasks story update <n> -a <username>
@@ -67,9 +103,10 @@ git-tasks story update <n> -a <username>
67103
### Wiki
68104

69105
```bash
70-
git-tasks wiki init
106+
git-tasks init
71107
git-tasks wiki list
72-
git-tasks wiki show <filename>
108+
git-tasks wiki show inbox/<filename>
109+
git-tasks wiki show knowledge/index
73110
```
74111

75112
## Title conventions
@@ -78,9 +115,17 @@ git-tasks wiki show <filename>
78115
- Sprint: `sprint(#<epic-number>): <title>`
79116
- User story: `story(#<sprint-number>): <title>`
80117

81-
## Output guidance
118+
## Lifecycle boundaries and output guidance
82119

83-
- Use `overview` for context.
84-
- Use `list --short` for low-token discovery.
120+
- Read `wiki/knowledge/index.md` first, then open only the relevant knowledge files.
121+
- New material in `wiki/inbox/` by itself does **not** justify creating or updating issues, branches, or pull requests.
122+
- New or updated knowledge that changes the plan **may** justify epic/sprint/story create or update operations.
123+
- Use `overview` for context and `list --short` for low-token discovery.
85124
- Use `show --comments` only when comments matter.
86125
- Reuse returned issue numbers as stable references.
126+
- When backlog items are tied to knowledge docs, record those links in issue `Knowledge Links` metadata and mirror the issue numbers back into knowledge frontmatter `issue-refs`.
127+
- When a story is picked up, work from an isolated worktree with a named branch and attached draft PR.
128+
- Routine execution should follow the existing story lifecycle; do not create new knowledge nodes unless durable understanding or planning changed.
129+
- When moving a story to `ready-for-review`, make sure the draft PR is promoted and review is requested from `--reviewer` when explicitly provided, otherwise `GIT_TASKS_REVIEWERS`, otherwise `.git-tasks/config.json` `defaultReviewers`, falling back to `owner`.
130+
- Branches and draft PRs are execution artifacts for stories, not wiki entities.
131+
- Treat worktrees, PR logs, and review handoff as required operating discipline even when your host does not automate them yet; if your agent host supports hooks, that is the right layer to enforce them.

0 commit comments

Comments
 (0)