@mvarble/mesearch-workflow 0.0.0-stage → 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 (165) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +109 -2
  3. package/agents/reference/authoring.md +127 -0
  4. package/agents/reference/workflow.md +106 -0
  5. package/agents/skills/wf-abandon/SKILL.md +16 -0
  6. package/agents/skills/wf-approve/SKILL.md +23 -0
  7. package/agents/skills/wf-build/SKILL.md +41 -0
  8. package/agents/skills/wf-plan/SKILL.md +47 -0
  9. package/agents/skills/wf-publish/SKILL.md +41 -0
  10. package/agents/skills/wf-reopen/SKILL.md +20 -0
  11. package/agents/skills/wf-resume/SKILL.md +16 -0
  12. package/agents/skills/wf-start/SKILL.md +25 -0
  13. package/agents/skills/wf-status/SKILL.md +12 -0
  14. package/agents/skills/wf-writeup/SKILL.md +58 -0
  15. package/app/ambient.d.ts +71 -0
  16. package/app/lib/components/CopyCode.svelte +24 -0
  17. package/app/lib/components/DocumentMap.svelte +38 -0
  18. package/app/lib/components/DocumentPage.svelte +184 -0
  19. package/app/lib/components/Icon.svelte +35 -0
  20. package/app/lib/components/ImageFigure.svelte +213 -0
  21. package/app/lib/components/LinkList.svelte +46 -0
  22. package/app/lib/components/ModelGraph.svelte +169 -0
  23. package/app/lib/components/OpenEntry.svelte +35 -0
  24. package/app/lib/components/PageList.svelte +35 -0
  25. package/app/lib/components/PrevNext.svelte +24 -0
  26. package/app/lib/components/Proof.svelte +12 -0
  27. package/app/lib/components/Shell.svelte +55 -0
  28. package/app/lib/components/Sidebar.svelte +77 -0
  29. package/app/lib/components/StageRail.svelte +30 -0
  30. package/app/lib/components/Statement.svelte +41 -0
  31. package/app/lib/components/Tex.svelte +25 -0
  32. package/app/lib/components/ThemeToggle.svelte +17 -0
  33. package/app/lib/components/Timeline.svelte +31 -0
  34. package/app/lib/components/Toc.svelte +41 -0
  35. package/app/lib/components/TopBar.svelte +55 -0
  36. package/app/lib/components/TrackCard.svelte +20 -0
  37. package/app/lib/documents.ts +52 -0
  38. package/app/lib/graph/describe.ts +29 -0
  39. package/app/lib/graph/geometry.ts +296 -0
  40. package/app/lib/graph/spec.ts +158 -0
  41. package/app/lib/kit.ts +11 -0
  42. package/app/lib/load.ts +12 -0
  43. package/app/lib/map.ts +6 -0
  44. package/app/lib/nav.ts +91 -0
  45. package/app/lib/questions.ts +33 -0
  46. package/app/lib/server/document.ts +117 -0
  47. package/app/lib/server/map.ts +41 -0
  48. package/app/lib/server/markdown.ts +134 -0
  49. package/app/lib/server/open.ts +35 -0
  50. package/app/lib/server/repo.ts +6 -0
  51. package/app/lib/server/specs.ts +26 -0
  52. package/app/lib/server/title.ts +9 -0
  53. package/app/lib/state/persisted.svelte.ts +40 -0
  54. package/app/lib/state/theme.svelte.ts +24 -0
  55. package/app/lib/tex.ts +99 -0
  56. package/app/params/slug.ts +5 -0
  57. package/app/params/track.ts +5 -0
  58. package/app/routes/+layout.ts +2 -0
  59. package/app/routes/[...key].md/+server.ts +19 -0
  60. package/app/routes/[track=track]/+page.server.ts +14 -0
  61. package/app/routes/[track=track]/+page.svelte +24 -0
  62. package/app/routes/[track=track]/[slug=slug]/+page.server.ts +9 -0
  63. package/app/routes/[track=track]/[slug=slug]/+page.svelte +7 -0
  64. package/app/routes/[track=track]/[slug=slug]/+page.ts +4 -0
  65. package/app/routes/archive/+page.server.ts +18 -0
  66. package/app/routes/archive/+page.svelte +44 -0
  67. package/app/routes/archive/[entry=slug]/+page.server.ts +9 -0
  68. package/app/routes/archive/[entry=slug]/+page.svelte +7 -0
  69. package/app/routes/archive/[entry=slug]/+page.ts +4 -0
  70. package/app/routes/archive/[entry=slug]/[name=slug]/+page.server.ts +14 -0
  71. package/app/routes/archive/[entry=slug]/[name=slug]/+page.svelte +7 -0
  72. package/app/routes/archive/[entry=slug]/[name=slug]/+page.ts +4 -0
  73. package/app/routes/llms-full.txt/+server.ts +17 -0
  74. package/app/routes/llms.txt/+server.ts +50 -0
  75. package/app/routes/math/+page.server.ts +21 -0
  76. package/app/routes/math/+page.svelte +56 -0
  77. package/app/routes/math/[slug=slug]/+page.server.ts +8 -0
  78. package/app/routes/math/[slug=slug]/+page.svelte +7 -0
  79. package/app/routes/math/[slug=slug]/+page.ts +4 -0
  80. package/app/styles/base.css +98 -0
  81. package/app/styles/code.css +83 -0
  82. package/app/styles/index.css +17 -0
  83. package/app/styles/katex.css +14 -0
  84. package/app/styles/layout.css +545 -0
  85. package/app/styles/text.css +96 -0
  86. package/app/styles/tokens/dimensions.css +31 -0
  87. package/app/styles/tokens/typography.css +33 -0
  88. package/app/styles/tokens.css +2 -0
  89. package/app/styles/utils/archive.css +339 -0
  90. package/app/styles/utils/buttons.css +28 -0
  91. package/app/styles/utils/callouts.css +41 -0
  92. package/app/styles/utils/cards.css +95 -0
  93. package/app/styles/utils/graph.css +186 -0
  94. package/app/styles/utils/map.css +45 -0
  95. package/app/styles/utils/tables.css +25 -0
  96. package/dist/cli.d.ts +2 -0
  97. package/dist/cli.js +88 -0
  98. package/dist/cli.js.map +1 -0
  99. package/dist/engine/cli.d.ts +12 -0
  100. package/dist/engine/cli.js +744 -0
  101. package/dist/engine/cli.js.map +1 -0
  102. package/dist/engine/config.d.ts +40 -0
  103. package/dist/engine/config.js +16 -0
  104. package/dist/engine/config.js.map +1 -0
  105. package/dist/engine/lib.d.ts +108 -0
  106. package/dist/engine/lib.js +375 -0
  107. package/dist/engine/lib.js.map +1 -0
  108. package/dist/engine/main.d.ts +1 -0
  109. package/dist/engine/main.js +45 -0
  110. package/dist/engine/main.js.map +1 -0
  111. package/dist/index.d.ts +4 -0
  112. package/dist/index.js +3 -0
  113. package/dist/index.js.map +1 -0
  114. package/dist/site/hooks.d.ts +27 -0
  115. package/dist/site/hooks.js +2 -0
  116. package/dist/site/hooks.js.map +1 -0
  117. package/dist/site/index.d.ts +1 -0
  118. package/dist/site/index.js +2 -0
  119. package/dist/site/index.js.map +1 -0
  120. package/dist/site/preset/index.d.ts +15 -0
  121. package/dist/site/preset/index.js +556 -0
  122. package/dist/site/preset/index.js.map +1 -0
  123. package/dist/site/preset/runtime.d.ts +42 -0
  124. package/dist/site/preset/runtime.js +99 -0
  125. package/dist/site/preset/runtime.js.map +1 -0
  126. package/dist/site/preset/types.d.ts +87 -0
  127. package/dist/site/preset/types.js +2 -0
  128. package/dist/site/preset/types.js.map +1 -0
  129. package/dist/site/vite.d.ts +14 -0
  130. package/dist/site/vite.js +202 -0
  131. package/dist/site/vite.js.map +1 -0
  132. package/dist/sync/index.d.ts +17 -0
  133. package/dist/sync/index.js +175 -0
  134. package/dist/sync/index.js.map +1 -0
  135. package/dist/sync/init.d.ts +7 -0
  136. package/dist/sync/init.js +62 -0
  137. package/dist/sync/init.js.map +1 -0
  138. package/dist/sync/render.d.ts +3 -0
  139. package/dist/sync/render.js +118 -0
  140. package/dist/sync/render.js.map +1 -0
  141. package/dist/sync/site.d.ts +3 -0
  142. package/dist/sync/site.js +58 -0
  143. package/dist/sync/site.js.map +1 -0
  144. package/package.json +78 -3
  145. package/templates/.agents/reference/authoring.md +11 -0
  146. package/templates/.agents/reference/stages/README.md +4 -0
  147. package/templates/AGENTS.md +36 -0
  148. package/templates/site/content/landing.md +5 -0
  149. package/templates/site/katex.config.ts +5 -0
  150. package/templates/site/package.json +22 -0
  151. package/templates/site/src/app.d.ts +8 -0
  152. package/templates/site/src/app.html +23 -0
  153. package/templates/site/src/lib/components/Logo.svelte +12 -0
  154. package/templates/site/src/lib/site.ts +39 -0
  155. package/templates/site/src/routes/+layout.server.ts +3 -0
  156. package/templates/site/src/routes/+layout.svelte +11 -0
  157. package/templates/site/src/routes/+page.server.ts +3 -0
  158. package/templates/site/src/routes/+page.svelte +34 -0
  159. package/templates/site/src/routes/+page.ts +7 -0
  160. package/templates/site/src/styles/index.css +4 -0
  161. package/templates/site/src/styles/tokens/colors.css +107 -0
  162. package/templates/site/static/favicon.svg +1 -0
  163. package/templates/site/tsconfig.json +20 -0
  164. package/templates/site/vite.config.ts +4 -0
  165. package/templates/workflow.config.ts +40 -0
