project-guide 2.18.0__tar.gz → 2.18.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. {project_guide-2.18.0 → project_guide-2.18.1}/CHANGELOG.md +7 -0
  2. {project_guide-2.18.0 → project_guide-2.18.1}/PKG-INFO +11 -1
  3. {project_guide-2.18.0 → project_guide-2.18.1}/README.md +10 -0
  4. {project_guide-2.18.0 → project_guide-2.18.1}/docs/site/user-guide/commands.md +11 -0
  5. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/concept.md +1 -1
  6. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/features.md +6 -1
  7. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/project-essentials.md +2 -0
  8. project_guide-2.18.1/docs/specs/stories.md +87 -0
  9. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/tech-spec.md +8 -6
  10. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/cli.py +81 -7
  11. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/version.py +1 -1
  12. {project_guide-2.18.0 → project_guide-2.18.1}/pyproject.toml +1 -1
  13. {project_guide-2.18.0 → project_guide-2.18.1}/tests/test_cli.py +182 -0
  14. {project_guide-2.18.0 → project_guide-2.18.1}/.github/FUNDING.yml +0 -0
  15. {project_guide-2.18.0 → project_guide-2.18.1}/.github/dependabot.yml +0 -0
  16. {project_guide-2.18.0 → project_guide-2.18.1}/.github/workflows/ci.yml +0 -0
  17. {project_guide-2.18.0 → project_guide-2.18.1}/.github/workflows/deploy-docs.yml +0 -0
  18. {project_guide-2.18.0 → project_guide-2.18.1}/.github/workflows/publish.yml +0 -0
  19. {project_guide-2.18.0 → project_guide-2.18.1}/.github/workflows/test.yml +0 -0
  20. {project_guide-2.18.0 → project_guide-2.18.1}/.gitignore +0 -0
  21. {project_guide-2.18.0 → project_guide-2.18.1}/.project-guide.yml +0 -0
  22. {project_guide-2.18.0 → project_guide-2.18.1}/.tool-versions +0 -0
  23. {project_guide-2.18.0 → project_guide-2.18.1}/CONTRIBUTING.md +0 -0
  24. {project_guide-2.18.0 → project_guide-2.18.1}/LICENSE +0 -0
  25. {project_guide-2.18.0 → project_guide-2.18.1}/SECURITY.md +0 -0
  26. {project_guide-2.18.0 → project_guide-2.18.1}/docs/site/.gitignore +0 -0
  27. {project_guide-2.18.0 → project_guide-2.18.1}/docs/site/about/changelog.md +0 -0
  28. {project_guide-2.18.0 → project_guide-2.18.1}/docs/site/about/license.md +0 -0
  29. {project_guide-2.18.0 → project_guide-2.18.1}/docs/site/developer-guide/contributing.md +0 -0
  30. {project_guide-2.18.0 → project_guide-2.18.1}/docs/site/developer-guide/development.md +0 -0
  31. {project_guide-2.18.0 → project_guide-2.18.1}/docs/site/developer-guide/testing.md +0 -0
  32. {project_guide-2.18.0 → project_guide-2.18.1}/docs/site/getting-started.md +0 -0
  33. {project_guide-2.18.0 → project_guide-2.18.1}/docs/site/images/project-guide-banner-landing.png +0 -0
  34. {project_guide-2.18.0 → project_guide-2.18.1}/docs/site/images/project-guide-header-readme.png +0 -0
  35. {project_guide-2.18.0 → project_guide-2.18.1}/docs/site/index.html +0 -0
  36. {project_guide-2.18.0 → project_guide-2.18.1}/docs/site/user-guide/configuration.md +0 -0
  37. {project_guide-2.18.0 → project_guide-2.18.1}/docs/site/user-guide/install-options.md +0 -0
  38. {project_guide-2.18.0 → project_guide-2.18.1}/docs/site/user-guide/modes.md +0 -0
  39. {project_guide-2.18.0 → project_guide-2.18.1}/docs/site/user-guide/overrides.md +0 -0
  40. {project_guide-2.18.0 → project_guide-2.18.1}/docs/site/user-guide/workflow.md +0 -0
  41. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/.archive/phase-j-modes-plan.md +0 -0
  42. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/.archive/phase-k-release-lifecycle-plan.md +0 -0
  43. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/.archive/phase-l-no-input-init-plan.md +0 -0
  44. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/.archive/phase-m-project-essentials-plan.md +0 -0
  45. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/.archive/phase-n-mode-naming-cli-memory-plan.md +0 -0
  46. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/.archive/phase-o-pyve-quiet-embedding-subplan.md +0 -0
  47. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/.archive/phase-o-quiet-non-interactive-embedding-feature.md +0 -0
  48. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/.archive/phase-p-auto-heal-plan.md +0 -0
  49. {project_guide-2.18.0/docs/specs → project_guide-2.18.1/docs/specs/.archive}/phase-q-dx-subphases-plan.md +0 -0
  50. {project_guide-2.18.0/docs/specs → project_guide-2.18.1/docs/specs/.archive}/phase-q-plan-envs-mode-env-dependences-artifact-roughdraft.md +0 -0
  51. {project_guide-2.18.0/docs/specs → project_guide-2.18.1/docs/specs/.archive}/phase-q-plan-envs-mode-roughdraft.md +0 -0
  52. {project_guide-2.18.0/docs/specs → project_guide-2.18.1/docs/specs/.archive}/phase-q-pyve-toolchain-hosting.md +0 -0
  53. {project_guide-2.18.0/docs/specs → project_guide-2.18.1/docs/specs/.archive}/phase-q-subphase-2-plan-envs-plan.md +0 -0
  54. {project_guide-2.18.0/docs/specs → project_guide-2.18.1/docs/specs/.archive}/phase-q-subphase-3-pyve-hosting-plan.md +0 -0
  55. {project_guide-2.18.0/docs/specs → project_guide-2.18.1/docs/specs/.archive}/phase-q-subphase-4-local-install-warning-readiness-gate.md +0 -0
  56. {project_guide-2.18.0/docs/specs → project_guide-2.18.1/docs/specs/.archive}/phase-q-subphase-4-readiness-gate-plan.md +0 -0
  57. {project_guide-2.18.0/docs/specs → project_guide-2.18.1/docs/specs/.archive}/phase-q-subphase-strategy-for-large-phases.md +0 -0
  58. {project_guide-2.18.0/docs/specs → project_guide-2.18.1/docs/specs/.archive}/phase-q-wizard-env-contract.md +0 -0
  59. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/.archive/project-guide-no-input-spec.md +0 -0
  60. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/.archive/stories-v1.3.1.md +0 -0
  61. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/.archive/stories-v2.0.20.md +0 -0
  62. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/.archive/stories-v2.10.2.md +0 -0
  63. /project_guide-2.18.0/docs/specs/stories.md → /project_guide-2.18.1/docs/specs/.archive/stories-v2.18.0.md +0 -0
  64. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/.archive/stories-v2.3.9.md +0 -0
  65. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/.archive/stories-v2.4.19.md +0 -0
  66. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/.archive/stories-v2.5.15.md +0 -0
  67. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/.archive/ux-problems-v2.0.10.md +0 -0
  68. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/brand-descriptions.md +0 -0
  69. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/pyve/README.md +0 -0
  70. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/pyve/concept.md +0 -0
  71. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/pyve/features.md +0 -0
  72. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/pyve/sync.sh +0 -0
  73. {project_guide-2.18.0 → project_guide-2.18.1}/docs/specs/pyve/tech-spec.md +0 -0
  74. {project_guide-2.18.0 → project_guide-2.18.1}/mkdocs.yml +0 -0
  75. {project_guide-2.18.0 → project_guide-2.18.1}/project-guide-old-template.md +0 -0
  76. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/__init__.py +0 -0
  77. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/__main__.py +0 -0
  78. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/actions.py +0 -0
  79. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/config.py +0 -0
  80. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/exceptions.py +0 -0
  81. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/metadata.py +0 -0
  82. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/render.py +0 -0
  83. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/runtime.py +0 -0
  84. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/stories.py +0 -0
  85. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/sync.py +0 -0
  86. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/.project-guide.yml.template +0 -0
  87. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/.metadata.yml +0 -0
  88. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/README.md +0 -0
  89. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/developer/best-practices-guide.md +0 -0
  90. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/developer/brand-descriptions-guide.md +0 -0
  91. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/developer/codecov-setup-guide.md +0 -0
  92. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/developer/debug-guide.md +0 -0
  93. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/developer/landing-page-guide.md +0 -0
  94. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/developer/production-github-guide.md +0 -0
  95. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/developer/project-guide.md +0 -0
  96. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/developer/python-editable-install.md +0 -0
  97. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/artifacts/brand-descriptions.md +0 -0
  98. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/artifacts/concept.md +0 -0
  99. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/artifacts/env-dependencies.md +0 -0
  100. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/artifacts/features.md +0 -0
  101. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/artifacts/project-essentials.md +0 -0
  102. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/artifacts/pyve-essentials.md +0 -0
  103. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/artifacts/stories.md +0 -0
  104. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/artifacts/tech-spec.md +0 -0
  105. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/llm_entry_point.md +0 -0
  106. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/_header-common.md +0 -0
  107. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/_header-cycle.md +0 -0
  108. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/_header-sequence.md +0 -0
  109. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/_phase-letters.md +0 -0
  110. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/archive-stories-mode.md +0 -0
  111. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/code-direct-mode.md +0 -0
  112. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/code-test-first-mode.md +0 -0
  113. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/debug-mode.md +0 -0
  114. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/default-mode.md +0 -0
  115. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/document-brand-mode.md +0 -0
  116. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/document-landing-mode.md +0 -0
  117. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/plan-concept-mode.md +0 -0
  118. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/plan-envs-mode.md +0 -0
  119. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/plan-features-mode.md +0 -0
  120. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/plan-phase-mode.md +0 -0
  121. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/plan-production-phase-mode.md +0 -0
  122. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/plan-stories-mode.md +0 -0
  123. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/plan-tech-spec-mode.md +0 -0
  124. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/refactor-document-mode.md +0 -0
  125. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/refactor-plan-mode.md +0 -0
  126. {project_guide-2.18.0 → project_guide-2.18.1}/project_guide/templates/project-guide/templates/modes/scaffold-project-mode.md +0 -0
  127. {project_guide-2.18.0 → project_guide-2.18.1}/pyve.toml +0 -0
  128. {project_guide-2.18.0 → project_guide-2.18.1}/requirements-dev.txt +0 -0
  129. {project_guide-2.18.0 → project_guide-2.18.1}/tests/__init__.py +0 -0
  130. {project_guide-2.18.0 → project_guide-2.18.1}/tests/conftest.py +0 -0
  131. {project_guide-2.18.0 → project_guide-2.18.1}/tests/test_actions.py +0 -0
  132. {project_guide-2.18.0 → project_guide-2.18.1}/tests/test_archive_stories_mode.py +0 -0
  133. {project_guide-2.18.0 → project_guide-2.18.1}/tests/test_config.py +0 -0
  134. {project_guide-2.18.0 → project_guide-2.18.1}/tests/test_cross_repo_contract.py +0 -0
  135. {project_guide-2.18.0 → project_guide-2.18.1}/tests/test_integration.py +0 -0
  136. {project_guide-2.18.0 → project_guide-2.18.1}/tests/test_metadata.py +0 -0
  137. {project_guide-2.18.0 → project_guide-2.18.1}/tests/test_purge.py +0 -0
  138. {project_guide-2.18.0 → project_guide-2.18.1}/tests/test_render.py +0 -0
  139. {project_guide-2.18.0 → project_guide-2.18.1}/tests/test_runtime.py +0 -0
  140. {project_guide-2.18.0 → project_guide-2.18.1}/tests/test_stories.py +0 -0
  141. {project_guide-2.18.0 → project_guide-2.18.1}/tests/test_sync.py +0 -0
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.18.1] - 2026-08-01
11
+
12
+ **`project-guide git-commit` subcommand (Story R.a).** gitbetter added a `git-commit` subcommand for iterating on commits locally and pushing a batch to GitHub later (saving GitHub Actions CI minutes). project-guide gains the sibling wrapper with an identical interface and behavior to `git-push`.
13
+
14
+ ### Added
15
+ - **`project-guide git-commit [BRANCH_NAME]`** — identical interface and behavior to `project-guide git-push` (commit-message derivation from `[Done]` story headings, bundle offer, duplicate-ID warning, header-story filter, out-of-sequence handling with the Q.p single-story opt-in, Q.u branch-aware squash-merge presumption, exit-code semantics, `--no-input` contract), but discovers and invokes gitbetter's `git-commit` binary to perform a local commit instead of a push. Both commands share `_run_gitbetter_wrapper(tool_name, branch_name, no_input)` in `project_guide/cli.py`; `tool_name` selects the gitbetter binary and drives every tool-naming message (not-on-PATH error, bundle-decline hint, out-of-sequence manual-resolution hint). `_emit_out_of_sequence_error` gains a `tool_name` parameter (default `"git-push"`). Eight new `test_git_commit_*` tests pin the delta; the shared flow stays pinned by the existing `test_git_push_*` suite. Docs updated: `README.md`, `docs/site/user-guide/commands.md`, `docs/specs/concept.md`, `docs/specs/features.md` (FR-15), `docs/specs/tech-spec.md` (command table, key functions, External CLI Dependencies), `docs/specs/project-essentials.md`.
16
+
10
17
  ## [2.18.0] - 2026-07-11
