mdrules 0.1.0 → 0.2.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.
- package/README.md +196 -55
- package/dist/cli.js +871 -165
- package/dist/web/assets/{abnfDiagram-WEYOIA3C-DKgk2hIQ.js → abnfDiagram-WEYOIA3C-COoXc57p.js} +1 -1
- package/dist/web/assets/{arc-CCAU-51h.js → arc-CQ-mpttu.js} +1 -1
- package/dist/web/assets/{architecture-WOLXFQ4H-BcNYkHmW.js → architecture-WOLXFQ4H-Cl3-F9oV.js} +1 -1
- package/dist/web/assets/{architectureDiagram-ZHVYKT53-DgRlfGj2.js → architectureDiagram-ZHVYKT53-C1LOUHfq.js} +1 -1
- package/dist/web/assets/{blockDiagram-RJAE7QA3-DoBplOhb.js → blockDiagram-RJAE7QA3-YeQnD2ds.js} +1 -1
- package/dist/web/assets/{c4Diagram-XDPPPE54-CGKzgX6O.js → c4Diagram-XDPPPE54-XLmSlndV.js} +1 -1
- package/dist/web/assets/channel-Bu489uW7.js +1 -0
- package/dist/web/assets/{chunk-2E7WHVMD-DhQx5a0n.js → chunk-2E7WHVMD-HGXqy_LQ.js} +1 -1
- package/dist/web/assets/{chunk-4EMNKR2T-vHF11V5m.js → chunk-4EMNKR2T-DsQggzQE.js} +1 -1
- package/dist/web/assets/{chunk-55XCU76K-DgZ0btzr.js → chunk-55XCU76K-DY1xg8cl.js} +1 -1
- package/dist/web/assets/{chunk-7S6XSTFO-DoKaEIP0.js → chunk-7S6XSTFO-BuyzABLx.js} +1 -1
- package/dist/web/assets/{chunk-AQDTSKZB-DktDdZ_o.js → chunk-AQDTSKZB-CsDWfENX.js} +1 -1
- package/dist/web/assets/{chunk-DSNLSHJZ-C_3sVqJn.js → chunk-DSNLSHJZ-CuiVxF9g.js} +1 -1
- package/dist/web/assets/{chunk-HAGFOTED-DhCQIE99.js → chunk-HAGFOTED-CjjQypU8.js} +1 -1
- package/dist/web/assets/{chunk-HNE4Q36P-D_sbl6UM.js → chunk-HNE4Q36P-B0-YOuZI.js} +1 -1
- package/dist/web/assets/{chunk-NQOKRVIF-UuKYBp6F.js → chunk-NQOKRVIF-DMWnWh6r.js} +1 -1
- package/dist/web/assets/{chunk-UHW7PFBP-BkreF8rs.js → chunk-UHW7PFBP-D3E4ik9Y.js} +1 -1
- package/dist/web/assets/{chunk-VQ5W62QI-Cb7PeOKH.js → chunk-VQ5W62QI-CiPAEjx6.js} +1 -1
- package/dist/web/assets/{chunk-WQQL4CDK-GsIKInJ-.js → chunk-WQQL4CDK-StBWijFa.js} +1 -1
- package/dist/web/assets/{chunk-XXDRQBXY-Bbz14gys.js → chunk-XXDRQBXY-CINBf_Ay.js} +1 -1
- package/dist/web/assets/{chunk-YZO67HFG--IdJYNXK.js → chunk-YZO67HFG-BSkchBSd.js} +1 -1
- package/dist/web/assets/{chunk-ZAUX2LTX-DmenwPIM.js → chunk-ZAUX2LTX-CYfcgJpt.js} +1 -1
- package/dist/web/assets/{chunk-ZCHMQSOR-BZ2XP8BW.js → chunk-ZCHMQSOR-CwWl64AI.js} +1 -1
- package/dist/web/assets/{classDiagram-v2-4MYWR3UA-B_FJCXgY.js → classDiagram-v2-4MYWR3UA-Ce6JKsB3.js} +1 -1
- package/dist/web/assets/{cose-bilkent-JH36ORCC-DMBdq3mq.js → cose-bilkent-JH36ORCC-COClxHi_.js} +1 -1
- package/dist/web/assets/{cynefin-EF2NZ3EQ-BthcZtsD.js → cynefin-EF2NZ3EQ-BGZI2c8V.js} +1 -1
- package/dist/web/assets/{cynefinDiagram-WF24UDRP-Bva6JySb.js → cynefinDiagram-WF24UDRP-B24KUNeS.js} +1 -1
- package/dist/web/assets/{dagre-NK4GIZVX-BE6DKQYs.js → dagre-NK4GIZVX-DjCzI5LG.js} +1 -1
- package/dist/web/assets/{diagram-CBK3MWTC-DuDzgplS.js → diagram-CBK3MWTC-pa5xxV7I.js} +1 -1
- package/dist/web/assets/{diagram-I5XIIV2D-DU3jaZXW.js → diagram-I5XIIV2D-BQtih66c.js} +1 -1
- package/dist/web/assets/{diagram-ODIL2UCW-DYI3Rj6j.js → diagram-ODIL2UCW-CtodvdqO.js} +1 -1
- package/dist/web/assets/{diagram-PFBEJUXE-FD1CYRbT.js → diagram-PFBEJUXE-B-CnrB9d.js} +1 -1
- package/dist/web/assets/{diagram-RJA3I4VV-BsbAupu0.js → diagram-RJA3I4VV-Di8-srfd.js} +1 -1
- package/dist/web/assets/{diagram-TYUNFSNR-BMB0kMWv.js → diagram-TYUNFSNR-DT-cfj0M.js} +1 -1
- package/dist/web/assets/{dist-B5RhPiDb.js → dist-5RSr3i1a.js} +1 -1
- package/dist/web/assets/{dist-CugnsBBM.js → dist-B4Z2sV8l.js} +1 -1
- package/dist/web/assets/{dist-EDnzgrlE.js → dist-B7yJAZLB.js} +1 -1
- package/dist/web/assets/{dist-ABZ0bfMR.js → dist-BxXtIjV1.js} +1 -1
- package/dist/web/assets/{dist-1HFNA2Sd.js → dist-CA-ReuvA.js} +1 -1
- package/dist/web/assets/{dist-CIDoXcx0.js → dist-CLMm60_p.js} +1 -1
- package/dist/web/assets/{dist-D6VkQ_7h.js → dist-CPFvkcDl.js} +1 -1
- package/dist/web/assets/{dist-BoeMvgh-.js → dist-CZxj92ue.js} +1 -1
- package/dist/web/assets/{dist-CFaMxIWT.js → dist-DVG9d1NU.js} +1 -1
- package/dist/web/assets/{dist-BFFH-h4L.js → dist-DevJcR0Y.js} +1 -1
- package/dist/web/assets/{dist-Be0WQzsz.js → dist-JJNpWgR6.js} +1 -1
- package/dist/web/assets/{ebnfDiagram-V4P3TTPT-C5zEPRhM.js → ebnfDiagram-V4P3TTPT-5btoYlHi.js} +1 -1
- package/dist/web/assets/{elk-QONTBCTQ-BR5YBYTe.js → elk-QONTBCTQ-BiXiP5mn.js} +1 -1
- package/dist/web/assets/{erDiagram-KYQIGQAA-B-5pcNVz.js → erDiagram-KYQIGQAA-Csvahmwh.js} +1 -1
- package/dist/web/assets/{eventmodeling-K75KTNOO-DkMnS-Cz.js → eventmodeling-K75KTNOO-CTDk7azy.js} +1 -1
- package/dist/web/assets/flowDiagram-IUGLLWBU-CTlRlF-F.js +1 -0
- package/dist/web/assets/{ganttDiagram-R7GPNTJY-B21dBS-O.js → ganttDiagram-R7GPNTJY-Kr_UYAyo.js} +1 -1
- package/dist/web/assets/{gitGraph-VSP46ZUC-DalD3PH5.js → gitGraph-VSP46ZUC-DWAozJzq.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-PDYL7XHY-CWi1FEeW.js → gitGraphDiagram-PDYL7XHY-DyTW4WQG.js} +1 -1
- package/dist/web/assets/index-lmzHXuPr.css +1 -0
- package/dist/web/assets/index-qPUGRLvu.js +63 -0
- package/dist/web/assets/{info-OHQRW6UA-CByswqH6.js → info-OHQRW6UA-DiJj6mF5.js} +1 -1
- package/dist/web/assets/{infoDiagram-MVDRKAX5-DizZ8XVo.js → infoDiagram-MVDRKAX5-D02QrLp5.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-HPEHV2GE-DQoKMoDQ.js → ishikawaDiagram-HPEHV2GE-CXW4mRts.js} +1 -1
- package/dist/web/assets/{journeyDiagram-BOSHW7O7-DKj7UdLQ.js → journeyDiagram-BOSHW7O7-DwyTpaHZ.js} +1 -1
- package/dist/web/assets/{kanban-definition-FNSA4HC5-bTblh8-S.js → kanban-definition-FNSA4HC5-B8br7aDC.js} +1 -1
- package/dist/web/assets/{line-DWkG8aZQ.js → line-C7pCcPIA.js} +1 -1
- package/dist/web/assets/{linear-aVPxw88X.js → linear-Tw3CU3Fk.js} +1 -1
- package/dist/web/assets/{mermaid-parser.core-C-J7_HBm.js → mermaid-parser.core-DuxqJtRQ.js} +3 -3
- package/dist/web/assets/{mermaid.core-DpHqjC1s.js → mermaid.core-DsOnw7nE.js} +4 -4
- package/dist/web/assets/{mindmap-definition-6OY57UG3-DnifqP1p.js → mindmap-definition-6OY57UG3-Cx4RGd4t.js} +1 -1
- package/dist/web/assets/{packet-JDAUHWVQ-_ADKLP5T.js → packet-JDAUHWVQ-FgGACr61.js} +1 -1
- package/dist/web/assets/{pegDiagram-ECIUJNBX-_SU4-PwS.js → pegDiagram-ECIUJNBX-DbM0mpqP.js} +1 -1
- package/dist/web/assets/{pie-XZMESJXO-BfbJN8hk.js → pie-XZMESJXO-D3_sBOVu.js} +1 -1
- package/dist/web/assets/{pieDiagram-GNMPY74T-DQQKmEIp.js → pieDiagram-GNMPY74T-COgyAYuf.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-D57K4MC3-BLtF0lyY.js → quadrantDiagram-D57K4MC3-CHA07iGU.js} +1 -1
- package/dist/web/assets/{radar-ABXABTNO-D7Tlesuz.js → radar-ABXABTNO-DecHbZ8y.js} +1 -1
- package/dist/web/assets/{railroad-I3PHUGI6-CA4jSH3I.js → railroad-I3PHUGI6-CX9gFbv6.js} +1 -1
- package/dist/web/assets/{railroad-abnf-LNEFI6M7-CumrL10E.js → railroad-abnf-LNEFI6M7-7ekNszOQ.js} +1 -1
- package/dist/web/assets/{railroad-ebnf-DWYD2UWJ-2GeHQm3G.js → railroad-ebnf-DWYD2UWJ-DdczO4iK.js} +1 -1
- package/dist/web/assets/{railroad-peg-JR7BVNR7-CGbW9a0w.js → railroad-peg-JR7BVNR7-tTF8C5h6.js} +1 -1
- package/dist/web/assets/{railroadDiagram-Y72NRBL7-BQKP5iZM.js → railroadDiagram-Y72NRBL7-7GM0UzXp.js} +1 -1
- package/dist/web/assets/{requirementDiagram-EQYSW5RA-Cn_K53gc.js → requirementDiagram-EQYSW5RA-BSC7dW7G.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-SY24JHO5-BouDevNW.js → sankeyDiagram-SY24JHO5-zbVVy5A9.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-BLEHNHQU-C0rguio1.js → sequenceDiagram-BLEHNHQU-DEe5_sJr.js} +1 -1
- package/dist/web/assets/{src-BJB85M8z.js → src-BRIqFVDQ.js} +1 -1
- package/dist/web/assets/{stateDiagram-v2-A6IESKWZ-BzgsnDJf.js → stateDiagram-v2-A6IESKWZ-D9iIEu7F.js} +1 -1
- package/dist/web/assets/{swimlanes-B3ENRKFQ-BAnQnO43.js → swimlanes-B3ENRKFQ-kSlZwPrl.js} +1 -1
- package/dist/web/assets/swimlanesDiagram-AYQRV4AK-DUYiDwoF.js +8 -0
- package/dist/web/assets/{timeline-definition-JXYKGLGB-i_V2SDud.js → timeline-definition-JXYKGLGB-D3FVcL1M.js} +1 -1
- package/dist/web/assets/{treeView-D4JQ5SDB-blg1ho_V.js → treeView-D4JQ5SDB-Dg-vnn_2.js} +1 -1
- package/dist/web/assets/{treemap-SAJKECNS-GWe0sLdw.js → treemap-SAJKECNS-SUcVM8SE.js} +1 -1
- package/dist/web/assets/{usecaseDiagram-WPOLBNNX-C2epnXsY.js → usecaseDiagram-WPOLBNNX-pg19th6w.js} +1 -1
- package/dist/web/assets/{vennDiagram-Q3Y3IDCW-CYguUs2o.js → vennDiagram-Q3Y3IDCW-C0bGBnZZ.js} +1 -1
- package/dist/web/assets/{wardley-7MLQ67FV-CA1BMgJ-.js → wardley-7MLQ67FV-DRUta4Q-.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-IVAIDKWA-COJi2fLq.js → wardleyDiagram-IVAIDKWA-CafLMkAZ.js} +1 -1
- package/dist/web/assets/{xychartDiagram-4URNHDU4-BxweoZn5.js → xychartDiagram-4URNHDU4-CbBmnzba.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/templates/main.md +1 -11
- package/templates/method/area/docs/ARCHITECTURE.md +14 -0
- package/templates/method/area/docs/TASKS.md +18 -0
- package/templates/method/area/docs/tasks/.gitkeep +0 -0
- package/templates/method/area-main.md +9 -0
- package/templates/method/root/docs/README.md +69 -0
- package/templates/method/root/docs/TASKS.md +18 -0
- package/templates/method/root/docs/architecture/README.md +10 -0
- package/templates/method/root/docs/architecture/stack.md +28 -0
- package/templates/method/root/docs/phases/01-foundations.md +23 -0
- package/templates/method/root/docs/tasks/_TEMPLATE.md +28 -0
- package/templates/method/root/docs/tasks/{{prefix}}-001-set-up-the-project.md +30 -0
- package/templates/method/root/docs/vision.md +22 -0
- package/templates/method/skills/mdrules-close-session/SKILL.md +20 -0
- package/templates/method/skills/mdrules-new-task/SKILL.md +22 -0
- package/templates/proposals/SKILL.md +114 -0
- package/templates/sdd/openspec/openspec/README.md +89 -0
- package/templates/sdd/openspec/openspec/changes/archive/.gitkeep +0 -0
- package/templates/sdd/openspec/openspec/config.yaml +12 -0
- package/templates/sdd/openspec/openspec/specs/.gitkeep +0 -0
- package/templates/sdd/speckit/.specify/memory/constitution.md +30 -0
- package/templates/sdd/speckit/specs/README.md +82 -0
- package/templates/skill/SKILL.md +9 -10
- package/dist/web/assets/channel-BWmWik05.js +0 -1
- package/dist/web/assets/flowDiagram-IUGLLWBU-Dq34jEaq.js +0 -1
- package/dist/web/assets/index-DBrCTV1V.js +0 -58
- package/dist/web/assets/index-DxpaDO0r.css +0 -1
- package/dist/web/assets/swimlanesDiagram-AYQRV4AK-BLBJ1_iu.js +0 -8
- package/templates/docs/architecture.md +0 -21
- package/templates/docs/decisions.md +0 -11
- package/templates/docs/phases/README.md +0 -25
- package/templates/docs/rules.md +0 -11
- package/templates/docs/tasks.md +0 -15
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mdrules-close-session
|
|
3
|
+
description: Closes a work session in a project that follows the mdrules method, recording what was done and the next step of every task touched, and updating task indexes and phases.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Close the session (mdrules method)
|
|
7
|
+
|
|
8
|
+
1. Identify the tasks worked on in this session.
|
|
9
|
+
2. For each one, in its file:
|
|
10
|
+
- Add a log entry at the top of "Log": date, what was done, key files and decisions.
|
|
11
|
+
- Rewrite "Next step" in one or two actionable lines (for `blocked`: what it waits on).
|
|
12
|
+
- Tick the acceptance criteria that are met; set `status` and `updated` in the frontmatter.
|
|
13
|
+
3. If a status changed, move the task's line to the right section of its `TASKS.md` (and of every
|
|
14
|
+
area index that links it).
|
|
15
|
+
4. If a task is `done`, tick it in its phase (`docs/phases/NN-*.md`). When every task and every item
|
|
16
|
+
of "Definition of done" is ticked, set the phase to `status: done`; when the first task starts,
|
|
17
|
+
set it to `in-progress`. Update `updated`.
|
|
18
|
+
5. If an architecture decision was made or changed, update it in its one place (the area's
|
|
19
|
+
`docs/ARCHITECTURE.md` or the root `docs/architecture/`), never in the main doc.
|
|
20
|
+
6. Summarize for the user in three lines: what was done, the next step, and anything open.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mdrules-new-task
|
|
3
|
+
description: Creates a task file in this project's docs (the mdrules method) when the user asks for a new task. Uses the task template, the next ID of the area, and updates the task index and the phase.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# New task (mdrules method)
|
|
7
|
+
|
|
8
|
+
Create tasks only when the user asks; you may propose them first.
|
|
9
|
+
|
|
10
|
+
1. Gather what is missing, in one question: title, goal, area (in a monorepo; the map in the main doc
|
|
11
|
+
lists areas and their prefixes), phase, and dependencies.
|
|
12
|
+
2. Folder and prefix: the area's `docs/tasks/` with its prefix; cross-area or single-project tasks go
|
|
13
|
+
in the root `docs/tasks/` (prefix in the root `docs/TASKS.md` title, `T` by default).
|
|
14
|
+
3. Next ID: the highest `<PREFIX>-NNN` in that folder + 1, three digits.
|
|
15
|
+
4. Copy the root `docs/tasks/_TEMPLATE.md` to `<folder>/<ID>-<short-slug>.md`. Fill the frontmatter
|
|
16
|
+
(`id`, `status: pending`, `area`, `phase`, `depends`, `created` and `updated` = today), the title,
|
|
17
|
+
the goal and the acceptance criteria as a checklist.
|
|
18
|
+
5. Add `- [<ID>](tasks/<file>.md) <title>` under "Pending" in that folder's `TASKS.md`. For a
|
|
19
|
+
cross-area task, also link it from each affected area's `TASKS.md`; never copy it.
|
|
20
|
+
6. If it belongs to a phase, add `- [ ] [<ID>](<relative path>) <title>` under "Tasks" in
|
|
21
|
+
`docs/phases/NN-*.md`.
|
|
22
|
+
7. Show the task to the user. Do not start working on it until they say so.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mdrules-proposals
|
|
3
|
+
description: Write temporary proposals the user answers in mdrules (options with ASCII or Mermaid diagrams, choices to tick, comments like in Word), then apply their answer to every affected doc and delete the proposal. Use when an answer would be long or has options or a design to validate, when the user asks for a proposal, or when they say a proposal is answered.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Proposals (mdrules)
|
|
7
|
+
|
|
8
|
+
A proposal is a **temporary** file for one decision. Write one instead of a chat answer when:
|
|
9
|
+
|
|
10
|
+
- the answer would be long, or has several options, diagrams or a design to validate; or
|
|
11
|
+
- the user asks for a proposal.
|
|
12
|
+
|
|
13
|
+
For a short answer or a single obvious option, just answer in the chat.
|
|
14
|
+
|
|
15
|
+
Write the file, tell the user its path in one line, and wait. They open it in mdrules, tick options and
|
|
16
|
+
add comments, then tell you it is answered. Once applied, the decision lives in the docs it affects and
|
|
17
|
+
the proposal is deleted.
|
|
18
|
+
|
|
19
|
+
## Where
|
|
20
|
+
|
|
21
|
+
{{where}}.
|
|
22
|
+
|
|
23
|
+
## Format
|
|
24
|
+
|
|
25
|
+
````md
|
|
26
|
+
---
|
|
27
|
+
type: proposal
|
|
28
|
+
status: open # open → answered (set by the user in mdrules); deleted once applied
|
|
29
|
+
updated: YYYY-MM-DD
|
|
30
|
+
affects: [docs/tasks/T-004-login.md, docs/architecture/auth.md] # docs the decision will change
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
# Proposal: <topic>
|
|
34
|
+
|
|
35
|
+
## Context
|
|
36
|
+
|
|
37
|
+
<!-- Two or three lines: what needs deciding and why now. -->
|
|
38
|
+
|
|
39
|
+
## Option A: <name> (recommended)
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
Browser ──REST──▶ Gateway ──gRPC──▶ Users ──▶ (Postgres)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
What it means, pros and cons in a few bullets.
|
|
46
|
+
|
|
47
|
+
## Option B: <name>
|
|
48
|
+
|
|
49
|
+
```mermaid
|
|
50
|
+
flowchart LR
|
|
51
|
+
Browser --> Users --> DB[(Postgres)]
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Your choice
|
|
55
|
+
|
|
56
|
+
<!-- choose: one -->
|
|
57
|
+
- [ ] A: <name>
|
|
58
|
+
- [ ] B: <name>
|
|
59
|
+
|
|
60
|
+
## Also include
|
|
61
|
+
|
|
62
|
+
- [ ] <optional extra the user can tick>
|
|
63
|
+
|
|
64
|
+
## Open questions
|
|
65
|
+
|
|
66
|
+
1. <question>
|
|
67
|
+
|
|
68
|
+
<!-- choose: one -->
|
|
69
|
+
- [ ] <answer>
|
|
70
|
+
- [ ] <answer>
|
|
71
|
+
````
|
|
72
|
+
|
|
73
|
+
- Diagrams: a ` ```text ` block with box-drawing characters for small sketches, ` ```mermaid ` for
|
|
74
|
+
flows and sequences. mdrules renders both.
|
|
75
|
+
- In ASCII diagrams use only single-width characters (box drawing `┌─┐│└┘▶`, letters, `#`, `-`); shading
|
|
76
|
+
blocks like `▓░` are wider in many fonts and break the alignment.
|
|
77
|
+
- `<!-- choose: one -->` right before a checklist makes it single choice in mdrules (radio buttons);
|
|
78
|
+
without it, any number can be ticked.
|
|
79
|
+
- Put your recommendation first and say why.
|
|
80
|
+
|
|
81
|
+
## Comments
|
|
82
|
+
|
|
83
|
+
The user comments like in Word. A comment is an HTML comment right after the block it refers to,
|
|
84
|
+
indented like that block (inside a list item: aligned with the item's text):
|
|
85
|
+
|
|
86
|
+
```md
|
|
87
|
+
- [x] A: gateway validates
|
|
88
|
+
<!-- comment by Rafael, 2026-10-22, on "gateway validates": What if the gateway goes down? -->
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Answer each comment with a reply right below it (or below the last reply), same indentation:
|
|
92
|
+
|
|
93
|
+
```md
|
|
94
|
+
<!-- reply by AI, 2026-10-22: Two Cloud Run instances minimum; added to the architecture. -->
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Never delete or rewrite the user's comments: they resolve them in mdrules. Never put `-->` inside a
|
|
98
|
+
comment's text.
|
|
99
|
+
|
|
100
|
+
- `affects`: the docs that depend on this decision (tasks, phases, architecture, vision, other
|
|
101
|
+
proposals…), so the user sees what their choice will change.
|
|
102
|
+
|
|
103
|
+
## When the user answers
|
|
104
|
+
|
|
105
|
+
1. Read the ticked options, the open questions and every comment without a reply from you.
|
|
106
|
+
2. If something is unclear or a comment raises a new question, reply to that comment, keep
|
|
107
|
+
`status: open`, and tell the user what you need. Don't apply anything yet.
|
|
108
|
+
3. Otherwise apply the decision to every doc that depends on it: the ones in `affects` and any other
|
|
109
|
+
you find (a task's goal or acceptance criteria, a phase's task list, an architecture table, the
|
|
110
|
+
vision…). Record it in its one place: in the mdrules method, the architecture file for design
|
|
111
|
+
decisions, and a line in the log of the task it belongs to (`<date>: decided <what> (proposal
|
|
112
|
+
<name>)`).
|
|
113
|
+
4. Delete the proposal file: it was temporary, the decision now lives in those docs.
|
|
114
|
+
5. Tell the user in a few lines what you changed and where.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# OpenSpec guide
|
|
2
|
+
|
|
3
|
+
This project uses [OpenSpec](https://github.com/Fission-AI/OpenSpec): agree on **what** to build in
|
|
4
|
+
Markdown before writing code, so you and the AI work from the same spec.
|
|
5
|
+
|
|
6
|
+
## Structure
|
|
7
|
+
|
|
8
|
+
```tree
|
|
9
|
+
openspec/
|
|
10
|
+
config.yaml # project context and rules for the AI (edit in your code editor)
|
|
11
|
+
specs/ # how the system behaves TODAY, one folder per domain
|
|
12
|
+
auth/
|
|
13
|
+
spec.md
|
|
14
|
+
changes/ # proposed work, one folder per change
|
|
15
|
+
add-2fa/
|
|
16
|
+
proposal.md # why and what
|
|
17
|
+
design.md # how (optional, for non-trivial changes)
|
|
18
|
+
tasks.md # checklist the AI works through
|
|
19
|
+
specs/auth/spec.md # delta: requirements added, modified or removed
|
|
20
|
+
archive/ # finished changes, dated
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Lifecycle
|
|
24
|
+
|
|
25
|
+
```mermaid
|
|
26
|
+
flowchart LR
|
|
27
|
+
Propose[Propose a change] --> Review[Review proposal, specs and tasks]
|
|
28
|
+
Review --> Apply[Apply: implement the tasks]
|
|
29
|
+
Apply --> Archive[Archive: deltas merge into specs/]
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
| Step | Command (if OpenSpec is installed) | Or ask the AI |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| Explore an idea | `/opsx:explore` | "Let's think through X before proposing anything." |
|
|
35
|
+
| Propose | `/opsx:propose add 2FA` | "Create an OpenSpec change `add-2fa` with proposal, tasks and spec deltas." |
|
|
36
|
+
| Implement | `/opsx:apply` | "Implement the tasks of `add-2fa`, ticking each one." |
|
|
37
|
+
| Finish | `/opsx:archive` | "Archive `add-2fa` and merge its deltas into `openspec/specs/`." |
|
|
38
|
+
|
|
39
|
+
## Examples
|
|
40
|
+
|
|
41
|
+
**`changes/add-2fa/proposal.md`**
|
|
42
|
+
|
|
43
|
+
```md
|
|
44
|
+
# Proposal: Add two-factor authentication
|
|
45
|
+
|
|
46
|
+
## Why
|
|
47
|
+
Accounts are protected by a password only.
|
|
48
|
+
|
|
49
|
+
## What changes
|
|
50
|
+
- Users can enable TOTP codes from their settings.
|
|
51
|
+
- Login asks for the code when 2FA is enabled.
|
|
52
|
+
|
|
53
|
+
## Out of scope
|
|
54
|
+
- SMS codes.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**`changes/add-2fa/specs/auth/spec.md`** (delta)
|
|
58
|
+
|
|
59
|
+
```md
|
|
60
|
+
## ADDED Requirements
|
|
61
|
+
|
|
62
|
+
### Requirement: Two-factor login
|
|
63
|
+
The system SHALL ask for a one-time code after the password when 2FA is enabled.
|
|
64
|
+
|
|
65
|
+
#### Scenario: Valid code
|
|
66
|
+
- **WHEN** the user enters a valid code
|
|
67
|
+
- **THEN** they are logged in
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**`changes/add-2fa/tasks.md`**
|
|
71
|
+
|
|
72
|
+
```md
|
|
73
|
+
## 1. Backend
|
|
74
|
+
- [ ] 1.1 Store the TOTP secret per user
|
|
75
|
+
- [ ] 1.2 Verify codes on login
|
|
76
|
+
|
|
77
|
+
## 2. Frontend
|
|
78
|
+
- [ ] 2.1 Settings screen to enable 2FA
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Installing OpenSpec
|
|
82
|
+
|
|
83
|
+
The `/opsx:*` commands come from the OpenSpec CLI. If they are missing, install it (needs Node.js) and
|
|
84
|
+
run its setup here; it keeps the files you already have:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npm install -g @fission-ai/openspec
|
|
88
|
+
openspec init
|
|
89
|
+
```
|
|
File without changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
schema: spec-driven
|
|
2
|
+
|
|
3
|
+
# Project context (optional): constraints an agent can't infer from the code.
|
|
4
|
+
# context: |
|
|
5
|
+
# Designs and tasks must cover Windows, macOS and Linux
|
|
6
|
+
|
|
7
|
+
# Per-artifact rules (optional).
|
|
8
|
+
# rules:
|
|
9
|
+
# proposal:
|
|
10
|
+
# - Always state what is out of scope
|
|
11
|
+
# tasks:
|
|
12
|
+
# - Break tasks into chunks of at most 2 hours
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# [PROJECT_NAME] Constitution
|
|
2
|
+
|
|
3
|
+
<!-- The principles every feature must respect. Fill it in, or run /speckit-constitution and let the AI
|
|
4
|
+
draft it from a conversation. Replace every [PLACEHOLDER]. -->
|
|
5
|
+
|
|
6
|
+
## Core Principles
|
|
7
|
+
|
|
8
|
+
### [PRINCIPLE_1_NAME]
|
|
9
|
+
<!-- Example: I. Test-First -->
|
|
10
|
+
[PRINCIPLE_1_DESCRIPTION]
|
|
11
|
+
<!-- Example: Tests are written and approved before the implementation. -->
|
|
12
|
+
|
|
13
|
+
### [PRINCIPLE_2_NAME]
|
|
14
|
+
<!-- Example: II. Simplicity -->
|
|
15
|
+
[PRINCIPLE_2_DESCRIPTION]
|
|
16
|
+
<!-- Example: Start with the simplest thing that works; no speculative abstractions. -->
|
|
17
|
+
|
|
18
|
+
### [PRINCIPLE_3_NAME]
|
|
19
|
+
[PRINCIPLE_3_DESCRIPTION]
|
|
20
|
+
|
|
21
|
+
## Constraints
|
|
22
|
+
|
|
23
|
+
[CONSTRAINTS]
|
|
24
|
+
<!-- Example: TypeScript only; Postgres; must run on Node 20+. -->
|
|
25
|
+
|
|
26
|
+
## Governance
|
|
27
|
+
|
|
28
|
+
This constitution overrides other practices. Amendments are documented here with their reason.
|
|
29
|
+
|
|
30
|
+
**Version**: 1.0.0 | **Ratified**: {{date}} | **Last amended**: {{date}}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Spec Kit guide
|
|
2
|
+
|
|
3
|
+
This project uses [GitHub Spec Kit](https://github.com/github/spec-kit): every feature goes from an
|
|
4
|
+
idea to a spec, a plan and a task list before any code is written.
|
|
5
|
+
|
|
6
|
+
## Structure
|
|
7
|
+
|
|
8
|
+
```tree
|
|
9
|
+
.specify/
|
|
10
|
+
memory/constitution.md # principles every feature must respect
|
|
11
|
+
templates/ # templates the commands fill (installed by Spec Kit)
|
|
12
|
+
specs/
|
|
13
|
+
001-user-login/ # one folder per feature, numbered
|
|
14
|
+
spec.md # what and why: user stories, requirements
|
|
15
|
+
plan.md # how: stack, architecture, data model
|
|
16
|
+
tasks.md # ordered checklist, by user story
|
|
17
|
+
research.md # optional: findings behind the plan
|
|
18
|
+
data-model.md # optional
|
|
19
|
+
contracts/ # optional: API definitions
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Flow
|
|
23
|
+
|
|
24
|
+
```mermaid
|
|
25
|
+
flowchart LR
|
|
26
|
+
C[Constitution] --> S[Specify] --> Q[Clarify] --> P[Plan] --> T[Tasks] --> I[Implement]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
| Step | Command (if Spec Kit is installed) | Or ask the AI |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| Principles | `/speckit-constitution` | "Fill `.specify/memory/constitution.md` with our principles." |
|
|
32
|
+
| Spec | `/speckit-specify users can log in with email` | "Write `specs/001-user-login/spec.md`: user stories, requirements, success criteria. No tech choices." |
|
|
33
|
+
| Clarify (optional) | `/speckit-clarify` | "Ask me about anything ambiguous in the spec." |
|
|
34
|
+
| Plan | `/speckit-plan use Next.js and Postgres` | "Write `plan.md` for 001 with the stack and data model." |
|
|
35
|
+
| Tasks | `/speckit-tasks` | "Break the plan into `tasks.md`, grouped by user story." |
|
|
36
|
+
| Build | `/speckit-implement` | "Implement the tasks of 001 in order, ticking each one." |
|
|
37
|
+
|
|
38
|
+
## Examples
|
|
39
|
+
|
|
40
|
+
**`specs/001-user-login/spec.md`**
|
|
41
|
+
|
|
42
|
+
```md
|
|
43
|
+
# Feature Specification: User login
|
|
44
|
+
|
|
45
|
+
## User Scenarios
|
|
46
|
+
|
|
47
|
+
### User Story 1 - Log in with email (Priority: P1)
|
|
48
|
+
A registered user logs in with email and password to reach their dashboard.
|
|
49
|
+
|
|
50
|
+
**Acceptance Scenarios**:
|
|
51
|
+
1. **Given** a registered user, **When** they enter valid credentials, **Then** they see their dashboard.
|
|
52
|
+
2. **Given** a wrong password, **When** they submit, **Then** they see an error and stay logged out.
|
|
53
|
+
|
|
54
|
+
## Requirements
|
|
55
|
+
- **FR-001**: The system MUST lock an account after 5 failed attempts.
|
|
56
|
+
|
|
57
|
+
## Success Criteria
|
|
58
|
+
- **SC-001**: 95% of logins complete in under 2 seconds.
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**`specs/001-user-login/tasks.md`**
|
|
62
|
+
|
|
63
|
+
```md
|
|
64
|
+
## Phase 1: User Story 1 - Log in with email (P1)
|
|
65
|
+
- [ ] T001 [US1] Create the users table in src/db/schema.ts
|
|
66
|
+
- [ ] T002 [P] [US1] Login form in src/app/login/page.tsx
|
|
67
|
+
- [ ] T003 [US1] POST /api/login in src/app/api/login/route.ts
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`[P]` marks tasks that can run in parallel.
|
|
71
|
+
|
|
72
|
+
## Installing Spec Kit
|
|
73
|
+
|
|
74
|
+
The `/speckit-*` commands come from the Spec Kit CLI, which needs [uv](https://docs.astral.sh/uv/)
|
|
75
|
+
(Python). If they are missing:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
curl -LsSf https://astral.sh/uv/install.sh | sh # install uv
|
|
79
|
+
uvx --from git+https://github.com/github/spec-kit.git specify init --here --integration claude
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
It keeps the files you already have, including the constitution.
|
package/templates/skill/SKILL.md
CHANGED
|
@@ -14,21 +14,20 @@ The user reads and edits this project's Markdown in **mdrules**, a visual editor
|
|
|
14
14
|
|
|
15
15
|
## Frontmatter
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
Docs that track work start with a frontmatter block; the mdrules dashboard reads it:
|
|
20
18
|
|
|
21
19
|
```yaml
|
|
22
20
|
---
|
|
23
|
-
type:
|
|
24
|
-
status: pending # pending | in-progress |
|
|
25
|
-
phase: 2 #
|
|
21
|
+
type: task # vision | architecture | phase | tasks | task | note
|
|
22
|
+
status: pending # pending | in-progress | blocked | done
|
|
23
|
+
phase: 2 # phases: their order; tasks: the phase they belong to
|
|
26
24
|
updated: YYYY-MM-DD
|
|
27
25
|
---
|
|
28
26
|
```
|
|
29
27
|
|
|
30
28
|
- Update `status` and `updated` whenever you change the doc.
|
|
31
|
-
-
|
|
29
|
+
- If the main doc has a "Workflow (mdrules method)" section, follow it: it says where vision,
|
|
30
|
+
architecture, phases and tasks live, and how to start and close a session.
|
|
32
31
|
|
|
33
32
|
## Content conventions
|
|
34
33
|
|
|
@@ -39,8 +38,6 @@ updated: YYYY-MM-DD
|
|
|
39
38
|
| Folder / module structure | a ` ```tree ` block: indented lines; two spaces + `#` starts a description |
|
|
40
39
|
| Flows, sequences, states | a ` ```mermaid ` block |
|
|
41
40
|
|
|
42
|
-
When you finish a task: tick its checkbox, update the doc's `status`/`updated`, and set the phase to `done` when all its tasks are done.
|
|
43
|
-
|
|
44
41
|
Never edit the section between `<!-- mdrules:rules:start -->` and `<!-- mdrules:rules:end -->` by hand; it is generated from the user's rule presets.
|
|
45
42
|
|
|
46
43
|
## Translation sync (`/mdrules sync`)
|
|
@@ -48,7 +45,9 @@ Never edit the section between `<!-- mdrules:rules:start -->` and `<!-- mdrules:
|
|
|
48
45
|
Run this when the user asks for `/mdrules sync`, at the start of a session, and after you edit any `.md` file.
|
|
49
46
|
|
|
50
47
|
1. `mdrules sync --status --json` (use `pnpm exec mdrules` if it is a local dependency). It returns:
|
|
51
|
-
`{ sourceLang, langs, foreign: [{ path, detected }], files: [{ path, lang, status, translation }] }`.
|
|
48
|
+
`{ sourceLang, langs, names, foreign: [{ path, detected }], files: [{ path, lang, status, translation }] }`.
|
|
49
|
+
`names` maps each language code to its name (`ja` → `Japanese`): translate into that language, also for
|
|
50
|
+
codes the user added by hand.
|
|
52
51
|
2. **Files not in the source language** (`foreign`): ask the user, in one question listing them, whether to convert each one to `sourceLang`.
|
|
53
52
|
- Yes: rewrite the file in place in the source language, keeping structure, code, links and markers byte-identical.
|
|
54
53
|
- No: `mdrules sync --keep <path> [<path>...]` so they are not offered again.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ot as e,st as t}from"./chunk-DSNLSHJZ-C_3sVqJn.js";var n=(n,r)=>t.lang.round(e.parse(n)[r]);export{n as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./src-BJB85M8z.js";import"./chunk-DSNLSHJZ-C_3sVqJn.js";import"./chunk-7S6XSTFO-DoKaEIP0.js";import"./chunk-YZO67HFG--IdJYNXK.js";import"./chunk-AQDTSKZB-DktDdZ_o.js";import"./chunk-UHW7PFBP-BkreF8rs.js";import"./chunk-HAGFOTED-DhCQIE99.js";import"./chunk-ZAUX2LTX-DmenwPIM.js";import"./chunk-WQQL4CDK-GsIKInJ-.js";import"./chunk-55XCU76K-DgZ0btzr.js";import"./chunk-XXDRQBXY-Bbz14gys.js";import"./chunk-VQ5W62QI-Cb7PeOKH.js";import"./chunk-HNE4Q36P-D_sbl6UM.js";export{n as diagram}from"./chunk-NQOKRVIF-UuKYBp6F.js";import"./mermaid.core-DpHqjC1s.js";
|