knitmd 0.0.0-stage → 0.1.1

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.
@@ -0,0 +1,124 @@
1
+ # Working with tickets
2
+
3
+ This project tracks its work with Knit (`nit`):
4
+ every ticket is a Markdown file in `{{dir}}/tickets/`, and Git is the database. These rules apply
5
+ to people and AI agents alike.
6
+
7
+ ## The everyday flow
8
+
9
+ ```sh
10
+ nit inbox # what waits for you: status owner, questions, approvals
11
+ nit next # the ready, unblocked, unclaimed tickets in priority order
12
+ nit start {{key}}-12 --worktree # claim it: branch {{branch}}, a worktree, the claim pushed
13
+ nit show # the ticket of the current branch
14
+ nit log "Chose X because Y" # record decisions and handoff notes
15
+ nit finish # all criteria checked → done, Closes: trailer, push
16
+ ```
17
+
18
+ Then open the pull request as usual. Inside a ticket branch, commands default to that ticket, and
19
+ the commit hooks add a `Refs: {{key}}-12` trailer to every commit. `nit show` lists the commits
20
+ that refer to the ticket, from Git; do not copy them into the ticket.
21
+
22
+ ## Rules
23
+
24
+ 1. **Pick work** with `nit next`, or take the ticket you were given. Read the whole ticket,
25
+ including `## Log`: it is the memory of earlier sessions.
26
+ 2. **Claim before working** with `nit start <ID>`. If the claim is rejected, someone else has
27
+ the ticket: pick another one. Never work on a ticket someone else has claimed.
28
+ 3. **Plan first.** Write the `## Plan` section before changing code.
29
+ 4. **Log as you go** with `nit log`: decisions, dead ends, what is left. A later session, or a
30
+ person, continues from there.
31
+ 5. **Acceptance criteria are the definition of done.** Check each one (`- [x]`) when it is met.
32
+ Never weaken or delete a criterion to finish; if a criterion is wrong, say so in the log and
33
+ stop for a human decision.
34
+ 6. **Finish with `nit finish`.** Partial work: log what is left and keep the claim.
35
+ 7. **New work becomes a new ticket** (`nit new <type> "<title>"`), not scope creep.
36
+ 8. **Edit tickets directly or with the CLI.** `nit check` (also run by the pre-commit hook)
37
+ tells you what is wrong and how to fix it. Never edit generated reports.
38
+ 9. **`nit start` and `nit finish` commit and push.** They may do so for a ticket the
39
+ project owner has assigned or approved, unless this repository's own rules say otherwise.
40
+
41
+ <!-- nit:workflow -->
42
+ <!-- /nit:workflow -->
43
+
44
+ ## From idea to a ready ticket
45
+
46
+ 1. **Capture** the idea as a ticket when it comes up, not in a chat or a TODO comment:
47
+ `nit new feature "<title>"` creates it in `backlog`. A one-line Goal is enough.
48
+ 2. **Refine.** The agent (or a person) drafts the Goal, Context, Acceptance criteria and, when it
49
+ helps, a Plan. A question for someone goes to a `## Questions` section as
50
+ `- [ ] @alice: Card payments only?`: it shows in that person's `nit inbox` until it is
51
+ checked. Answers and decisions go to the log (`nit log`), so the reasoning survives the
52
+ session.
53
+ 3. **Approve.** `ready` means approved for work. A small ticket is approved by setting it to
54
+ `ready` (`nit set <ID> status=ready`). A large proposal is reviewed as a pull request that
55
+ changes only the ticket file and sets it to `ready`: reviewers comment on the pull request, the
56
+ ticket is revised, and merging the pull request is the approval.
57
+
58
+ **Who approves:** the people in `workflow.approvers` of `proj.yml`, or, when it is not set,
59
+ anyone but an agent. **Agents never approve**, not even when asked to: they leave the ticket in
60
+ `backlog` and ask. Pull request checks reject a move to `ready` by anyone else, and `nit`
61
+ refuses it locally. An agent that commits under a person's Git identity cannot be told apart by
62
+ the checks, so the rule is also a rule of conduct.
63
+ 4. **Split** a proposal that is too large for one pull request into an epic with child tickets
64
+ (below).
65
+
66
+ ### Epic, ticket or acceptance criterion?
67
+
68
+ * **Acceptance criterion:** a checkable property of the result of one pull request. The reviewer
69
+ of that pull request verifies it.
70
+ * **Ticket:** work that is merged in one pull request and can be done independently of other
71
+ open work. A bug is a ticket of type `bug`: the steps to reproduce in Context, the correct
72
+ behaviour as a criterion.
73
+ * **Epic:** a goal that needs several pull requests, people or repositories. Its children set
74
+ `parent: <epic ID>`; its own criteria describe the outcome as a whole, and it is done when every
75
+ child is done or cancelled. `nit show <epic ID>` shows the children and the progress;
76
+ `nit finish` on the last open child says when the epic can be closed.
77
+
78
+ Rule of thumb: if two pieces of work can be merged separately, they are separate tickets. If a
79
+ ticket grows past one pull request, or past about seven criteria, make it an epic and split it.
80
+
81
+ ## Attachments
82
+
83
+ ```sh
84
+ nit attach screenshot.png --note "The error dialog after export"
85
+ nit attach https://example.com/design --note "Checkout design"
86
+ ```
87
+
88
+ Files go to `{{dir}}/attachments/<ID>/` and are listed under `## Attachments` with the
89
+ description. Always describe what a file contains. Prefer text: a table in the ticket (or a CSV)
90
+ is readable by everyone and diffs line by line; attach a spreadsheet only when the file itself
91
+ matters. Attachments are never changed: attach a new version under a new name. Large files need
92
+ Git LFS or a link (`attachments.max_size` in `proj.yml`). **Never attach screenshots or files
93
+ with personal data or secrets:** they stay in the Git history even after deletion.
94
+
95
+ ## Ticket files
96
+
97
+ ```markdown
98
+ ---
99
+ id: {{key}}-12
100
+ title: One line
101
+ type: feature # see proj.yml
102
+ status: ready # backlog → ready → in-progress → done, or cancelled
103
+ priority: medium
104
+ assignee: alice # a key of people (hosting user name), team:<name>, or agent:<name>
105
+ depends_on: [{{key}}-10] # blocked until these are done
106
+ tags: [verify:manual] # namespace:value or a free word; vocabulary in proj.yml
107
+ created: 2026-12-04
108
+ ---
109
+
110
+ # One line
111
+
112
+ ## Goal
113
+ ## Context
114
+ ## Acceptance criteria
115
+ - [ ] …
116
+ ## Questions
117
+ - [ ] @alice: …
118
+ ## Plan
119
+ ## Log
120
+ - 2026-12-04 alice: …
121
+ ```
122
+
123
+ Field reference and rules: `nit help`, and the SPEC.md of Knit. Status reports:
124
+ the `{{reportsBranch}}` branch.
@@ -0,0 +1,60 @@
1
+ # Knit configuration. Reference: SPEC.md of Knit.
2
+ key: {{key}} # ticket ID prefix: {{key}}-1, {{key}}-2, …
3
+ mode: {{mode}} # embedded (tickets in the code repository) or central (own repository)
4
+
5
+ workflow:
6
+ statuses: [backlog, ready, in-progress, done, cancelled]
7
+ ready: ready # what `nit next` offers and `nit start` claims
8
+ start: in-progress # set by `nit start`
9
+ done: done # set by `nit finish` (or `nit sync` in the central mode)
10
+ cancelled: cancelled
11
+ # approvers: [alice] # who may approve tickets (move them to ready); default: everyone but agents
12
+
13
+ types: [feature, bug, task, chore, epic]
14
+ priorities: [critical, high, medium, low]
15
+
16
+ # How the team estimates is the team's decision:
17
+ # unit: none | points | hours | days | <your own unit>
18
+ # scale: [1, 2, 3, 5, 8] allowed values (optional)
19
+ # values: { S: 1, M: 3, L: 5 } numbers for a non-numeric scale
20
+ # per_day: 2 units per person-day, for the schedule (optional)
21
+ estimation:
22
+ unit: none
23
+
24
+ # People: keys are user names on the hosting service (GitHub, GitLab, Azure DevOps).
25
+ # alice: { name: Alice, gitlab: alice-l, git: [alice@example.com] } other names, Git aliases
26
+ people:
27
+ {{people}}
28
+
29
+ # Teams: listed people, or a team of the hosting service. Use as team:<name> (assignee, approvers).
30
+ # teams:
31
+ # qa: [alice]
32
+ # po: { github: acme/product-owners }
33
+
34
+ calendar:
35
+ workdays: [mon, tue, wed, thu, fri]
36
+ hours_per_day: 8
37
+ holidays: []
38
+
39
+ git:
40
+ remote: origin
41
+ main: {{main}}
42
+ branch: "{id}" # claim branch name; {id} is the lower-case ticket ID
43
+ push: true # start/finish push claims; false for local-only work
44
+ require_ticket: false # commit-msg hook: every commit must refer to a ticket
45
+
46
+ reports:
47
+ branch: project-reports # the report job commits the reports to this branch
48
+ # group_by: [severity] # tag namespaces the overview report groups tickets by
49
+
50
+ # Tags classify tickets for your process: namespace:value (verify:manual) or a free word (ux).
51
+ # A vocabulary is optional; check reports values that are not listed.
52
+ # tags:
53
+ # verify: { values: [auto, manual] }
54
+ # severity: { values: [critical, major, minor], single: true }
55
+ # area:
56
+
57
+ attachments:
58
+ max_size: 2MB # larger files must be tracked by Git LFS, or linked
59
+ # types: [png, jpg, jpeg, gif, webp, svg, pdf, csv, xlsx, docx, txt]
60
+ {{repos}}
@@ -0,0 +1,22 @@
1
+ ---
2
+ priority: high
3
+ ---
4
+
5
+ ## Goal
6
+
7
+ <!-- What is wrong, and what should happen instead. -->
8
+
9
+ ## Context
10
+
11
+ Steps to reproduce:
12
+
13
+ 1.
14
+
15
+ Expected:
16
+
17
+ Actual:
18
+
19
+ ## Acceptance criteria
20
+
21
+ - [ ] The problem no longer occurs in the steps above
22
+ - [ ] A test covers the case
@@ -0,0 +1,10 @@
1
+ ---
2
+ ---
3
+
4
+ ## Goal
5
+
6
+ <!-- What and why, in a few sentences. -->
7
+
8
+ ## Acceptance criteria
9
+
10
+ - [ ]
@@ -0,0 +1,10 @@
1
+ ---
2
+ ---
3
+
4
+ ## Goal
5
+
6
+ <!-- The outcome this epic delivers. Its child tickets set `parent` to this ID. -->
7
+
8
+ ## Acceptance criteria
9
+
10
+ - [ ] All child tickets are done
@@ -0,0 +1,14 @@
1
+ ---
2
+ ---
3
+
4
+ ## Goal
5
+
6
+ <!-- What the user can do afterwards, and why it matters. -->
7
+
8
+ ## Context
9
+
10
+ <!-- Background, links, constraints. -->
11
+
12
+ ## Acceptance criteria
13
+
14
+ - [ ]