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.
Files changed (128) hide show
  1. package/README.md +196 -55
  2. package/dist/cli.js +871 -165
  3. package/dist/web/assets/{abnfDiagram-WEYOIA3C-DKgk2hIQ.js → abnfDiagram-WEYOIA3C-COoXc57p.js} +1 -1
  4. package/dist/web/assets/{arc-CCAU-51h.js → arc-CQ-mpttu.js} +1 -1
  5. package/dist/web/assets/{architecture-WOLXFQ4H-BcNYkHmW.js → architecture-WOLXFQ4H-Cl3-F9oV.js} +1 -1
  6. package/dist/web/assets/{architectureDiagram-ZHVYKT53-DgRlfGj2.js → architectureDiagram-ZHVYKT53-C1LOUHfq.js} +1 -1
  7. package/dist/web/assets/{blockDiagram-RJAE7QA3-DoBplOhb.js → blockDiagram-RJAE7QA3-YeQnD2ds.js} +1 -1
  8. package/dist/web/assets/{c4Diagram-XDPPPE54-CGKzgX6O.js → c4Diagram-XDPPPE54-XLmSlndV.js} +1 -1
  9. package/dist/web/assets/channel-Bu489uW7.js +1 -0
  10. package/dist/web/assets/{chunk-2E7WHVMD-DhQx5a0n.js → chunk-2E7WHVMD-HGXqy_LQ.js} +1 -1
  11. package/dist/web/assets/{chunk-4EMNKR2T-vHF11V5m.js → chunk-4EMNKR2T-DsQggzQE.js} +1 -1
  12. package/dist/web/assets/{chunk-55XCU76K-DgZ0btzr.js → chunk-55XCU76K-DY1xg8cl.js} +1 -1
  13. package/dist/web/assets/{chunk-7S6XSTFO-DoKaEIP0.js → chunk-7S6XSTFO-BuyzABLx.js} +1 -1
  14. package/dist/web/assets/{chunk-AQDTSKZB-DktDdZ_o.js → chunk-AQDTSKZB-CsDWfENX.js} +1 -1
  15. package/dist/web/assets/{chunk-DSNLSHJZ-C_3sVqJn.js → chunk-DSNLSHJZ-CuiVxF9g.js} +1 -1
  16. package/dist/web/assets/{chunk-HAGFOTED-DhCQIE99.js → chunk-HAGFOTED-CjjQypU8.js} +1 -1
  17. package/dist/web/assets/{chunk-HNE4Q36P-D_sbl6UM.js → chunk-HNE4Q36P-B0-YOuZI.js} +1 -1
  18. package/dist/web/assets/{chunk-NQOKRVIF-UuKYBp6F.js → chunk-NQOKRVIF-DMWnWh6r.js} +1 -1
  19. package/dist/web/assets/{chunk-UHW7PFBP-BkreF8rs.js → chunk-UHW7PFBP-D3E4ik9Y.js} +1 -1
  20. package/dist/web/assets/{chunk-VQ5W62QI-Cb7PeOKH.js → chunk-VQ5W62QI-CiPAEjx6.js} +1 -1
  21. package/dist/web/assets/{chunk-WQQL4CDK-GsIKInJ-.js → chunk-WQQL4CDK-StBWijFa.js} +1 -1
  22. package/dist/web/assets/{chunk-XXDRQBXY-Bbz14gys.js → chunk-XXDRQBXY-CINBf_Ay.js} +1 -1
  23. package/dist/web/assets/{chunk-YZO67HFG--IdJYNXK.js → chunk-YZO67HFG-BSkchBSd.js} +1 -1
  24. package/dist/web/assets/{chunk-ZAUX2LTX-DmenwPIM.js → chunk-ZAUX2LTX-CYfcgJpt.js} +1 -1
  25. package/dist/web/assets/{chunk-ZCHMQSOR-BZ2XP8BW.js → chunk-ZCHMQSOR-CwWl64AI.js} +1 -1
  26. package/dist/web/assets/{classDiagram-v2-4MYWR3UA-B_FJCXgY.js → classDiagram-v2-4MYWR3UA-Ce6JKsB3.js} +1 -1
  27. package/dist/web/assets/{cose-bilkent-JH36ORCC-DMBdq3mq.js → cose-bilkent-JH36ORCC-COClxHi_.js} +1 -1
  28. package/dist/web/assets/{cynefin-EF2NZ3EQ-BthcZtsD.js → cynefin-EF2NZ3EQ-BGZI2c8V.js} +1 -1
  29. package/dist/web/assets/{cynefinDiagram-WF24UDRP-Bva6JySb.js → cynefinDiagram-WF24UDRP-B24KUNeS.js} +1 -1
  30. package/dist/web/assets/{dagre-NK4GIZVX-BE6DKQYs.js → dagre-NK4GIZVX-DjCzI5LG.js} +1 -1
  31. package/dist/web/assets/{diagram-CBK3MWTC-DuDzgplS.js → diagram-CBK3MWTC-pa5xxV7I.js} +1 -1
  32. package/dist/web/assets/{diagram-I5XIIV2D-DU3jaZXW.js → diagram-I5XIIV2D-BQtih66c.js} +1 -1
  33. package/dist/web/assets/{diagram-ODIL2UCW-DYI3Rj6j.js → diagram-ODIL2UCW-CtodvdqO.js} +1 -1
  34. package/dist/web/assets/{diagram-PFBEJUXE-FD1CYRbT.js → diagram-PFBEJUXE-B-CnrB9d.js} +1 -1
  35. package/dist/web/assets/{diagram-RJA3I4VV-BsbAupu0.js → diagram-RJA3I4VV-Di8-srfd.js} +1 -1
  36. package/dist/web/assets/{diagram-TYUNFSNR-BMB0kMWv.js → diagram-TYUNFSNR-DT-cfj0M.js} +1 -1
  37. package/dist/web/assets/{dist-B5RhPiDb.js → dist-5RSr3i1a.js} +1 -1
  38. package/dist/web/assets/{dist-CugnsBBM.js → dist-B4Z2sV8l.js} +1 -1
  39. package/dist/web/assets/{dist-EDnzgrlE.js → dist-B7yJAZLB.js} +1 -1
  40. package/dist/web/assets/{dist-ABZ0bfMR.js → dist-BxXtIjV1.js} +1 -1
  41. package/dist/web/assets/{dist-1HFNA2Sd.js → dist-CA-ReuvA.js} +1 -1
  42. package/dist/web/assets/{dist-CIDoXcx0.js → dist-CLMm60_p.js} +1 -1
  43. package/dist/web/assets/{dist-D6VkQ_7h.js → dist-CPFvkcDl.js} +1 -1
  44. package/dist/web/assets/{dist-BoeMvgh-.js → dist-CZxj92ue.js} +1 -1
  45. package/dist/web/assets/{dist-CFaMxIWT.js → dist-DVG9d1NU.js} +1 -1
  46. package/dist/web/assets/{dist-BFFH-h4L.js → dist-DevJcR0Y.js} +1 -1
  47. package/dist/web/assets/{dist-Be0WQzsz.js → dist-JJNpWgR6.js} +1 -1
  48. package/dist/web/assets/{ebnfDiagram-V4P3TTPT-C5zEPRhM.js → ebnfDiagram-V4P3TTPT-5btoYlHi.js} +1 -1
  49. package/dist/web/assets/{elk-QONTBCTQ-BR5YBYTe.js → elk-QONTBCTQ-BiXiP5mn.js} +1 -1
  50. package/dist/web/assets/{erDiagram-KYQIGQAA-B-5pcNVz.js → erDiagram-KYQIGQAA-Csvahmwh.js} +1 -1
  51. package/dist/web/assets/{eventmodeling-K75KTNOO-DkMnS-Cz.js → eventmodeling-K75KTNOO-CTDk7azy.js} +1 -1
  52. package/dist/web/assets/flowDiagram-IUGLLWBU-CTlRlF-F.js +1 -0
  53. package/dist/web/assets/{ganttDiagram-R7GPNTJY-B21dBS-O.js → ganttDiagram-R7GPNTJY-Kr_UYAyo.js} +1 -1
  54. package/dist/web/assets/{gitGraph-VSP46ZUC-DalD3PH5.js → gitGraph-VSP46ZUC-DWAozJzq.js} +1 -1
  55. package/dist/web/assets/{gitGraphDiagram-PDYL7XHY-CWi1FEeW.js → gitGraphDiagram-PDYL7XHY-DyTW4WQG.js} +1 -1
  56. package/dist/web/assets/index-lmzHXuPr.css +1 -0
  57. package/dist/web/assets/index-qPUGRLvu.js +63 -0
  58. package/dist/web/assets/{info-OHQRW6UA-CByswqH6.js → info-OHQRW6UA-DiJj6mF5.js} +1 -1
  59. package/dist/web/assets/{infoDiagram-MVDRKAX5-DizZ8XVo.js → infoDiagram-MVDRKAX5-D02QrLp5.js} +1 -1
  60. package/dist/web/assets/{ishikawaDiagram-HPEHV2GE-DQoKMoDQ.js → ishikawaDiagram-HPEHV2GE-CXW4mRts.js} +1 -1
  61. package/dist/web/assets/{journeyDiagram-BOSHW7O7-DKj7UdLQ.js → journeyDiagram-BOSHW7O7-DwyTpaHZ.js} +1 -1
  62. package/dist/web/assets/{kanban-definition-FNSA4HC5-bTblh8-S.js → kanban-definition-FNSA4HC5-B8br7aDC.js} +1 -1
  63. package/dist/web/assets/{line-DWkG8aZQ.js → line-C7pCcPIA.js} +1 -1
  64. package/dist/web/assets/{linear-aVPxw88X.js → linear-Tw3CU3Fk.js} +1 -1
  65. package/dist/web/assets/{mermaid-parser.core-C-J7_HBm.js → mermaid-parser.core-DuxqJtRQ.js} +3 -3
  66. package/dist/web/assets/{mermaid.core-DpHqjC1s.js → mermaid.core-DsOnw7nE.js} +4 -4
  67. package/dist/web/assets/{mindmap-definition-6OY57UG3-DnifqP1p.js → mindmap-definition-6OY57UG3-Cx4RGd4t.js} +1 -1
  68. package/dist/web/assets/{packet-JDAUHWVQ-_ADKLP5T.js → packet-JDAUHWVQ-FgGACr61.js} +1 -1
  69. package/dist/web/assets/{pegDiagram-ECIUJNBX-_SU4-PwS.js → pegDiagram-ECIUJNBX-DbM0mpqP.js} +1 -1
  70. package/dist/web/assets/{pie-XZMESJXO-BfbJN8hk.js → pie-XZMESJXO-D3_sBOVu.js} +1 -1
  71. package/dist/web/assets/{pieDiagram-GNMPY74T-DQQKmEIp.js → pieDiagram-GNMPY74T-COgyAYuf.js} +1 -1
  72. package/dist/web/assets/{quadrantDiagram-D57K4MC3-BLtF0lyY.js → quadrantDiagram-D57K4MC3-CHA07iGU.js} +1 -1
  73. package/dist/web/assets/{radar-ABXABTNO-D7Tlesuz.js → radar-ABXABTNO-DecHbZ8y.js} +1 -1
  74. package/dist/web/assets/{railroad-I3PHUGI6-CA4jSH3I.js → railroad-I3PHUGI6-CX9gFbv6.js} +1 -1
  75. package/dist/web/assets/{railroad-abnf-LNEFI6M7-CumrL10E.js → railroad-abnf-LNEFI6M7-7ekNszOQ.js} +1 -1
  76. package/dist/web/assets/{railroad-ebnf-DWYD2UWJ-2GeHQm3G.js → railroad-ebnf-DWYD2UWJ-DdczO4iK.js} +1 -1
  77. package/dist/web/assets/{railroad-peg-JR7BVNR7-CGbW9a0w.js → railroad-peg-JR7BVNR7-tTF8C5h6.js} +1 -1
  78. package/dist/web/assets/{railroadDiagram-Y72NRBL7-BQKP5iZM.js → railroadDiagram-Y72NRBL7-7GM0UzXp.js} +1 -1
  79. package/dist/web/assets/{requirementDiagram-EQYSW5RA-Cn_K53gc.js → requirementDiagram-EQYSW5RA-BSC7dW7G.js} +1 -1
  80. package/dist/web/assets/{sankeyDiagram-SY24JHO5-BouDevNW.js → sankeyDiagram-SY24JHO5-zbVVy5A9.js} +1 -1
  81. package/dist/web/assets/{sequenceDiagram-BLEHNHQU-C0rguio1.js → sequenceDiagram-BLEHNHQU-DEe5_sJr.js} +1 -1
  82. package/dist/web/assets/{src-BJB85M8z.js → src-BRIqFVDQ.js} +1 -1
  83. package/dist/web/assets/{stateDiagram-v2-A6IESKWZ-BzgsnDJf.js → stateDiagram-v2-A6IESKWZ-D9iIEu7F.js} +1 -1
  84. package/dist/web/assets/{swimlanes-B3ENRKFQ-BAnQnO43.js → swimlanes-B3ENRKFQ-kSlZwPrl.js} +1 -1
  85. package/dist/web/assets/swimlanesDiagram-AYQRV4AK-DUYiDwoF.js +8 -0
  86. package/dist/web/assets/{timeline-definition-JXYKGLGB-i_V2SDud.js → timeline-definition-JXYKGLGB-D3FVcL1M.js} +1 -1
  87. package/dist/web/assets/{treeView-D4JQ5SDB-blg1ho_V.js → treeView-D4JQ5SDB-Dg-vnn_2.js} +1 -1
  88. package/dist/web/assets/{treemap-SAJKECNS-GWe0sLdw.js → treemap-SAJKECNS-SUcVM8SE.js} +1 -1
  89. package/dist/web/assets/{usecaseDiagram-WPOLBNNX-C2epnXsY.js → usecaseDiagram-WPOLBNNX-pg19th6w.js} +1 -1
  90. package/dist/web/assets/{vennDiagram-Q3Y3IDCW-CYguUs2o.js → vennDiagram-Q3Y3IDCW-C0bGBnZZ.js} +1 -1
  91. package/dist/web/assets/{wardley-7MLQ67FV-CA1BMgJ-.js → wardley-7MLQ67FV-DRUta4Q-.js} +1 -1
  92. package/dist/web/assets/{wardleyDiagram-IVAIDKWA-COJi2fLq.js → wardleyDiagram-IVAIDKWA-CafLMkAZ.js} +1 -1
  93. package/dist/web/assets/{xychartDiagram-4URNHDU4-BxweoZn5.js → xychartDiagram-4URNHDU4-CbBmnzba.js} +1 -1
  94. package/dist/web/index.html +2 -2
  95. package/package.json +1 -1
  96. package/templates/main.md +1 -11
  97. package/templates/method/area/docs/ARCHITECTURE.md +14 -0
  98. package/templates/method/area/docs/TASKS.md +18 -0
  99. package/templates/method/area/docs/tasks/.gitkeep +0 -0
  100. package/templates/method/area-main.md +9 -0
  101. package/templates/method/root/docs/README.md +69 -0
  102. package/templates/method/root/docs/TASKS.md +18 -0
  103. package/templates/method/root/docs/architecture/README.md +10 -0
  104. package/templates/method/root/docs/architecture/stack.md +28 -0
  105. package/templates/method/root/docs/phases/01-foundations.md +23 -0
  106. package/templates/method/root/docs/tasks/_TEMPLATE.md +28 -0
  107. package/templates/method/root/docs/tasks/{{prefix}}-001-set-up-the-project.md +30 -0
  108. package/templates/method/root/docs/vision.md +22 -0
  109. package/templates/method/skills/mdrules-close-session/SKILL.md +20 -0
  110. package/templates/method/skills/mdrules-new-task/SKILL.md +22 -0
  111. package/templates/proposals/SKILL.md +114 -0
  112. package/templates/sdd/openspec/openspec/README.md +89 -0
  113. package/templates/sdd/openspec/openspec/changes/archive/.gitkeep +0 -0
  114. package/templates/sdd/openspec/openspec/config.yaml +12 -0
  115. package/templates/sdd/openspec/openspec/specs/.gitkeep +0 -0
  116. package/templates/sdd/speckit/.specify/memory/constitution.md +30 -0
  117. package/templates/sdd/speckit/specs/README.md +82 -0
  118. package/templates/skill/SKILL.md +9 -10
  119. package/dist/web/assets/channel-BWmWik05.js +0 -1
  120. package/dist/web/assets/flowDiagram-IUGLLWBU-Dq34jEaq.js +0 -1
  121. package/dist/web/assets/index-DBrCTV1V.js +0 -58
  122. package/dist/web/assets/index-DxpaDO0r.css +0 -1
  123. package/dist/web/assets/swimlanesDiagram-AYQRV4AK-BLBJ1_iu.js +0 -8
  124. package/templates/docs/architecture.md +0 -21
  125. package/templates/docs/decisions.md +0 -11
  126. package/templates/docs/phases/README.md +0 -25
  127. package/templates/docs/rules.md +0 -11
  128. package/templates/docs/tasks.md +0 -15
