project-kit-cli 0.4.0__tar.gz → 0.5.0__tar.gz

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.
Files changed (76) hide show
  1. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/PKG-INFO +61 -4
  2. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/README.md +60 -3
  3. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/pyproject.toml +1 -1
  4. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/pyproject.toml.orig +1 -1
  5. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/approval.py +42 -0
  6. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/skills/pk-amend/SKILL.md +2 -0
  7. project_kit_cli-0.5.0/src/project_kit/assets/skills/pk-import/SKILL.md +62 -0
  8. project_kit_cli-0.5.0/src/project_kit/assets/skills/pk-next/SKILL.md +46 -0
  9. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/skills/pk-plan/SKILL.md +5 -0
  10. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/skills/pk-start/SKILL.md +14 -3
  11. project_kit_cli-0.5.0/src/project_kit/assets/skills/pk-verify/SKILL.md +74 -0
  12. project_kit_cli-0.5.0/src/project_kit/assets/subagents/pk-reviewer.md +26 -0
  13. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/templates/interview.md +4 -2
  14. project_kit_cli-0.5.0/src/project_kit/claude_hooks.py +100 -0
  15. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/cli.py +226 -2
  16. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/config.py +14 -0
  17. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/context_files.py +31 -1
  18. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/doctor.py +13 -3
  19. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/help.py +5 -0
  20. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/installer.py +6 -0
  21. project_kit_cli-0.5.0/src/project_kit/next_step.py +134 -0
  22. project_kit_cli-0.5.0/src/project_kit/sources.py +243 -0
  23. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/statusline.py +31 -1
  24. project_kit_cli-0.5.0/src/project_kit/trace.py +272 -0
  25. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/workflow.py +12 -8
  26. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/LICENSE +0 -0
  27. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/__init__.py +0 -0
  28. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/__main__.py +0 -0
  29. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/agents.py +0 -0
  30. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/ai_attribution.py +0 -0
  31. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/hooks/commit-msg +0 -0
  32. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/project/skills-catalog.yml +0 -0
  33. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/project/workflow.yml +0 -0
  34. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/skills/pk-decide/SKILL.md +0 -0
  35. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/skills/pk-discover/SKILL.md +0 -0
  36. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/skills/pk-foundations/SKILL.md +0 -0
  37. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/skills/pk-grill/SKILL.md +0 -0
  38. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/skills/pk-handoff/SKILL.md +0 -0
  39. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/skills/pk-provision/SKILL.md +0 -0
  40. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/skills/pk-skills/SKILL.md +0 -0
  41. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/skills/pk-workflow/SKILL.md +0 -0
  42. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/templates/adr.md +0 -0
  43. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/templates/backlog.example.json +0 -0
  44. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/templates/brief.md +0 -0
  45. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/templates/constitution-input.md +0 -0
  46. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/templates/development-workflow.md +0 -0
  47. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/templates/github/ISSUE_TEMPLATE/adr.yml +0 -0
  48. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/templates/github/ISSUE_TEMPLATE/bug.yml +0 -0
  49. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/templates/github/ISSUE_TEMPLATE/config.yml +0 -0
  50. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/templates/github/ISSUE_TEMPLATE/epic.yml +0 -0
  51. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/templates/github/ISSUE_TEMPLATE/feature.yml +0 -0
  52. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/templates/github/pull_request_template.md +0 -0
  53. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/templates/gitlab/issue_templates/adr.md +0 -0
  54. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/templates/gitlab/issue_templates/bug.md +0 -0
  55. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/templates/gitlab/issue_templates/epic.md +0 -0
  56. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/templates/gitlab/issue_templates/feature.md +0 -0
  57. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/assets/templates/gitlab/merge_request_templates/Default.md +0 -0
  58. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/backlog.py +0 -0
  59. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/entry.py +0 -0
  60. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/fsutil.py +0 -0
  61. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/gh.py +0 -0
  62. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/glab.py +0 -0
  63. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/handoff.py +0 -0
  64. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/labels.py +0 -0
  65. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/manifest.py +0 -0
  66. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/project_choice.py +0 -0
  67. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/providers/__init__.py +0 -0
  68. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/providers/github.py +0 -0
  69. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/providers/gitlab.py +0 -0
  70. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/provision.py +0 -0
  71. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/provision_gitlab.py +0 -0
  72. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/provision_issues.py +0 -0
  73. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/skills.py +0 -0
  74. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/state.py +0 -0
  75. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/templating.py +0 -0
  76. {project_kit_cli-0.4.0 → project_kit_cli-0.5.0}/src/project_kit/upgrade.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: project-kit-cli
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Summary: Project definition and dev-workflow kit that hands off to Spec Kit
5
5
  Keywords: project-management,spec-kit,claude-code,workflow,github
6
6
  Author: Miguel Tomás
@@ -91,6 +91,33 @@ pjkit status # where you are and what comes next
91
91
  pjkit help # a visual guide to the flow and the commands