11
18
 
12
19
  **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`).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: project-guide
3
- Version: 2.18.0
3
+ Version: 2.18.1
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/
@@ -439,6 +439,16 @@ project-guide git-push feature/heal-command
439
439
  brew install pointmatic/tap/gitbetter
440
440
  ```
441
441
 
442
+ ### `git-commit`
443
+
444
+ Identical interface and behavior to `git-push`, but wraps gitbetter's `git-commit`: derive the same story-aware commit message, then perform a **local commit** instead of a push. Iterate on commits locally and push a batch to GitHub later (saves CI minutes).
445
+
446
+ ```bash
447
+ project-guide git-commit [BRANCH_NAME]
448
+ ```
449
+
450
+ Everything documented for `git-push` above — message derivation, bundle offer, out-of-sequence handling, exit codes, the gitbetter optional dependency — applies unchanged.
451
+
442
452
  ### `override`
443
453
 
444
454
  Mark a file as customized to prevent automatic updates.
@@ -403,6 +403,16 @@ project-guide git-push feature/heal-command
403
403
  brew install pointmatic/tap/gitbetter
404
404
  ```
405
405
 
406
+ ### `git-commit`
407
+
408
+ Identical interface and behavior to `git-push`, but wraps gitbetter's `git-commit`: derive the same story-aware commit message, then perform a **local commit** instead of a push. Iterate on commits locally and push a batch to GitHub later (saves CI minutes).
409
+
410
+ ```bash
411
+ project-guide git-commit [BRANCH_NAME]
412
+ ```
413
+
414
+ Everything documented for `git-push` above — message derivation, bundle offer, out-of-sequence handling, exit codes, the gitbetter optional dependency — applies unchanged.
415
+
406
416
  ### `override`
407
417
 
408
418
  Mark a file as customized to prevent automatic updates.
@@ -13,6 +13,7 @@ project-guide provides twelve commands for managing LLM workflow files across yo
13
13
  | `update` | Update non-overridden files to latest versions |
14
14
  | `heal` | Repair the install — create missing templates and refresh stale ones |
15
15
  | `git-push` | Commit the latest completed story via gitbetter (optional dependency) |
16
+ | `git-commit` | Local-commit variant of `git-push` via gitbetter (optional dependency) |
16
17
  | `override` | Mark a file as overridden to prevent updates |
17
18
  | `unoverride` | Remove override status from a file |
18
19
  | `overrides` | List all overridden files |
@@ -276,6 +277,16 @@ project-guide git-push [BRANCH_NAME]
276
277
 
277
278
  It hard-errors (exit 1) when there is no `[Done]` story, when the latest one is already committed, when multiple `[Done]` stories are uncommitted, or when gitbetter is not installed (`brew install pointmatic/tap/gitbetter`).
278
279
 
280
+ ## git-commit
281
+
282
+ Identical interface and behavior to `git-push`, but wraps gitbetter's `git-commit`: the same story-derived message becomes a **local commit** instead of a push, so you can iterate on commits locally and push a batch to GitHub later (saving CI minutes).
283
+
284
+ ```bash
285
+ project-guide git-commit [BRANCH_NAME]
286
+ ```
287
+
288
+ Everything documented for `git-push` above — message derivation, bundle offer, out-of-sequence handling, exit codes, the gitbetter optional dependency — applies unchanged.
289
+
279
290
  ## override
280
291
 
281
292
  Mark a file as overridden to prevent automatic updates.
@@ -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`, `git-push`
48
+ - **CLI tool**: `project-guide init`, `mode`, `status`, `update`, `heal`, `override`, `unoverride`, `overrides`, `purge`, `archive-stories`, `git-push`, `git-commit`
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
@@ -85,6 +85,9 @@ For a high-level concept (why), see [`concept.md`](concept.md). For implementati
85
85
  - Optional positional `BRANCH_NAME` — passed through to gitbetter's `git-push` for branch-aware push flows
