@punks/cli 2.1.3 → 2.1.5

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.
@@ -17,12 +17,12 @@ This skill has three scoped references:
17
17
 
18
18
  Use active grilling when the user is still iterating on requirements, terminology, tradeoffs, branch closure, or status percentages. During a serious grilling session, load both `grilling-flow` and `artifact-output`; the interview and durable artifacts move together.
19
19
 
20
- Use wiki synthesis when the user asks to persist closed grill decisions into `apps/wiki`, extract high-level flows/concepts, or sync domain knowledge from grill artifacts.
20
+ Use wiki synthesis when the user asks to turn closed grill decisions into high-level routed wiki flows/concepts, or sync domain knowledge from grill artifacts.
21
21
 
22
22
  Both workflows can happen in one long session, but keep the responsibilities distinct:
23
23
 
24
- - `docs/<topic>-grill-log.md` and `docs/<topic>-grill-status.md` are the detailed requirements and glossary record
25
- - routed `apps/wiki/content/docs/project/` pages are the synthesized project knowledge surface
24
+ - `<wiki-root>/content/docs/project/grilling/<topic>-grill-log.md` and `<topic>-grill-status.md` are the detailed requirements and glossary record
25
+ - other routed `<wiki-root>/content/docs/project/` pages are the synthesized project knowledge surface
26
26
  - backlog/user-story creation is the next phase after the grill gate, outside this skill's scope
27
27
 
28
28
  ## Core Behavior
@@ -8,12 +8,42 @@ This workflow is always paired with [grilling-flow.md](grilling-flow.md) during
8
8
 
9
9
  At the start of a serious grilling session, create or reuse:
10
10
 
11
- - `docs/<topic>-grill-log.md`
12
- - `docs/<topic>-grill-status.md`
11
+ - `<wiki-root>/content/docs/project/grilling/<topic>-grill-log.md`
12
+ - `<wiki-root>/content/docs/project/grilling/<topic>-grill-status.md`
13
+
14
+ Resolve `<wiki-root>` the same way as `docs-ingest-phase`:
15
+
16
+ - monorepo: `apps/wiki`
17
+ - single-repo: `wiki`
18
+
19
+ Before writing, read `<wiki-root>/AGENTS.md`. The grilling artifacts live in the routed project wiki because `/docs/project` owns useful grill context and maintenance/project records.
20
+
21
+ If a legacy `docs/<topic>-grill-log.md` or `docs/<topic>-grill-status.md` exists, treat it as input to move or merge into the routed grilling section. Do not keep updating both locations.
13
22
 
14
23
  The log is the durable decision record.
15
24
  The status file is the current branch dashboard plus the current glossary snapshot.
16
25
 
26
+ ## Routed Wiki Contract
27
+
28
+ Grill artifacts are human-facing routed pages. Include frontmatter on new files:
29
+
30
+ ```yaml
31
+ ---
32
+ title: "<Topic> Grill Log"
33
+ surface: project
34
+ permission: project
35
+ ---
36
+ ```
37
+
38
+ Use `"<Topic> Grill Status"` for the status file title.
39
+
40
+ After adding or renaming a grill artifact:
41
+
42
+ - update `<wiki-root>/content/docs/project/grilling/meta.json`
43
+ - create `grilling/index.mdx` if the section is missing
44
+ - append a concise entry to `<wiki-root>/log.md` when the repo maintains one
45
+ - preserve existing frontmatter on existing files
46
+
17
47
  ## Grill Log Contract
18
48
 
19
49
  The log is structured, not a raw transcript.
@@ -113,7 +143,7 @@ When a branch closes:
113
143
  1. Update the grill log with final accepted decisions.
114
144
  2. Update the status file percentage, open items, glossary snapshot, axioms, and ambiguities.
115
145
  3. If the branch changes durable domain/product knowledge, run the wiki-output workflow.
116
- 4. Say exactly what changed and which artifacts were updated.
146
+ 4. Say exactly what changed, which routed artifacts were updated, and whether `meta.json` or wiki log bookkeeping changed.
117
147
 
118
148
  ## Final Handoff
119
149
 
@@ -6,8 +6,8 @@ Use this reference when closed grill branches should be reflected in `apps/wiki`
6
6
 
7
7
  Use the grill artifacts as source:
8
8
 
9
- - `docs/<topic>-grill-status.md`
10
- - `docs/<topic>-grill-log.md`
9
+ - `<wiki-root>/content/docs/project/grilling/<topic>-grill-status.md`
10
+ - `<wiki-root>/content/docs/project/grilling/<topic>-grill-log.md`
11
11
 
