plan_driven 0.1.0

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 (55) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +76 -0
  3. data/LICENSE.txt +21 -0
  4. data/README.md +823 -0
  5. data/exe/plan-driven +7 -0
  6. data/lib/generators/plan_driven/install_generator.rb +37 -0
  7. data/lib/generators/plan_driven/templates/create_plan_driven_tables.rb.tt +73 -0
  8. data/lib/generators/plan_driven/templates/plan_driven.rb +39 -0
  9. data/lib/plan_driven/agent_prompt.rb +86 -0
  10. data/lib/plan_driven/cli/plan_commands.rb +158 -0
  11. data/lib/plan_driven/cli/setup_commands.rb +97 -0
  12. data/lib/plan_driven/cli/ticket_commands.rb +155 -0
  13. data/lib/plan_driven/cli/ui.rb +101 -0
  14. data/lib/plan_driven/cli.rb +150 -0
  15. data/lib/plan_driven/configuration.rb +114 -0
  16. data/lib/plan_driven/credentials.rb +90 -0
  17. data/lib/plan_driven/cursor_agents.rb +82 -0
  18. data/lib/plan_driven/cursor_llm.mjs +70 -0
  19. data/lib/plan_driven/cursor_llm.rb +79 -0
  20. data/lib/plan_driven/delivery.rb +362 -0
  21. data/lib/plan_driven/drafter.rb +122 -0
  22. data/lib/plan_driven/errors.rb +22 -0
  23. data/lib/plan_driven/evidence.rb +108 -0
  24. data/lib/plan_driven/gherkin.rb +42 -0
  25. data/lib/plan_driven/github.rb +118 -0
  26. data/lib/plan_driven/guards/migration_guard.rb +94 -0
  27. data/lib/plan_driven/guards/plan_guard.rb +84 -0
  28. data/lib/plan_driven/guards/pr_guard.rb +140 -0
  29. data/lib/plan_driven/guards/ticket_guard.rb +178 -0
  30. data/lib/plan_driven/guards/ticket_normalizer.rb +90 -0
  31. data/lib/plan_driven/guards.rb +57 -0
  32. data/lib/plan_driven/http.rb +60 -0
  33. data/lib/plan_driven/json_reply.rb +26 -0
  34. data/lib/plan_driven/llm.rb +80 -0
  35. data/lib/plan_driven/models/approval.rb +12 -0
  36. data/lib/plan_driven/models/event.rb +13 -0
  37. data/lib/plan_driven/models/evidence_run.rb +17 -0
  38. data/lib/plan_driven/models/plan.rb +98 -0
  39. data/lib/plan_driven/models/record.rb +8 -0
  40. data/lib/plan_driven/models/ticket.rb +58 -0
  41. data/lib/plan_driven/models.rb +8 -0
  42. data/lib/plan_driven/railtie.rb +9 -0
  43. data/lib/plan_driven/renderer/html.rb +106 -0
  44. data/lib/plan_driven/renderer/markdown.rb +145 -0
  45. data/lib/plan_driven/renderer/pdf.rb +39 -0
  46. data/lib/plan_driven/renderer/style.css +22 -0
  47. data/lib/plan_driven/renderer.rb +41 -0
  48. data/lib/plan_driven/repository.rb +35 -0
  49. data/lib/plan_driven/schema_context.rb +98 -0
  50. data/lib/plan_driven/template.rb +113 -0
  51. data/lib/plan_driven/ticket_generator.rb +98 -0
  52. data/lib/plan_driven/version.rb +5 -0
  53. data/lib/plan_driven/workflow.rb +59 -0
  54. data/lib/plan_driven.rb +72 -0
  55. metadata +146 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 49e95b18ac3191d34d9d526ba2fea2428ea662fab966da32c15239ba39573e5d