92
92
  ```
93
93
 
94
+ ## You do not need to learn the skills
95
+
96
+ You never have to know which skill fits which moment. Open your agent in the project and say
97
+ what you want in your own words: *"continue"*, *"I already have a PRD"*, *"challenge this plan"*,
98
+ *"the scope changed"*, *"is this feature really done?"*. The agent picks the skill.
99
+
100
+ - `init` writes a block in `CLAUDE.md` / `AGENTS.md` / `GEMINI.md` with a table of *what the user
101
+ wants → which skill*, refreshed as the project moves.
102
+ - `/pk-next` is the conductor: it reads `pjkit next`, runs the phase that is due, offers
103
+ `pk-grill` before each approval, suggests `pk-skills` once the stack is chosen, `pk-amend`
104
+ when the plan changes and `pk-verify` when an issue seems finished. It never approves for you.
105
+ - `pjkit next` and the end of `pjkit status` print what to tell your AI, in plain words, for
106
+ agents that have no `/` commands.
107
+ - Claude Code can also be told the project's state at the start of each session
108
+ (`pjkit hook install`, asked in `init`, never without a yes).
109
+
110
+ ## Starting from documents you already have
111
+
112
+ `pjkit import <folder or file>` (or `pjkit init --from <path>`) copies a PRD, notes or a wiki
113
+ export into `docs/sources/` without touching the originals, and lists them in
114
+ `docs/sources/INDEX.md` with how each can be read. Then `/pk-import` drafts the brief, the
115
+ decisions (as *Proposed*), the roadmap and the backlog from them, citing the source of every
116
+ claim, marking what they do not say as `[NEEDS CLARIFICATION]`, asking about contradictions, and
117
+ reviewing the result with `pk-grill`. It never overwrites a document or approves a phase. Files
118
+ that look like they contain secrets or personal data are not copied unless you say so
119
+ (`--allow-sensitive`).
120
+
94
121
  ## The phases
95
122
 
96
123
  | # | Skill | What it does | Produces |
@@ -104,8 +131,8 @@ pjkit help # a visual guide to the flow and the commands
104
131
  | 6 | `/pk-provision` | Creates milestones, labels, branches, the GitHub Project and the issues (skipped with `provider: none`) | GitHub |
105
132
  | 7 | `/pk-handoff` | Prepares the Spec Kit constitution; each issue becomes a spec; writes `CLAUDE.md` / `AGENTS.md` | `.project-kit/handoff/constitution-input.md` |
106
133
 
107
- Outside the sequence, three skills are always available: `/pk-grill` interviews you hard and
108
- cross-checks the project's documents for contradictions (it is offered before each approval),
134
+ `/pk-next` runs the whole sequence for you (see above). Outside the sequence, three more
135
+ skills are always available: `/pk-grill` interviews you hard and cross-checks the project's documents for contradictions (it is offered before each approval),
109
136
  `/pk-skills` recommends third-party skills that fit the project, and `/pk-amend` brings a change
110
137
  after the plan (a new epic, a decision that replaces another) into the documents and the backlog.
111
138
 
@@ -138,11 +165,16 @@ It never rewrites issues that already exist, and re-running it is always safe.
138
165
  | `pjkit backlog validate` | Validate `.project-kit/backlog.json` |
139
166
  | `pjkit provision [--dry-run] [--project X]` | Create milestones, branches, the Project and issues on GitHub |
140
167
  | `pjkit handoff [--install-speckit]` | Generate the Spec Kit constitution input |
168
+ | `pjkit next [--json]` | What comes next, in words you can give to your AI |
169
+ | `pjkit import <path>` | Copy existing documentation to `docs/sources/` for `/pk-import` |
170
+ | `pjkit hook install\|remove` | Tell Claude Code the project's state at the start of each session |
171
+ | `pjkit mode [quick\|full]` | Show or change how many phases the project goes through |
172
+ | `pjkit trace [--criteria] [--json]` | Show which issues have a spec, a decision and a test, and what is not linked |
141
173
  | `pjkit statusline [--install]` | One line for Claude Code's status bar: model, context, usage limits and the project phase |
142
174
  | `pjkit context [--dry-run]` | Write or refresh the project block in `CLAUDE.md` / `AGENTS.md` / `GEMINI.md` |
143
175
  | `pjkit skills list\|show\|mark` | Recommended third-party skills, their install command, and what the project decided |
144
176
 
145
- Useful `init` options: `--project-name`, `--language` (language of the generated documents),
177
+ Useful `init` options: `--from <path>`, `--mode quick|full`, `--no-context`, `--project-name`, `--language` (language of the generated documents),
146
178
  `--agents claude,codex,...` (the AI agents you use; asked when there is a terminal),
147
179
  `--agent claude|none` (open the agent or not), `--provider github|gitlab|none` and
148
180
  `--ai-coauthor keep|remove`.
@@ -156,6 +188,31 @@ writes the context file each one reads (`CLAUDE.md`, `AGENTS.md`, `GEMINI.md`).
156
188
  between its markers is managed; the rest of the file is yours. Only Claude Code is started by
157
189
  `init`; for the others, open the agent and ask it to run the `pk-start` skill.
158
190
 
191
+ ## Small projects: quick mode
192
+
193
+ Not every project needs seven phases. `pjkit init --mode quick` (or answer yes when `init` asks
194
+ whether it is a small project) skips *decide*, *workflow* and *foundations*: you go from the
195
+ brief to the plan, and the stack is taken from the brief. `pjkit mode full` brings the phases
196
+ back, `pjkit mode` shows where you are, and `pjkit status` says which phases are skipped and why.
197
+
198
+ ## Checking that it is really done
199
+
200
+ The agent that built a feature should not be the only one to decide it is finished.
201
+ `/pk-verify` is a second opinion: it reads the issue's acceptance criteria, runs the project's
202
+ own tests and gives a verdict per criterion with evidence (`PASS`, `FAIL` or `INCOMPLETE`),
203
+ without touching any file. In Claude Code, `init` also installs the `pk-reviewer` subagent
204
+ (`.claude/agents/`), read-only, so the check runs in a context separate from the implementation.
205
+
206
+ `pjkit trace` shows the links between what was asked and what exists. Each acceptance criterion
207
+ has a stable name, `<issue id>#<position>` (`login#2`); write it in a test name or a spec and
208
+ `trace` lists the issues with no spec, the specs with no test, the criteria with no test, the
209
+ decisions nobody mentions and the references to things that do not exist. A link is a mention:
210
+ it shows what is missing, not that a test is any good, which is what `/pk-verify` is for.
211
+
212
+ `pjkit approve` refuses to sign off a phase whose documents still have
213
+ `[NEEDS CLARIFICATION]` markers (it asks if you are at a terminal; `--allow-open-questions`
214
+ approves anyway).
215
+
159
216
  ## Status bar