package/README.md CHANGED
@@ -3,85 +3,216 @@
3
3
  [![CI](https://github.com/rafiqui1987/mdrules/actions/workflows/ci.yml/badge.svg)](https://github.com/rafiqui1987/mdrules/actions/workflows/ci.yml)
4
4
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
5
5
 
6
- **mdrules** is a local, open-source editor for the Markdown that drives your project and your AI agents:
7
- `CLAUDE.md`, `AGENTS.md` and everything under `docs/`. Run `mdrules` in any repo and get a VS Code-style
8
- file tree with an Obsidian-style live preview: editable tables, Mermaid diagrams, KaTeX math, footnotes,
9
- images and checklists, plus a dashboard of phases and tasks from frontmatter, git changes and reusable
10
- rule presets. Files are saved exactly as written, never reformatted, so the AI always reads clean, plain
11
- Markdown. Docs can also be viewed and edited in your own language while the source stays in sync.
6
+ **See and edit every Markdown file in your project in one place: no split screen, no raw syntax in the
7
+ way.**
8
+
9
+ Run `mdrules` in any repository and it opens all its `.md` files (`README.md`, `CLAUDE.md`, `AGENTS.md`,
10
+ `docs/`…) in a single editor that is also the preview. Tables, Mermaid diagrams, checklists and math
11
+ render as you type, and change in place. Files are saved exactly as written, never reformatted, so Git
12
+ diffs stay clean and AI agents keep reading plain Markdown.
12
13
 
13
14
  <picture>
14
15
  <source media="(prefers-color-scheme: dark)" srcset="docs/assets/screenshot-dark.png">
15
- <img alt="mdrules editor: file tree, a phase doc with checklists, an editable table, a Mermaid diagram and KaTeX math" src="docs/assets/screenshot-light.png">
16
+ <img alt="mdrules editor: file tree of a project using the mdrules method, a phase with its tasks, a comment thread like in Word and a Mermaid diagram" src="docs/assets/screenshot-light.png">
16
17
  </picture>
17
18
 
18
19
  ## Quick start
19
20
 
20
- Requires Node.js 20 or newer.
21
+ Requires Node.js 20 or newer. From the root of any project (monorepos included):
21
22
 
22
23
  ```bash
23
- # from the root of any project (monorepos included)
24
- npx mdrules # first run asks: main doc, docs/ structure, rules, languages
24
+ npx mdrules
25
25
  ```
26
26
 
27
- Or install it globally:
27
+ The first run asks a few questions (main doc, how to plan the work, the language you work in, rules)
28
+ and opens the editor at `http://localhost:4319`. It only listens on `127.0.0.1`.
28
29
 
29
- ```bash
30
- npm install -g mdrules # or: pnpm add -g mdrules
31
- mdrules # init if needed, then open the editor
32
- mdrules init # re-run the setup
33
- mdrules serve # open the editor without running init
34
- mdrules serve --port 5000 --no-open
35
- ```
30
+ ## What it does
36
31
 
37
- The editor opens at `http://localhost:4319` and only listens on `127.0.0.1`.
32
+ ### 1. Every Markdown file of the project, in one place
38
33
 
39
- ## Features
34
+ A file tree with every `.md` in the folder where you run it, folders first. Search, expand or collapse
35
+ all, create files and folders inline, hide what you don't need (`.mdrulesignore`) and delete from the
36
+ right-click menu. Resize the sidebar by dragging its edge, or hide it for more room.
40
37
 
41
- ### Live preview editor
38
+ ### 2. Edit and view at the same time
42
39
 
43
- Markdown syntax hides where the cursor isn't and comes back where you edit, as in Obsidian.
40
+ There is no "editor | preview" split. Markdown syntax is hidden everywhere except the line you are
41
+ editing, as in Obsidian, so you read the document as it looks and still write plain Markdown.
42
+ Undo, redo and **discard** (back to how the file was when you opened it) sit next to the breadcrumb.
44
43
 
45
- - **Tables**: rendered and editable in place. Right-click a header to insert or delete columns, any row
46
- to insert or delete rows. Drag column borders to resize (view-only, stored per browser). Paste a
47
- range from Excel or Google Sheets to get a Markdown table; a hint offers `Alt+H` to drop the header row.
48
- - **Diagrams and structure**: ` ```mermaid ` diagrams that follow the app theme, and ` ```tree ` blocks
49
- for folder layouts.
50
- - **Math and footnotes**: `$inline$` and `$$display$$` math with KaTeX (prices like `$5` stay text),
51
- `[^1]` footnotes as numbered superscripts with the note on hover.
52
- - **Images**: local paths resolve from the document's folder, as on GitHub, and remote URLs load directly.
53
- - **Code blocks**: fences are hidden and only the language label is shown; copying still gives the full
54
- Markdown.
55
- - **Selection toolbar**: select text to copy it and turn it into bold, italic, strikethrough, code or a
44
+ ### 3. Formatting without remembering syntax
45
+
46
+ - **`/` commands**: type `/` at the start of a line (or `Ctrl+Space` anywhere) for a menu of headings,
47
+ lists, checklists, tables, code blocks, diagrams, quotes, links and frontmatter.
48
+ - **Selection toolbar**: select text to copy it or turn it into bold, italic, strikethrough, code or a
56
49
  link. Hover a button for its variants (`**`/`__`, `*`/`_`, `***`).
57
- - **Checklists**: click to tick. After `Enter` on a task, `Ctrl+Enter` checks the new one.
58
- - **Insert menu**: `/` at the start of a line opens a numbered, grouped menu with headings, lists,
59
- tables, code, diagrams and frontmatter.
60
50
 
61
- ### Workspace
51
+ ### 4. Diagrams, tables and lists that are easy to work with
52
+
53
+ - **Mermaid diagrams** (flowcharts, sequences…) render in place and follow the light or dark theme.
54
+ ` ```tree ` blocks draw folder structures.
55
+ - **Tables**: edit cells directly. Right-click to insert or delete rows and columns; drag borders to
56
+ resize columns (view only, the file is not changed).
57
+ - **Tables from Excel or Google Sheets**: paste a range of cells and it becomes a Markdown table.
58
+ `Alt+H` toggles whether the first row is a header.
59
+ - **Checklists**: click to tick. After `Enter` on a task, `Ctrl+Enter` ticks the new one.
60
+ - And more: KaTeX math (`$x^2$`, `$$…$$`), footnotes on hover, local and remote images, code blocks with
61
+ only their language label showing.
62
+
63
+ ### 5. Work in your language
64
+
65
+ Most AI agents, and most teams, work best with docs in English. If English isn't easy for you, you
66
+ don't have to choose:
67
+
68
+ - Run `mdrules translate` and pick a language to review the docs in: Spanish, French, Portuguese,
69
+ German or Italian, or **type any other** (Japanese, Dutch…). mdrules then shows **every doc in that
70
+ language**, and the interface too for the built-in ones (menus stay in English for the others).
71
+ Read the architecture, tick tasks, write notes and fix a rule, all in your language.
72
+ - The files in the repository **stay in one source language** (English by default), so the agent and
73
+ the rest of the team keep reading one consistent version.
74
+ - Your edits are kept as a translation until you ask the agent for `/mdrules sync`: it applies them
75
+ to the source file and refreshes every translation. The sidebar marks which docs are pending.
76
+
77
+ Example: you open `docs/tasks/T-004-login.md` in Spanish, add an acceptance criterion and tick two
78
+ others. After `/mdrules sync`, the English file has the new criterion and the ticks, and the agent
79
+ works from it.
80
+
81
+ ### 6. A method to plan and follow the work
82
+
83
+ `mdrules init` offers the **mdrules method**, a way of organizing the project so that you and the
84
+ agent always know what is being built, how, and what comes next:
85
+
86
+ ```tree
87
+ CLAUDE.md # short: map, commands, how to start and close a session
88
+ docs/
89
+ README.md # how the method works
90
+ vision.md # what the project is, for whom, what is out of scope
91
+ architecture/ # technology and design decisions, one file per topic
92
+ phases/01-foundations.md # a construction phase: goal, its tasks, definition of done
93
+ TASKS.md # index: in progress, blocked, pending, done
94
+ tasks/T-001-....md # one file per task: goal, acceptance checklist, next step, log
95
+ ```
96
+
97
+ ```mermaid
98
+ flowchart LR
99
+ V[Vision] --> A[Architecture] --> P[Phase] --> T[Tasks] --> W[Work] --> C[Close the session]
100
+ C -->|next step| W
101
+ C -->|phase done| P
102
+ ```
103
+
104
+ - **The main doc stays short** and points to `docs/`. If `CLAUDE.md` or `AGENTS.md` already exist,
105
+ they are not rewritten: mdrules adds a "Workflow" section with the map and the session routine.
106
+ - **Each fact lives in one place**: decisions in `architecture/`, progress in the task files.
107
+ - **Sessions pick up where they stopped**: the agent looks for tasks `in-progress`, reads their "Next
108
+ step" and tells you where you left off. `/mdrules-new-task` creates a task in the right place, and
109
+ `/mdrules-close-session` logs what was done, the next step and the status.
110
+ - **Monorepos**: each area (`apps/`, `services/`…) gets its own short `CLAUDE.md`, `docs/ARCHITECTURE.md`
111
+ and tasks with its own prefix (`APP-001`, `SVC-001`); the root `docs/` holds vision, phases and
112
+ cross-area tasks (`CORE-001`). The agent reads only the area it is working on.
113
+ - **The Dashboard** shows each phase with its progress and tasks, and a board of what is in progress,
114
+ blocked and pending.
115
+
116
+ **Prefer spec-driven development?** Pick one of these instead, and the Dashboard follows it too:
117
+
118
+ | Option | What you get |
119
+ |---|---|
120
+ | **[OpenSpec](https://github.com/Fission-AI/OpenSpec)** | `openspec/` with specs and proposed changes; the dashboard shows each change and its tasks |
121
+ | **[GitHub Spec Kit](https://github.com/github/spec-kit)** | a constitution and one folder per feature (spec → plan → tasks); the dashboard shows what each has |
122
+
123
+ mdrules runs their official installer, which also adds their commands to your agent (`/opsx:*`,
124
+ `/speckit-*`). If it can't (Spec Kit needs [uv](https://docs.astral.sh/uv/)), it creates a compatible
125
+ structure with a guide on how to add them later. Projects that already use either are detected and
126
+ shown as they are. Choose **None** and mdrules adds no structure or workflow at all.
127
+
128
+ ### 7. Proposals and comments: answer the AI with clicks
129
+
130
+ When an answer would be long or has options to choose from (or when you ask for one), the agent writes
131
+ a **proposal** instead of a long chat message: options with small ASCII or Mermaid diagrams, choices to
132
+ tick, open questions, and the docs the decision will change. You answer in mdrules:
133
+
134
+ ```text
135
+ ┌ Proposal: Authentication ─────────────────────────────┐
136
+ │ Option A (recommended) │
137
+ │ Browser ──REST──▶ Gateway ──gRPC──▶ Users ──▶ (DB) │
138
+ │ │
139
+ │ Your choice │
140
+ │ (•) A: gateway validates │
141
+ │ ( ) B: each service validates │
142
+ │ │
143
+ │ [ Done, send my answer ] │
144
+ └───────────────────────────────────────────────────────┘
145
+ ```
146
+
147
+ - **Tick options**: a list marked `<!-- choose: one -->` behaves like radio buttons; any other
148
+ checklist allows several.
149
+ - **Comment like in Word**: select text and press 💬. The text is highlighted and the thread shows next
150
+ to it, with replies and a button to resolve it. In the file, a comment is an HTML comment, invisible
151
+ on GitHub and readable by the agent:
152
+
153
+ ```md
154
+ - [x] A: gateway validates
155
+ <!-- comment by Ana, 2026-10-22, on "gateway validates": What if it goes down? -->
156
+ <!-- reply by AI, 2026-10-22: Two instances minimum; added to the architecture. -->
157
+ ```
158
+
159
+ - **Send your answer**: the button marks the proposal as answered and copies a message to paste in your
160
+ AI chat. The agent replies to your comments and updates every doc that depends on the decision
161
+ (tasks, phases, architecture…). A proposal is temporary: once applied, it is deleted and the decision
162
+ lives in those docs.
163
+ - In big projects, proposals can be organized **by topic and area** (`docs/proposals/auth/…`,
164
+ `services/docs/proposals/…`) instead of one folder.
165
+
166
+ It comes with the mdrules method, and can be turned on or off for any project in **Settings**.
167
+
168
+ ### 8. Your AI agent's skills
62
169
 
63
- - **File tree**: every `.md` in the project in a sidebar. Search, expand or collapse all, create, ignore
64
- (`.mdrulesignore`) and delete from the right-click menu.
65
- - **Undo and redo** buttons appear in the sidebar once there is something to undo.
66
- - **Dashboard** of phases and docs from frontmatter (`type`, `status`, `phase`, `updated`) with task
67
- progress.
68
- - **Changes**: git diff of your Markdown, grouped by folder.
69
- - **Rules**: reusable rule presets written into your main doc.
70
- - **Settings**: font, size, line spacing, side margin, line width, and line wrapping (wrap, or scroll
71
- horizontally). Light and dark themes, following the system until you pick one.
170
+ The **Skills** tab lists every global skill you have for Claude Code, Codex, Gemini, Copilot or Cursor
171
+ ([Agent Skills](https://agentskills.io) format). Tag them to group them, expand one to read or edit its
172
+ `SKILL.md`, see problems that would stop an agent from loading it, and **add it to the current project**
173
+ (`.claude/skills/` and/or `.agents/skills/`). Tags are stored in `~/.mdrules/skills.json`, never in the
174
+ skill.
72
175
 
73
- ### Languages
176
+ ### 9. Also included
74
177
 
75
- Each project has a source language (English by default) plus any translation languages: English, Spanish,
76
- French, Portuguese, German and Italian. Translations live in `.mdrules/i18n/` (git-ignored). You can view
77
- and edit docs in your language, and the AI applies your edits to the source with `/mdrules sync`. The UI
78
- is translated too.
178
+ - **Changes**: Git diff of your Markdown, grouped by folder and section.
179
+ - **Rules**: reusable rule presets (e.g. "ask before committing") written into `CLAUDE.md` or `AGENTS.md`.
180
+ - **Settings**: font, size, line spacing, margins, line width and wrapping; light and dark themes.
79
181
 
80
- ## AI side
182
+ ## Keyboard shortcuts
81
183
 
82
- `mdrules init` installs `.claude/skills/mdrules/SKILL.md` with the project's Markdown conventions and the
83
- sync procedure. It also writes the selected working rules into the main doc, between
84
- `<!-- mdrules:rules:start -->` and `<!-- mdrules:rules:end -->`.
184
+ | Keys | Action |
185
+ |---|---|
186
+ | `/` at the start of a line, `Ctrl+Space` | Insert menu |
187
+ | `Ctrl+Enter` | Tick or untick the task on the current line |
188
+ | `Alt+H` | After pasting a table from a spreadsheet: toggle the header row |
189
+ | `Ctrl+Z` / `Ctrl+Y` | Undo / redo |
190
+ | `Ctrl+F` | Find and replace |
191
+ | `Escape` | Close a menu or the selection toolbar |
192
+
193
+ ## Commands
194
+
195
+ ```bash
196
+ mdrules # set up the project if needed, then open the editor
197
+ mdrules init # run the setup again
198
+ mdrules serve # open the editor without the setup
199
+ mdrules serve --port 5000 --no-open
200
+ mdrules translate # choose languages to review the docs in (also: mdrules --translate)
201
+ ```
202
+
203
+ To keep it installed: `npm install -g mdrules` (or `pnpm add -g mdrules`).
204
+
205
+ ## For AI agents
206
+
207
+ `mdrules init` installs `.claude/skills/mdrules/SKILL.md`, which tells the agent how to write Markdown
208
+ that mdrules presents well and how to keep translations in sync. It also writes into the main doc:
209
+
210
+ - the working rules you picked, between `<!-- mdrules:rules:start -->` and `<!-- mdrules:rules:end -->`;
211
+ - how the project plans its work (the mdrules method, OpenSpec or Spec Kit), between
212
+ `<!-- mdrules:workflow:start -->` and `<!-- mdrules:workflow:end -->`. With the mdrules method it
213
+ also installs the `mdrules-new-task` and `mdrules-close-session` skills.
214
+ - with proposals on, how the agent writes proposals and answers comments (skill
215
+ `mdrules-proposals`), between `<!-- mdrules:proposals:start -->` and `<!-- mdrules:proposals:end -->`.
85
216
 
86
217
  ```bash
87
218
  mdrules sync --status [--json] # translations + files not in the source language
@@ -89,6 +220,16 @@ mdrules sync --mark [--lang xx] <path...>|--all # record translations as in syn
89
220
  mdrules sync --keep <path...> # keep files in their current language
90
221
  ```
91
222
 
223
+ ## Uninstall
224
+
225
+ ```bash
226
+ npm uninstall -g mdrules # or: pnpm remove -g mdrules (use the one you installed it with)
227
+ ```
228
+
229
+ To remove it from a project, delete `.mdrules/` and `.claude/skills/mdrules*/`, the `.mdrules/` line in
230
+ `.gitignore`, and the `mdrules:rules`, `mdrules:workflow` and `mdrules:proposals` blocks in your main doc (keep the text
231
+ inside if you still want it). Editor settings, rule presets and skill tags live in `~/.mdrules`.
232
+
92
233
  ## Development
93
234
 
94
235
  ```bash