4
+ data.tar.gz: '099d0a1fae1854e186a894e95354118b086722ecb6b13c72e90e28dfa2a2bc13'
5
+ SHA512:
6
+ metadata.gz: 2bd6c949e802f2f2e7ccc1b98052ebc3c744b5e4bb381666cddbe79f7849e7ff1cf4205bde8a8f00b560bbce70f85ebac584c2ddd76f12156a8adf3f06843520
7
+ data.tar.gz: c6605b055a96b9f2779038c2915ae2bf2585dfa28b66cd289a6b9a2dcbf295ed1ebda16d2df4476ea0d71b6dfd26ea05e9da39b596c905bbe18aeda6c6aa98a8
data/CHANGELOG.md ADDED
@@ -0,0 +1,76 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project are documented here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project adheres to
5
+ [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.1.0] - 2026-09-30
10
+
11
+ First public release.
12
+
13
+ ### Plans
14
+
15
+ - `plan-driven new` interviews the team in the terminal (what, why, where, who, when,
16
+ background, out of scope) and drafts the rest of the plan from the answers and the
17
+ application's schema, following the usual Confluence implementation plan template.
18
+ - `edit` in `$EDITOR`, `redraft` with an instruction, `check`, `submit`, `approve` and
19
+ `reject`. Approvals belong to a revision, so editing an approved plan asks for approval again.
20
+ - Plans are written to `docs/plans/<plan>/plan.{md,html,pdf}`, with the PDF rendered by
21
+ headless Chrome or any configured renderer.
22
+
23
+ ### Tickets
24
+
25
+ - `tickets` splits an approved plan into tickets with a type, kind, description, acceptance
26
+ criteria, estimate, dependencies and the tables they touch. `tickets PLAN "instruction"`
27
+ redrafts the whole set.
28
+ - `approve-tickets` approves them and creates a GitHub issue for each. Issue numbers and
29
+ names in ticket text (`#1`, `@event`) don't turn into links or mentions.
30
+
31
+ ### Development
32
+
33
+ - `develop` starts one Cursor cloud agent per ready ticket, within `max_parallel_agents`. A
34
+ ticket is ready once every ticket it depends on is merged.
35
+ - `status` follows agents to their pull requests, notices pull requests merged on GitHub, and
36
+ suggests the next step.
37
+ - `review` lists every check it ran, not only the failures. `approve-pr`, `feedback` (a
38
+ follow-up to the same agent) and `merge`, which needs the ticket key typed, waits for CI and
39
+ marks an agent's draft pull request ready before merging.
40
+
41
+ ### Guards
42
+
43
+ - PlanGuard: required sections, minimum length, a security risk level, placeholders, and an
44
+ Existing Data Structure section that cites only models, files and columns that exist.
45
+ - MigrationGuard: one-step removals and renames, NOT NULL without a default or backfill, and
46
+ non-concurrent indexes on PostgreSQL.
47
+ - TicketNormalizer: keys, kinds, types, title prefixes and estimates corrected in code, and
48
+ every correction reported.
49
+ - TicketGuard: acceptance criteria, estimates, dependency cycles, expand and contract order
50
+ per table, and coverage of the plan's tables.
51
+ - PrGuard: size, specs, migrations only in migration tickets, a Cucumber scenario for every
52
+ acceptance criterion, CI results, and a warning when the branch is behind the base branch.
53
+ - Guard errors go back to the model as a list to fix, up to `max_repair_attempts` times.
54
+
55
+ ### Evidence
56
+
57
+ - `evidence` runs the plan's Cucumber scenarios, or imports a JSON run with `--from`, and maps
58
+ each acceptance criterion to the scenarios tagged for it.
59
+ - `report` writes the delivery report: tickets and pull requests, the acceptance criteria
60
+ proof matrix, guard findings, approvals and the timeline.
61
+ - `log` prints the append-only audit trail.
62
+
63
+ ### Setup
64
+
65
+ - A `plan_driven:install` generator for the tables, the initializer and `docs/plans`.
66
+ - OpenAI and Anthropic over `net/http`, any OpenAI-compatible endpoint through `llm_api_base`.
67
+ - `llm_provider :cursor` drafts plans and tickets with a model on the user's Cursor account
68
+ (Claude Opus 5.5 by default) through the Cursor SDK. The agent reads the application's code
69
+ with read-only tools.
70
+ - Keys from the environment, then `~/.plan_driven/config` (mode 0600), written by
71
+ `plan-driven configure`; the GitHub token can also come from `gh auth token`.
72
+ - `plan-driven doctor` checks keys, the repository, the PDF browser, the Cursor API, the agent
73
+ model, and Node and the SDK for `:cursor`.
74
+
75
+ [Unreleased]: https://github.com/blaz1988/plan-driven/compare/v0.1.0...HEAD
76
+ [0.1.0]: https://github.com/blaz1988/plan-driven/releases/tag/v0.1.0
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 Ivan Blazevic, Rubycode (https://rubycode.co)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.