@namewta/speculo 0.8.5 → 0.8.6

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 (64) hide show
  1. package/README.md +4 -3
  2. package/dist/src/structured.js +162 -4
  3. package/dist/src/structured.js.map +1 -1
  4. package/package.json +2 -2
  5. package/template/canonical/canonical-specdev-goal-plan.md +0 -1
  6. package/template/canonical/canonical-specdev-grill-with-docs.md +0 -1
  7. package/template/canonical/canonical-specdev-spec.md +0 -1
  8. package/template/canonical/canonical-specdev-tickets.md +0 -1
  9. package/template/commands/status.md +3 -3
  10. package/template/skills/archive-and-consolidate/SKILL.md +19 -14
  11. package/template/workflows/learning/A-archive-and-consolidate/A-archive-and-consolidate.md +38 -0
  12. package/template/workflows/learning/A-archive-and-consolidate/promotion-plan-template.md +23 -0
  13. package/template/workflows/learning/A-assess-and-plan/A-assess-and-plan.md +39 -0
  14. package/template/workflows/learning/A-assess-and-plan/change-status-template.json +28 -0
  15. package/template/workflows/learning/A-assess-and-plan/learning-plan-template.md +28 -0
  16. package/template/workflows/learning/E-eli5/E-eli5.md +37 -0
  17. package/template/workflows/learning/E-eli5/lesson-template.md +31 -0
  18. package/template/workflows/learning/I-init-setup/I-init-setup.md +36 -0
  19. package/template/workflows/learning/I-init-setup/context-index-template.md +6 -0
  20. package/template/workflows/learning/I-init-setup/learner-profile-template.md +17 -0
  21. package/template/workflows/learning/I-init-setup/review-index-template.md +4 -0
  22. package/template/workflows/learning/INDEX.md +26 -0
  23. package/template/workflows/learning/P-practice/P-practice.md +34 -0
  24. package/template/workflows/learning/P-practice/practice-template.md +16 -0
  25. package/template/workflows/learning/Q-quiz/Q-quiz.md +34 -0
  26. package/template/workflows/learning/Q-quiz/quiz-artifact-template.md +16 -0
  27. package/template/workflows/learning/R-review/R-review.md +35 -0
  28. package/template/workflows/learning/R-review/review-template.md +12 -0
  29. package/template/workflows/learning/README.md +121 -0
  30. package/template/workflows/learning/_state/archive/.gitkeep +1 -0
  31. package/template/workflows/learning/_state/changes/.gitkeep +1 -0
  32. package/template/workflows/learning/_state/status.json +6 -0
  33. package/template/workflows/learning/common/rules/artifact-contract.md +27 -0
  34. package/template/workflows/learning/common/rules/assessment-policy.md +7 -0
  35. package/template/workflows/learning/common/rules/knowledge-organization.md +9 -0
  36. package/template/workflows/learning/common/rules/mastery-policy.md +21 -0
  37. package/template/workflows/learning/common/rules/path-reference-contract.md +7 -0
  38. package/template/workflows/learning/common/rules/teaching-policy.md +15 -0
  39. package/template/workflows/learning/common/schemas/change-status.schema.json +41 -0
  40. package/template/workflows/learning/common/schemas/status.schema.json +32 -0
  41. package/template/workflows/learning/common/skills/knowledge-promotion/SKILL.md +46 -0
  42. package/template/workflows/learning/common/skills/knowledge-promotion/domain-index-template.md +6 -0
  43. package/template/workflows/learning/common/skills/knowledge-promotion/domain-overview-template.md +19 -0
  44. package/template/workflows/learning/common/skills/knowledge-promotion/knowledge-template.md +25 -0
  45. package/template/workflows/learning/common/tools/validate-learning.mjs +356 -0
  46. package/template/workflows/learning/runtime-contract.json +11 -0
  47. package/template/workflows/specdev/INDEX.md +2 -2
  48. package/template/workflows/specdev/README.md +1 -6
  49. package/template/workflows/specdev/common/rules/artifact-contract.md +0 -1
  50. package/template/workflows/specdev/common/tools/validate-specdev.mjs +0 -68
  51. package/template/canonical/canonical-specdev-engineering-cognitive-mentor.md +0 -1968
  52. package/template/workflows/specdev/E-eli5/E-eli5.md +0 -97
  53. package/template/workflows/specdev/E-engineering-cognitive-mentor/E-engineering-cognitive-mentor.md +0 -254
  54. package/template/workflows/specdev/E-engineering-cognitive-mentor/architecture-guidance.md +0 -90
  55. package/template/workflows/specdev/E-engineering-cognitive-mentor/bug-guidance.md +0 -80
  56. package/template/workflows/specdev/E-engineering-cognitive-mentor/codebase-guidance.md +0 -107
  57. package/template/workflows/specdev/E-engineering-cognitive-mentor/comprehension-and-closure.md +0 -95
  58. package/template/workflows/specdev/E-engineering-cognitive-mentor/domain-learning-guidance.md +0 -62
  59. package/template/workflows/specdev/E-engineering-cognitive-mentor/evidence-and-options.md +0 -132
  60. package/template/workflows/specdev/E-engineering-cognitive-mentor/interaction-protocol.md +0 -116
  61. package/template/workflows/specdev/E-engineering-cognitive-mentor/mentor-report-template.md +0 -135
  62. package/template/workflows/specdev/E-engineering-cognitive-mentor/mode-routing.md +0 -47
  63. package/template/workflows/specdev/E-engineering-cognitive-mentor/persistence-and-resume.md +0 -132
  64. package/template/workflows/specdev/E-engineering-cognitive-mentor/requirements-guidance.md +0 -92