86
86
  - No other flags — the wrapped command is fully interactive (preview, confirm, branch cleanup, reject/recovery menu), so `--no-input` / `--quiet` would be no-ops; for those, route through raw `git-push` instead
87
87
 
88
+ **`project-guide git-commit [BRANCH_NAME]`**
89
+ - Identical interface and behavior to `git-push` (FR-15), but invokes gitbetter's `git-commit` for a local commit instead of a push
90
+
88
91
  **`project-guide override FILE_NAME REASON`**
89
92
  - Required: file name (template-relative path)
90
93
  - Required: reason for override
@@ -417,6 +420,8 @@ Consumers migrating from a pre-Phase-P install run `project-guide init --force`
417
420
 
418
421
  **`spec_artifacts_path` resolution.** The wrapper reads `spec_artifacts_path` from project-guide metadata when available; otherwise falls back to `docs/specs`. This lets the wrapper work in projects that haven't yet run `project-guide init`, including this project itself before metadata renders.
419
422
 
423
+ **`git-commit` sibling (Story R.a, v2.18.1).** `project-guide git-commit [BRANCH_NAME]` has an identical interface and behavior — same message derivation, bundle offer, header filter, out-of-sequence handling, branch-aware presumption, exit codes — but shells out to gitbetter's `git-commit` binary to perform a **local commit** instead of a push, so the developer can iterate on commits locally and push a batch to GitHub later (saving CI minutes). Both commands share a single implementation (`_run_gitbetter_wrapper(tool_name, …)` in `cli.py`); `tool_name` selects the gitbetter binary and drives every tool-naming message.
424
+
420
425
  ### FR-7: Shell Completion
421
426
 
422
427
  Tab completion for `project-guide` commands, flags, and mode names in bash, zsh, and fish.
@@ -558,4 +563,4 @@ modes:
558
563
  14. Package is published to PyPI as `project-guide`
559
564
  15. `project-guide heal` (FR-14) is **silent on no drift** and applies fixes after the `[Y/n]` prompt on drift; under `--no-input` / `CI=1` / non-TTY the prompt is replaced with auto-yes plus the `Auto-healing N templates under --no-input.` stderr notice
560
565
  16. The auto-hook fires for every CLI invocation including `--help` and `--version`, is silent in the steady state, recursion-guarded by `PROJECT_GUIDE_HEALING=1`, and never blocks the original subcommand on prompt decline
561
- 17. `project-guide git-push [BRANCH_NAME]` (FR-15) derives the commit message from the last `[Done]` story, hard-errors on already-committed or multi-uncommitted-Done states or missing gitbetter, and propagates gitbetter's child exit code unchanged
566
+ 17. `project-guide git-push [BRANCH_NAME]` (FR-15) derives the commit message from the last `[Done]` story, hard-errors on already-committed or multi-uncommitted-Done states or missing gitbetter, and propagates gitbetter's child exit code unchanged; `project-guide git-commit [BRANCH_NAME]` behaves identically against gitbetter's `git-commit` binary
@@ -124,6 +124,8 @@ The notice is **non-suppressible** (always emitted even with `--quiet`) so CI lo
124
124
 