160
217
 
161
218
  Claude Code can show a line of your choosing at the bottom of the screen. `pjkit statusline`
@@ -71,6 +71,33 @@ pjkit status # where you are and what comes next
71
71
  pjkit help # a visual guide to the flow and the commands
72
72
  ```
73
73
 
74
+ ## You do not need to learn the skills
75
+
76
+ You never have to know which skill fits which moment. Open your agent in the project and say
77
+ what you want in your own words: *"continue"*, *"I already have a PRD"*, *"challenge this plan"*,
78
+ *"the scope changed"*, *"is this feature really done?"*. The agent picks the skill.
79
+
80
+ - `init` writes a block in `CLAUDE.md` / `AGENTS.md` / `GEMINI.md` with a table of *what the user
81
+ wants → which skill*, refreshed as the project moves.
82
+ - `/pk-next` is the conductor: it reads `pjkit next`, runs the phase that is due, offers
83
+ `pk-grill` before each approval, suggests `pk-skills` once the stack is chosen, `pk-amend`
84
+ when the plan changes and `pk-verify` when an issue seems finished. It never approves for you.
85
+ - `pjkit next` and the end of `pjkit status` print what to tell your AI, in plain words, for
86
+ agents that have no `/` commands.
87
+ - Claude Code can also be told the project's state at the start of each session
88
+ (`pjkit hook install`, asked in `init`, never without a yes).
89
+
90
+ ## Starting from documents you already have
91
+
92
+ `pjkit import <folder or file>` (or `pjkit init --from <path>`) copies a PRD, notes or a wiki
93
+ export into `docs/sources/` without touching the originals, and lists them in
94
+ `docs/sources/INDEX.md` with how each can be read. Then `/pk-import` drafts the brief, the
95
+ decisions (as *Proposed*), the roadmap and the backlog from them, citing the source of every
96
+ claim, marking what they do not say as `[NEEDS CLARIFICATION]`, asking about contradictions, and
97
+ reviewing the result with `pk-grill`. It never overwrites a document or approves a phase. Files
98
+ that look like they contain secrets or personal data are not copied unless you say so
99
+ (`--allow-sensitive`).
100
+
74
101
  ## The phases
75
102
 
76
103
  | # | Skill | What it does | Produces |
@@ -84,8 +111,8 @@ pjkit help # a visual guide to the flow and the commands
84
111
  | 6 | `/pk-provision` | Creates milestones, labels, branches, the GitHub Project and the issues (skipped with `provider: none`) | GitHub |
85
112
  | 7 | `/pk-handoff` | Prepares the Spec Kit constitution; each issue becomes a spec; writes `CLAUDE.md` / `AGENTS.md` | `.project-kit/handoff/constitution-input.md` |
86
113
 
87
- Outside the sequence, three skills are always available: `/pk-grill` interviews you hard and
88
- cross-checks the project's documents for contradictions (it is offered before each approval),
114
+ `/pk-next` runs the whole sequence for you (see above). Outside the sequence, three more
115
+ skills are always available: `/pk-grill` interviews you hard and cross-checks the project's documents for contradictions (it is offered before each approval),
89
116
  `/pk-skills` recommends third-party skills that fit the project, and `/pk-amend` brings a change
90
117
  after the plan (a new epic, a decision that replaces another) into the documents and the backlog.
91
118
 
@@ -118,11 +145,16 @@ It never rewrites issues that already exist, and re-running it is always safe.
118
145
  | `pjkit backlog validate` | Validate `.project-kit/backlog.json` |
119
146
  | `pjkit provision [--dry-run] [--project X]` | Create milestones, branches, the Project and issues on GitHub |
120
147
  | `pjkit handoff [--install-speckit]` | Generate the Spec Kit constitution input |
148
+ | `pjkit next [--json]` | What comes next, in words you can give to your AI |
149
+ | `pjkit import <path>` | Copy existing documentation to `docs/sources/` for `/pk-import` |
150
+ | `pjkit hook install\|remove` | Tell Claude Code the project's state at the start of each session |
151
+ | `pjkit mode [quick\|full]` | Show or change how many phases the project goes through |
152
+ | `pjkit trace [--criteria] [--json]` | Show which issues have a spec, a decision and a test, and what is not linked |
121
153
  | `pjkit statusline [--install]` | One line for Claude Code's status bar: model, context, usage limits and the project phase |
122
154
  | `pjkit context [--dry-run]` | Write or refresh the project block in `CLAUDE.md` / `AGENTS.md` / `GEMINI.md` |
123
155
  | `pjkit skills list\|show\|mark` | Recommended third-party skills, their install command, and what the project decided |
124
156
 
125
- Useful `init` options: `--project-name`, `--language` (language of the generated documents),
157
+ Useful `init` options: `--from <path>`, `--mode quick|full`, `--no-context`, `--project-name`, `--language` (language of the generated documents),
126
158
  `--agents claude,codex,...` (the AI agents you use; asked when there is a terminal),
127
159
  `--agent claude|none` (open the agent or not), `--provider github|gitlab|none` and
128
160
  `--ai-coauthor keep|remove`.
@@ -136,6 +168,31 @@ writes the context file each one reads (`CLAUDE.md`, `AGENTS.md`, `GEMINI.md`).
136
168
  between its markers is managed; the rest of the file is yours. Only Claude Code is started by
137
169
  `init`; for the others, open the agent and ask it to run the `pk-start` skill.
138
170
 
171
+ ## Small projects: quick mode
172
+
173
+ Not every project needs seven phases. `pjkit init --mode quick` (or answer yes when `init` asks
174
+ whether it is a small project) skips *decide*, *workflow* and *foundations*: you go from the
175
+ brief to the plan, and the stack is taken from the brief. `pjkit mode full` brings the phases
176
+ back, `pjkit mode` shows where you are, and `pjkit status` says which phases are skipped and why.
177
+
178
+ ## Checking that it is really done
179
+
180
+ The agent that built a feature should not be the only one to decide it is finished.
181
+ `/pk-verify` is a second opinion: it reads the issue's acceptance criteria, runs the project's
182
+ own tests and gives a verdict per criterion with evidence (`PASS`, `FAIL` or `INCOMPLETE`),
183
+ without touching any file. In Claude Code, `init` also installs the `pk-reviewer` subagent
184
+ (`.claude/agents/`), read-only, so the check runs in a context separate from the implementation.
185
+
186
+ `pjkit trace` shows the links between what was asked and what exists. Each acceptance criterion
187
+ has a stable name, `<issue id>#<position>` (`login#2`); write it in a test name or a spec and
188
+ `trace` lists the issues with no spec, the specs with no test, the criteria with no test, the
189
+ decisions nobody mentions and the references to things that do not exist. A link is a mention:
190
+ it shows what is missing, not that a test is any good, which is what `/pk-verify` is for.
191
+
192
+ `pjkit approve` refuses to sign off a phase whose documents still have
193
+ `[NEEDS CLARIFICATION]` markers (it asks if you are at a terminal; `--allow-open-questions`
194
+ approves anyway).
195
+
139
196
  ## Status bar
