project-guide 2.17.0__tar.gz → 2.18.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_guide-2.17.0 → project_guide-2.18.0}/.github/workflows/ci.yml +3 -3
- {project_guide-2.17.0 → project_guide-2.18.0}/.github/workflows/deploy-docs.yml +1 -1
- {project_guide-2.17.0 → project_guide-2.18.0}/.github/workflows/publish.yml +1 -1
- {project_guide-2.17.0 → project_guide-2.18.0}/.github/workflows/test.yml +2 -2
- {project_guide-2.17.0 → project_guide-2.18.0}/.project-guide.yml +1 -1
- {project_guide-2.17.0 → project_guide-2.18.0}/CHANGELOG.md +10 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/CONTRIBUTING.md +2 -2
- {project_guide-2.17.0 → project_guide-2.18.0}/PKG-INFO +1 -23
- {project_guide-2.17.0 → project_guide-2.18.0}/README.md +0 -22
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/site/user-guide/commands.md +0 -24
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/concept.md +1 -1
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/phase-q-subphase-strategy-for-large-phases.md +1 -1
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/stories.md +34 -17
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/tech-spec.md +0 -1
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/cli.py +0 -270
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/developer/best-practices-guide.md +1 -1
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/plan-production-phase-mode.md +1 -1
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/version.py +1 -1
- {project_guide-2.17.0 → project_guide-2.18.0}/pyproject.toml +1 -1
- {project_guide-2.17.0 → project_guide-2.18.0}/tests/test_cli.py +43 -127
- {project_guide-2.17.0 → project_guide-2.18.0}/tests/test_render.py +53 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/.github/FUNDING.yml +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/.github/dependabot.yml +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/.gitignore +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/.tool-versions +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/LICENSE +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/SECURITY.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/site/.gitignore +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/site/about/changelog.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/site/about/license.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/site/developer-guide/contributing.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/site/developer-guide/development.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/site/developer-guide/testing.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/site/getting-started.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/site/images/project-guide-banner-landing.png +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/site/images/project-guide-header-readme.png +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/site/index.html +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/site/user-guide/configuration.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/site/user-guide/install-options.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/site/user-guide/modes.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/site/user-guide/overrides.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/site/user-guide/workflow.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/.archive/phase-j-modes-plan.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/.archive/phase-k-release-lifecycle-plan.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/.archive/phase-l-no-input-init-plan.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/.archive/phase-m-project-essentials-plan.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/.archive/phase-n-mode-naming-cli-memory-plan.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/.archive/phase-o-pyve-quiet-embedding-subplan.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/.archive/phase-o-quiet-non-interactive-embedding-feature.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/.archive/phase-p-auto-heal-plan.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/.archive/project-guide-no-input-spec.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/.archive/stories-v1.3.1.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/.archive/stories-v2.0.20.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/.archive/stories-v2.10.2.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/.archive/stories-v2.3.9.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/.archive/stories-v2.4.19.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/.archive/stories-v2.5.15.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/.archive/ux-problems-v2.0.10.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/brand-descriptions.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/features.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/phase-q-dx-subphases-plan.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/phase-q-plan-envs-mode-env-dependences-artifact-roughdraft.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/phase-q-plan-envs-mode-roughdraft.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/phase-q-pyve-toolchain-hosting.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/phase-q-subphase-2-plan-envs-plan.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/phase-q-subphase-3-pyve-hosting-plan.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/phase-q-subphase-4-local-install-warning-readiness-gate.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/phase-q-subphase-4-readiness-gate-plan.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/phase-q-wizard-env-contract.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/project-essentials.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/pyve/README.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/pyve/concept.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/pyve/features.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/pyve/sync.sh +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/docs/specs/pyve/tech-spec.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/mkdocs.yml +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project-guide-old-template.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/__init__.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/__main__.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/actions.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/config.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/exceptions.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/metadata.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/render.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/runtime.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/stories.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/sync.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/.project-guide.yml.template +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/.metadata.yml +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/README.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/developer/brand-descriptions-guide.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/developer/codecov-setup-guide.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/developer/debug-guide.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/developer/landing-page-guide.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/developer/production-github-guide.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/developer/project-guide.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/developer/python-editable-install.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/artifacts/brand-descriptions.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/artifacts/concept.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/artifacts/env-dependencies.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/artifacts/features.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/artifacts/project-essentials.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/artifacts/pyve-essentials.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/artifacts/stories.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/artifacts/tech-spec.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/llm_entry_point.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/_header-common.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/_header-cycle.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/_header-sequence.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/_phase-letters.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/archive-stories-mode.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/code-direct-mode.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/code-test-first-mode.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/debug-mode.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/default-mode.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/document-brand-mode.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/document-landing-mode.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/plan-concept-mode.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/plan-envs-mode.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/plan-features-mode.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/plan-phase-mode.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/plan-stories-mode.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/plan-tech-spec-mode.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/refactor-document-mode.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/refactor-plan-mode.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/project_guide/templates/project-guide/templates/modes/scaffold-project-mode.md +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/pyve.toml +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/requirements-dev.txt +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/tests/__init__.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/tests/conftest.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/tests/test_actions.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/tests/test_archive_stories_mode.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/tests/test_config.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/tests/test_cross_repo_contract.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/tests/test_integration.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/tests/test_metadata.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/tests/test_purge.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/tests/test_runtime.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/tests/test_stories.py +0 -0
- {project_guide-2.17.0 → project_guide-2.18.0}/tests/test_sync.py +0 -0
|
@@ -15,7 +15,7 @@ jobs:
|
|
|
15
15
|
python-version: ['3.11', '3.12', '3.13']
|
|
16
16
|
|
|
17
17
|
steps:
|
|
18
|
-
- uses: actions/checkout@
|
|
18
|
+
- uses: actions/checkout@v7
|
|
19
19
|
|
|
20
20
|
- name: Set up Python ${{ matrix.python-version }}
|
|
21
21
|
uses: actions/setup-python@v5
|
|
@@ -41,7 +41,7 @@ jobs:
|
|
|
41
41
|
|
|
42
42
|
- name: Upload coverage to Codecov
|
|
43
43
|
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
|
|
44
|
-
uses: codecov/codecov-action@
|
|
44
|
+
uses: codecov/codecov-action@v7
|
|
45
45
|
with:
|
|
46
46
|
file: ./coverage.xml
|
|
47
47
|
fail_ci_if_error: false
|
|
@@ -51,7 +51,7 @@ jobs:
|
|
|
51
51
|
needs: test
|
|
52
52
|
|
|
53
53
|
steps:
|
|
54
|
-
- uses: actions/checkout@
|
|
54
|
+
- uses: actions/checkout@v7
|
|
55
55
|
|
|
56
56
|
- name: Set up Python
|
|
57
57
|
uses: actions/setup-python@v5
|
|
@@ -19,7 +19,7 @@ jobs:
|
|
|
19
19
|
python-version: ['3.11', '3.12', '3.13']
|
|
20
20
|
|
|
21
21
|
steps:
|
|
22
|
-
- uses: actions/checkout@
|
|
22
|
+
- uses: actions/checkout@v7
|
|
23
23
|
|
|
24
24
|
- name: Set up Python ${{ matrix.python-version }}
|
|
25
25
|
uses: actions/setup-python@v5
|
|
@@ -42,7 +42,7 @@ jobs:
|
|
|
42
42
|
|
|
43
43
|
- name: Upload coverage
|
|
44
44
|
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
|
|
45
|
-
uses: codecov/codecov-action@
|
|
45
|
+
uses: codecov/codecov-action@v7
|
|
46
46
|
with:
|
|
47
47
|
file: ./coverage.xml
|
|
48
48
|
flags: unittests
|
|
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.18.0] - 2026-07-11
|
|
11
|
+
|
|
12
|
+
**Removed the `bump-version` command (Story Q.ac).** project-guide no longer ships a mechanical version writer. The command (added Story O.o, v2.5.13) was Python-/`pyproject.toml`-centric — it stamped `X.Y.Z` into `pyproject.toml`, an auto-detected `__version__` source, and `CHANGELOG.md`. project-guide is now tightly integrated into Pyve, which is polyglot; generalizing a mechanical version-write across every ecosystem's manifest and changelog conventions would be brittle, and version stamping is per-ecosystem and increasingly Pyve's domain. Hard removal, no deprecation shim: an audit found no programmatic consumer (Pyve invokes it nowhere in code — only in doc text that refreshes on its next `project-guide update`).
|
|
13
|
+
|
|
14
|
+
### Removed
|
|
15
|
+
- **`project-guide bump-version`** and its helpers (`_bump_pyproject_version`, `_bump_version_file`, `_bump_changelog`, `_find_version_file`, `_SEMVER_RE`) from `project_guide/cli.py`, plus the Story O.p CLI test suite. Invoking `project-guide bump-version` now exits 2 with click's standard "No such command" error.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- **Replacement guidance — manual bumps per the Version Cadence rule.** The `plan_production_phase` end-of-phase release step and `developer/best-practices-guide.md` now direct the developer to bump the version manually per the Version Cadence rule (edit the per-ecosystem version sites + `CHANGELOG.md` when the owning story/phase ships) instead of invoking the removed command. `README.md`, `tech-spec.md`, `concept.md`, `docs/site/user-guide/commands.md`, and `CONTRIBUTING.md` drop their `bump-version` sections/rows accordingly.
|
|
19
|
+
|
|
10
20
|
## [2.17.0] - 2026-06-22
|
|
11
21
|
|
|
12
22
|
**Cycle-mode story-guidance & strategic-context grounding (Stories Q.w, Q.x).** Two template-only edits to the rendered mode headers that shape LLM behavior across modes. Q.w loosens the cycle modes' story scope/sequencing guidance — the previous absolute "work strictly in document order, regardless of any developer signal" framing was too rigid and even contradicted the shipped `git-push` Q.p single-story out-of-sequence opt-in. Q.x adds a universal "ground yourself in the strategic context" instruction so a fresh-context LLM reads the *why* / *what* before the *how*, curbing short-sighted, mechanics-only implementation. No Python change; ships as a deliberate minor release because the rendered-prompt surface is project-guide's product.
|
|
@@ -140,8 +140,8 @@ Releases are cut by the maintainer at end-of-phase per the **Version
|
|
|
140
140
|
Cadence** rule documented at the top of `docs/specs/stories.md`:
|
|
141
141
|
|
|
142
142
|
1. Land all stories in the phase via direct commits or merged PRs.
|
|
143
|
-
2.
|
|
144
|
-
`pyproject.toml
|
|
143
|
+
2. Bump the version manually per the Version Cadence rule — edit
|
|
144
|
+
`pyproject.toml` and `project_guide/version.py`, and add the
|
|
145
145
|
`## [X.Y.Z] - <date>` heading to `CHANGELOG.md`.
|
|
146
146
|
3. Use `project-guide mode plan_production_phase` (post-1.0) to negotiate
|
|
147
147
|
the bump magnitude when applicable.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: project-guide
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.18.0
|
|
4
4
|
Summary: Stay organized and in control with adaptive LLM workflow prompts.
|
|
5
5
|
Project-URL: Homepage, https://github.com/pointmatic/project-guide
|
|
6
6
|
Project-URL: Documentation, https://pointmatic.github.io/project-guide/
|
|
@@ -319,28 +319,6 @@ If any pre-check fails (no versioned stories, archive target already exists, sou
|
|
|
319
319
|
|
|
320
320
|
This command is intended to be run by the LLM after the developer has approved the archive in `project-guide mode archive_stories`.
|
|
321
321
|
|
|
322
|
-
### `bump-version`
|
|
323
|
-
|
|
324
|
-
Bump the package version across all three canonical sites in one step. Use it at end-of-phase when shipping a bundled release.
|
|
325
|
-
|
|
326
|
-
```bash
|
|
327
|
-
project-guide bump-version [VERSION]
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
**Argument:**
|
|
331
|
-
- `VERSION` - the `X.Y.Z` version to write
|
|
332
|
-
|
|
333
|
-
**Writes:**
|
|
334
|
-
- `pyproject.toml` `[project] version`
|
|
335
|
-
- the package `__version__` source (auto-detected: `<package>/version.py`, `_version.py`, `__init__.py`, and `src/` variants)
|
|
336
|
-
- a new `## [VERSION] - YYYY-MM-DD` entry in `CHANGELOG.md`, inserted directly below `## [Unreleased]` (idempotent — re-running refreshes the date and preserves the body)
|
|
337
|
-
|
|
338
|
-
**Options:**
|
|
339
|
-
- `--no-input` - Skip prompts; fail loudly if a default is missing (also auto-enabled by `CI=1` or non-TTY stdin)
|
|
340
|
-
- `--quiet` - Suppress success-path stdout; errors and warnings still print to stderr
|
|
341
|
-
|
|
342
|
-
The version magnitude (patch / minor / major) is a decision made per the Version Cadence rule in `docs/specs/stories.md`; this command performs only the mechanical write.
|
|
343
|
-
|
|
344
322
|
### `status`
|
|
345
323
|
|
|
346
324
|
Show status of all installed files and current mode. Output is compact and grouped into Mode, Guide, and Files sections with color.
|
|
@@ -283,28 +283,6 @@ If any pre-check fails (no versioned stories, archive target already exists, sou
|
|
|
283
283
|
|
|
284
284
|
This command is intended to be run by the LLM after the developer has approved the archive in `project-guide mode archive_stories`.
|
|
285
285
|
|
|
286
|
-
### `bump-version`
|
|
287
|
-
|
|
288
|
-
Bump the package version across all three canonical sites in one step. Use it at end-of-phase when shipping a bundled release.
|
|
289
|
-
|
|
290
|
-
```bash
|
|
291
|
-
project-guide bump-version [VERSION]
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
**Argument:**
|
|
295
|
-
- `VERSION` - the `X.Y.Z` version to write
|
|
296
|
-
|
|
297
|
-
**Writes:**
|
|
298
|
-
- `pyproject.toml` `[project] version`
|
|
299
|
-
- the package `__version__` source (auto-detected: `<package>/version.py`, `_version.py`, `__init__.py`, and `src/` variants)
|
|
300
|
-
- a new `## [VERSION] - YYYY-MM-DD` entry in `CHANGELOG.md`, inserted directly below `## [Unreleased]` (idempotent — re-running refreshes the date and preserves the body)
|
|
301
|
-
|
|
302
|
-
**Options:**
|
|
303
|
-
- `--no-input` - Skip prompts; fail loudly if a default is missing (also auto-enabled by `CI=1` or non-TTY stdin)
|
|
304
|
-
- `--quiet` - Suppress success-path stdout; errors and warnings still print to stderr
|
|
305
|
-
|
|
306
|
-
The version magnitude (patch / minor / major) is a decision made per the Version Cadence rule in `docs/specs/stories.md`; this command performs only the mechanical write.
|
|
307
|
-
|
|
308
286
|
### `status`
|
|
309
287
|
|
|
310
288
|
Show status of all installed files and current mode. Output is compact and grouped into Mode, Guide, and Files sections with color.
|
|
@@ -9,7 +9,6 @@ project-guide provides twelve commands for managing LLM workflow files across yo
|
|
|
9
9
|
| `init` | Install files into a new project |
|
|
10
10
|
| `mode` | Switch workflow mode or list available modes |
|
|
11
11
|
| `archive-stories` | Archive `stories.md` and re-render a fresh one for the next phase |
|
|
12
|
-
| `bump-version` | Bump the package version across `pyproject.toml`, the version source, and `CHANGELOG.md` |
|
|
13
12
|
| `status` | Show file status grouped by category |
|
|
14
13
|
| `update` | Update non-overridden files to latest versions |
|
|
15
14
|
| `heal` | Repair the install — create missing templates and refresh stale ones |
|
|
@@ -144,29 +143,6 @@ If any pre-check fails (no versioned stories in the source, archive target alrea
|
|
|
144
143
|
|
|
145
144
|
This command is intended to be run by the LLM after the developer has approved the archive in `project-guide mode archive_stories`. The conversational-vs-deterministic split is deliberate: the mode template walks the developer through the decision; the CLI command performs the transaction.
|
|
146
145
|
|
|
147
|
-
## bump-version
|
|
148
|
-
|
|
149
|
-
Bump the package version across all three canonical sites in one step — used at end-of-phase when shipping a bundled release.
|
|
150
|
-
|
|
151
|
-
```bash
|
|
152
|
-
project-guide bump-version [VERSION]
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
### Options
|
|
156
|
-
|
|
157
|
-
- `--no-input` - Skip prompts; fail loudly if a default is missing (also auto-enabled by `CI=1` or non-TTY stdin)
|
|
158
|
-
- `--quiet` - Suppress success-path stdout; errors and warnings still print to stderr
|
|
159
|
-
|
|
160
|
-
### What It Does
|
|
161
|
-
|
|
162
|
-
Writes the supplied `X.Y.Z` to:
|
|
163
|
-
|
|
164
|
-
1. `pyproject.toml` `[project] version`
|
|
165
|
-
2. the package `__version__` source (auto-detected: `<package>/version.py`, `_version.py`, `__init__.py`, and `src/` variants)
|
|
166
|
-
3. a new `## [VERSION] - YYYY-MM-DD` entry in `CHANGELOG.md`, inserted directly below `## [Unreleased]` (idempotent — re-running refreshes the date and preserves the body)
|
|
167
|
-
|
|
168
|
-
The version magnitude (patch / minor / major) is decided per the Version Cadence rule in `docs/specs/stories.md`; this command performs only the mechanical write.
|
|
169
|
-
|
|
170
146
|
## status
|
|
171
147
|
|
|
172
148
|
Display the status of all files in your project, grouped by category.
|
|
@@ -45,7 +45,7 @@ A mode-driven template system that dynamically renders a single entry-point docu
|
|
|
45
45
|
5. Make the LLM's work transparent and accountable through structured artifacts
|
|
46
46
|
|
|
47
47
|
### Scope
|
|
48
|
-
- **CLI tool**: `project-guide init`, `mode`, `status`, `update`, `heal`, `override`, `unoverride`, `overrides`, `purge`, `archive-stories`, `
|
|
48
|
+
- **CLI tool**: `project-guide init`, `mode`, `status`, `update`, `heal`, `override`, `unoverride`, `overrides`, `purge`, `archive-stories`, `git-push`
|
|
49
49
|
- **17 modes**: `default`, `scaffold_project`, `plan_concept`, `plan_features`, `plan_tech_spec`, `plan_envs` *(frozen — pending Pyve work; do not use)*, `plan_stories`, `plan_phase`, `plan_production_phase`, `archive_stories`, `code_direct`, `code_test_first`, `debug`, `document_brand`, `document_landing`, `refactor_plan`, `refactor_document`, plus a future `code_production` (not yet implemented)
|
|
50
50
|
- **Jinja2 rendering**: mode templates + header partials rendered into a single entry-point document
|
|
51
51
|
- **Hash-based file sync**: content-hash comparison determines file freshness, not version numbers
|
|
@@ -159,7 +159,7 @@ No change recommended. These are inclusion partials for cycle/sequence headers;
|
|
|
159
159
|
- **Parser-safe.** Subphase headings use `##` (already a heading level the rendered docs handle); subphase IDs use a hyphen-separated form (`N-1`) that does not collide with story IDs (`N.a`), sub-numbered stories (`N.m.1`), or phase letters (`N`, `AA`).
|
|
160
160
|
- **Consumers** that already grep for `## Phase` continue to work — they will not see false matches against `## Subphase X-N:`.
|
|
161
161
|
- **Consumers** that grep for `### Story X.y` continue to work — story letters retain their existing format; subphases live one level up.
|
|
162
|
-
- **No tooling rename required.**
|
|
162
|
+
- **No tooling rename required.** ~~`project-guide bump-version`~~ (removed in v2.18.0), the `archive_stories` mode, and downstream version detection continue to operate on the phase boundary, not the subphase boundary.
|
|
163
163
|
|
|
164
164
|
---
|
|
165
165
|
|
|
@@ -1099,6 +1099,40 @@ Bundled release at end-of-subphase as **v2.15.0** (minor — new readiness-gated
|
|
|
1099
1099
|
|
|
1100
1100
|
---
|
|
1101
1101
|
|
|
1102
|
+
### Story Q.ac: v2.18.0 Remove the `bump-version` command [Done]
|
|
1103
|
+
|
|
1104
|
+
Rip out `project-guide bump-version` entirely. It is a Python-/`pyproject.toml`-centric mechanical version writer (added Story O.o, v2.5.13) that stamps `X.Y.Z` into three hardcoded Python sites: `pyproject.toml [project] version`, an auto-detected `__version__` source, and a `CHANGELOG.md` entry.
|
|
1105
|
+
|
|
1106
|
+
**Why remove rather than extend.** project-guide is now tightly integrated into Pyve, which is **polyglot** (Python + JavaScript/TypeScript today; venv / micromamba / pnpm / npm backends; Ruby, Rust, C++, Go, Java and their canonical backends/frameworks to come). Generalizing a mechanical version-write across every ecosystem's version file + manifest (`Cargo.toml`, `package.json`, `*.gemspec`, `build.gradle`/`pom.xml`, `go.mod`, …) and CHANGELOG conventions would be a brittle, fragile maintenance nightmare. Version stamping is per-ecosystem and increasingly Pyve's domain; project-guide should not own a Python-shaped command that mis-serves every other stack. (Removing `bump-version` also *unblocks and simplifies* the separately-considered hatchling **dynamic-version / single-source-of-truth** change: with no command needing a static `version =` line to rewrite, making `pyproject.toml` derive its version from `version.py` becomes a trivial config edit rather than one that must also teach `bump-version` to skip a dynamic pyproject. That dynamic-version change is still worthwhile on its own — it is *enabled*, not obviated, by this removal.)
|
|
1107
|
+
|
|
1108
|
+
**Removal surface (audited 2026-06-11):**
|
|
1109
|
+
- **Code** — `project_guide/cli.py`: the `bump-version` command (`bump_version`, `@main.command(name="bump-version")`) and its helpers `_bump_pyproject_version`, `_bump_version_file`, `_bump_changelog`, `_find_version_file`, plus `_SEMVER_RE` (used *only* by this command).
|
|
1110
|
+
- **Mode template** — `templates/.../modes/plan-production-phase-mode.md` instructs the LLM to run `project-guide bump-version` at end-of-phase; rewrite that step to point at the manual per-story bump convention (or a Pyve-delegated bump) instead. `developer/best-practices-guide.md` also references it.
|
|
1111
|
+
- **Tests** — `tests/test_cli.py` (the `bump-version` suite) and any `tests/test_render.py` assertion that the production-phase template mentions the command.
|
|
1112
|
+
- **Docs** — `README.md` (`### bump-version` section), `tech-spec.md` (CLI command table), `concept.md`, `docs/site/user-guide/commands.md`. Re-render installed `docs/project-guide/` copies after editing the source templates. Leave `.archive/` and historical `stories-vX.Y.Z.md` bodies untouched.
|
|
1113
|
+
|
|
1114
|
+
**Open decisions (planning-time):**
|
|
1115
|
+
- **Hard-remove vs. deprecate-then-remove.** project-guide is post-1.0 and `bump-version` is a shipped, consumer-facing command — a clean removal is a breaking change. Decide whether to ship a one-release deprecation shim (command prints a removal notice + exits non-zero) or hard-remove. Coordinate with the Pyve integration if Pyve invokes it anywhere.
|
|
1116
|
+
- **Replacement guidance.** What the production-phase mode and best-practices guide tell the LLM to do for version bumps post-removal (manual edits to the per-ecosystem version sites + CHANGELOG, per the Version Cadence rule).
|
|
1117
|
+
|
|
1118
|
+
Surfaced 2026-06-11 while weighing a hatchling dynamic-version change — concluded the command itself is the liability, not its sync mechanics.
|
|
1119
|
+
|
|
1120
|
+
**Decisions (resolved 2026-07-11):**
|
|
1121
|
+
- **Hard-remove** (no deprecation shim). Audited the Pyve repo: no Python code invokes `bump-version` — only doc/spec text in Pyve's installed `docs/project-guide/` copies and vendored specs, which refresh on Pyve's next `project-guide update`. With no programmatic consumer, the CHANGELOG removal notice suffices for human users.
|
|
1122
|
+
- **Replacement guidance:** point the production-phase mode step and `developer/best-practices-guide.md` at the manual per-story bump convention (Version Cadence rule: edit the per-ecosystem version sites + `CHANGELOG.md` when the owning story ships), noting version stamping is per-ecosystem and Pyve's domain.
|
|
1123
|
+
|
|
1124
|
+
Tasks:
|
|
1125
|
+
- [x] Red: add failing tests asserting `bump-version` is no longer a registered CLI command and that the rendered production-phase template no longer mentions it (5 tests, all red before removal)
|
|
1126
|
+
- [x] Remove from `project_guide/cli.py`: `bump_version` command, `_bump_pyproject_version`, `_bump_version_file`, `_bump_changelog`, `_find_version_file`, `_SEMVER_RE`
|
|
1127
|
+
- [x] Remove the `bump-version` suite from `tests/test_cli.py` (Story O.p block incl. `_seed_minimal_python_project`); `tests/test_render.py` had no assertions requiring the command's presence
|
|
1128
|
+
- [x] Rewrite the end-of-phase version step in `templates/.../modes/plan-production-phase-mode.md` to the manual Version Cadence convention; update `developer/best-practices-guide.md` accordingly
|
|
1129
|
+
- [x] Update docs: `README.md` (drop `### bump-version`), `tech-spec.md` (CLI command table), `concept.md`, `docs/site/user-guide/commands.md`; also `CONTRIBUTING.md` release-process step 2 (live instruction found during the removal sweep); left `.archive/` and historical story bodies untouched
|
|
1130
|
+
- [x] Re-render installed `docs/project-guide/` copies via `project-guide update`
|
|
1131
|
+
- [x] Bump v2.18.0 (`project_guide/version.py`, `pyproject.toml`) + dated `CHANGELOG.md` entry with removal notice
|
|
1132
|
+
- [x] Verify: full `pyve test` suite green (628 passed), `ruff check` clean, `mypy project_guide/` clean
|
|
1133
|
+
|
|
1134
|
+
---
|
|
1135
|
+
|
|
1102
1136
|
## Future
|
|
1103
1137
|
|
|
1104
1138
|
### Installation/Config Discovery Hierarchy (global vs. project context) [Deferred]
|
|
@@ -1142,20 +1176,3 @@ Future modes: `audit_security`, `audit_architecture`, `audit_performance`, `audi
|
|
|
1142
1176
|
|
|
1143
1177
|
`mypy project_guide/` emits `note: unused section(s): module = ['tests.*']` on every run — the `[[tool.mypy.overrides]]` block targeting `tests.*` in `pyproject.toml` matches nothing, because the checked target is `project_guide/` only (tests are never passed to mypy). Harmless (a note, not an error — exit stays 0 on success) but it's noise on every type-check, and a dead config stanza invites confusion about whether tests are meant to be type-checked. Resolve by deciding intent, then either: (a) **remove** the dead `tests.*` override from `pyproject.toml` (if tests are intentionally out of mypy's scope), or (b) **bring `tests/` into the mypy target** (CI step + local convention) if the override implies test type-checking was once intended. Surfaced 2026-06-11 during the Q.u mypy CI fix. Low priority — cosmetic until someone wants test type-checking.
|
|
1144
1178
|
|
|
1145
|
-
### Remove the `bump-version` command [Deferred]
|
|
1146
|
-
|
|
1147
|
-
Rip out `project-guide bump-version` entirely. It is a Python-/`pyproject.toml`-centric mechanical version writer (added Story O.o, v2.5.13) that stamps `X.Y.Z` into three hardcoded Python sites: `pyproject.toml [project] version`, an auto-detected `__version__` source, and a `CHANGELOG.md` entry.
|
|
1148
|
-
|
|
1149
|
-
**Why remove rather than extend.** project-guide is now tightly integrated into Pyve, which is **polyglot** (Python + JavaScript/TypeScript today; venv / micromamba / pnpm / npm backends; Ruby, Rust, C++, Go, Java and their canonical backends/frameworks to come). Generalizing a mechanical version-write across every ecosystem's version file + manifest (`Cargo.toml`, `package.json`, `*.gemspec`, `build.gradle`/`pom.xml`, `go.mod`, …) and CHANGELOG conventions would be a brittle, fragile maintenance nightmare. Version stamping is per-ecosystem and increasingly Pyve's domain; project-guide should not own a Python-shaped command that mis-serves every other stack. (Removing `bump-version` also *unblocks and simplifies* the separately-considered hatchling **dynamic-version / single-source-of-truth** change: with no command needing a static `version =` line to rewrite, making `pyproject.toml` derive its version from `version.py` becomes a trivial config edit rather than one that must also teach `bump-version` to skip a dynamic pyproject. That dynamic-version change is still worthwhile on its own — it is *enabled*, not obviated, by this removal.)
|
|
1150
|
-
|
|
1151
|
-
**Removal surface (audited 2026-06-11):**
|
|
1152
|
-
- **Code** — `project_guide/cli.py`: the `bump-version` command (`bump_version`, `@main.command(name="bump-version")`) and its helpers `_bump_pyproject_version`, `_bump_version_file`, `_bump_changelog`, `_find_version_file`, plus `_SEMVER_RE` (used *only* by this command).
|
|
1153
|
-
- **Mode template** — `templates/.../modes/plan-production-phase-mode.md` instructs the LLM to run `project-guide bump-version` at end-of-phase; rewrite that step to point at the manual per-story bump convention (or a Pyve-delegated bump) instead. `developer/best-practices-guide.md` also references it.
|
|
1154
|
-
- **Tests** — `tests/test_cli.py` (the `bump-version` suite) and any `tests/test_render.py` assertion that the production-phase template mentions the command.
|
|
1155
|
-
- **Docs** — `README.md` (`### bump-version` section), `tech-spec.md` (CLI command table), `concept.md`, `docs/site/user-guide/commands.md`. Re-render installed `docs/project-guide/` copies after editing the source templates. Leave `.archive/` and historical `stories-vX.Y.Z.md` bodies untouched.
|
|
1156
|
-
|
|
1157
|
-
**Open decisions (planning-time):**
|
|
1158
|
-
- **Hard-remove vs. deprecate-then-remove.** project-guide is post-1.0 and `bump-version` is a shipped, consumer-facing command — a clean removal is a breaking change. Decide whether to ship a one-release deprecation shim (command prints a removal notice + exits non-zero) or hard-remove. Coordinate with the Pyve integration if Pyve invokes it anywhere.
|
|
1159
|
-
- **Replacement guidance.** What the production-phase mode and best-practices guide tell the LLM to do for version bumps post-removal (manual edits to the per-ecosystem version sites + CHANGELOG, per the Version Cadence rule).
|
|
1160
|
-
|
|
1161
|
-
Surfaced 2026-06-11 while weighing a hatchling dynamic-version change — concluded the command itself is the liability, not its sync mechanics.
|
|
@@ -125,7 +125,6 @@ project-guide/
|
|
|
125
125
|
| `init` | Copy template tree, render `go.md`, create config, update `.gitignore` |
|
|
126
126
|
| `mode [name]` | Switch mode and re-render `go.md`, or list available modes |
|
|
127
127
|
| `archive-stories` | Archive `stories.md` to `.archive/stories-vX.Y.Z.md` and re-render a fresh one |
|
|
128
|
-
| `bump-version <X.Y.Z>` | Update `pyproject.toml`, `<package>/version.py`, and seed a `CHANGELOG.md` heading |
|
|
129
128
|
| `status` | Grouped status: Mode, Guide, Files (with `--verbose`) |
|
|
130
129
|
| `update` | Hash-based sync with prompt/force/dry-run |
|
|
131
130
|
| `heal` | Silent-when-clean drift repair with create-missing semantics; fires automatically before every other command via the group-level auto-hook |
|
|
@@ -836,276 +836,6 @@ def archive_stories_cmd():
|
|
|
836
836
|
)
|
|
837
837
|
|
|
838
838
|
|
|
839
|
-
_SEMVER_RE = __import__("re").compile(
|
|
840
|
-
r"^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$"
|
|
841
|
-
)
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
def _bump_pyproject_version(pyproject_path: Path, new_version: str) -> bool:
|
|
845
|
-
"""Update `version = "..."` under `[project]` in pyproject.toml.
|
|
846
|
-
|
|
847
|
-
Returns True if the file was changed (or already at the target version).
|
|
848
|
-
Raises FileNotFoundError if the file is missing, or click.ClickException
|
|
849
|
-
if the version line cannot be located.
|
|
850
|
-
"""
|
|
851
|
-
import re
|
|
852
|
-
|
|
853
|
-
if not pyproject_path.exists():
|
|
854
|
-
raise FileNotFoundError(str(pyproject_path))
|
|
855
|
-
text = pyproject_path.read_text(encoding="utf-8")
|
|
856
|
-
# Match the [project] section, then the first version = "..." line within it.
|
|
857
|
-
# We don't try to parse TOML — the regex preserves formatting exactly.
|
|
858
|
-
pattern = re.compile(
|
|
859
|
-
r'(?ms)^(\[project\][^\[]*?\bversion\s*=\s*)"[^"]+"',
|
|
860
|
-
)
|
|
861
|
-
new_text, n = pattern.subn(rf'\1"{new_version}"', text, count=1)
|
|
862
|
-
if n == 0:
|
|
863
|
-
raise click.ClickException(
|
|
864
|
-
f"Could not locate `version = \"...\"` under `[project]` in {pyproject_path}"
|
|
865
|
-
)
|
|
866
|
-
if new_text != text:
|
|
867
|
-
pyproject_path.write_text(new_text, encoding="utf-8")
|
|
868
|
-
return True
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
def _find_version_file(project_name: str) -> Path | None:
|
|
872
|
-
"""Auto-detect a `__version__ = "..."` source file.
|
|
873
|
-
|
|
874
|
-
Tries common locations in order:
|
|
875
|
-
<project_name>/version.py
|
|
876
|
-
<project_name>/_version.py
|
|
877
|
-
<project_name>/__init__.py
|
|
878
|
-
src/<project_name>/version.py
|
|
879
|
-
src/<project_name>/_version.py
|
|
880
|
-
src/<project_name>/__init__.py
|
|
881
|
-
|
|
882
|
-
Project names are normalized (replace `-` with `_`). Returns None if
|
|
883
|
-
none of the candidates exist or contain `__version__`.
|
|
884
|
-
"""
|
|
885
|
-
import re
|
|
886
|
-
|
|
887
|
-
safe = project_name.replace("-", "_")
|
|
888
|
-
candidates = [
|
|
889
|
-
Path(safe) / "version.py",
|
|
890
|
-
Path(safe) / "_version.py",
|
|
891
|
-
Path(safe) / "__init__.py",
|
|
892
|
-
Path("src") / safe / "version.py",
|
|
893
|
-
Path("src") / safe / "_version.py",
|
|
894
|
-
Path("src") / safe / "__init__.py",
|
|
895
|
-
]
|
|
896
|
-
for candidate in candidates:
|
|
897
|
-
if not candidate.exists():
|
|
898
|
-
continue
|
|
899
|
-
content = candidate.read_text(encoding="utf-8")
|
|
900
|
-
if re.search(r'^__version__\s*=\s*["\'][^"\']+["\']', content, re.MULTILINE):
|
|
901
|
-
return candidate
|
|
902
|
-
return None
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
def _bump_version_file(version_file: Path, new_version: str) -> bool:
|
|
906
|
-
"""Update `__version__ = "..."` in a Python source file.
|
|
907
|
-
|
|
908
|
-
Returns True if the file was changed (or already at the target version).
|
|
909
|
-
Raises click.ClickException if `__version__` cannot be located.
|
|
910
|
-
"""
|
|
911
|
-
import re
|
|
912
|
-
|
|
913
|
-
text = version_file.read_text(encoding="utf-8")
|
|
914
|
-
pattern = re.compile(
|
|
915
|
-
r'^(__version__\s*=\s*)["\'][^"\']+["\']',
|
|
916
|
-
re.MULTILINE,
|
|
917
|
-
)
|
|
918
|
-
new_text, n = pattern.subn(rf'\1"{new_version}"', text, count=1)
|
|
919
|
-
if n == 0:
|
|
920
|
-
raise click.ClickException(
|
|
921
|
-
f"Could not locate `__version__ = \"...\"` in {version_file}"
|
|
922
|
-
)
|
|
923
|
-
if new_text != text:
|
|
924
|
-
version_file.write_text(new_text, encoding="utf-8")
|
|
925
|
-
return True
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
def _bump_changelog(changelog_path: Path, new_version: str) -> str:
|
|
929
|
-
"""Insert a `## [VERSION] - YYYY-MM-DD` heading below `## [Unreleased]`.
|
|
930
|
-
|
|
931
|
-
If a section heading for `[VERSION]` already exists, update its date to
|
|
932
|
-
today and leave its body untouched (idempotent on repeated runs).
|
|
933
|
-
|
|
934
|
-
Returns one of: "inserted", "updated-date", "no-unreleased-section".
|
|
935
|
-
Raises FileNotFoundError if the file is missing.
|
|
936
|
-
"""
|
|
937
|
-
import re
|
|
938
|
-
|
|
939
|
-
if not changelog_path.exists():
|
|
940
|
-
raise FileNotFoundError(str(changelog_path))
|
|
941
|
-
text = changelog_path.read_text(encoding="utf-8")
|
|
942
|
-
today = datetime.now().strftime("%Y-%m-%d")
|
|
943
|
-
|
|
944
|
-
# Idempotent path: section already exists; update its date.
|
|
945
|
-
existing_pattern = re.compile(
|
|
946
|
-
rf'^(## \[{re.escape(new_version)}\])\s*-\s*\d{{4}}-\d{{2}}-\d{{2}}',
|
|
947
|
-
re.MULTILINE,
|
|
948
|
-
)
|
|
949
|
-
new_text, n = existing_pattern.subn(rf"\1 - {today}", text, count=1)
|
|
950
|
-
if n > 0:
|
|
951
|
-
if new_text != text:
|
|
952
|
-
changelog_path.write_text(new_text, encoding="utf-8")
|
|
953
|
-
return "updated-date"
|
|
954
|
-
|
|
955
|
-
# Insertion path: place the new section heading below `## [Unreleased]`.
|
|
956
|
-
insert_pattern = re.compile(r'^(## \[Unreleased\][^\n]*\n)', re.MULTILINE)
|
|
957
|
-
insert_match = insert_pattern.search(text)
|
|
958
|
-
if not insert_match:
|
|
959
|
-
return "no-unreleased-section"
|
|
960
|
-
new_section = f"\n## [{new_version}] - {today}\n"
|
|
961
|
-
insertion_idx = insert_match.end()
|
|
962
|
-
new_text = text[:insertion_idx] + new_section + text[insertion_idx:]
|
|
963
|
-
changelog_path.write_text(new_text, encoding="utf-8")
|
|
964
|
-
return "inserted"
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
@main.command(name="bump-version")
|
|
968
|
-
@click.argument("version", required=False)
|
|
969
|
-
@click.option(
|
|
970
|
-
'--no-input', 'no_input',
|
|
971
|
-
is_flag=True, default=False,
|
|
972
|
-
help='Skip interactive prompts; fail loudly if defaults are missing. (Also auto-enabled by CI=1 or non-TTY stdin.)',
|
|
973
|
-
)
|
|
974
|
-
@click.option(
|
|
975
|
-
'--quiet', 'quiet',
|
|
976
|
-
is_flag=True, default=False,
|
|
977
|
-
help='Suppress success-path stdout. Errors and warnings still emit on stderr.',
|
|
978
|
-
)
|
|
979
|
-
def bump_version(version: str | None, no_input: bool, quiet: bool):
|
|
980
|
-
"""Bump the package version in pyproject.toml, version source, and CHANGELOG.md.
|
|
981
|
-
|
|
982
|
-
Writes the supplied X.Y.Z to:
|
|
983
|
-
|
|
984
|
-
\b
|
|
985
|
-
- pyproject.toml `[project] version` field
|
|
986
|
-
- The package's `__version__` source file (auto-detected from
|
|
987
|
-
`<package>/version.py`, `<package>/_version.py`, `<package>/__init__.py`,
|
|
988
|
-
and the `src/<package>/...` variants)
|
|
989
|
-
- A new `## [VERSION] - YYYY-MM-DD` entry in CHANGELOG.md, inserted
|
|
990
|
-
directly below `## [Unreleased]`. Idempotent if the section already
|
|
991
|
-
exists (date is updated, body is preserved).
|
|
992
|
-
|
|
993
|
-
Use this at end-of-phase when shipping a bundled release per the
|
|
994
|
-
Version Cadence rule documented in `docs/specs/stories.md` (added in
|
|
995
|
-
Story O.o, v2.5.13). The version magnitude (patch / minor / major) is
|
|
996
|
-
determined by the cadence rule and `plan_production_phase`'s
|
|
997
|
-
breaking-change negotiation; this command is purely the mechanical
|
|
998
|
-
write.
|
|
999
|
-
"""
|
|
1000
|
-
skip_input = should_skip_input(no_input)
|
|
1001
|
-
|
|
1002
|
-
# Resolve the version arg per the --no-input contract: if missing under
|
|
1003
|
-
# --no-input, fail loud with the canonical error message.
|
|
1004
|
-
if version is None:
|
|
1005
|
-
if skip_input:
|
|
1006
|
-
click.secho(
|
|
1007
|
-
"Error: bump-version requires a VERSION argument when "
|
|
1008
|
-
"--no-input is set (or stdin is non-TTY). "
|
|
1009
|
-
"Pass the target version as a positional, e.g. "
|
|
1010
|
-
"`project-guide bump-version 1.0.0`.",
|
|
1011
|
-
fg='red',
|
|
1012
|
-
err=True,
|
|
1013
|
-
)
|
|
1014
|
-
sys.exit(2)
|
|
1015
|
-
version = click.prompt("Target version (X.Y.Z)", type=str).strip()
|
|
1016
|
-
|
|
1017
|
-
if not _SEMVER_RE.match(version):
|
|
1018
|
-
click.secho(
|
|
1019
|
-
f"Error: '{version}' is not a valid semver string "
|
|
1020
|
-
"(expected X.Y.Z, optionally with -prerelease or +build).",
|
|
1021
|
-
fg='red',
|
|
1022
|
-
err=True,
|
|
1023
|
-
)
|
|
1024
|
-
sys.exit(2)
|
|
1025
|
-
|
|
1026
|
-
# Resolve project name for version-file auto-detection.
|
|
1027
|
-
config_path = Path(".project-guide.yml")
|
|
1028
|
-
project_name: str | None = None
|
|
1029
|
-
if config_path.exists():
|
|
1030
|
-
try:
|
|
1031
|
-
config = Config.load(str(config_path))
|
|
1032
|
-
project_name = config.project_name
|
|
1033
|
-
except ConfigError:
|
|
1034
|
-
pass
|
|
1035
|
-
if project_name is None:
|
|
1036
|
-
project_name = _detect_project_name_from_pyproject() or Path.cwd().name
|
|
1037
|
-
|
|
1038
|
-
pyproject_path = Path("pyproject.toml")
|
|
1039
|
-
changelog_path = Path("CHANGELOG.md")
|
|
1040
|
-
|
|
1041
|
-
# Update pyproject.toml (required).
|
|
1042
|
-
try:
|
|
1043
|
-
_bump_pyproject_version(pyproject_path, version)
|
|
1044
|
-
except FileNotFoundError:
|
|
1045
|
-
click.secho(
|
|
1046
|
-
f"Error: {pyproject_path} not found. bump-version requires a "
|
|
1047
|
-
"Python pyproject.toml in the current directory.",
|
|
1048
|
-
fg='red',
|
|
1049
|
-
err=True,
|
|
1050
|
-
)
|
|
1051
|
-
sys.exit(2)
|
|
1052
|
-
except click.ClickException as e:
|
|
1053
|
-
click.secho(f"Error: {e.message}", fg='red', err=True)
|
|
1054
|
-
sys.exit(2)
|
|
1055
|
-
|
|
1056
|
-
# Update version source file (auto-detected; warn but don't fail if missing).
|
|
1057
|
-
version_file = _find_version_file(project_name)
|
|
1058
|
-
if version_file is not None:
|
|
1059
|
-
try:
|
|
1060
|
-
_bump_version_file(version_file, version)
|
|
1061
|
-
except click.ClickException as e:
|
|
1062
|
-
click.secho(f"Error: {e.message}", fg='red', err=True)
|
|
1063
|
-
sys.exit(2)
|
|
1064
|
-
else:
|
|
1065
|
-
click.secho(
|
|
1066
|
-
f"⚠ No __version__ source file auto-detected for project "
|
|
1067
|
-
f"'{project_name}'. Skipped version-file update; pyproject.toml "
|
|
1068
|
-
"and CHANGELOG.md updated. If your project keeps __version__ in "
|
|
1069
|
-
"a non-standard location, edit it manually.",
|
|
1070
|
-
fg='yellow',
|
|
1071
|
-
err=True,
|
|
1072
|
-
)
|
|
1073
|
-
|
|
1074
|
-
# Update CHANGELOG.md (required).
|
|
1075
|
-
try:
|
|
1076
|
-
result = _bump_changelog(changelog_path, version)
|
|
1077
|
-
except FileNotFoundError:
|
|
1078
|
-
click.secho(
|
|
1079
|
-
f"Error: {changelog_path} not found. bump-version requires a "
|
|
1080
|
-
"CHANGELOG.md in the current directory.",
|
|
1081
|
-
fg='red',
|
|
1082
|
-
err=True,
|
|
1083
|
-
)
|
|
1084
|
-
sys.exit(2)
|
|
1085
|
-
|
|
1086
|
-
if result == "no-unreleased-section":
|
|
1087
|
-
click.secho(
|
|
1088
|
-
f"⚠ {changelog_path} has no `## [Unreleased]` section. "
|
|
1089
|
-
f"pyproject.toml and version source updated, but no changelog "
|
|
1090
|
-
f"entry was added. Add a `## [{version}] - <date>` heading "
|
|
1091
|
-
"manually, or seed `## [Unreleased]` and re-run.",
|
|
1092
|
-
fg='yellow',
|
|
1093
|
-
err=True,
|
|
1094
|
-
)
|
|
1095
|
-
|
|
1096
|
-
# Quiet mode: suppress success-path stdout. Errors and warnings (above)
|
|
1097
|
-
# already emit to stderr regardless.
|
|
1098
|
-
if not quiet:
|
|
1099
|
-
click.secho(f"✓ Bumped version to {version}", fg='green', bold=True)
|
|
1100
|
-
click.echo(f" pyproject.toml: {pyproject_path}")
|
|
1101
|
-
if version_file is not None:
|
|
1102
|
-
click.echo(f" __version__: {version_file}")
|
|
1103
|
-
if result == "inserted":
|
|
1104
|
-
click.echo(f" CHANGELOG.md: inserted ## [{version}]")
|
|
1105
|
-
elif result == "updated-date":
|
|
1106
|
-
click.echo(f" CHANGELOG.md: updated date on existing ## [{version}]")
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
839
|
@main.command()
|
|
1110
840
|
@click.option('--verbose', '-v', is_flag=True, help='Show full per-file list')
|
|
1111
841
|
def status(verbose):
|
|
@@ -75,7 +75,7 @@ Recognize and adapt to two distinct development modes:
|
|
|
75
75
|
|
|
76
76
|
**Rationale:** Velocity mode maximizes learning and iteration speed when exploring solutions. Production mode maximizes stability and security when users depend on the project. Using the wrong mode at the wrong time either slows progress unnecessarily or creates technical debt.
|
|
77
77
|
|
|
78
|
-
**How project-guide enforces the switch:** the `plan_production_phase` mode (mandatory for every phase once the package is at v1.0.0+) walks the developer through the **Production-readiness checklist** above as step 2 — branch protection, SECURITY.md, CONTRIBUTING.md, Dependabot, trusted publisher, mandatory CI, bundled-release cadence. The mode does not proceed past unmet items without explicit developer override. `plan_phase` (pre-1.0 only) halts and recommends `plan_production_phase` if the manifest reports `version >= 1.0.0`. End-of-phase, the developer
|
|
78
|
+
**How project-guide enforces the switch:** the `plan_production_phase` mode (mandatory for every phase once the package is at v1.0.0+) walks the developer through the **Production-readiness checklist** above as step 2 — branch protection, SECURITY.md, CONTRIBUTING.md, Dependabot, trusted publisher, mandatory CI, bundled-release cadence. The mode does not proceed past unmet items without explicit developer override. `plan_phase` (pre-1.0 only) halts and recommends `plan_production_phase` if the manifest reports `version >= 1.0.0`. End-of-phase, the developer bumps the version manually per the Version Cadence rule — editing the per-ecosystem version sites (manifest + version source) and adding the dated `CHANGELOG.md` entry. Version stamping is per-ecosystem and the toolchain's (Pyve's) domain, not a project-guide command.
|
|
79
79
|
|
|
80
80
|
---
|
|
81
81
|
|
|
@@ -91,7 +91,7 @@ If the package version is below v1.0.0 and this is **not** the first-time crossi
|
|
|
91
91
|
|
|
92
92
|
9. **Append any new must-know facts to `project-essentials.md`** — same shape as `plan_phase` step 7. New architecture boundaries, workflow rules, hidden coupling, deferred-but-documented items. Skip if the phase introduces no new invariants.
|
|
93
93
|
|
|
94
|
-
10. **End-of-phase release** (after all phase stories are marked `[Done]` — typically a separate session, not part of this mode's run): the developer
|
|
94
|
+
10. **End-of-phase release** (after all phase stories are marked `[Done]` — typically a separate session, not part of this mode's run): the developer bumps the version manually per the Version Cadence rule — edit the per-ecosystem version sites (e.g. the manifest and the `__version__` source for Python; the equivalent files for other stacks) and add a `## [X.Y.Z] - <date>` CHANGELOG entry. Version stamping is per-ecosystem and increasingly the toolchain's (Pyve's) domain; project-guide does not provide a mechanical version-write command. The version is the target recorded in step 5; if implementation introduced unanticipated breaking changes, the developer revisits the target before bumping.
|
|
95
95
|
|
|
96
96
|
{% set next_mode = 'code_test_first' if test_first else 'code_direct' %}
|
|
97
97
|
{% include "modes/_header-sequence.md" %}
|