12
12
  Read status first to understand:
13
13
 
@@ -78,13 +78,14 @@ Create or update decision pages only when:
78
78
 
79
79
  ## Boundary
80
80
 
81
- Keep `docs/` as the detailed design record.
81
+ Keep the routed grilling log/status files as the detailed requirements record.
82
82
 
83
- Use routed `apps/wiki/content/docs/project/` pages for synthesized project knowledge.
83
+ Use other routed `<wiki-root>/content/docs/project/` pages for synthesized project knowledge.
84
+ For the default scaffold, that routed project surface is `apps/wiki/content/docs/project/`.
84
85
 
85
86
  Do not create a separate `apps/wiki/domains/` article tree. That duplicates the routed Fumadocs surface and makes later docs ingest choose between competing homes.
86
87
 
87
- Do not duplicate the full grill log in wiki pages.
88
+ Do not duplicate the full grill log into concept, flow, or decision pages.
88
89
  Summarize stable meaning, glossary, and axioms; link back to source docs when useful.
89
90
 
90
91
  ## Bookkeeping
@@ -226,24 +226,26 @@ When `create-spec` is given a backlog-backed epic:
226
226
 
227
227
  ## Provider policy
228
228
 
229
- This skill documents raw provider create payloads only.
229
+ This skill documents raw provider create/setup payloads only.
230
230
 
231
231
  In scope:
232
232
 
233
233
  - create issue/work item payload shapes
234
+ - create provider containers needed for the canonical hierarchy
234
235
  - required vs optional fields
235
236
  - how module/epic/story intent appears at creation time
236
237
 
237
238
  Out of scope:
238
239
 
239
- - update payloads
240
- - comment payloads
241
240
  - completion-time execution sync
241
+ - comment payloads
242
+ - status churn after backlog creation
242
243
 
243
- If a provider cannot express part of the canonical model in the create payload alone:
244
+ If a provider cannot express part of the canonical model in one create call:
244
245
 
245
246
  - document the limitation explicitly
246
- - do not silently reshape the model
247
+ - include the minimal native follow-up call needed to preserve module -> epic -> story
248
+ - do not silently flatten or reshape the model
247
249
 
248
250
  ## Anti-patterns
249
251
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: write-backlog
3
- description: Turns a large requirements discussion into a canonical backlog hierarchy of module/milestone -> epic/capability -> story and documents provider-specific issue creation payloads. Use when structuring backlog from discovery, breaking requirements into milestones/epics/stories, consuming `requirements-grill` artifacts like `*-grill-log.md` and `*-grill-status.md`, or preparing Linear, GitHub Issues, or Azure DevOps issue creation payloads.
3
+ description: Turns a large requirements discussion into a canonical backlog hierarchy of module/milestone -> epic/capability -> story and documents provider-specific backlog creation payloads. Use when structuring backlog from discovery, breaking requirements into milestones/epics/stories, consuming `requirements-grill` artifacts like `*-grill-log.md` and `*-grill-status.md`, or preparing Linear, GitHub Projects/Issues, or Azure DevOps creation payloads.
4
4
  ---
5
5
 
6
6
  # Write Backlog
@@ -54,7 +54,7 @@ description: Turns a large requirements discussion into a canonical backlog hier
54
54
 
55
55
  1. Read the provider payload asset:
56
56
  - [Linear](assets/providers/linear-create-payload.md)
57
- - [GitHub Issues](assets/providers/github-issues-create-payload.md)
57
+ - [GitHub Projects and Issues](assets/providers/github-projects-create-payload.md)
58
58
  - [Azure DevOps](assets/providers/azure-devops-create-payload.md)
59
59
  2. Use the raw provider request shape documented there.
60
60
  3. Do not invent provider fields from memory when the asset already defines them.