140
197
 
141
198
  Claude Code can show a line of your choosing at the bottom of the screen. `pjkit statusline`
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "project-kit-cli"
3
- version = "0.4.0"
3
+ version = "0.5.0"
4
4
  description = "Project definition and dev-workflow kit that hands off to Spec Kit"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "project-kit-cli"
3
- version = "0.4.0"
3
+ version = "0.5.0"
4
4
  description = "Project definition and dev-workflow kit that hands off to Spec Kit"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -1,5 +1,6 @@
1
1
  """Approval gates: record that the user signed off on a phase."""
2
2
 
3
+ import re
3
4
  from pathlib import Path
4
5
 
5
6
  from project_kit.backlog import load_backlog
@@ -8,6 +9,47 @@ from project_kit.handoff import CONSTITUTION, INPUT_FILE, constitution_ready
8
9
  from project_kit.state import PHASES, State, StateError, load_state, save_state
9
10
  from project_kit.workflow import load_workflow
10
11
 
12
+ _MARKER = re.compile(r"\[NEEDS CLARIFICATION\b[^\]]*\]?")
13
+ _COMMENT = re.compile(r"<!--.*?-->", re.DOTALL)
14
+ _MAX_SHOWN = 8
15
+
16
+
17
+ def open_questions(root: Path, phase: str) -> list[tuple[str, int, str]]:
18
+ """Unresolved ``[NEEDS CLARIFICATION: ...]`` markers in the documents the phase produces.
19
+
20
+ Returns (file, line, text). A marker inside an HTML comment is a template's instruction, not
21
+ a question, and is ignored. Files that do not exist are skipped.
22
+ """
23
+ step = next((s for s in load_workflow(root).steps if s.id == phase), None)
24
+ if step is None:
25
+ return []
26
+ paths: list[Path] = []
27
+ for produced in step.produces:
28
+ target = root / produced
29
+ if target.is_dir():
30
+ paths += sorted(target.rglob("*.md"))
31
+ elif target.is_file() and target.suffix == ".md":
32
+ paths.append(target)
33
+ found = []
34
+ for path in paths:
35
+ try:
36
+ text = path.read_text(encoding="utf-8")
37
+ except (OSError, UnicodeDecodeError):
38
+ continue
39
+ text = _COMMENT.sub(lambda m: "\n" * m.group(0).count("\n"), text) # keep line numbers
40
+ for number, line in enumerate(text.splitlines(), 1):
41
+ if match := _MARKER.search(line):
42
+ found.append((path.relative_to(root).as_posix(), number, match.group(0)[:100]))
43
+ return found
44
+
45
+
46
+ def describe_open_questions(found: list[tuple[str, int, str]]) -> str:
47
+ shown = [f" {path}:{line} {text}" for path, line, text in found[:_MAX_SHOWN]]
48
+ more = len(found) - _MAX_SHOWN
49
+ if more > 0:
50
+ shown.append(f" ... and {more} more")
51
+ return f"{len(found)} unresolved [NEEDS CLARIFICATION] marker(s):\n" + "\n".join(shown)
52
+
11
53
 