@@ -34,8 +34,6 @@ const EXPECTED_WORKS = new Set([
34
34
  "A-archive-and-consolidate",
35
35
  "C-code-review",
36
36
  "D-diagnose-bugs",
37
- "E-eli5",
38
- "E-engineering-cognitive-mentor",
39
37
  "G-grill-with-docs",
40
38
  "I-implement",
41
39
  "I-init-setup",
@@ -99,7 +97,6 @@ const VALID_STAGES = new Set([
99
97
  "triage",
100
98
  "diagnosis",
101
99
  "grill",
102
- "eli5",
103
100
  "spec",
104
101
  "tickets",
105
102
  "goal-plan",
@@ -169,7 +166,6 @@ const STATE_ARTIFACT_BASENAMES = new Set([
169
166
  "source.md",
170
167
  "architecture-review.md",
171
168
  "architecture-review.html",
172
- "eli_index.md",
173
169
  "wayfinder-map.md",
174
170
  "design-tree.json",
175
171
  ]);
@@ -823,13 +819,6 @@ function capabilityChecks(root) {
823
819
  ["一个问题", "Logic", "UI", "临时 branch/worktree", "promotion target", "main"],
824
820
  ],
825
821
  ],
826
- [
827
- "eli5",
828
- [
829
- join(root, "E-eli5", "E-eli5.md"),
830
- ["大一新生", "零专业背景", "$ARGUMENTS", "ASCII", "eli_index.md", "{number}_{topic}.md"],
831
- ],
832
- ],
833
822
  [
834
823
  "wayfinder",
835
824
  [
@@ -1235,62 +1224,6 @@ function validatePrototypes(change, required, errors) {
1235
1224
  return paths;
1236
1225
  }
1237
1226
 
1238
- function validateEli5(change, required, errors) {
1239
- const indexPath = join(change, "eli_index.md");
1240
- const diagramFiles = readdirSync(change, { withFileTypes: true })
1241
- .filter((entry) => entry.isFile() && /^\d{2,}_[^/\\\\\s]+\.md$/.test(entry.name))
1242
- .map((entry) => entry.name)
1243
- .sort();
1244
-
1245
- if (!isFile(indexPath)) {
1246
- if (required) errors.push("eli5 stage requires eli_index.md");
1247
- return null;
1248
- }
1249
-
1250
- const index = readText(indexPath);
1251
- if (!index.includes("# ELI5 图解索引")) errors.push("eli_index.md: missing index heading");
1252
- const entries = Array.from(index.matchAll(/^\|\s*(\d{2,})\s*\|\s*([^|\s]+\.md)\s*\|\s*([^|]+)\|\s*([^|]+)\|\s*$/gm));
1253
- if (!entries.length && required) errors.push("eli_index.md: requires at least one diagram entry");
1254
-
1255
- const indexedFiles = new Set();
1256
- let previousNumber = 0;
1257
- for (const entry of entries) {
1258
- const [, number, fileName, topic, summary] = entry;
1259
- const numericNumber = Number(number);
1260
- if (!/^\d{2,}_[^/\\\\\s]+\.md$/.test(fileName)) {
1261
- errors.push(`eli_index.md: invalid diagram filename '${fileName}'`);
1262
- continue;
1263
- }
1264
- if (numericNumber <= previousNumber) errors.push("eli_index.md: diagram numbers must increase");
1265
- if (numericNumber !== previousNumber + 1) errors.push("eli_index.md: diagram numbers must start at 01 and be continuous");
1266
- previousNumber = numericNumber;
1267
- if (!fileName.startsWith(`${number}_`)) errors.push(`eli_index.md: '${fileName}' must start with '${number}_'`);
1268
- if (!topic.trim() || !summary.trim()) errors.push(`eli_index.md: '${fileName}' requires a topic and summary`);
1269
- indexedFiles.add(fileName);
1270
- }
1271
-
1272
- for (const fileName of diagramFiles) {
1273
- if (!indexedFiles.has(fileName)) errors.push(`eli_index.md: missing entry for '${fileName}'`);
1274
- }
1275
- for (const fileName of indexedFiles) {
1276
- if (!diagramFiles.includes(fileName)) errors.push(`eli_index.md: '${fileName}' does not exist`);
1277
- }
1278
-
1279
- for (const fileName of diagramFiles) {
1280
- const markdown = readText(join(change, fileName));
1281
- for (const heading of ["## 先看全图", "## 一步一步看", "## 术语小词典", "## 你现在能复述什么"]) {
1282
- if (!markdown.includes(heading)) errors.push(`${fileName}: missing '${heading}'`);
1283
- }
1284
- if (!/```(?:text)?\s*[\s\S]*?(?:->|\||\+--)[\s\S]*?```/.test(markdown)) {
1285
- errors.push(`${fileName}: requires an ASCII diagram in a fenced code block`);
1286
- }
1287
- if (/<\/?(?:html|head|body|svg|canvas|img|picture)\b/i.test(markdown)) {
1288
- errors.push(`${fileName}: must be Markdown, not HTML`);
1289
- }
1290
- }
1291
- return indexPath;
1292
- }
1293
-
1294
1227
  function validateSpec(path, errors, warnings) {
1295
1228
  if (!isFile(path)) {
1296
1229
  warnings.push("Spec is missing; contract traceability cannot be fully checked");
@@ -2151,7 +2084,6 @@ function validateChange(change, stage = null, repoRoot = null) {
2151
2084
  }
2152
2085
  validateReviews(change, stage === "review", errors);
2153
2086
  validatePrototypes(change, stage === "prototype", errors);
2154
- validateEli5(change, stage === "eli5", errors);
2155
2087
 
2156
2088
  const specRequired = new Set(["spec", "tickets", "goal-plan", "implement", "complete"]).has(stage);
2157
2089
  const specPath = join(change, "spec.md");