@@ -0,0 +1,224 @@
1
+ # GitHub Projects and Issues Create Payload
2
+
3
+ Official sources:
4
+
5
+ - GraphQL mutations: [docs.github.com/en/graphql/reference/mutations](https://docs.github.com/en/graphql/reference/mutations)
6
+ - GraphQL input objects: [docs.github.com/en/graphql/reference/input-objects](https://docs.github.com/en/graphql/reference/input-objects)
7
+ - REST issues API: [docs.github.com/en/rest/issues/issues](https://docs.github.com/en/rest/issues/issues?apiVersion=2022-11-28)
8
+ - REST milestones API: [docs.github.com/en/rest/issues/milestones](https://docs.github.com/en/rest/issues/milestones?apiVersion=2022-11-28)
9
+
10
+ ## Intent
11
+
12
+ Use GitHub Projects V2 and GitHub Issues together.
13
+
14
+ Canonical mapping:
15
+
16
+ - module/milestone -> repository milestone plus a Project V2 grouping field
17
+ - epic/capability -> parent GitHub issue in the Project
18
+ - story -> child issue/sub-issue in the Project
19
+ - story ordering -> native issue dependency
20
+
21
+ Do not use an issues-only path for GitHub backlog sync when Projects V2 is available.
22
+
23
+ ## Required bootstrap
24
+
25
+ Resolve these IDs before creating backlog items:
26
+
27
+ - `ownerId`
28
+ - `repositoryId`
29
+ - existing `projectV2.id` by title, if present
30
+ - existing repository milestone IDs/numbers by title
31
+
32
+ If the target Project V2 does not exist, create it:
33
+
34
+ ```graphql
35
+ mutation CreateBacklogProject($ownerId: ID!, $repositoryId: ID!, $title: String!) {
36
+ createProjectV2(input: {
37
+ ownerId: $ownerId
38
+ repositoryId: $repositoryId
39
+ title: $title
40
+ }) {
41
+ projectV2 {
42
+ id
43
+ title
44
+ }
45
+ }
46
+ }
47
+ ```
48
+
49
+ Expected Project fields:
50
+
51
+ - `Level`: single-select values `Epic`, `Story`
52
+ - `Module/Milestone`: text or single-select
53
+ - `Epic`: text, storing the epic issue number/title for story rows
54
+
55
+ Create missing fields with `createProjectV2Field`; set values with `updateProjectV2ItemFieldValue`.
56
+
57
+ ## Create missing milestones
58
+
59
+ Use repository milestones for the module/milestone container.
60
+
61
+ Endpoint:
62
+
63
+ `POST https://api.github.com/repos/{owner}/{repo}/milestones`
64
+
65
+ Headers:
66
+
67
+ - `Accept: application/vnd.github+json`
68
+ - `Authorization: Bearer <TOKEN>`
69
+ - `X-GitHub-Api-Version: 2022-11-28`
70
+
71
+ Body:
72
+
73
+ ```json
74
+ {
75
+ "title": "M1 - Intake and Review",
76
+ "state": "open",
77
+ "description": "Module container for intake and review backlog.",
78
+ "due_on": "2026-09-30T23:59:59Z"
79
+ }
80
+ ```
81
+
82
+ Required field:
83
+
84
+ - `title`
85
+
86
+ For GraphQL issue creation, use the returned milestone node ID as `milestoneId`.
87
+ For REST issue creation, use the returned milestone number as `milestone`.
88
+
89
+ ## Create an epic issue
90
+
91
+ Use a parent issue for each epic/capability. Add it to the Project V2 at creation time.
92
+
93
+ ```graphql
94
+ mutation CreateEpic(
95
+ $repositoryId: ID!
96
+ $projectV2Ids: [ID!]
97
+ $milestoneId: ID
98
+ $title: String!
99
+ $body: String!
100
+ ) {
101
+ createIssue(input: {
102
+ repositoryId: $repositoryId
103
+ projectV2Ids: $projectV2Ids
104
+ milestoneId: $milestoneId
105
+ title: $title
106
+ body: $body
107
+ labelIds: []
108
+ }) {
109
+ issue {
110
+ id
111
+ number
112
+ title
113
+ }
114
+ }
115
+ }
116
+ ```
117
+
118
+ Epic body ownership:
119
+
120
+ - outcome
121
+ - scope
122
+ - cross-story constraints
123
+ - child story list
124
+ - links to source grill/status artifacts when relevant
125
+
126
+ After creation, set Project fields:
127
+
128
+ - `Level = Epic`
129
+ - `Module/Milestone = <module title>`
130
+
131
+ ## Create story issues
132
+
133
+ Use child issues/sub-issues for stories. Prefer `parentIssueId` at story creation time.
134
+
135
+ ```graphql
136
+ mutation CreateStory(
137
+ $repositoryId: ID!
138
+ $projectV2Ids: [ID!]
139
+ $milestoneId: ID
140
+ $parentIssueId: ID!
141
+ $title: String!
142
+ $body: String!
143
+ ) {
144
+ createIssue(input: {
145
+ repositoryId: $repositoryId
146
+ projectV2Ids: $projectV2Ids
147
+ milestoneId: $milestoneId
148
+ parentIssueId: $parentIssueId
149
+ title: $title
150
+ body: $body
151
+ labelIds: []
152
+ }) {
153
+ issue {
154
+ id
155
+ number
156
+ title
157
+ parent {
158
+ id
159
+ }
160
+ }
161
+ }
162
+ }
163
+ ```
164
+
165
+ Story body ownership:
166
+
167
+ - outcome
168
+ - acceptance signals
169
+ - non-goals
170
+ - links
171
+
172
+ After creation, set Project fields:
173
+
174
+ - `Level = Story`
175
+ - `Module/Milestone = <module title>`
176
+ - `Epic = <epic issue number/title>`
177
+
178
+ If a story was created before the epic parent was known, attach it with `addSubIssue`:
179
+
180
+ ```graphql
181
+ mutation AddStoryToEpic($issueId: ID!, $subIssueId: ID!) {
182
+ addSubIssue(input: {
183
+ issueId: $issueId
184
+ subIssueId: $subIssueId
185
+ }) {
186
+ issue { id }
187
+ subIssue { id }
188
+ }
189
+ }
190
+ ```
191
+
192
+ ## Add story blockers
193
+
194
+ Use native issue dependencies for story ordering.
195
+
196
+ ```graphql
197
+ mutation AddBlockedBy($issueId: ID!, $blockingIssueId: ID!) {
198
+ addBlockedBy(input: {
199
+ issueId: $issueId
200
+ blockingIssueId: $blockingIssueId
201
+ }) {
202
+ issue { id }
203
+ }
204
+ }
205
+ ```
206
+
207
+ `issueId` is the blocked story. `blockingIssueId` is the prerequisite story.
208
+
209
+ ## Minimal creation order
210
+
211
+ 1. Resolve repository/owner IDs.
212
+ 2. Resolve Project V2 by title; create it if absent.
213
+ 3. Resolve or create Project fields.
214
+ 4. Resolve or create repository milestones for modules.
215
+ 5. Create epic parent issues with `projectV2Ids` and `milestoneId`.
216
+ 6. Create story child issues with `parentIssueId`, `projectV2Ids`, and `milestoneId`.
217
+ 7. Set Project field values for level/module/epic grouping.
218
+ 8. Add native issue dependencies for real story blockers.
219
+
220
+ ## Notes
221
+
222
+ - GitHub REST issue creation is still acceptable for plain issue creation, but GraphQL is preferred for backlog sync because it can attach Project V2 IDs, parent issues, and dependency relations.
223
+ - Project fields mirror planning/grouping metadata. Issue hierarchy remains the source for epic -> story.
224
+ - Repository milestones remain the source for module/milestone grouping when GitHub is the provider.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punks/cli",
3
- "version": "2.1.3",
3
+ "version": "2.1.5",
4
4
  "description": "Harness Intelligence scaffolding CLI",
5
5
  "bin": {
6
6
  "devpunks": "dist/index.js",
@@ -1,48 +0,0 @@
1
- # GitHub Issues Create Payload
2
-
3
- Official source:
4
-
5
- - REST issues API: [docs.github.com/en/rest/issues/issues](https://docs.github.com/en/rest/issues/issues?apiVersion=2022-11-28)
6
-
7
- ## Transport
8
-
9
- - endpoint: `POST https://api.github.com/repos/{owner}/{repo}/issues`
10
- - headers:
11
- - `Accept: application/vnd.github+json`
12
- - `Authorization: Bearer <TOKEN>`
13
- - `X-GitHub-Api-Version: 2022-11-28`
14
-
15
- ## Raw request body
16
-
17
- ```json
18
- {
19
- "title": "Lead manages unassigned submissions",
20
- "body": "## Outcome\n\n...\n\n## Acceptance signals\n\n- [ ] ...",
21
- "assignees": ["octocat"],
22
- "milestone": 1,
23
- "labels": ["workflow", "review"]
24
- }
25
- ```
26
-
27
- ## Required fields
28
-
29
- - `title`
30
-
31
- ## Common optional fields
32
-
33
- - `body`
34
- - `assignees`
35
- - `milestone`
36
- - `labels`
37
-
38
- ## Repo mapping
39
-
40
- - module -> repository milestone
41
- - epic -> GitHub issue
42
- - story -> GitHub issue
43
-
44
- ## Notes
45
-
46
- - GitHub’s create-issue payload does not natively express parent/sub-issue or blocker relations in the same create body documented here.
47
- - If you use GitHub as the provider, treat hierarchy and dependency setup as follow-up work outside this create-only asset.
48
- - Because of that limitation, keep the canonical module -> epic -> story model explicit in your own backlog logic instead of silently flattening it.