@@ -0,0 +1,107 @@
1
+ /* A neutral slate scale with one indigo accent, the logo's `COLOR` in `logo/generate.py`. Every
2
+ * other stylesheet refers to these names, so a palette change is made here and nowhere else. */
3
+
4
+ :root {
5
+ color-scheme: light;
6
+
7
+ --accent-hue: 255;
8
+
9
+ /* Foreground: 1 is headings, 2 body text, 3 secondary, 4 faint. */
10
+ --fg-1: hsl(222, 30%, 11%);
11
+ --fg-2: hsl(220, 16%, 22%);
12
+ --fg-3: hsl(220, 9%, 42%);
13
+ --fg-4: hsl(220, 8%, 58%);
14
+ --fg-accent: hsl(var(--accent-hue), 55%, 52%);
15
+ --fg-on-accent: hsl(0, 0%, 100%);
16
+
17
+ /* Background: 1 is the page, 2 raised surfaces (sidebar, cards), 3 code, 4 hover. */
18
+ --bg-1: hsl(0, 0%, 100%);
19
+ --bg-2: hsl(220, 20%, 98%);
20
+ --bg-3: hsl(220, 18%, 96.5%);
21
+ --bg-4: hsl(220, 16%, 93%);
22
+ --bg-accent: hsl(var(--accent-hue), 60%, 60%);
23
+ --bg-accent-soft: hsl(var(--accent-hue), 80%, 96%);
24
+ --bg-selection: hsla(var(--accent-hue), 90%, 60%, 0.22);
25
+ --bg-topbar: hsla(0, 0%, 100%, 0.85);
26
+
27
+ --border: hsl(220, 14%, 90%);
28
+ --border-strong: hsl(220, 12%, 82%);
29
+
30
+ /* Callouts: a hue per kind, used for the border and a faint tint. */
31
+ --callout-note: hsl(212, 70%, 48%);
32
+ --callout-tip: hsl(152, 55%, 36%);
33
+ --callout-warning: hsl(36, 90%, 45%);
34
+ --callout-decision: hsl(268, 50%, 55%);
35
+ --callout-todo: hsl(44, 95%, 42%);
36
+ --callout-tint: 6%;
37
+
38
+ /* Graph figures: the palette a figure's kinds of node and edge are drawn from (the `Hue`s of
39
+ * `$lib/graph/spec.ts`), and the neutral colour of an edge with no kind. */
40
+ --graph-gray: hsl(220, 9%, 46%);
41
+ --graph-blue: hsl(212, 72%, 46%);
42
+ --graph-orange: hsl(20, 68%, 46%);
43
+ --graph-green: hsl(152, 55%, 33%);
44
+ --graph-purple: hsl(268, 48%, 52%);
45
+ --graph-teal: hsl(186, 70%, 33%);
46
+ --graph-red: hsl(345, 70%, 50%);
47
+ --graph-sky: hsl(199, 80%, 42%);
48
+ --graph-amber: hsl(38, 92%, 42%);
49
+ --graph-olive: hsl(80, 55%, 36%);
50
+ --graph-magenta: hsl(310, 60%, 48%);
51
+ --graph-edge: hsl(220, 14%, 38%);
52
+ --graph-fill-mix: 12%;
53
+ --graph-shaded-mix: 55%;
54
+
55
+ --scrollbar: hsla(220, 10%, 20%, 0.25);
56
+ --shadow-sm: 0 1px 2px hsla(220, 30%, 10%, 0.06);
57
+ --shadow-md: 0 4px 16px hsla(220, 30%, 10%, 0.08);
58
+ }
59
+
60
+ :root.dark {
61
+ color-scheme: dark;
62
+
63
+ --fg-1: hsl(220, 20%, 94%);
64
+ --fg-2: hsl(220, 12%, 80%);
65
+ --fg-3: hsl(220, 8%, 62%);
66
+ --fg-4: hsl(220, 7%, 46%);
67
+ --fg-accent: hsl(var(--accent-hue), 85%, 76%);
68
+ --fg-on-accent: hsl(0, 0%, 100%);
69
+
70
+ --bg-1: hsl(222, 16%, 9%);
71
+ --bg-2: hsl(222, 14%, 11.5%);
72
+ --bg-3: hsl(222, 14%, 13.5%);
73
+ --bg-4: hsl(222, 12%, 18%);
74
+ --bg-accent: hsl(var(--accent-hue), 60%, 56%);
75
+ --bg-accent-soft: hsla(var(--accent-hue), 70%, 50%, 0.12);
76
+ --bg-selection: hsla(var(--accent-hue), 90%, 60%, 0.3);
77
+ --bg-topbar: hsla(222, 16%, 9%, 0.85);
78
+
79
+ --border: hsl(222, 10%, 20%);
80
+ --border-strong: hsl(222, 10%, 28%);
81
+
82
+ --callout-note: hsl(212, 80%, 64%);
83
+ --callout-tip: hsl(152, 50%, 55%);
84
+ --callout-warning: hsl(36, 90%, 58%);
85
+ --callout-decision: hsl(268, 70%, 72%);
86
+ --callout-todo: hsl(44, 95%, 58%);
87
+ --callout-tint: 9%;
88
+
89
+ --graph-gray: hsl(220, 10%, 64%);
90
+ --graph-blue: hsl(212, 85%, 66%);
91
+ --graph-orange: hsl(22, 85%, 64%);
92
+ --graph-green: hsl(152, 50%, 56%);
93
+ --graph-purple: hsl(268, 75%, 74%);
94
+ --graph-teal: hsl(186, 65%, 55%);
95
+ --graph-red: hsl(345, 80%, 68%);
96
+ --graph-sky: hsl(199, 85%, 62%);
97
+ --graph-amber: hsl(40, 95%, 60%);
98
+ --graph-olive: hsl(80, 50%, 58%);
99
+ --graph-magenta: hsl(310, 70%, 72%);
100
+ --graph-edge: hsl(220, 12%, 70%);
101
+ --graph-fill-mix: 16%;
102
+ --graph-shaded-mix: 45%;
103
+
104
+ --scrollbar: hsla(0, 0%, 100%, 0.2);
105
+ --shadow-sm: 0 1px 2px hsla(0, 0%, 0%, 0.4);
106
+ --shadow-md: 0 4px 16px hsla(0, 0%, 0%, 0.4);
107
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><circle cx="8" cy="8" r="6" fill="none" stroke="#1c1c1c" stroke-width="2"/></svg>
@@ -0,0 +1,20 @@
1
+ {
2
+ "extends": "./.svelte-kit/tsconfig.json",
3
+ "compilerOptions": {
4
+ "allowJs": true,
5
+ "allowImportingTsExtensions": true,
6
+ "checkJs": true,
7
+ "esModuleInterop": true,
8
+ "forceConsistentCasingInFileNames": true,
9
+ "resolveJsonModule": true,
10
+ "skipLibCheck": true,
11
+ "sourceMap": true,
12
+ "strict": true,
13
+ "moduleResolution": "bundler"
14
+ }
15
+ // Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias
16
+ // except $lib which is handled by https://svelte.dev/docs/kit/configuration#files
17
+ //
18
+ // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
19
+ // from the referenced tsconfig.json - TypeScript does not merge them in
20
+ }
@@ -0,0 +1,4 @@
1
+ import { docsSite } from '@mvarble/mesearch-workflow/site';
2
+ import { defineConfig } from 'vite';
3
+
4
+ export default defineConfig({ plugins: await docsSite() });
@@ -0,0 +1,40 @@
1
+ import type { WorkflowConfig } from '@mvarble/mesearch-workflow';
2
+
3
+ // This project's workflow: the kinds of entry, their stages, and what counts as its code. The
4
+ // engine (`bin/wf`) and the skills read it; `mesearch-wf sync` writes the reference documents
5
+ // from it. It loads before anything is installed, so it imports nothing but types.
6
+ export default {
7
+ project: '{{name}}',
8
+ code: [/^src\//],
9
+ describe: { code: '`src/`' },
10
+ kinds: {
11
+ feature: {
12
+ stages: ['plan', 'build', 'publish'],
13
+ describe: 'something new, planned, built and documented',
14
+ },
15
+ decision: { stages: ['writeup', 'publish'], describe: 'a position, argued in prose' },
16
+ chore: {
17
+ stages: ['plan', 'build', 'publish'],
18
+ describe: 'a refactor or a tooling change, with nothing new to document',
19
+ },
20
+ },
21
+ stages: {
22
+ plan: {
23
+ document: true,
24
+ checklist: true,
25
+ editableDuring: ['build'],
26
+ describe: '`plan.md`: a checklist the build works through',
27
+ },
28
+ build: { unlocks: ['code'], describe: 'the code, committed as the boxes are ticked' },
29
+ publish: {
30
+ unlocks: ['pages'],
31
+ describe: "the pages that say what now _is_, and the entry's `index.md`",
32
+ },
33
+ writeup: {
34
+ document: true,
35
+ unlocks: ['math'],
36
+ describe: "`writeup.md`: a decision's argument",
37
+ },
38
+ },
39
+ pagesOptional: ['chore'],
40
+ } satisfies WorkflowConfig;