project-kit-cli 0.1.0__tar.gz → 0.2.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.
- project_kit_cli-0.2.0/PKG-INFO +185 -0
- project_kit_cli-0.2.0/README.md +165 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/pyproject.toml +1 -1
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/pyproject.toml.orig +1 -1
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/ai_attribution.py +5 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/approval.py +7 -0
- project_kit_cli-0.2.0/src/project_kit/assets/skills/pk-handoff/SKILL.md +57 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/skills/pk-provision/SKILL.md +15 -9
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/skills/pk-start/SKILL.md +9 -7
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/skills/pk-workflow/SKILL.md +23 -4
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/templates/constitution-input.md +10 -4
- project_kit_cli-0.2.0/src/project_kit/assets/templates/interview.md +73 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/cli.py +47 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/config.py +38 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/handoff.py +136 -3
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/help.py +1 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/installer.py +38 -4
- project_kit_cli-0.2.0/src/project_kit/manifest.py +64 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/project_choice.py +16 -1
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/provision_issues.py +4 -0
- project_kit_cli-0.2.0/src/project_kit/upgrade.py +214 -0
- project_kit_cli-0.1.0/PKG-INFO +0 -97
- project_kit_cli-0.1.0/README.md +0 -77
- project_kit_cli-0.1.0/src/project_kit/assets/skills/pk-handoff/SKILL.md +0 -43
- project_kit_cli-0.1.0/src/project_kit/assets/templates/interview.md +0 -68
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/LICENSE +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/__init__.py +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/__main__.py +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/agents.py +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/hooks/commit-msg +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/project/workflow.yml +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/skills/pk-decide/SKILL.md +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/skills/pk-discover/SKILL.md +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/skills/pk-plan/SKILL.md +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/templates/adr.md +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/templates/backlog.example.json +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/templates/brief.md +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/templates/development-workflow.md +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/templates/github/ISSUE_TEMPLATE/adr.yml +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/templates/github/ISSUE_TEMPLATE/bug.yml +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/templates/github/ISSUE_TEMPLATE/config.yml +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/templates/github/ISSUE_TEMPLATE/epic.yml +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/templates/github/ISSUE_TEMPLATE/feature.yml +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/templates/github/pull_request_template.md +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/backlog.py +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/doctor.py +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/fsutil.py +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/gh.py +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/labels.py +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/providers/__init__.py +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/providers/github.py +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/provision.py +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/state.py +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/templating.py +0 -0
- {project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/workflow.py +0 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: project-kit-cli
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Project definition and dev-workflow kit that hands off to Spec Kit
|
|
5
|
+
Keywords: project-management,spec-kit,claude-code,workflow,github
|
|
6
|
+
Author: Miguel Tomás
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Environment :: Console
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Topic :: Software Development
|
|
15
|
+
Requires-Dist: pyyaml>=6.0.3
|
|
16
|
+
Requires-Python: >=3.12
|
|
17
|
+
Project-URL: Repository, https://github.com/miguelmatg/project-kit
|
|
18
|
+
Project-URL: Issues, https://github.com/miguelmatg/project-kit/issues
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# project-kit
|
|
22
|
+
|
|
23
|
+
[](https://pypi.org/project/project-kit-cli/)
|
|
24
|
+
[](https://github.com/miguelmatg/project-kit/blob/main/LICENSE)
|
|
25
|
+
|
|
26
|
+
**Everything that happens before the first line of code.** project-kit guides you, with an AI
|
|
27
|
+
agent, through defining a project, deciding its stack and architecture, agreeing how the team
|
|
28
|
+
works and planning the backlog. It then sets up GitHub and hands the project over to
|
|
29
|
+
[Spec Kit](https://github.com/github/spec-kit), which specifies and builds each feature.
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
idea ──▶ brief ──▶ decisions (ADRs) ──▶ workflow ──▶ backlog ──▶ GitHub ──▶ Spec Kit
|
|
33
|
+
/pk-discover /pk-decide /pk-workflow /pk-plan /pk-provision /pk-handoff
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The conversations run in your AI agent (today, [Claude Code](https://claude.com/claude-code)) as
|
|
37
|
+
`/pk-…` skills: one question at a time, a recommended answer for each, and everything written to
|
|
38
|
+
documents in your repository. Every phase ends with your approval, and every document can be
|
|
39
|
+
written by hand instead.
|
|
40
|
+
|
|
41
|
+
> **Status: alpha.** It works end to end on GitHub with Claude Code. GitLab and other agents are
|
|
42
|
+
> planned.
|
|
43
|
+
|
|
44
|
+
## Requirements
|
|
45
|
+
|
|
46
|
+
- [uv](https://docs.astral.sh/uv/) (it also fetches Python 3.12+ if you do not have it)
|
|
47
|
+
- `git`
|
|
48
|
+
- [Claude Code](https://claude.com/claude-code), to run the guided phases
|
|
49
|
+
- [`gh`](https://cli.github.com/), logged in with the `repo` and `project` scopes
|
|
50
|
+
(`gh auth login`, then `gh auth refresh -s project`), to create things on GitHub
|
|
51
|
+
|
|
52
|
+
`project-kit doctor` checks all of this for you. Spec Kit is installed for you at the end, if
|
|
53
|
+
you want it.
|
|
54
|
+
|
|
55
|
+
## Install
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
uv tool install project-kit-cli # installs the `project-kit` command
|
|
59
|
+
uv tool upgrade project-kit-cli # later, to update the program
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The package is called `project-kit-cli`; the command is `project-kit`. To try it without
|
|
63
|
+
installing: `uvx --from project-kit-cli project-kit help`.
|
|
64
|
+
|
|
65
|
+
**Updating a project.** `init` copies the skills and templates into your repository and never
|
|
66
|
+
overwrites them, so a new version of the program does not change a project that already exists.
|
|
67
|
+
Run `project-kit upgrade` inside it to see what is out of date, and `project-kit upgrade --apply`
|
|
68
|
+
to bring it up to date. Files you edited are never overwritten; see
|
|
69
|
+
[upgrading](https://github.com/miguelmatg/project-kit/blob/main/docs/upgrade.md).
|
|
70
|
+
|
|
71
|
+
## Quick start
|
|
72
|
+
|
|
73
|
+
In your repository, new or existing:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
cd my-project
|
|
77
|
+
project-kit init
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`init` copies the skills and templates into the repository and then offers to open Claude Code
|
|
81
|
+
right there, already running `/pk-start` (press Enter to accept). `/pk-start` asks whether to
|
|
82
|
+
**only initialise** or to **start defining the project now**, and after every phase it asks
|
|
83
|
+
whether to continue or stop. You can leave at any point and come back later:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
project-kit status # where you are and what comes next
|
|
87
|
+
project-kit help # a visual guide to the flow and the commands
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## The phases
|
|
91
|
+
|
|
92
|
+
| # | Skill | What it does | Produces |
|
|
93
|
+
|---|---|---|---|
|
|
94
|
+
| 0 | `/pk-start` | Checks your setup and lets you choose: only initialise, or start now | `.project-kit/` |
|
|
95
|
+
| 1 | `/pk-discover` | Interviews you about the project: problem, users, scope, constraints | `docs/project/brief.md` |
|
|
96
|
+
| 2 | `/pk-decide` | Guides the technical decisions: monolith or monorepo, language, package manager, data, auth, hosting | `docs/adr/*.md` |
|
|
97
|
+
| 3 | `/pk-workflow` | Agrees how the team works: branches, reviews, quality gates | `docs/development-workflow.md` |
|
|
98
|
+
| 4 | `/pk-plan` | Derives phases, epics and a backlog from all of the above | `docs/project/roadmap.md`, `.project-kit/backlog.json` |
|
|
99
|
+
| 5 | `/pk-provision` | Creates milestones, labels, branches, the GitHub Project and the issues | GitHub |
|
|
100
|
+
| 6 | `/pk-handoff` | Prepares the Spec Kit constitution; each issue becomes a spec | `.project-kit/handoff/constitution-input.md` |
|
|
101
|
+
|
|
102
|
+
Each phase ends with an explicit approval (`project-kit approve <phase>`), and a phase cannot be
|
|
103
|
+
approved while an earlier one is still open. The phases are listed in `.project-kit/workflow.yml`;
|
|
104
|
+
for a small project, switch one off with `enabled: false`.
|
|
105
|
+
|
|
106
|
+
To fill a document by hand instead, copy the matching template from `.project-kit/templates/`
|
|
107
|
+
(`brief.md`, `adr.md`, `development-workflow.md`). The skills read what is already there and only
|
|
108
|
+
ask about what is missing.
|
|
109
|
+
|
|
110
|
+
## Existing repositories and Projects
|
|
111
|
+
|
|
112
|
+
`init` never overwrites a file, so it is safe in a repository that already has code, documents or
|
|
113
|
+
a `.claude/` folder. Before creating a GitHub Project, `provision` looks at the ones already
|
|
114
|
+
linked to the repository: with one it asks whether to use it, with several it lists them, and
|
|
115
|
+
with none it asks for a name. Use `--project <number or title>` to choose without being asked.
|
|
116
|
+
It never rewrites issues that already exist, and re-running it is always safe.
|
|
117
|
+
|
|
118
|
+
## Commands
|
|
119
|
+
|
|
120
|
+
| Command | What it does |
|
|
121
|
+
|---|---|
|
|
122
|
+
| `project-kit init` | Install the skills, templates and workflow in the current directory |
|
|
123
|
+
| `project-kit status` | Show the phases and what comes next |
|
|
124
|
+
| `project-kit upgrade [--apply] [--adopt] [--diff]` | Update the skills and templates a project already has |
|
|
125
|
+
| `project-kit help` | Show a visual guide (also what plain `project-kit` prints) |
|
|
126
|
+
| `project-kit doctor` | Check that git, gh, uv and Spec Kit are available |
|
|
127
|
+
| `project-kit approve <phase>` | Record your sign-off of a phase |
|
|
128
|
+
| `project-kit backlog validate` | Validate `.project-kit/backlog.json` |
|
|
129
|
+
| `project-kit provision [--dry-run] [--project X]` | Create milestones, branches, the Project and issues on GitHub |
|
|
130
|
+
| `project-kit handoff [--install-speckit]` | Generate the Spec Kit constitution input |
|
|
131
|
+
|
|
132
|
+
Useful `init` options: `--project-name`, `--language` (language of the generated documents),
|
|
133
|
+
`--agent claude|none` (open the agent or not) and `--ai-coauthor keep|remove`.
|
|
134
|
+
|
|
135
|
+
## AI co-author
|
|
136
|
+
|
|
137
|
+
`init` asks whether AI assistants may appear as co-authors of your commits and pull requests. If
|
|
138
|
+
not, it configures Claude Code to stop signing them and installs a `commit-msg` hook that strips
|
|
139
|
+
the co-author trailer of other assistants. Switch the hook on once per clone with
|
|
140
|
+
`git config core.hooksPath .githooks`.
|
|
141
|
+
|
|
142
|
+
## After the handoff
|
|
143
|
+
|
|
144
|
+
`/pk-handoff` leaves a text file for Spec Kit's constitution and tells you the next step:
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
/speckit-constitution @.project-kit/handoff/constitution-input.md
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
From there Spec Kit does the work. Each issue of the backlog is one spec: its text is the input of
|
|
151
|
+
`/speckit-specify`, followed by `/speckit-clarify`, `/speckit-plan`, `/speckit-tasks` and
|
|
152
|
+
`/speckit-implement`. project-kit never writes inside `.specify/` and does not write specs.
|
|
153
|
+
|
|
154
|
+
The constitution is generated from your own rules: the branch pattern and merge strategy you agreed,
|
|
155
|
+
the decisions on record, and an index of where each kind of rule lives (including the GitHub
|
|
156
|
+
Project used for tasks). Once the constitution is written, `project-kit approve handoff` deletes
|
|
157
|
+
the temporary input files; from then on the constitution is the single source.
|
|
158
|
+
|
|
159
|
+
## What it adds to your repository
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
.project-kit/ config.yml, state.json, workflow.yml, templates/, handoff/
|
|
163
|
+
.claude/skills/pk-*/ the skills
|
|
164
|
+
docs/project/ brief.md, roadmap.md (created by the phases)
|
|
165
|
+
docs/adr/ one file per decision (created by the phases)
|
|
166
|
+
.githooks/commit-msg only if you removed the AI co-author
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
## Documentation
|
|
170
|
+
|
|
171
|
+
More detail lives in the repository (in Spanish):
|
|
172
|
+
[design](https://github.com/miguelmatg/project-kit/blob/main/docs/design.md),
|
|
173
|
+
[backlog schema](https://github.com/miguelmatg/project-kit/blob/main/docs/backlog-schema.md),
|
|
174
|
+
[provisioning](https://github.com/miguelmatg/project-kit/blob/main/docs/provisioning.md) and
|
|
175
|
+
[Spec Kit handoff](https://github.com/miguelmatg/project-kit/blob/main/docs/handoff.md).
|
|
176
|
+
|
|
177
|
+
## Feedback
|
|
178
|
+
|
|
179
|
+
Ideas and bug reports are welcome as
|
|
180
|
+
[issues](https://github.com/miguelmatg/project-kit/issues). Pull requests are not accepted; see
|
|
181
|
+
[CONTRIBUTING](https://github.com/miguelmatg/project-kit/blob/main/CONTRIBUTING.md).
|
|
182
|
+
|
|
183
|
+
## License
|
|
184
|
+
|
|
185
|
+
[MIT](https://github.com/miguelmatg/project-kit/blob/main/LICENSE)
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# project-kit
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/project-kit-cli/)
|
|
4
|
+
[](https://github.com/miguelmatg/project-kit/blob/main/LICENSE)
|
|
5
|
+
|
|
6
|
+
**Everything that happens before the first line of code.** project-kit guides you, with an AI
|
|
7
|
+
agent, through defining a project, deciding its stack and architecture, agreeing how the team
|
|
8
|
+
works and planning the backlog. It then sets up GitHub and hands the project over to
|
|
9
|
+
[Spec Kit](https://github.com/github/spec-kit), which specifies and builds each feature.
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
idea ──▶ brief ──▶ decisions (ADRs) ──▶ workflow ──▶ backlog ──▶ GitHub ──▶ Spec Kit
|
|
13
|
+
/pk-discover /pk-decide /pk-workflow /pk-plan /pk-provision /pk-handoff
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The conversations run in your AI agent (today, [Claude Code](https://claude.com/claude-code)) as
|
|
17
|
+
`/pk-…` skills: one question at a time, a recommended answer for each, and everything written to
|
|
18
|
+
documents in your repository. Every phase ends with your approval, and every document can be
|
|
19
|
+
written by hand instead.
|
|
20
|
+
|
|
21
|
+
> **Status: alpha.** It works end to end on GitHub with Claude Code. GitLab and other agents are
|
|
22
|
+
> planned.
|
|
23
|
+
|
|
24
|
+
## Requirements
|
|
25
|
+
|
|
26
|
+
- [uv](https://docs.astral.sh/uv/) (it also fetches Python 3.12+ if you do not have it)
|
|
27
|
+
- `git`
|
|
28
|
+
- [Claude Code](https://claude.com/claude-code), to run the guided phases
|
|
29
|
+
- [`gh`](https://cli.github.com/), logged in with the `repo` and `project` scopes
|
|
30
|
+
(`gh auth login`, then `gh auth refresh -s project`), to create things on GitHub
|
|
31
|
+
|
|
32
|
+
`project-kit doctor` checks all of this for you. Spec Kit is installed for you at the end, if
|
|
33
|
+
you want it.
|
|
34
|
+
|
|
35
|
+
## Install
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
uv tool install project-kit-cli # installs the `project-kit` command
|
|
39
|
+
uv tool upgrade project-kit-cli # later, to update the program
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
The package is called `project-kit-cli`; the command is `project-kit`. To try it without
|
|
43
|
+
installing: `uvx --from project-kit-cli project-kit help`.
|
|
44
|
+
|
|
45
|
+
**Updating a project.** `init` copies the skills and templates into your repository and never
|
|
46
|
+
overwrites them, so a new version of the program does not change a project that already exists.
|
|
47
|
+
Run `project-kit upgrade` inside it to see what is out of date, and `project-kit upgrade --apply`
|
|
48
|
+
to bring it up to date. Files you edited are never overwritten; see
|
|
49
|
+
[upgrading](https://github.com/miguelmatg/project-kit/blob/main/docs/upgrade.md).
|
|
50
|
+
|
|
51
|
+
## Quick start
|
|
52
|
+
|
|
53
|
+
In your repository, new or existing:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
cd my-project
|
|
57
|
+
project-kit init
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`init` copies the skills and templates into the repository and then offers to open Claude Code
|
|
61
|
+
right there, already running `/pk-start` (press Enter to accept). `/pk-start` asks whether to
|
|
62
|
+
**only initialise** or to **start defining the project now**, and after every phase it asks
|
|
63
|
+
whether to continue or stop. You can leave at any point and come back later:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
project-kit status # where you are and what comes next
|
|
67
|
+
project-kit help # a visual guide to the flow and the commands
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## The phases
|
|
71
|
+
|
|
72
|
+
| # | Skill | What it does | Produces |
|
|
73
|
+
|---|---|---|---|
|
|
74
|
+
| 0 | `/pk-start` | Checks your setup and lets you choose: only initialise, or start now | `.project-kit/` |
|
|
75
|
+
| 1 | `/pk-discover` | Interviews you about the project: problem, users, scope, constraints | `docs/project/brief.md` |
|
|
76
|
+
| 2 | `/pk-decide` | Guides the technical decisions: monolith or monorepo, language, package manager, data, auth, hosting | `docs/adr/*.md` |
|
|
77
|
+
| 3 | `/pk-workflow` | Agrees how the team works: branches, reviews, quality gates | `docs/development-workflow.md` |
|
|
78
|
+
| 4 | `/pk-plan` | Derives phases, epics and a backlog from all of the above | `docs/project/roadmap.md`, `.project-kit/backlog.json` |
|
|
79
|
+
| 5 | `/pk-provision` | Creates milestones, labels, branches, the GitHub Project and the issues | GitHub |
|
|
80
|
+
| 6 | `/pk-handoff` | Prepares the Spec Kit constitution; each issue becomes a spec | `.project-kit/handoff/constitution-input.md` |
|
|
81
|
+
|
|
82
|
+
Each phase ends with an explicit approval (`project-kit approve <phase>`), and a phase cannot be
|
|
83
|
+
approved while an earlier one is still open. The phases are listed in `.project-kit/workflow.yml`;
|
|
84
|
+
for a small project, switch one off with `enabled: false`.
|
|
85
|
+
|
|
86
|
+
To fill a document by hand instead, copy the matching template from `.project-kit/templates/`
|
|
87
|
+
(`brief.md`, `adr.md`, `development-workflow.md`). The skills read what is already there and only
|
|
88
|
+
ask about what is missing.
|
|
89
|
+
|
|
90
|
+
## Existing repositories and Projects
|
|
91
|
+
|
|
92
|
+
`init` never overwrites a file, so it is safe in a repository that already has code, documents or
|
|
93
|
+
a `.claude/` folder. Before creating a GitHub Project, `provision` looks at the ones already
|
|
94
|
+
linked to the repository: with one it asks whether to use it, with several it lists them, and
|
|
95
|
+
with none it asks for a name. Use `--project <number or title>` to choose without being asked.
|
|
96
|
+
It never rewrites issues that already exist, and re-running it is always safe.
|
|
97
|
+
|
|
98
|
+
## Commands
|
|
99
|
+
|
|
100
|
+
| Command | What it does |
|
|
101
|
+
|---|---|
|
|
102
|
+
| `project-kit init` | Install the skills, templates and workflow in the current directory |
|
|
103
|
+
| `project-kit status` | Show the phases and what comes next |
|
|
104
|
+
| `project-kit upgrade [--apply] [--adopt] [--diff]` | Update the skills and templates a project already has |
|
|
105
|
+
| `project-kit help` | Show a visual guide (also what plain `project-kit` prints) |
|
|
106
|
+
| `project-kit doctor` | Check that git, gh, uv and Spec Kit are available |
|
|
107
|
+
| `project-kit approve <phase>` | Record your sign-off of a phase |
|
|
108
|
+
| `project-kit backlog validate` | Validate `.project-kit/backlog.json` |
|
|
109
|
+
| `project-kit provision [--dry-run] [--project X]` | Create milestones, branches, the Project and issues on GitHub |
|
|
110
|
+
| `project-kit handoff [--install-speckit]` | Generate the Spec Kit constitution input |
|
|
111
|
+
|
|
112
|
+
Useful `init` options: `--project-name`, `--language` (language of the generated documents),
|
|
113
|
+
`--agent claude|none` (open the agent or not) and `--ai-coauthor keep|remove`.
|
|
114
|
+
|
|
115
|
+
## AI co-author
|
|
116
|
+
|
|
117
|
+
`init` asks whether AI assistants may appear as co-authors of your commits and pull requests. If
|
|
118
|
+
not, it configures Claude Code to stop signing them and installs a `commit-msg` hook that strips
|
|
119
|
+
the co-author trailer of other assistants. Switch the hook on once per clone with
|
|
120
|
+
`git config core.hooksPath .githooks`.
|
|
121
|
+
|
|
122
|
+
## After the handoff
|
|
123
|
+
|
|
124
|
+
`/pk-handoff` leaves a text file for Spec Kit's constitution and tells you the next step:
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
/speckit-constitution @.project-kit/handoff/constitution-input.md
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
From there Spec Kit does the work. Each issue of the backlog is one spec: its text is the input of
|
|
131
|
+
`/speckit-specify`, followed by `/speckit-clarify`, `/speckit-plan`, `/speckit-tasks` and
|
|
132
|
+
`/speckit-implement`. project-kit never writes inside `.specify/` and does not write specs.
|
|
133
|
+
|
|
134
|
+
The constitution is generated from your own rules: the branch pattern and merge strategy you agreed,
|
|
135
|
+
the decisions on record, and an index of where each kind of rule lives (including the GitHub
|
|
136
|
+
Project used for tasks). Once the constitution is written, `project-kit approve handoff` deletes
|
|
137
|
+
the temporary input files; from then on the constitution is the single source.
|
|
138
|
+
|
|
139
|
+
## What it adds to your repository
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
.project-kit/ config.yml, state.json, workflow.yml, templates/, handoff/
|
|
143
|
+
.claude/skills/pk-*/ the skills
|
|
144
|
+
docs/project/ brief.md, roadmap.md (created by the phases)
|
|
145
|
+
docs/adr/ one file per decision (created by the phases)
|
|
146
|
+
.githooks/commit-msg only if you removed the AI co-author
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## Documentation
|
|
150
|
+
|
|
151
|
+
More detail lives in the repository (in Spanish):
|
|
152
|
+
[design](https://github.com/miguelmatg/project-kit/blob/main/docs/design.md),
|
|
153
|
+
[backlog schema](https://github.com/miguelmatg/project-kit/blob/main/docs/backlog-schema.md),
|
|
154
|
+
[provisioning](https://github.com/miguelmatg/project-kit/blob/main/docs/provisioning.md) and
|
|
155
|
+
[Spec Kit handoff](https://github.com/miguelmatg/project-kit/blob/main/docs/handoff.md).
|
|
156
|
+
|
|
157
|
+
## Feedback
|
|
158
|
+
|
|
159
|
+
Ideas and bug reports are welcome as
|
|
160
|
+
[issues](https://github.com/miguelmatg/project-kit/issues). Pull requests are not accepted; see
|
|
161
|
+
[CONTRIBUTING](https://github.com/miguelmatg/project-kit/blob/main/CONTRIBUTING.md).
|
|
162
|
+
|
|
163
|
+
## License
|
|
164
|
+
|
|
165
|
+
[MIT](https://github.com/miguelmatg/project-kit/blob/main/LICENSE)
|
|
@@ -60,6 +60,11 @@ def install_hook(root: Path) -> tuple[Path | None, str]:
|
|
|
60
60
|
return HOOK, ""
|
|
61
61
|
|
|
62
62
|
|
|
63
|
+
def hook_bytes() -> bytes:
|
|
64
|
+
"""The shipped commit-msg hook, as it is installed."""
|
|
65
|
+
return (files("project_kit") / "assets" / "hooks" / "commit-msg").read_bytes()
|
|
66
|
+
|
|
67
|
+
|
|
63
68
|
def hook_is_active(root: Path) -> bool:
|
|
64
69
|
"""True if git is already pointed at ``.githooks`` in this repository."""
|
|
65
70
|
config = root / ".git" / "config"
|
|
@@ -4,6 +4,7 @@ from pathlib import Path
|
|
|
4
4
|
|
|
5
5
|
from project_kit.backlog import load_backlog
|
|
6
6
|
from project_kit.config import load_config
|
|
7
|
+
from project_kit.handoff import CONSTITUTION, INPUT_FILE, constitution_ready
|
|
7
8
|
from project_kit.state import PHASES, State, StateError, load_state, save_state
|
|
8
9
|
from project_kit.workflow import load_workflow
|
|
9
10
|
|
|
@@ -29,6 +30,12 @@ def approve_phase(root: Path, phase: str) -> State:
|
|
|
29
30
|
)
|
|
30
31
|
if phase == "plan":
|
|
31
32
|
load_backlog(root)
|
|
33
|
+
if phase == "handoff" and not constitution_ready(root):
|
|
34
|
+
raise StateError(
|
|
35
|
+
f"The Spec Kit constitution is not written yet ({CONSTITUTION.as_posix()} is missing "
|
|
36
|
+
"or still the template). In Claude Code run "
|
|
37
|
+
f"/speckit-constitution @{INPUT_FILE.as_posix()} first."
|
|
38
|
+
)
|
|
32
39
|
state.approve(phase)
|
|
33
40
|
if PHASES.index(phase) > PHASES.index(state.phase):
|
|
34
41
|
state.phase = phase
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pk-handoff
|
|
3
|
+
description: Hand the project over to Spec Kit: generate the constitution input from the project's decisions and set up Spec Kit (phase 6). Use when planning and provisioning are done and the user wants to start specifying features.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# pk-handoff — phase 6
|
|
7
|
+
|
|
8
|
+
Prepare the text for `/speckit-constitution`, make sure Spec Kit is available, and point the
|
|
9
|
+
user at the first specs. Spec Kit owns `.specify/`; project-kit never writes inside it.
|
|
10
|
+
|
|
11
|
+
## Steps
|
|
12
|
+
|
|
13
|
+
1. Ask, with a selection list (`AskUserQuestion`: **No extra rules** / **Yes, I have some**),
|
|
14
|
+
whether the project has rules of its own that should be part of the constitution
|
|
15
|
+
(security, compliance, performance, team conventions). If yes, collect them and write them
|
|
16
|
+
as a Markdown list to `.project-kit/handoff/constitution-extra.md`; they are added under
|
|
17
|
+
"Project-specific rules". Governance content only: no feature requests, no implementation
|
|
18
|
+
tasks. Everything else the constitution needs (principles, the branch pattern and merge
|
|
19
|
+
strategy from `config.yml`, the decisions on record, and an index of where each kind of rule
|
|
20
|
+
lives, including the GitHub Project used for tasks) is generated for you.
|
|
21
|
+
2. Run `project-kit handoff --dry-run` and show the user what will be generated.
|
|
22
|
+
3. Run `project-kit handoff`. It writes `.project-kit/handoff/constitution-input.md` and
|
|
23
|
+
reports the state of Spec Kit.
|
|
24
|
+
4. If Spec Kit is not ready, explain what `project-kit handoff --install-speckit` would run
|
|
25
|
+
(it installs the `specify-cli` package with `uv` and runs `specify init --here`, which
|
|
26
|
+
merges Spec Kit's files into the repository). Only after an explicit choice to go ahead,
|
|
27
|
+
run `project-kit handoff --install-speckit --yes`.
|
|
28
|
+
5. Tell the user to run, in this session:
|
|
29
|
+
`/speckit-constitution @.project-kit/handoff/constitution-input.md`
|
|
30
|
+
You cannot run that command for them.
|
|
31
|
+
6. When the constitution is written, read `.specify/memory/constitution.md` and check that it
|
|
32
|
+
kept what the input said: the branch pattern and the merge strategy of `config.yml`, the
|
|
33
|
+
section "Where the project's rules live" (or its content) and the reference to the GitHub
|
|
34
|
+
Project for tasks. If something is missing, tell the user and suggest amending it with
|
|
35
|
+
`/speckit-constitution` before continuing.
|
|
36
|
+
7. Suggest mentioning `docs/project/`, `docs/adr/` and `docs/development-workflow.md` in
|
|
37
|
+
`CLAUDE.md` or `AGENTS.md`. Explain that from here Spec Kit does the work: each backlog
|
|
38
|
+
issue is one spec, and its text (description and acceptance criteria) is the input of
|
|
39
|
+
`/speckit-specify`; then `/speckit-clarify`, `/speckit-plan`, `/speckit-tasks` and
|
|
40
|
+
`/speckit-implement`. project-kit does not write specs. Suggest the order: the issues of
|
|
41
|
+
the first phase, by priority.
|
|
42
|
+
8. When the user confirms the constitution is in place, run `project-kit approve handoff`. It
|
|
43
|
+
refuses while `.specify/memory/constitution.md` is missing or still Spec Kit's template, and
|
|
44
|
+
when it succeeds it **deletes** `constitution-input.md` and `constitution-extra.md`: they
|
|
45
|
+
only exist to feed `/speckit-constitution`, and from then on the constitution is the one
|
|
46
|
+
source. Tell the user they were removed.
|
|
47
|
+
|
|
48
|
+
## Rules
|
|
49
|
+
|
|
50
|
+
- `constitution-input.md` is regenerated every time until the handoff is approved. Do not edit
|
|
51
|
+
it; put project-specific rules in `constitution-extra.md`. If the user removes its
|
|
52
|
+
`project-kit:managed` header the file is theirs and is no longer regenerated.
|
|
53
|
+
- Both files are temporary. After the handoff, rules change by amending the constitution with
|
|
54
|
+
`/speckit-constitution`, not by recreating them.
|
|
55
|
+
- Never modify anything inside `.specify/` by hand.
|
|
56
|
+
- If project-kit warns about an untested Spec Kit version, tell the user, but continue: the
|
|
57
|
+
only thing project-kit depends on is the input file.
|
{project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/skills/pk-provision/SKILL.md
RENAMED
|
@@ -16,17 +16,23 @@ This writes to the provider, so nothing happens without the user's explicit cons
|
|
|
16
16
|
|
|
17
17
|
## Steps
|
|
18
18
|
|
|
19
|
-
1. Run `project-kit provision --dry-run
|
|
20
|
-
|
|
19
|
+
1. Run `project-kit provision --dry-run`. You have no terminal for the command's own
|
|
20
|
+
questions, so it never asks: it uses the only Project it finds, or stops and tells you what
|
|
21
|
+
to choose. Show the user the plan it prints: what will be created, what already exists, and
|
|
22
|
+
the note about branch protection.
|
|
21
23
|
- A `BLOCKING` line means nothing can be applied; explain it and help fix it.
|
|
22
24
|
- The `Project:` line says which GitHub Project will be used: one already linked to the
|
|
23
|
-
repository (`already exists`) or a new one.
|
|
24
|
-
|
|
25
|
-
existing
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
repository (`already exists`) or a new one. Ask which one they want with a selection
|
|
26
|
+
list (`AskUserQuestion`, see `.project-kit/templates/interview.md`): the detected
|
|
27
|
+
Project (Recommended), another existing one, or a new one (then ask its name). Whatever
|
|
28
|
+
they choose, run the dry run again with `--project "<number or exact title>"` (a new
|
|
29
|
+
title creates it), so the plan matches. The choice is remembered afterwards.
|
|
30
|
+
- If it stops with "Several Projects match this repository" or "There is no terminal to
|
|
31
|
+
ask which GitHub Project to use", offer the listed Projects (up to three, plus "Other"
|
|
32
|
+
for a new name) in a selection list and rerun with `--project`.
|
|
33
|
+
2. Ask with a selection list whether to go ahead (**Create it all** / **Not yet**). Only after
|
|
34
|
+
the first run `project-kit provision --yes` (with the same `--project`). Never pass `--yes`
|
|
35
|
+
without that consent.
|
|
30
36
|
3. Report the result. Running the command again is always safe: it only creates what is
|
|
31
37
|
missing, never rewrites existing issues and never moves cards the user has moved.
|
|
32
38
|
|
{project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/skills/pk-start/SKILL.md
RENAMED
|
@@ -16,24 +16,26 @@ now. Nothing is created in GitHub or GitLab here.
|
|
|
16
16
|
- `warn` lines are optional (`uv` and Spec Kit are only needed at the handoff phase).
|
|
17
17
|
2. **Read the setup.** If `.project-kit/config.yml` is missing, tell the user to run
|
|
18
18
|
`project-kit init` in the terminal and stop. Otherwise read it back (project name,
|
|
19
|
-
provider, language, branches) and ask
|
|
19
|
+
provider, language, branches) and ask with a selection list (`AskUserQuestion`: **It is
|
|
20
|
+
right** / **Change something**) whether it is right. These are plain values that can
|
|
20
21
|
also be edited by hand. If the language is wrong, edit `language:` in the file.
|
|
21
22
|
3. **AI co-author.** If `config.yml` says `ai_coauthor: true` and the user has not been
|
|
22
|
-
asked yet, ask
|
|
23
|
-
|
|
23
|
+
asked yet, ask with a selection list (**Keep them as co-authors** / **Remove them**) whether
|
|
24
|
+
AI assistants (Claude, Copilot...) should appear as co-authors of commits and pull
|
|
25
|
+
requests. If they do not want it:
|
|
24
26
|
- set `ai_coauthor: false` in `config.yml` and run `project-kit init`: it makes Claude
|
|
25
27
|
Code stop signing (`attribution` in `.claude/settings.json`) and installs a
|
|
26
28
|
`commit-msg` hook that strips the co-author trailer of any other assistant;
|
|
27
29
|
- ask before running `git config core.hooksPath .githooks`, which switches the hook on for
|
|
28
30
|
this clone. Each teammate runs that command once.
|
|
29
|
-
4. **Ask how far to go now
|
|
31
|
+
4. **Ask how far to go now**, with a selection list (`AskUserQuestion`, see
|
|
32
|
+
`.project-kit/templates/interview.md`) and exactly these two options. Put B first with
|
|
33
|
+
`(Recommended)` unless the user said they are in a hurry:
|
|
30
34
|
|
|
31
35
|
| Option | What happens |
|
|
32
36
|
|--------|--------------|
|
|
33
|
-
| **A. Only initialise** | Stop here. The user comes back later with `/pk-discover` |
|
|
34
37
|
| **B. Start defining the project** | Continue now with the discovery interview |
|
|
35
|
-
|
|
36
|
-
Recommend B unless the user said they are in a hurry.
|
|
38
|
+
| **A. Only initialise** | Stop here. The user comes back later with `/pk-discover` |
|
|
37
39
|
5. **If A:** run `project-kit status`, show it, and explain that `/pk-discover` is next. Done.
|
|
38
40
|
6. **If B:** ask for a short description of the project in the user's own words, a few
|
|
39
41
|
sentences, a pasted note or "nothing yet, ask me". Then follow the `pk-discover` skill
|
{project_kit_cli-0.1.0 → project_kit_cli-0.2.0}/src/project_kit/assets/skills/pk-workflow/SKILL.md
RENAMED
|
@@ -36,11 +36,28 @@ Read `.project-kit/templates/interview.md` first and follow it.
|
|
|
36
36
|
1. Create `docs/development-workflow.md` from the template if it does not exist; fill in what
|
|
37
37
|
the ADRs and config already settle.
|
|
38
38
|
2. Interview on the rest, then write the answers into the document after each one.
|
|
39
|
-
3.
|
|
40
|
-
|
|
39
|
+
3. **Record what was agreed as data** in `.project-kit/config.yml`: the handoff generates the
|
|
40
|
+
Spec Kit constitution from these values, not from the prose of the document, so they must
|
|
41
|
+
say the same thing as the document:
|
|
42
|
+
|
|
43
|
+
```yaml
|
|
44
|
+
branches: # the three permanent branches (three different names)
|
|
45
|
+
main: main
|
|
46
|
+
release: release
|
|
47
|
+
develop: develop
|
|
48
|
+
workflow:
|
|
49
|
+
spec_branch: "spec/<name>" # how the branch of one spec is named
|
|
50
|
+
merge: # how pull requests are merged into each branch
|
|
51
|
+
develop: squash # squash | merge | rebase
|
|
52
|
+
release: merge
|
|
53
|
+
main: merge
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
If the user changes branch names or drops `release`/`develop`, edit `branches:` too. Tell
|
|
57
|
+
the user what you wrote.
|
|
41
58
|
4. **Present** the document and the open markers; offer a clarification pass.
|
|
42
|
-
5. **Approval gate.** On an explicit "
|
|
43
|
-
`project-kit approve workflow`.
|
|
59
|
+
5. **Approval gate.** On an explicit choice of "Approve it", set `**Status**: Approved` and
|
|
60
|
+
run `project-kit approve workflow`.
|
|
44
61
|
6. Run `project-kit status` and offer `pk-plan` next: continue now, or stop here.
|
|
45
62
|
|
|
46
63
|
## Rules
|
|
@@ -48,4 +65,6 @@ Read `.project-kit/templates/interview.md` first and follow it.
|
|
|
48
65
|
- Do not configure anything in the provider here: branches and protection are created by
|
|
49
66
|
`pk-provision`, after the plan.
|
|
50
67
|
- Do not repeat technical decisions; link the ADR.
|
|
68
|
+
- The document and the `workflow:` / `branches:` values of `config.yml` must never disagree.
|
|
69
|
+
If the user changes one later, change the other.
|
|
51
70
|
- Write in the language of `config.yml`.
|
|
@@ -9,7 +9,7 @@ nothing in this document asks for features to be built.
|
|
|
9
9
|
|
|
10
10
|
### I. Spec-driven development (NON-NEGOTIABLE)
|
|
11
11
|
Every feature follows specify, clarify, plan, tasks, implement. There is no product code
|
|
12
|
-
without an approved spec. Each spec lives in its own branch `
|
|
12
|
+
without an approved spec. Each spec lives in its own branch `{{spec_branch}}`, created from
|
|
13
13
|
`{{branches.develop}}`, and in `specs/NNN-name/`. Trivial changes (typos, dependency bumps,
|
|
14
14
|
configuration) may go as `chore/*` without a spec.
|
|
15
15
|
|
|
@@ -47,13 +47,12 @@ in `docs/adr/`.
|
|
|
47
47
|
|
|
48
48
|
- Permanent branches: `{{branches.main}}` (released product), `{{branches.release}}`
|
|
49
49
|
(testing and acceptance) and `{{branches.develop}}` (development).
|
|
50
|
-
- Working branches start from `{{branches.develop}}`: `
|
|
50
|
+
- Working branches start from `{{branches.develop}}`: `{{spec_branch}}` (one per spec), `chore/*`,
|
|
51
51
|
`docs/*` and `fix/*`. `hotfix/*` starts from `{{branches.main}}`.
|
|
52
52
|
- Promotion flows `{{branches.develop}}` to `{{branches.release}}` to `{{branches.main}}`. A
|
|
53
53
|
hotfix goes to `{{branches.main}}` and `{{branches.release}}` and is then propagated back
|
|
54
54
|
to `{{branches.develop}}`.
|
|
55
|
-
-
|
|
56
|
-
`{{branches.main}}`. Releases are tagged `vX.Y.Z` (SemVer) on `{{branches.main}}`.
|
|
55
|
+
- {{merge_summary}} Releases are tagged `vX.Y.Z` (SemVer) on `{{branches.main}}`.
|
|
57
56
|
- Commits follow Conventional Commits (`feat:`, `fix:`, `docs:`, `chore:`, `test:`,
|
|
58
57
|
`refactor:`, `ci:`).
|
|
59
58
|
- Everything goes through a pull request. There is no direct push to a permanent branch.
|
|
@@ -70,6 +69,13 @@ in `docs/adr/`.
|
|
|
70
69
|
## Decisions on record
|
|
71
70
|
|
|
72
71
|
{{decisions}}
|
|
72
|
+
|
|
73
|
+
## Where the project's rules live
|
|
74
|
+
|
|
75
|
+
Follow these sources instead of restating them in a spec. When two disagree, fix the source
|
|
76
|
+
that is wrong rather than working around it.
|
|
77
|
+
|
|
78
|
+
{{rules_index}}
|
|
73
79
|
{{extra}}
|
|
74
80
|
## Governance
|
|
75
81
|
|