12
54
  def approve_phase(root: Path, phase: str) -> State:
13
55
  """Record the approval of ``phase`` in the project state.
@@ -30,6 +30,8 @@ Read `.project-kit/templates/interview.md` first and follow it.
30
30
  `Superseded by ADR-NNNN`. Never edit an accepted ADR to say something else.
31
31
  - Backlog: add or change issues keeping their `id`; to drop one, remove it only if it was not
32
32
  provisioned yet, otherwise mark it for the user to close. Do not reuse an id.
33
+ - Acceptance criteria are named by position (`<issue id>#1`, `#2`...) and tests refer to
34
+ them that way: add new ones at the end, never reorder or delete one that has a test.
33
35
  - Keep the language of `config.yml`. Record the exchange under `## Clarifications` >
34
36
  `### Session YYYY-MM-DD`, as `- Q: ... -> A: ...`.
35
37
  4. **Validate.** Run `pjkit backlog validate` and fix every problem it reports.
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: pk-import
3
+ description: Start the project from documentation the user already has (a PRD, notes, an exported wiki, a proposal, a long README) - read it, draft the brief, decisions, roadmap and backlog from it with sources, ask about contradictions and gaps, and review the drafts with pk-grill. Use when the user says they already have documents, or points at a folder of them.
4
+ ---
5
+
6
+ # pk-import — start from what already exists
7
+
8
+ Many projects do not start from nothing: there is a PRD, a client proposal, meeting notes, a
9
+ wiki export. Making the user repeat all of it in an interview wastes it. This skill reads what
10
+ exists and produces **drafts**, with the source of every claim, then asks about whatever does
11
+ not add up. The user still reviews and approves each phase.
12
+
13
+ Read `.project-kit/templates/interview.md` first and follow it.
14
+
15
+ ## Inputs
16
+
17
+ - `docs/sources/INDEX.md`: the index that `pjkit import <path>` wrote, which lists each source
18
+ file, its format and whether it could be read. If it does not exist and the user gave a path,
19
+ run `pjkit import <path>` (it copies the files to `docs/sources/`; the originals are not
20
+ touched). If the user attached documents to the conversation instead, save nothing yourself:
21
+ ask them to put the files in a folder and run `pjkit import <folder>`.
22
+ - Whatever already exists in `docs/project/` and `docs/adr/`. **Never overwrite it**: propose a
23
+ merge and ask.
24
+
25
+ ## Steps
26
+
27
+ 1. **Read the index and the sources.** Say which ones you could not read (a scanned PDF, a
28
+ format you cannot open) and what the user can do (export to text or Markdown). Read long
29
+ sources in parts. Say what did not fit.
30
+ 2. **Look for sensitive data first.** If a source seems to contain personal data, credentials or
31
+ keys, stop and tell the user before copying anything further or quoting it in a draft.
32
+ 3. **Draft, in this order,** only what the sources support. After each draft say its path:
33
+ - `docs/project/brief.md` from `.project-kit/templates/brief.md`: problem, users, scope,
34
+ non-goals, constraints, risks.
35
+ - `docs/adr/NNNN-*.md` for the technical decisions the sources already take, from
36
+ `.project-kit/templates/adr.md`, with `Status: Proposed` (the user accepts them).
37
+ - If the sources cover them: a draft of `docs/development-workflow.md` and of the project's
38
+ rules in `docs/project/` (standards, testing, security, documentation).
39
+ - A draft roadmap in `docs/project/roadmap.md` and `.project-kit/backlog.json`, with
40
+ acceptance criteria per issue. Validate it with `pjkit backlog validate`.
41
+ 4. **Sources and gaps.** Every claim that comes from a source ends with its provenance, for
42
+ example `(source: docs/sources/prd.md, section 3)`. What the sources do not say is written as
43
+ `[NEEDS CLARIFICATION: ...]`. **Invent nothing**: no users, figures, dates, stacks or
44
+ requirements that are not in the sources.
45
+ 5. **Contradictions.** List every place where two sources disagree, or a figure or date does not
46
+ add up, or a requirement has no owner. Ask them one at a time, each with your recommended
47
+ answer and the sources on both sides, and record the answer in the document it affects.
48
+ 6. **Review.** Run `pk-grill` on the drafts and resolve what it finds, exactly as it works for a
49
+ project written by interview.
50
+ 7. **Approval.** For each phase whose documents now exist, follow the usual gate with the user:
51
+ a selection list, and only an explicit "Approve it" allows `pjkit approve <phase>`. A phase
52
+ whose documents still have open `[NEEDS CLARIFICATION]` markers is not approved without the
53
+ user saying so. Then run `pjkit next` and offer what comes after.
54
+
55
+ ## Rules
56
+
57
+ - The originals in `docs/sources/` are never edited. Drafts go in the project's own documents.
58
+ - Never approve a phase for the user; never overwrite an existing document.
59
+ - Be explicit about confidence: "stated in the PRD" is not the same as "inferred from the PRD".
60
+ - Keep the language of `config.yml` for the drafts, even if the sources use another.
61
+ - If the sources cover only part of the project (say, the product but not the stack), draft that
62
+ part and continue with the normal skill for the rest (`pk-decide`, ...).
@@ -0,0 +1,46 @@
1
+ ---
2
+ name: pk-next
3
+ description: Conduct the project - find where it is and do the right next thing, choosing the skill so the user does not have to. Use whenever the user says "continue", "keep going", "what now?", "next", "where are we?", or is unsure which skill applies.
4
+ ---
5
+
6
+ # pk-next — the conductor
7
+
8
+ The user should not have to learn which skill fits which moment. This skill looks at the
9
+ project, picks the right skill and runs it, and asks only what a person must decide.
10
+
11
+ ## Steps
12
+
13
+ 1. Run `pjkit next --json` (or `pjkit next` for text). It gives the phase that comes next, its
14
+ skill, and hints: documents of the phase that already exist, `[NEEDS CLARIFICATION]` markers
15
+ that are still open, whether skills were recommended yet.
16
+ 2. Say in one sentence where the project is and what you are about to do.
17
+ 3. **Decide by situation**, in this order:
18
+ - **The user brought documents** (a folder, attachments, "I already have a PRD") and the
19
+ project has no brief yet: follow `pk-import`.
20
+ - **There is a phase to do** (`phase` is not null): follow that phase's skill (`pk-discover`,
21
+ `pk-decide`, `pk-workflow`, `pk-foundations`, `pk-plan`, `pk-provision`, `pk-handoff`).
22
+ If the hints say its documents already exist, do not start the interview again: review
23
+ what is there and complete what is missing.
24
+ - **Before any approval**, offer `pk-grill` (a hard review that cross-checks the documents)
25
+ with a selection list: **Review it with pk-grill** / **Approve without it** /
26
+ **I want changes**. Approval is always the user's call.
27
+ - **The stack was just decided** and `skills.yml` does not exist: offer `pk-skills`.
28
+ - **Every phase is done** (`phase` is null): ask what the user wants. A change to the plan, a
29
+ decision or the process is `pk-amend`; building an issue is Spec Kit's job
30
+ (`/speckit-specify`); an issue that seems finished is checked with `pk-verify` (in Claude
31
+ Code, the `pk-reviewer` subagent), by someone other than whoever wrote it.
32
+ - **The user changes direction mid-way** ("actually the plan changed", "I decided to use X
33
+ instead"): `pk-amend` if the plan was approved, otherwise edit the current phase's document.
34
+ 4. When the skill you ran finishes, run `pjkit next` again and offer to continue or stop. Never
35
+ chain more than one phase without asking.
36
+
37
+ ## Rules
38
+
39
+ - Never run `pjkit approve` yourself, and never treat "continue" as approval of a phase.
40
+ Approval needs an explicit yes to "Approve it" in this conversation.
41
+ - Do not skip a phase that `pjkit next` returns; if the user wants fewer phases, that is
42
+ `pjkit mode quick` (they decide), not something to do silently.
43
+ - Say the skill you are using by name, once, so the user learns what exists without having to.
44
+ - Use the language of `.project-kit/config.yml` with the user.
45
+ - If `pjkit` is missing or `.project-kit/` does not exist, tell the user to run `pjkit init` in a
46
+ terminal; do not create the files by hand.
@@ -14,6 +14,11 @@ that happens later, in the provision phase.
14
14
  `docs/development-workflow.md` (process). The plan is **derived** from them: scope becomes
15
15
  epics, constraints and decisions become issues (repository setup, CI, the chosen
16
16
  infrastructure) in the first phase.
17
+ - **In quick mode** (`mode: quick` in `config.yml`) there are no ADRs, workflow or rules
18
+ documents: take the stack and constraints from `docs/project/brief.md` and ask about whatever
19
+ the plan depends on that the brief does not say.
20
+ - **Acceptance criteria are named by position** (`<issue id>#1`, `#2`...); tests and specs
21
+ refer to them by that name (`pjkit trace`). Never reorder them: add new ones at the end.
17
22
  - **Run `pjkit status` first.** If an enabled earlier phase is not done, stop and tell
18
23
  the user which skill to run (`/pk-discover`, `/pk-decide`, `/pk-workflow`). Do not
19
24
  improvise a brief. If they want to skip a phase, they set `enabled: false` on it in
@@ -5,6 +5,9 @@ description: Start here. Check that project-kit is ready in this repository, set
5
5
 
6
6
  # pk-start — phase 0
7
7
 
8
+ > The user never has to know the skills. After this one, `pk-next` takes them through the rest:
9
+ > they say "continue" and it chooses.
10
+
8
11
  Entry point of project-kit. The files are already in the repository (`pjkit init` put
9
12
  them there); this skill checks them, settles the basics and lets the user choose how far to go
10
13
  now. Nothing is created in GitHub or GitLab here.
@@ -33,7 +36,13 @@ now. Nothing is created in GitHub or GitLab here.
33
36
  whether to show the model, the usage limits and the project phase in the status bar. Only on
34
37
  a yes run `pjkit statusline --install`; it keeps any status bar the user already has and
35
38
  runs it first. Never set it up without that yes. `pjkit statusline --remove` undoes it.
36
- 5. **Ask how far to go now**, with a selection list (`AskUserQuestion`, see
39
+ In the same way, if `pjkit doctor` shows the session hook as not set up, offer it (**Yes,
40
+ let Claude know the project's state at each session** / **No, thanks**) and only on a yes run
41
+ `pjkit hook install`; `pjkit hook remove` undoes it.
42
+ 5. **Size of the project.** `config.yml` has `mode: full` (every phase) or `mode: quick`
43
+ (skips decide, workflow and foundations, for a small project). If the user wants the other
44
+ one, run `pjkit mode quick` or `pjkit mode full`; `pjkit status` shows what is skipped.
45
+ 6. **Ask how far to go now**, with a selection list (`AskUserQuestion`, see
37
46
  `.project-kit/templates/interview.md`) and exactly these two options. Put B first with
38
47
  `(Recommended)` unless the user said they are in a hurry:
39
48
 
@@ -41,8 +50,10 @@ now. Nothing is created in GitHub or GitLab here.
41
50
  |--------|--------------|
42
51
  | **B. Start defining the project** | Continue now with the discovery interview |
43
52
  | **A. Only initialise** | Stop here. The user comes back later with `/pk-discover` |
44
- 6. **If A:** run `pjkit status`, show it, and explain that `/pk-discover` is next. Done.
45
- 7. **If B:** ask for a short description of the project in the user's own words, a few
53
+ 7. **If A:** run `pjkit status`, show it, and explain that `/pk-discover` is next. Done.
54
+ 8. **If B:** if the user has documents to start from (a PRD, notes, a proposal), or
55
+ `docs/sources/INDEX.md` exists, follow `pk-import` instead (`pjkit import <folder>` copies
56
+ them). Otherwise ask for a short description of the project in the user's own words, a few
46
57
  sentences, a pasted note or "nothing yet, ask me". Then follow the `pk-discover` skill
47
58
  (`.claude/skills/pk-discover/SKILL.md`) using that description as the starting point.
48
59
 
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: pk-verify
3
+ description: Verify, independently of whoever implemented it, that a feature meets its acceptance criteria - read the issue, run the project's tests and give a verdict per criterion with evidence. Use when a feature or issue is said to be finished, before merging, or when the user asks "is this really done?". Never edits code.
4
+ ---
5
+
6
+ # pk-verify — is it really done?
7
+
8
+ The agent that implements a feature should not be the only one to decide it is finished. This
9
+ skill is the second opinion: it checks the work against **what was asked**, not against what the
10
+ implementer says it did. It reads, runs the project's checks and reports. It changes nothing.
11
+
12
+ Run it in a separate context from the implementation: in Claude Code, hand it to the
13
+ `pk-reviewer` subagent (`.claude/agents/pk-reviewer.md`); in another agent, in a fresh session.
14
+
15
+ ## Inputs
16
+
17
+ 1. **Which issue.** The issue number (`#34`) or backlog id (`login`). If the user does not say,
18
+ find it from the current branch name (`NNN-name`) or from the open spec in `specs/`.
19
+ 2. **The criteria.** The "Acceptance criteria" list of the issue: `gh issue view <n>` (or
20
+ `glab issue view <n>`) when there is a provider, otherwise the entry in
21
+ `.project-kit/backlog.json`. Number them `<id>#1`, `<id>#2`... in the order they appear; that
22
+ is how `pjkit trace` names them. If the issue has none, stop and say that nothing can be
23
+ verified until it has some.
24
+ 3. **The spec and plan**, if Spec Kit produced them: `specs/<NNN-name>/spec.md` and `plan.md`.
25
+ 4. **How to check.** `docs/project/testing.md` (the commands and where tests live) and
26
+ `docs/project/standards.md` (lint, format, types). If they do not exist, look for the project's
27
+ own test command (`package.json`, `pyproject.toml`, `Makefile`) and say you guessed it.
28
+
29
+ ## Steps
30
+
31
+ 1. Read the inputs. Do not read the implementer's summary or commit messages as evidence.
32
+ 2. Run the checks that the project defines, in this order, and keep their output: tests, then
33
+ lint and type checks. A failing or missing run is a finding.
34
+ 3. For **each criterion**, look for evidence in the code and the tests:
35
+ - a test that exercises it (name it, say whether it passed, and whether it really asserts
36
+ the criterion or only touches the code);
37
+ - the code that implements it (file and line);
38
+ - for what cannot be checked by reading or running tests (a look, a flow in the browser), say
39
+ "not verified" and what would verify it.
40
+ 4. Look for what was **not** asked but changed: files outside the issue's scope, removed tests,
41
+ skipped or weakened assertions, new dependencies, secrets. Report them.
42
+ 5. Give the verdict.
43
+
44
+ ## Report format
45
+
46
+ ```
47
+ Verdict: PASS | FAIL | INCOMPLETE
48
+ Issue: <id / #n> <title>
49
+
50
+ Checks
51
+ - tests: <command> -> <result>
52
+ - lint/types: <command> -> <result>
53
+
54
+ Criteria
55
+ - <id>#1 <text>: PASS - <evidence>
56
+ - <id>#2 <text>: FAIL - <what is missing or wrong, with file/line>
57
+ - <id>#3 <text>: NOT VERIFIED - <why, and what would verify it>
58
+
59
+ Outside the scope of the issue
60
+ - <anything else that changed, or "nothing found">
61
+ ```
62
+
63
+ `PASS` only if every criterion passes with evidence and the checks are green. Any `FAIL` makes it
64
+ `FAIL`. A criterion that is not verified makes it at best `INCOMPLETE`.
65
+
66
+ ## Rules
67
+
68
+ - Do not edit, create or delete files; do not commit, push or change branches; do not install
69
+ anything; do not write to the provider (no comments, labels, closing issues, moving cards).
70
+ Report, and let the user or the implementer act.
71
+ - Do not fix a failing test to make the verdict pass. Do not lower a criterion.
72
+ - Never claim a pass you did not see. If a command could not run, say so.
73
+ - Do not run `pjkit approve` or merge anything.
74
+ - Be specific and brief. The reader wants to know what to fix, not a review of the style.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: pk-reviewer
3
+ description: Independent reviewer. Use proactively after a feature has been implemented, and before it is called done, to check it against its acceptance criteria and the project's tests. It never wrote the code it reviews and never edits it.
4
+ tools: Read, Grep, Glob, Bash
5
+ ---
6
+
7
+ You are the independent reviewer of a project set up with project-kit. Someone else
8
+ implemented the work you are asked about; your job is to decide, with evidence, whether it
9
+ meets what was asked. You are not there to help it pass.
10
+
11
+ Start by reading `.claude/skills/pk-verify/SKILL.md` and follow it exactly.
12
+
13
+ Ground rules:
14
+
15
+ - You work in a clean context: do not rely on the implementer's summary. Read the issue, the
16
+ spec and the code yourself.
17
+ - You may read files and run the project's own test, lint and type-check commands (the ones in
18
+ `docs/project/testing.md` and `docs/project/standards.md`). You may read issues with the
19
+ provider's CLI (`gh issue view`, `glab issue view`).
20
+ - You must not edit, create or delete project files, change branches, commit, push, install
21
+ packages, or run anything that writes to the provider. If a command would do any of that, do
22
+ not run it and say so.
23
+ - Every verdict cites evidence: a test name and its result, a file and line, a command and its
24
+ output. A criterion you could not check is reported as "not verified", never as "passes".
25
+ - Report in the format the skill asks for. If everything passes, say so plainly; if not, list
26
+ what fails first.
@@ -68,8 +68,10 @@ for the whole project.
68
68
  hard interview that cross-checks the project's documents), or **I want changes** (the user
69
69
  says what).
70
70
  3. Approval gate: only an explicit choice of "Approve it" in this conversation allows running
71
- `pjkit approve <phase>`. Never approve on the user's behalf, and never because an
72
- earlier question was answered.
71
+ `pjkit approve <phase>`. If it refuses because documents still have `[NEEDS CLARIFICATION]`
72
+ markers, resolve them with the user first. Add `--allow-open-questions` only if the user
73
+ explicitly says to approve with them open, and say which ones stay open. Never approve on
74
+ the user's behalf, and never because an earlier question was answered.
73
75
  4. After approving, run `pjkit status` and ask, again with a list, whether to **Continue
74
76
  with the next phase** now or **Stop here** and come back later with its skill. Respect the
75
77
  answer.