125
125
  `project-guide git-push` is a thin wrapper over [gitbetter](https://github.com/pointmatic/gitbetter)'s `git-push` that auto-derives the commit message from `[Done]` story headings. It is a **developer-lane convenience command** — the LLM **must not** initiate it. The approval-gate discipline rule earlier in this file ("do not propose commits, pushes, or bundling options ... do not offer 'want me to also …?' follow-ups") remains in force, and applies to this wrapper just as it does to raw `git`. The wrapper exists to shorten the developer's typing at commit time, not to give the LLM a new excuse to volunteer commits.
126
126
 
127
+ **`git-commit` sibling (Story R.a, v2.18.1).** `project-guide git-commit` wraps gitbetter's `git-commit` (local commit instead of push — iterate locally, push a batch later to save CI minutes) with an **identical interface and behavior**: both commands share `_run_gitbetter_wrapper(tool_name, …)` in `cli.py`, differing only in which gitbetter binary is discovered and invoked. Everything in this section — heading-to-message rules, bundle offer, duplicate-ID warning, header filter, out-of-sequence handling, branch-aware presumption, exit-code semantics — applies to both wrappers unchanged.
128
+
127
129
  **Heading-to-message rules (single story):**
128
130
  - Output is `"<id>: <title>"`. The colon after the story ID is preserved — it is the anchor the already-committed check searches for in `git log --pretty=%s`.
129
131
  - Backticks (`` ` ``) in the title become single quotes.
@@ -0,0 +1,87 @@
1
+ # stories.md -- project-guide (python)
2
+
3
+ This document breaks the `project-guide` project into an ordered sequence of small, independently completable stories grouped into phases. Each story has a checklist of concrete tasks. Stories are organized by phase and reference modules defined in `tech-spec.md`.
4
+
5
+ Put **`vX.Y.Z` in the story title only when that story ships the package version bump** for that release. Doc-only or polish stories **omit the version from the title** (they share the release with the preceding code story, or use your project’s doc-release policy). **One semver bump per owning story** — extra tasks on the *same* story share that bump; see `project-essentials.md`. Semantic versioning applies to the package. Stories are marked with `[Planned]` initially and changed to `[Done]` when completed.
6
+
7
+ For a high-level concept (why), see [`concept.md`](concept.md). For requirements and behavior (what), see [`features.md`](features.md). For implementation details (how), see [`tech-spec.md`](tech-spec.md). For project-specific must-know facts, see [`project-essentials.md`](project-essentials.md) (`plan_phase` appends new facts per phase). For the workflow steps tailored to the current mode (cycle steps, approval gates, conventions), see [`docs/project-guide/go.md`](../project-guide/go.md) — re-read it whenever the mode changes or after context compaction.
8
+
9
+ ---
10
+
11
+ ## Version Cadence
12
+
13
+ Standard semantic versioning, with these conventions:
14
+
15
+ - **Every story belongs to a phase.** Bugfix stories included. No orphan stories.
16
+ - **Per-story bumping** (when a story owns its own release):
17
+ - Bugfix or trivial change → **patch** (`vX.Y.Z+1`)
18
+ - Feature or improvement → **minor** (`vX.Y+1.0`)
19
+ - Breaking change → **major** (`vX+1.0.0`). Post-1.0 only, and only via the `plan_production_phase` mode, which negotiates with the developer about whether the breakage is substantively user-facing or technically-but-trivially breaking (example: a log-format change is technically breaking, but if logs aren't a core consumer capability, the developer may judge it minor or even patch).
20
+ - **Phase-bundling option:** a phase can run unversioned during work and ship a single release/tag at end-of-phase. Stories within the phase carry no version in their title; the phase's last story owns the bump (magnitude determined by the highest-impact change in the bundle).
21
+ - **No out-of-order implementation.** Story order in this file is the order of execution. If work order needs to change, **reorganize/renumber here first** — don't skip ahead and create version-number gaps.
22
+ - **Pre-1.0:** standard semver applies; version starts at `v0.1.0` (Story A.a).
23
+ - **Post-1.0:** every phase must go through `plan_production_phase` (the lighter `plan_phase` is pre-1.0 only). Major bumps only happen through that mode's negotiation step.
24
+
25
+ This is the authoritative cadence rule. **Do not extrapolate the bump magnitude from `pyproject.toml`'s current version** — re-read this section whenever you're about to assign a version to a story.
26
+
27
+ ---
28
+
29
+ ## Phase R: (Theme TBD)
30
+
31
+ ---
32
+
33
+ ### Story R.a: v2.18.1 Gitbetter `git-commit` subcommand [Done]
34
+
35
+ Gitbetter just added a `git-commit` subcommand to allow iterations on commits locally and then pushing a batch to GitHub, which will save substantially on GitHub Actions CI minutes.
36
+
37
+ This new `project-guide git-commit` subcommand is nearly identical to its sibling `project-guide git-push`. From the Project Guide perspective, the two commands have the identical interface and behavior.
38
+
39
+ - [x] Add `project-guide git-commit` subcommand that mirrors `project-guide git-push` functionality — both share `_run_gitbetter_wrapper(tool_name, …)` in `cli.py`
40
+ - [x] Update tests to cover the new command — 8 new `test_git_commit_*` tests (636 passed total)
41
+ - [x] Update documentation to reflect the new command — README, site commands.md, concept/features/tech-spec/project-essentials
42
+ - [x] Bump patch version to `v2.18.1` — `version.py`, `pyproject.toml`, CHANGELOG dated 2026-08-01
43
+
44
+ ---
45
+
46
+ ## Future
47
+
48
+ ### Installation/Config Discovery Hierarchy (global vs. project context) [Deferred]
49
+
50
+ Model after `asdf` with no `.tool-versions`: context-free commands still work; project-scoped commands warn when there's no project. Today `project-guide` resolves its operating context only from a local `.project-guide.yml` in `Path.cwd()`, so commands run outside a project directory have no context and the pre-invoke hook stays silent (e.g., the Q-4 local-install readiness warning can't fire without a local config). Support a discovery hierarchy with a graceful global fallback:
51
+
52
+ - **Context-free commands** (`--version`, `status`, …) run against the global pyve toolchain-install context when no local `.project-guide.yml` is found — no project home required.
53
+ - **Project-scoped commands** (`mode`, …) warn "no project home" (no-op / non-zero exit) when no local `.project-guide.yml` is found, rather than silently doing nothing.
54
+
55
+ Resolution order: local `.project-guide.yml` first, then the global toolchain-install context. **Cross-repo contract implication:** the install-location-independence contract (Story Q.l, pinned by `tests/test_cross_repo_contract.py`) currently mandates per-project state is *always* resolved from `cwd`, never from the package install location — a global fallback is a coordinated evolution of that contract requiring a paired Pyve story (the global toolchain context is Pyve-owned). Defer until the need is concrete.
56
+
57
+ ### Audit Modes [Deferred]
58
+
59
+ Future modes: `audit_security`, `audit_architecture`, `audit_performance`, `audit_best_practices`, `audit_modularity`, `audit_patterns`.
60
+
61
+ ### Project Lifecycle Automation [Deferred]
62
+
63
+ - Release helper / version-bump / tag automation — developer works across multiple git flows and prefers tool-agnostic; no timeline.
64
+ - Migration tooling for `docs/guides/` → `docs/project-guide/` — future `refactor` mode; low demand.
65
+
66
+ ### Advanced Project Essentials [Deferred]
67
+
68
+ - `create_or_modify` action type — revisit if multiple artifacts develop the need; not yet justified.
69
+ - Validation/linting of `project-essentials.md` content — freeform by design; template convention is sufficient.
70
+ - Auto-detection of stale `project-essentials.md` — git-log based; deferred until there is demand.
71
+
72
+ ### CLI Edge Cases [Deferred]
73
+
74
+ - `--interactive` flag to force interactive mode over non-TTY stdin — not needed; `stdin` can always be re-attached.
75
+ - Legacy broken-state detection for `init` (`.project-guide.yml` absent but target dir populated) — unusual edge case; falls through to existing skip-with-warnings path.
76
+
77
+ ### Integrity & Validation [Deferred]
78
+
79
+ - `project-guide check` command — dedicated integrity/audit surface with nonzero exit on failure, suitable for CI and pre-commit hooks. Candidate rules: `project_name` in config vs. `cwd.name` vs. `pyproject.toml` `[project] name`; artifact headers (`# stories.md -- <name> (<lang>)`) vs. `config.project_name`/`config.programming_language`; `SCHEMA_VERSION` surfacing; `installed_version` vs. `__version__`; `.archive/stories-vX.Y.Z.md` filenames parse cleanly; metadata override keys reference existing modes; unrendered `{{ var }}` placeholders across written artifacts (broadens the N.s `render_fresh_stories_artifact` guard to every written artifact). `project-guide status` runs a cheap subset and prints a one-line footer (`⚠ N integrity issues — run 'project-guide check' for details`) without changing its exit code. Precedent: `django check`, `brew doctor`, `cargo check`. Defer until there is a concrete second integrity rule worth shipping (N.s covers the first drift source inline with a warning).
80
+
81
+ ### Template & Rendering [Deferred]
82
+
83
+ - Support for literal `{{ var }}` strings in template output — use `{% raw %}...{% endraw %}` on a case-by-case basis; bridge with a general solution only if the pattern becomes common.
84
+
85
+ ### mypy `tests.*` unused-override cleanup [Deferred]
86
+
87
+ `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.
@@ -129,6 +129,7 @@ project-guide/
129
129
  | `update` | Hash-based sync with prompt/force/dry-run |
130
130
  | `heal` | Silent-when-clean drift repair with create-missing semantics; fires automatically before every other command via the group-level auto-hook |
131
131
  | `git-push [BRANCH_NAME]` | Wrap gitbetter's `git-push` with a commit message derived from the last `[Done]` story heading; shells out via `shutil.which` + `subprocess.run`, propagates child exit code |
132
+ | `git-commit [BRANCH_NAME]` | Identical interface/behavior to `git-push` (both share `_run_gitbetter_wrapper`), but invokes gitbetter's `git-commit` for a local commit instead of a push |
132
133
  | `override` | Lock a file from updates |
133
134
  | `unoverride` | Remove a file lock |
134
135
  | `overrides` | List all locked files |
@@ -141,10 +142,11 @@ project-guide/
141
142
  - `_apply_heal(config, config_path)` — apply pending template syncs and re-render `go.md`. Sets `PROJECT_GUIDE_HEALING=1` in `os.environ` before doing any writes so nested subprocess invocations don't re-enter the auto-hook.
142
143
  - `_run_pre_invoke_hook()` — group-level auto-heal hook (Story P.b/c). Calls `should_skip_input()` to honor the `--no-input` contract via env / TTY signals; silent when no drift; prompts on drift in interactive mode; auto-yes + `Auto-healing N templates under --no-input.` stderr notice in skip-input mode.
143
144
  - `HealGroup(click.Group)` — custom Click group whose overridden `main()` runs `_run_pre_invoke_hook()` before `super().main()`, so `--help` and `--version` (eager flags that would otherwise short-circuit during arg parsing) still trigger the hook.
144
- - `_get_committed_story_ids()` — parses `git log --pretty=%s` and extracts story IDs from any subject line whose prefix matches `<id>: ` (regex `^([A-Z]\.[a-z]+):\s`). Returns an empty set on `git`-not-found, non-git cwd, or empty history. Used by the `git-push` wrapper to decide which `[Done]` stories are uncommitted.
145
- - `_resolve_spec_artifacts_path()` — best-effort resolver for the `spec_artifacts_path` metadata value used by `git-push` to locate `stories.md`. Falls back to `docs/specs` when config / metadata are unavailable so the wrapper works in projects that haven't yet run `init`.
146
- - `project_guide/stories.py:_read_done_stories()` / `derive_commit_message()` — pure helpers used by `git-push`. `_read_done_stories` returns all `[Done]` headings as `StoryHeading(story_id, title)` tuples in file order; `derive_commit_message` produces the gitbetter-ready subject `"<id>: <transformed title>"` (backticks → single quotes, double quotes → single quotes, single quotes pass through, colon preserved).
147
- - **Phase Q additions (named for navigation; the contracts live in `project-essentials.md`):** `_query_pyve_provision_status()` / `_warn_if_local_install_under_pyve()` / `_provision_pyve_hosting()` (Subphase Q-4 readiness-gated local-install warning); `_get_current_branch()` / `_presume_committed_on_branch()` (Q.u branch-aware squash-merge presumption for `git-push`); `_prompt_commit_out_of_sequence()` (Q.p single-story out-of-sequence opt-in). The git-log subject parser is `parse_committed_ids_from_subject()` in `stories.py` (P.u, superseding the single-regex form); `stories.py`'s `_STORY_RE` recognizes `#{3,5}` heading depths (Q.v).
145
+ - `_run_gitbetter_wrapper(tool_name, branch_name, no_input)` — shared body of the `git-push` / `git-commit` commands (Story R.a); `tool_name` selects the gitbetter binary (`"git-push"` / `"git-commit"`) and drives every tool-naming message (not-on-PATH error, bundle-decline hint, out-of-sequence manual-resolution hint).
146
+ - `_get_committed_story_ids()` — parses `git log --pretty=%s` and extracts story IDs from any subject line whose prefix matches `<id>: ` (regex `^([A-Z]\.[a-z]+):\s`). Returns an empty set on `git`-not-found, non-git cwd, or empty history. Used by the gitbetter wrappers to decide which `[Done]` stories are uncommitted.
147
+ - `_resolve_spec_artifacts_path()` — best-effort resolver for the `spec_artifacts_path` metadata value used by the gitbetter wrappers to locate `stories.md`. Falls back to `docs/specs` when config / metadata are unavailable so the wrappers work in projects that haven't yet run `init`.
148
+ - `project_guide/stories.py:_read_done_stories()` / `derive_commit_message()` — pure helpers used by the gitbetter wrappers. `_read_done_stories` returns all `[Done]` headings as `StoryHeading(story_id, title)` tuples in file order; `derive_commit_message` produces the gitbetter-ready subject `"<id>: <transformed title>"` (backticks → single quotes, double quotes → single quotes, single quotes pass through, colon preserved).
149
+ - **Phase Q additions (named for navigation; the contracts live in `project-essentials.md`):** `_query_pyve_provision_status()` / `_warn_if_local_install_under_pyve()` / `_provision_pyve_hosting()` (Subphase Q-4 readiness-gated local-install warning); `_get_current_branch()` / `_presume_committed_on_branch()` (Q.u branch-aware squash-merge presumption for `git-push`); `_prompt_commit_out_of_sequence()` (Q.p single-story out-of-sequence opt-in) — all shared by both gitbetter wrappers. The git-log subject parser is `parse_committed_ids_from_subject()` in `stories.py` (P.u, superseding the single-regex form); `stories.py`'s `_STORY_RE` recognizes `#{3,5}` heading depths (Q.v).
148
150
 
149
151
  ### Module: `config.py`
150
152
 
@@ -373,12 +375,12 @@ Fail fast with actionable messages:
373
375
 
374
376
  ### External CLI Dependencies (Story P.k pattern)
375
377
 
376
- `git-push` is the first `project-guide` subcommand that **depends on an external CLI being on PATH** (gitbetter's `git-push` binary). Future workflow-integration commands (potential `git-tag`, `git-rebase`, etc.) should follow the same pattern:
378
+ `git-push` is the first `project-guide` subcommand that **depends on an external CLI being on PATH** (gitbetter's `git-push` binary); `git-commit` (Story R.a) is the second — same gitbetter toolchain, same shape, sharing `_run_gitbetter_wrapper` with only the binary name differing. Future workflow-integration commands (potential `git-tag`, `git-rebase`, etc.) should follow the same pattern:
377
379
 
378
380
  1. **Discover** via `shutil.which(name)`. If `None`, exit 1 with stderr that names the missing tool and the canonical install command. Never silently fall back to a degraded behavior.
379
381
  2. **Invoke** via `subprocess.run(argv, check=False)` with **no captured output** so the external tool inherits the parent's stdin/stdout/stderr (interactive flows like prompts and progress reporting must reach the developer unaltered).
380
382
  3. **Propagate** the child's exit code with `sys.exit(result.returncode)`. The wrapper's own exit semantics are a passthrough — the external tool's reject/recovery semantics are the source of truth, not the wrapper's.
381
- 4. **Tests** mock both `shutil.which` (to control discovery) and `subprocess.run` (to control the child's behavior and capture argv). See `tests/test_cli.py::test_git_push_*` for the reference test shape.
383
+ 4. **Tests** mock both `shutil.which` (to control discovery) and `subprocess.run` (to control the child's behavior and capture argv). See `tests/test_cli.py::test_git_push_*` and `test_git_commit_*` for the reference test shape.
382
384
 
383
385
  This deliberately keeps each wrapper a thin convenience layer rather than a parallel implementation. The tested invariants are: discovery error message, argv shape (including positional passthrough), and exit-code propagation. Nothing else.
384
386
 
@@ -1854,6 +1854,79 @@ def git_push(branch_name: str | None, no_input: bool):
1854
1854
  This is a developer-lane convenience command. The LLM still does not
1855
1855
  initiate commits — the approval-gate discipline rule remains in force.
1856
1856
  """
1857
+ _run_gitbetter_wrapper("git-push", branch_name, no_input)
1858
+
1859
+
1860
+ @main.command(name="git-commit")
1861
+ @click.argument("branch_name", required=False)
1862
+ @click.option(
1863
+ '--no-input',
1864
+ 'no_input',
1865
+ is_flag=True,
1866
+ default=False,
1867
+ help=(
1868
+ 'Do not read from stdin; auto-decline both the duplicate-story-ID '
1869
+ 'warning and the bundle-offer prompt (so CI never silently bundles '
1870
+ 'or papers over a history anomaly). Also auto-enabled by CI=1 or '
1871
+ 'non-TTY stdin.'
1872
+ ),
1873
+ )
1874
+ def git_commit(branch_name: str | None, no_input: bool):
1875
+ """Wrap gitbetter's `git-commit` with the most-recently-completed story ID.
1876
+
1877
+ \b
1878
+ Identical interface and behavior to `project-guide git-push` (Story R.a),
1879
+ but shells out to gitbetter's `git-commit` to perform a local commit
1880
+ instead of a push — iterate on commits locally, then push a batch to
1881
+ GitHub later. Derives the commit message from `[Done]` story headings in
1882
+ `docs/specs/stories.md`, verifies the stories have not already been
1883
+ committed, and passes optional `BRANCH_NAME` through to gitbetter.
1884
+
1885
+ \b
1886
+ [Done] stories whose body contains no `- [ ]` / `- [x]` checklist items
1887
+ are treated as decorative group-overview headers (Story P.v) and filtered
1888
+ out of the uncommitted-detection flow — headers do not produce commits.
1889
+
1890
+ \b
1891
+ Single uncommitted [Done] story: derives `<id>: <title>` and commits.
1892
+ Multiple uncommitted [Done] stories: proposes a bundled subject
1893
+ `<id1>[: <ver1>], <id2>[: <ver2>], ... <title1> + <title2> + ...`
1894
+ and asks `[Y/n]`. Decline → exit 1 with the manual-resolution hint.
1895
+
1896
+ \b
1897
+ Out-of-sequence detection (Story P.v) applies on `main`/`master` (or when
1898
+ the branch is undeterminable); a single uncommitted offender gets the
1899
+ `[y/N]` opt-in prompt (Story Q.p). On any other branch (Story Q.u) the
1900
+ squash-merge presumption heuristics replace the out-of-sequence
1901
+ error/prompt. --no-input auto-declines every prompt.
1902
+
1903
+ \b
1904
+ Exit 0 (success):
1905
+ - Commit completed successfully
1906
+ - Nothing real to commit — every commit-worthy [Done] story is in git log
1907
+
1908
+ \b
1909
+ Hard errors (exit 1): same set as `git-push` — no `[Done]` story,
1910
+ unresolved out-of-sequence state, declined bundle offer, declined
1911
+ duplicate-ID continuation, or `git-commit` not on PATH (install
1912
+ gitbetter: `brew install pointmatic/tap/gitbetter`).
1913
+
1914
+ This is a developer-lane convenience command. The LLM still does not
1915
+ initiate commits — the approval-gate discipline rule remains in force.
1916
+ """
1917
+ _run_gitbetter_wrapper("git-commit", branch_name, no_input)
1918
+
1919
+
1920
+ def _run_gitbetter_wrapper(tool_name: str, branch_name: str | None, no_input: bool):
1921
+ """Shared body for the `git-push` / `git-commit` wrappers (Story R.a).
1922
+
1923
+ ``tool_name`` is the gitbetter binary to discover on PATH and invoke
1924
+ (``"git-push"`` or ``"git-commit"``); every tool-naming message (the
1925
+ not-on-PATH error, the bundle-decline hint, the out-of-sequence manual-
1926
+ resolution hint) is derived from it. Both wrappers have an identical
1927
+ interface and behavior from the project-guide perspective — the only
1928
+ difference is which gitbetter binary performs the actual git operation.
1929
+ """
1857
1930
  skip_input = should_skip_input(no_input)
1858
1931
  spec_artifacts_path = _resolve_spec_artifacts_path()
1859
1932
  done_stories = _read_done_stories(spec_artifacts_path)
@@ -1913,7 +1986,7 @@ def git_push(branch_name: str | None, no_input: bool):
1913
1986
  uncommitted_oos = [s for s in commit_units if s.story_id not in committed]
1914
1987
  single = len(uncommitted_oos) == 1
1915
1988
  if not (single and _prompt_commit_out_of_sequence(uncommitted_oos[0], skip_input)):
1916
- _emit_out_of_sequence_error(offenders, commit_units, committed)
1989
+ _emit_out_of_sequence_error(offenders, commit_units, committed, tool_name)
1917
1990
  sys.exit(1)
1918
1991
  # Accepted single out-of-sequence story → fall through to the normal
1919
1992
  # single-story commit path below.
@@ -1950,7 +2023,7 @@ def git_push(branch_name: str | None, no_input: bool):
1950
2023
  ids = ", ".join(s.story_id for s in uncommitted)
1951
2024
  click.secho(
1952
2025
  f"Multiple uncommitted [Done] stories: {ids}. "
1953
- f"Use 'git-push' directly to commit them one at a time with explicit messages.",
2026
+ f"Use '{tool_name}' directly to commit them one at a time with explicit messages.",
1954
2027
  fg='red',
1955
2028
  err=True,
1956
2029
  )
@@ -1958,17 +2031,17 @@ def git_push(branch_name: str | None, no_input: bool):
1958
2031
  else:
1959
2032
  message = derive_commit_message(uncommitted[0])
1960
2033
 
1961
- git_push_path = shutil.which("git-push")
1962
- if git_push_path is None:
2034
+ tool_path = shutil.which(tool_name)
2035
+ if tool_path is None:
1963
2036
  click.secho(
1964
- "git-push not found on PATH. "
2037
+ f"{tool_name} not found on PATH. "
1965
2038
  "Install gitbetter: brew install pointmatic/tap/gitbetter",
1966
2039
  fg='red',
1967
2040
  err=True,
1968
2041
  )
1969
2042
  sys.exit(1)
1970
2043
 
1971
- argv = [git_push_path, message]
2044
+ argv = [tool_path, message]
1972
2045
  if branch_name:
1973
2046
  argv.append(branch_name)
1974
2047
 
@@ -2100,6 +2173,7 @@ def _emit_out_of_sequence_error(
2100
2173
  offenders: list[tuple[str, list[str]]],
2101
2174
  commit_units: list,
2102
2175
  committed: set[str],
2176
+ tool_name: str = "git-push",
2103
2177
  ) -> None:
2104
2178
  """Print the out-of-sequence error block to stderr.
2105
2179
 
@@ -2140,7 +2214,7 @@ def _emit_out_of_sequence_error(
2140
2214
 
2141
2215
  click.echo("", err=True)
2142
2216
  click.secho(
2143
- "Commit out-of-sequence stories manually with raw git-push, or "
2217
+ f"Commit out-of-sequence stories manually with raw {tool_name}, or "
2144
2218
  "investigate the history gap.",
2145
2219
  fg='red',
2146
2220
  err=True,
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- __version__ = "2.18.0"
15
+ __version__ = "2.18.1"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "project-guide"
3
- version = "2.18.0"
3
+ version = "2.18.1"
4
4
  description = "Stay organized and in control with adaptive LLM workflow prompts."
5
5
  readme = "README.md"
6
6
  license = "Apache-2.0"
@@ -3639,6 +3639,188 @@ def test_git_push_nonmain_duplicate_id_warning_still_fires(runner, tmp_path, mon
3639
3639
  # --- End Story Q.u ----------------------------------------------------------
3640
3640
 
3641
3641
 
3642
+ # --- Story R.a: project-guide git-commit subcommand -------------------------
3643
+
3644
+
3645
+ def _mock_git_commit_on_path(monkeypatch, path: str | None = "/usr/local/bin/git-commit"):
3646
+ """Patch `shutil.which("git-commit")` to return the given path (or None)."""
3647
+ import project_guide.cli as cli_module
3648
+
3649
+ def fake_which(name):
3650
+ if name == "git-commit":
3651
+ return path
3652
+ return None # other lookups don't matter for these tests
3653
+
3654
+ monkeypatch.setattr(cli_module.shutil, "which", fake_which)
3655
+
3656
+
3657
+ def test_git_commit_happy_path_invokes_gitbetter_with_derived_message(runner, tmp_path, monkeypatch):
3658
+ """Last [Done] story, not yet committed → git-commit called with derived message."""
3659
+ with runner.isolated_filesystem(temp_dir=tmp_path):
3660
+ _write_stories_md(
3661
+ "### Story A.a: v0.1.0 Hello World [Done]",
3662
+ )
3663
+ _mock_git_commit_on_path(monkeypatch)
3664
+ captured: list = []
3665
+ _mock_git_log_subjects(monkeypatch, subjects=[], git_push_argv_capture=captured)
3666
+
3667
+ result = runner.invoke(main, ['git-commit'])
3668
+
3669
+ assert result.exit_code == 0, result.output
3670
+ assert len(captured) == 1, captured
3671
+ argv = captured[0]
3672
+ assert argv[0] == "/usr/local/bin/git-commit"
3673
+ assert argv[1] == "A.a: v0.1.0 Hello World"
3674
+
3675
+
3676
+ def test_git_commit_passes_branch_name_through(runner, tmp_path, monkeypatch):
3677
+ """BRANCH_NAME positional appears as second argument to git-commit."""
3678
+ with runner.isolated_filesystem(temp_dir=tmp_path):
3679
+ _write_stories_md(
3680
+ "### Story A.a: v0.1.0 Hello World [Done]",
3681
+ )
3682
+ _mock_git_commit_on_path(monkeypatch)
3683
+ captured: list = []
3684
+ _mock_git_log_subjects(monkeypatch, subjects=[], git_push_argv_capture=captured)
3685
+
3686
+ result = runner.invoke(main, ['git-commit', 'feature/xyz'])
3687
+
3688
+ assert result.exit_code == 0, result.output
3689
+ argv = captured[0]
3690
+ assert argv == ["/usr/local/bin/git-commit", "A.a: v0.1.0 Hello World", "feature/xyz"]
3691
+
3692
+
3693
+ def test_git_commit_not_on_path_errors_with_install_hint(runner, tmp_path, monkeypatch):
3694
+ """git-commit missing from PATH → exit 1 naming the tool + gitbetter install hint."""
3695
+ with runner.isolated_filesystem(temp_dir=tmp_path):
3696
+ _write_stories_md(
3697
+ "### Story A.a: v0.1.0 Hello World [Done]",
3698
+ )
3699
+ _mock_git_commit_on_path(monkeypatch, path=None)
3700
+ captured: list = []
3701
+ _mock_git_log_subjects(monkeypatch, subjects=[], git_push_argv_capture=captured)
3702
+
3703
+ result = runner.invoke(main, ['git-commit'])
3704
+
3705
+ assert result.exit_code == 1
3706
+ assert "git-commit not found on PATH" in result.output
3707
+ assert "brew install pointmatic/tap/gitbetter" in result.output
3708
+ assert captured == []
3709
+
3710
+
3711
+ def test_git_commit_no_done_stories_errors(runner, tmp_path, monkeypatch):
3712
+ """No [Done] story in stories.md → exit 1 (stories.md authoring problem)."""
3713
+ with runner.isolated_filesystem(temp_dir=tmp_path):
3714
+ _write_stories_md(
3715
+ "### Story A.a: v0.1.0 Hello World [Planned]",
3716
+ )
3717
+ _mock_git_commit_on_path(monkeypatch)
3718
+ captured: list = []
3719
+ _mock_git_log_subjects(monkeypatch, subjects=[], git_push_argv_capture=captured)
3720
+
3721
+ result = runner.invoke(main, ['git-commit'])
3722
+
3723
+ assert result.exit_code == 1
3724
+ assert "No completed story found" in result.output
3725
+ assert captured == []
3726
+
3727
+
3728
+ def test_git_commit_nothing_to_commit_exits_zero(runner, tmp_path, monkeypatch):
3729
+ """Every real [Done] story already committed → exit 0, no git-commit invocation."""
3730
+ with runner.isolated_filesystem(temp_dir=tmp_path):
3731
+ _write_stories_md(
3732
+ "### Story A.a: v0.1.0 Hello World [Done]",
3733
+ )
3734
+ _mock_git_commit_on_path(monkeypatch)
3735
+ captured: list = []
3736
+ _mock_git_log_subjects(
3737
+ monkeypatch,
3738
+ subjects=["A.a: v0.1.0 Hello World"],
3739
+ git_push_argv_capture=captured,
3740
+ )
3741
+
3742
+ result = runner.invoke(main, ['git-commit'])
3743
+
3744
+ assert result.exit_code == 0, result.output
3745
+ assert "Nothing to commit" in result.output
3746
+ assert captured == []
3747
+
3748
+
3749
+ def test_git_commit_bundle_offer_accepted_invokes_git_commit(runner, tmp_path, monkeypatch):
3750
+ """2+ uncommitted [Done] stories → bundled subject offered [Y/n]; accepting
3751
+ invokes git-commit with the bundled message."""
3752
+ import project_guide.cli as cli_module
3753
+
3754
+ with runner.isolated_filesystem(temp_dir=tmp_path):
3755
+ _write_stories_md(
3756
+ "### Story A.a: v0.1.0 first [Done]",
3757
+ "### Story A.b: v0.2.0 second [Done]",
3758
+ )
3759
+ _mock_git_commit_on_path(monkeypatch)
3760
+ captured: list = []
3761
+ _mock_git_log_subjects(monkeypatch, subjects=[], git_push_argv_capture=captured)
3762
+ monkeypatch.setattr(cli_module, 'should_skip_input', lambda *a, **kw: False)
3763
+
3764
+ result = runner.invoke(main, ['git-commit'], input='y\n')
3765
+
3766
+ assert result.exit_code == 0, result.output
3767
+ assert len(captured) == 1, captured
3768
+ assert captured[0][0] == "/usr/local/bin/git-commit"
3769
+ assert captured[0][1] == "A.a: v0.1.0, A.b: v0.2.0 first + second"
3770
+
3771
+
3772
+ def test_git_commit_bundle_declined_under_no_input_names_git_commit(runner, tmp_path, monkeypatch):
3773
+ """--no-input auto-declines the bundle offer → exit 1; the manual-resolution
3774
+ hint names git-commit (not git-push)."""
3775
+ with runner.isolated_filesystem(temp_dir=tmp_path):
3776
+ _write_stories_md(
3777
+ "### Story A.a: v0.1.0 first [Done]",
3778
+ "### Story A.b: v0.2.0 second [Done]",
3779
+ )
3780
+ _mock_git_commit_on_path(monkeypatch)
3781
+ captured: list = []
3782
+ _mock_git_log_subjects(monkeypatch, subjects=[], git_push_argv_capture=captured)
3783
+
3784
+ result = runner.invoke(main, ['git-commit', '--no-input'])
3785
+
3786
+ assert result.exit_code == 1
3787
+ assert "Multiple uncommitted [Done] stories" in result.output
3788
+ assert "'git-commit'" in result.output
3789
+ assert captured == []
3790
+
3791
+
3792
+ def test_git_commit_single_out_of_sequence_accepted_invokes_gitbetter(runner, tmp_path, monkeypatch):
3793
+ """A single uncommitted [Done] story sitting out of sequence → the wrapper
3794
+ offers [y/N]; accepting derives the single-story message and invokes
3795
+ git-commit (mirrors the Q.p git-push flow)."""
3796
+ import project_guide.cli as cli_module
3797
+
3798
+ with runner.isolated_filesystem(temp_dir=tmp_path):
3799
+ _write_stories_md(
3800
+ "### Story A.a: v0.1.0 First [Done]",
3801
+ "### Story A.b: v0.2.0 Second [Done]",
3802
+ )
3803
+ _mock_git_commit_on_path(monkeypatch)
3804
+ captured: list = []
3805
+ _mock_git_log_subjects(
3806
+ monkeypatch,
3807
+ subjects=["A.b: v0.2.0 Second"],
3808
+ git_push_argv_capture=captured,
3809
+ )
3810
+ monkeypatch.setattr(cli_module, 'should_skip_input', lambda *a, **kw: False)
3811
+
3812
+ result = runner.invoke(main, ['git-commit'], input='y\n')
3813
+
3814
+ assert result.exit_code == 0, result.output
3815
+ assert "Out-of-sequence" not in result.output
3816
+ assert len(captured) == 1
3817
+ assert captured[0][0] == "/usr/local/bin/git-commit"
3818
+ assert captured[0][1] == "A.a: v0.1.0 First"
3819
+
3820
+
3821
+ # --- End Story R.a ----------------------------------------------------------
3822
+
3823
+
3642
3824
  # --- Story P.o: untracked-by-default go.md policy ---------------------------
3643
3825
 
3644
3826
 
File without changes
File without changes