schub 0.1.25 → 0.1.26
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.
- package/README.md +3 -2
- package/dist/api/server.js +521 -1221
- package/dist/dashboard/assets/{EquationComponent-CmMddHEw.js → EquationComponent-DYTYbmpl.js} +1 -1
- package/dist/dashboard/assets/index-raRkw0ib.js +354 -0
- package/dist/dashboard/index.html +1 -1
- package/dist/index.js +7458 -10106
- package/dist/services/runtime.js +133 -384
- package/drizzle/0010_restructure_templates.sql +11 -0
- package/drizzle/meta/_journal.json +7 -0
- package/package.json +1 -1
- package/skills/create-proposal/SKILL.md +17 -20
- package/skills/create-sub-tickets/SKILL.md +2 -14
- package/skills/create-ticket/SKILL.md +0 -1
- package/skills/refine-ticket/SKILL.md +3 -3
- package/skills/review-ticket/SKILL.md +40 -0
- package/skills/update-documentation/SKILL.md +30 -0
- package/templates/{create-proposal/adr-template.md → adr-template.md} +3 -3
- package/templates/{create-proposal/cookbook-template.md → cookbook-template.md} +1 -1
- package/templates/{create-proposal/proposal-template.md → proposal-template.md} +10 -2
- package/templates/{review-proposal/q&a-template.md → q&a-template.md} +2 -2
- package/templates/{review-proposal/review-me-template.md → review-me-template.md} +2 -2
- package/templates/{create-ticket/ticket-template.md → ticket-template.md} +1 -2
- package/dist/dashboard/assets/index-UwpVAg9D.js +0 -354
- package/skills/review-proposal/SKILL.md +0 -40
- package/templates/create-tasks/task-template.md +0 -69
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
DROP TABLE IF EXISTS `templates`;--> statement-breakpoint
|
|
2
|
+
CREATE TABLE `templates` (
|
|
3
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
4
|
+
`project_id` text REFERENCES `projects`(`id`) ON DELETE set null,
|
|
5
|
+
`name` text NOT NULL,
|
|
6
|
+
`template_type` text NOT NULL,
|
|
7
|
+
`file_id` text NOT NULL REFERENCES `files`(`id`),
|
|
8
|
+
`is_default` integer NOT NULL DEFAULT 0,
|
|
9
|
+
`created_at` text NOT NULL,
|
|
10
|
+
`updated_at` text NOT NULL
|
|
11
|
+
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: create-proposal
|
|
3
|
-
description: "Create or update proposals
|
|
3
|
+
description: "Create or update proposals. Use this when asked to write a proposal, introduce changes that add features, large refactors, introduce breaking API or schema changes, modify architecture or design patterns, update security patterns, or after creating a plan, to save a plan as proposal. Do not create proposals for bug fixes that restore intended behavior, typos or formatting/comment-only changes, non-breaking dependency updates, configuration-only changes, or tests that validate existing behavior."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## User Input
|
|
@@ -12,28 +12,25 @@ $ARGUMENTS
|
|
|
12
12
|
## Workflow
|
|
13
13
|
|
|
14
14
|
1. Derive a concise, verb-led `title` from the request (kebab-case: `add-`, `update-`, `remove-`, `refactor-`, `fix-`).
|
|
15
|
-
2. Run `npx schub
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
9. (OPTIONAL) For complex tickets requiring deep understanding of the system, track relevant additional information in `research.md`.
|
|
25
|
-
10. (OPTIONAL) For decisions with lasting architectural impact or important tradeoffs, run `npx schub templates create --name "adr" --proposal-id "<proposal-id>" --title "<title>"`.
|
|
26
|
-
11. Run `npx schub proposals save --proposal-id "<proposal-id>"` to persist the final proposal and related files under `.schub/proposals/<proposal-id>/` (proposal, cookbook, schemas, contracts, research, adr).
|
|
15
|
+
2. Run `npx schub tickets write --title "<title>" --input "<user prompt verbatim>" --status "backlog" --template "proposal-template"` to create a proposal.
|
|
16
|
+
3. Update the proposal with concrete, testable statements.
|
|
17
|
+
4. Identify touch points throughout the project and track them in the proposal sections.
|
|
18
|
+
5. Track missing information with [MISSING INFORMATION] tags in the ticket.
|
|
19
|
+
6. (OPTIONAL) If the change affects a public surface (API, SDK, CLI), run `npx schub templates create --ticket-id "<ticket-id>" --name "cookbook"` to scaffold `cookbook.md`.
|
|
20
|
+
7. (OPTIONAL) If implementing the change requires knowledge of an API, DB schema, etc., encode this in a `contracts.md` or `schemas.md` file in the ticket folder.
|
|
21
|
+
8. (OPTIONAL) For complex tickets requiring deep understanding of the system, track relevant additional information in a `research.md` file in the ticket folder.
|
|
22
|
+
9. (OPTIONAL) For decisions with lasting architectural impact or important tradeoffs, run `npx schub templates create --ticket-id "<ticket-id>" --name "adr" --title "<title>"` to scaffold `adr.md`.
|
|
23
|
+
10. Run `npx schub tickets save --id "<ticket-id>"` to persist the proposal.
|
|
27
24
|
|
|
28
25
|
## Output Locations
|
|
29
26
|
|
|
30
|
-
- Proposal: `.schub/
|
|
31
|
-
- (OPTIONAL) Cookbook: `.schub/
|
|
32
|
-
- (OPTIONAL) Schemas: `.schub/
|
|
33
|
-
- (OPTIONAL) Contracts: `.schub/
|
|
34
|
-
- (OPTIONAL) Research: `.schub/
|
|
35
|
-
- (OPTIONAL) ADR: `.schub/
|
|
27
|
+
- Proposal: `.schub/tickets/<ticket-id>_<slug>/ticket.md`
|
|
28
|
+
- (OPTIONAL) Cookbook: `.schub/tickets/<ticket-id>_<slug>/cookbook.md`
|
|
29
|
+
- (OPTIONAL) Schemas: `.schub/tickets/<ticket-id>_<slug>/schemas.md`
|
|
30
|
+
- (OPTIONAL) Contracts: `.schub/tickets/<ticket-id>_<slug>/contracts.md`
|
|
31
|
+
- (OPTIONAL) Research: `.schub/tickets/<ticket-id>_<slug>/research.md`
|
|
32
|
+
- (OPTIONAL) ADR: `.schub/tickets/<ticket-id>_<slug>/adr.md`
|
|
36
33
|
|
|
37
34
|
## Notes
|
|
38
35
|
|
|
39
|
-
- **Do not start the implementation
|
|
36
|
+
- **Do not start the implementation**. Stop after the proposal content is saved.
|
|
@@ -18,28 +18,17 @@ $ARGUMENTS
|
|
|
18
18
|
4. Read the parent ticket and derive sub-tickets. Each sub-ticket should be:
|
|
19
19
|
- Small enough to implement in one sitting.
|
|
20
20
|
- Independently testable.
|
|
21
|
-
- Explicit about file paths and affected components.
|
|
22
|
-
- Include `References` linking to parent/proposal/spec files when available.
|
|
23
21
|
- Include `Implementation Notes` covering assumptions, key decisions, and where to look in code.
|
|
24
22
|
- Include `Acceptance` criteria with explicit tests (file paths, cases covered) and exact commands to run.
|
|
25
23
|
- Include corresponding documentation updates.
|
|
26
24
|
5. Create each sub-ticket via the CLI (one command per sub-ticket):
|
|
27
25
|
- Run `npx schub tickets write --title "<ticket title>" --status "<status>"`.
|
|
28
|
-
- If the parent ticket has `proposal_id`, include it: `--proposal-id "<proposal-id>"`.
|
|
29
26
|
6. After each `tickets write`, open the generated child ticket and set frontmatter `parent_id` to the parent ticket id:
|
|
30
27
|
- `parent_id: "<parent-ticket-id>"`.
|
|
31
|
-
7. Fill each child ticket template with concrete details
|
|
32
|
-
- Priority (P1/P2/P3)
|
|
33
|
-
- Parallelizable (yes/no)
|
|
34
|
-
- Goal, scope, steps, acceptance, and evidence
|
|
35
|
-
- References to existing docs/specs (if any), otherwise record gaps as assumptions
|
|
36
|
-
- Implementation Notes with key files/modules and decisions
|
|
37
|
-
- Acceptance with explicit tests, file paths, and exact commands
|
|
38
|
-
- Documentation updates, or an explicit “no docs” note
|
|
39
|
-
- If blocked, run `npx schub tickets update --id "<ticket-id>" --status blocked --blocked-reason <reason>`
|
|
28
|
+
7. Fill each child ticket template with concrete details.
|
|
40
29
|
8. Verify every child ticket has `parent_id` set to the parent ticket id before saving.
|
|
41
30
|
9. When defining acceptance, list the exact test file paths, cases covered, and commands to run. Tests must live in the same ticket as the feature/bugfix work. Do not create standalone “add tests” tickets. Tests belong with the functional change they validate.
|
|
42
|
-
10. Resolve blockers by checking all existing tickets that are not done
|
|
31
|
+
10. Resolve blockers by checking all existing tickets that are not done `npx schub tickets list open`. If another ticket is a blocker, add it to `depends_on` in frontmatter. If blocked, run `npx schub tickets update --id "<ticket-id>" --status blocked --blocked-reason <reason>`
|
|
43
32
|
11. Run `npx schub tickets save --id "<ticket-id>"` for each child ticket to persist updates.
|
|
44
33
|
12. Stop after the sub-ticket files are created. Do not implement code or modify plan artifacts.
|
|
45
34
|
|
|
@@ -47,7 +36,6 @@ $ARGUMENTS
|
|
|
47
36
|
|
|
48
37
|
- Parent Ticket: `.schub/tickets/<parent-ticket-id>_<slug>/ticket.md`
|
|
49
38
|
- Sub-tickets: `.schub/tickets/<ticket-id>_<slug>/ticket.md`
|
|
50
|
-
- Validation Artifacts: `.schub/tickets/<ticket-id>_<slug>/artifacts/`
|
|
51
39
|
|
|
52
40
|
## Ticket Notes
|
|
53
41
|
|
|
@@ -16,7 +16,6 @@ $ARGUMENTS
|
|
|
16
16
|
- Otherwise set status to `wip`.
|
|
17
17
|
2. Derive a concise, verb-led ticket title from the user request and immediately run the schub CLI to create the ticket.
|
|
18
18
|
- Run `npx schub tickets write --title "<ticket title>" --input "<user prompt verbatim>" --status "<status>"`.
|
|
19
|
-
- If the ticket maps to a proposal, include `--proposal-id "<shorthand>"`.
|
|
20
19
|
3. Fill the ticket template with concrete details:
|
|
21
20
|
- Priority (P1/P2/P3)
|
|
22
21
|
- Parallelizable (yes/no)
|
|
@@ -12,12 +12,12 @@ $ARGUMENTS
|
|
|
12
12
|
## Workflow
|
|
13
13
|
|
|
14
14
|
1. Identify the target ticket shorthand from the user request (`TK####`).
|
|
15
|
-
- If the request includes a template name (e.g. `refine ticket: TK0001 with template
|
|
16
|
-
2. Run `npx schub tickets refine --id "<ticket-shorthand>"` (or `npx schub tickets refine --id "<ticket-shorthand>" --template "<
|
|
15
|
+
- If the request includes a template name (e.g. `refine ticket: TK0001 with template proposal-template`), extract the template slug.
|
|
16
|
+
2. Run `npx schub tickets refine --id "<ticket-shorthand>"` (or `npx schub tickets refine --id "<ticket-shorthand>" --template "<slug>"` when a template is specified).
|
|
17
17
|
- This command pulls the ticket from DB if it is not local.
|
|
18
18
|
- It creates `ticket.original.md` in the ticket folder as a backup.
|
|
19
19
|
- It prepends the ticket template into `ticket.md`.
|
|
20
|
-
-
|
|
20
|
+
- The `--template` value is a lowercase slug matching the template name in the DB (e.g. `proposal-template`, `ticket-template`).
|
|
21
21
|
- It wraps the original ticket content in:
|
|
22
22
|
- `<MOVE_TO_TEMPLATE>`
|
|
23
23
|
- `</MOVE_TO_TEMPLATE>`
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-ticket
|
|
3
|
+
description: "Run a review session for a ticket by creating a list of open questions, updating the ticket, adding a Q&A section, and deleting REVIEW_ME.md on completion. Use when asked to review tickets."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## User Input (ticket-id shorthand `TK####`)
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
$ARGUMENTS
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. Pull the ticket locally if not already present:
|
|
15
|
+
- Run `npx schub tickets pull --id "<ticket-id>"`.
|
|
16
|
+
2. Confirm `.schub/tickets/<ticket-id>_<slug>/ticket.md` exists. If it is missing, ask the user to run the create-ticket skill first. If it is still a draft, ask the user to review it first.
|
|
17
|
+
3. Review the ticket by checking the [MISSING INFORMATION] tags and the potential issues listed.
|
|
18
|
+
4. If there are issues, or missing information, run `npx schub templates create --name "review" --ticket-id "<ticket-id>"` to scaffold `REVIEW_ME.md` in the ticket folder.
|
|
19
|
+
5. Triage each item:
|
|
20
|
+
- **High-stakes** (scope, risks, dependencies, security, performance): create a bullet point item in the review checklist.
|
|
21
|
+
- **Minute details** (naming, copy, formatting, low-impact defaults): make a decision update the ticket and mark as an assumption.
|
|
22
|
+
6. Once the review checklist is completed, gather unchecked items (`- [ ]`) in order.
|
|
23
|
+
7. Start the review loop (process unchecked items in order), ask each item as a question. If unclear, ask a quick follow-up and do not advance.
|
|
24
|
+
- Update the review checklist accordingly inline with the answers.
|
|
25
|
+
8. When no unchecked items remain, update the ticket with the new information.
|
|
26
|
+
9. When no unchecked items remain, run `npx schub review complete --ticket-id "<ticket-id>"` to create `Q&A.md` in the ticket folder.
|
|
27
|
+
- Ask the LLM to migrate the TODO block into the Q&A sections and remove the TODO block.
|
|
28
|
+
10. Mark the ticket Status as "Accepted".
|
|
29
|
+
|
|
30
|
+
## Output Locations
|
|
31
|
+
|
|
32
|
+
- Ticket: `.schub/tickets/<ticket-id>_<slug>/ticket.md`
|
|
33
|
+
- (OPTIONAL) Review In Progress: `.schub/tickets/<ticket-id>_<slug>/REVIEW_ME.md`
|
|
34
|
+
- (OPTIONAL) Review Completed: `.schub/tickets/<ticket-id>_<slug>/Q&A.md`
|
|
35
|
+
|
|
36
|
+
## Notes
|
|
37
|
+
|
|
38
|
+
- Avoid expanding scope beyond missing information in the ticket.
|
|
39
|
+
- Focus review on high-stakes issues; place details into assumptions instead of asking.
|
|
40
|
+
- **Do not start the implementation** only edit the ticket folder.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: update-documentation
|
|
3
|
+
description: "Use when asked to update, add, or modify project documentation. Pull the latest project documentation, apply updates, and save changes back."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## User Input
|
|
7
|
+
|
|
8
|
+
```text
|
|
9
|
+
$ARGUMENTS
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. Run `npx schub@latest docs pull` to pull the latest persisted documentation snapshot to `.schub/docs`:
|
|
15
|
+
- If the pull fails because docs have not been initialized, run `npx schub@latest docs init` first, then retry.
|
|
16
|
+
2. Read `.schub/docs/docs.json` to understand the current sidebar structure and available pages.
|
|
17
|
+
3. Apply the requested documentation changes:
|
|
18
|
+
- **Adding a new page**: create the markdown file under `.schub/docs/`, then add a sidebar entry in `docs.json` with `{ "text": "<title>", "link": "<relative-path>" }`.
|
|
19
|
+
- **Updating an existing page**: edit the markdown file in place.
|
|
20
|
+
- **Removing a page**: delete the markdown file and remove its sidebar entry from `docs.json`.
|
|
21
|
+
- **Reorganizing**: update `docs.json` sidebar order or grouping. Groups use `{ "text": "<group>", "items": [...] }`.
|
|
22
|
+
4. Save the updated documentation:
|
|
23
|
+
- Run `npx schub@latest docs save`.
|
|
24
|
+
- Verify the command reports the expected number of updated/removed files.
|
|
25
|
+
5. Summarize the changes made: list added, updated, and removed pages.
|
|
26
|
+
|
|
27
|
+
## Output Locations
|
|
28
|
+
|
|
29
|
+
- Documentation files: `.schub/docs/`
|
|
30
|
+
- Sidebar config: `.schub/docs/docs.json`
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
status: "[Proposed | Accepted | Deprecated | Superseded]"
|
|
3
|
-
date: "
|
|
4
|
-
related: "
|
|
3
|
+
date: "{{DATE}}"
|
|
4
|
+
related: "{{TICKET_ID}}"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# ADR:
|
|
7
|
+
# ADR: {{TITLE}}
|
|
8
8
|
|
|
9
9
|
[What problem are we solving? What constraints, requirements, or incidents led here?]
|
|
10
10
|
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
ticket_id: "{{TICKET_ID}}"
|
|
3
3
|
created: "{{DATE}}"
|
|
4
4
|
status: Draft
|
|
5
5
|
input: "{{INPUT}}"
|
|
6
|
+
parent_id: "{{PARENT_ID}}"
|
|
7
|
+
priority: "[P1|P2|P3]"
|
|
8
|
+
complexity: "[low|medium|high]"
|
|
9
|
+
depends_on: []
|
|
10
|
+
parallelizable: "[no|yes]"
|
|
11
|
+
blocked_reason: ""
|
|
6
12
|
---
|
|
7
13
|
|
|
8
|
-
# {{
|
|
14
|
+
# {{TICKET_TITLE}}
|
|
9
15
|
|
|
10
16
|
[1–3 sentences describing the change and the user-visible outcome.]
|
|
11
17
|
|
|
18
|
+
[This proposal is maintained inside a ticket artifact and should stay implementation-ready.]
|
|
19
|
+
|
|
12
20
|
## Why
|
|
13
21
|
|
|
14
22
|
[Problem/opportunity + motivation. What’s broken/missing today? Why now?]
|