dimcode-darwin-x64 0.1.2 → 0.1.3-beta.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 (148) hide show
  1. package/bin/dimcode +0 -0
  2. package/bin/runtime/sandbox/dim-sandbox-runner +0 -0
  3. package/bin/runtime/sandbox/manifest.json +15 -0
  4. package/bin/skills-assets/deep-investigate/SKILL.md +101 -0
  5. package/bin/skills-assets/deep-investigate/references/prompts.md +75 -0
  6. package/bin/skills-assets/deep-investigate/references/templates.md +73 -0
  7. package/bin/skills-assets/deep-investigate/references/thinking-tools.md +36 -0
  8. package/bin/skills-assets/docs-sprint/SKILL.md +73 -0
  9. package/bin/skills-assets/docs-sprint/agents/openai.yaml +4 -0
  10. package/bin/skills-assets/docs-sprint/references/contract-discipline.md +30 -0
  11. package/bin/skills-assets/docs-sprint/references/delivery-plan.md +162 -0
  12. package/bin/skills-assets/docs-sprint/references/documentation-system.md +109 -0
  13. package/bin/skills-assets/docs-sprint/references/ui-layout.md +73 -0
  14. package/bin/skills-assets/docs-sprint/references/worktree-guide.md +45 -0
  15. package/bin/skills-assets/docx/SKILL.md +273 -0
  16. package/bin/skills-assets/docx/assets/styles/academic_styles.xml +250 -0
  17. package/bin/skills-assets/docx/assets/styles/corporate_styles.xml +284 -0
  18. package/bin/skills-assets/docx/assets/styles/default_styles.xml +449 -0
  19. package/bin/skills-assets/docx/assets/xsd/aesthetic-rules.xsd +470 -0
  20. package/bin/skills-assets/docx/assets/xsd/business-rules.xsd +130 -0
  21. package/bin/skills-assets/docx/assets/xsd/common-types.xsd +159 -0
  22. package/bin/skills-assets/docx/assets/xsd/wml-subset.xsd +589 -0
  23. package/bin/skills-assets/docx/references/cjk_typography.md +357 -0
  24. package/bin/skills-assets/docx/references/cjk_university_template_guide.md +184 -0
  25. package/bin/skills-assets/docx/references/comments_guide.md +191 -0
  26. package/bin/skills-assets/docx/references/design_good_bad_examples.md +829 -0
  27. package/bin/skills-assets/docx/references/design_principles.md +819 -0
  28. package/bin/skills-assets/docx/references/openxml_element_order.md +308 -0
  29. package/bin/skills-assets/docx/references/openxml_encyclopedia_part1.md +4061 -0
  30. package/bin/skills-assets/docx/references/openxml_encyclopedia_part2.md +2820 -0
  31. package/bin/skills-assets/docx/references/openxml_encyclopedia_part3.md +3381 -0
  32. package/bin/skills-assets/docx/references/openxml_namespaces.md +82 -0
  33. package/bin/skills-assets/docx/references/openxml_units.md +72 -0
  34. package/bin/skills-assets/docx/references/scenario_a_create.md +284 -0
  35. package/bin/skills-assets/docx/references/scenario_b_edit_content.md +295 -0
  36. package/bin/skills-assets/docx/references/scenario_c_apply_template.md +456 -0
  37. package/bin/skills-assets/docx/references/track_changes_guide.md +200 -0
  38. package/bin/skills-assets/docx/references/troubleshooting.md +506 -0
  39. package/bin/skills-assets/docx/references/typography_guide.md +294 -0
  40. package/bin/skills-assets/docx/references/xsd_validation_guide.md +158 -0
  41. package/bin/skills-assets/docx/scripts/doc_to_docx.sh +40 -0
  42. package/bin/skills-assets/docx/scripts/docx_preview.sh +37 -0
  43. package/bin/skills-assets/docx/scripts/dotnet/Docx.Cli/Docx.Cli.csproj +19 -0
  44. package/bin/skills-assets/docx/scripts/dotnet/Docx.Cli/Program.cs +18 -0
  45. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/AnalyzeCommand.cs +147 -0
  46. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/ApplyTemplateCommand.cs +322 -0
  47. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/CreateCommand.cs +324 -0
  48. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/DiffCommand.cs +155 -0
  49. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/EditContentCommand.cs +487 -0
  50. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/FixOrderCommand.cs +108 -0
  51. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/MergeRunsCommand.cs +122 -0
  52. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Commands/ValidateCommand.cs +107 -0
  53. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Docx.Core.csproj +15 -0
  54. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/CommentSynchronizer.cs +169 -0
  55. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/ElementOrder.cs +80 -0
  56. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/NamespaceConstants.cs +42 -0
  57. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/RunMerger.cs +81 -0
  58. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/StyleAnalyzer.cs +81 -0
  59. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/TrackChangesHelper.cs +99 -0
  60. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/OpenXml/UnitConverter.cs +23 -0
  61. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples.cs +1832 -0
  62. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch1.cs +910 -0
  63. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch2.cs +999 -0
  64. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch3.cs +1048 -0
  65. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/AestheticRecipeSamples_Batch4.cs +1038 -0
  66. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/CharacterFormattingSamples.cs +1020 -0
  67. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/DocumentCreationSamples.cs +1121 -0
  68. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/FieldAndTocSamples.cs +624 -0
  69. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/FootnoteAndCommentSamples.cs +675 -0
  70. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/HeaderFooterSamples.cs +838 -0
  71. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/ImageSamples.cs +917 -0
  72. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/ListAndNumberingSamples.cs +826 -0
  73. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/ParagraphFormattingSamples.cs +1199 -0
  74. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/StyleSystemSamples.cs +1487 -0
  75. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/TableSamples.cs +1163 -0
  76. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Samples/TrackChangesSamples.cs +595 -0
  77. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Typography/CjkHelper.cs +39 -0
  78. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Typography/FontDefaults.cs +24 -0
  79. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Typography/PageSizes.cs +20 -0
  80. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/BusinessRuleValidator.cs +224 -0
  81. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/GateCheckValidator.cs +148 -0
  82. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/ValidationResult.cs +23 -0
  83. package/bin/skills-assets/docx/scripts/dotnet/Docx.Core/Validation/XsdValidator.cs +69 -0
  84. package/bin/skills-assets/docx/scripts/dotnet/Docx.slnx +4 -0
  85. package/bin/skills-assets/docx/scripts/env_check.sh +196 -0
  86. package/bin/skills-assets/docx/scripts/setup.ps1 +274 -0
  87. package/bin/skills-assets/docx/scripts/setup.sh +504 -0
  88. package/bin/skills-assets/pdf/README.md +222 -0
  89. package/bin/skills-assets/pdf/SKILL.md +191 -0
  90. package/bin/skills-assets/pdf/design/design.md +381 -0
  91. package/bin/skills-assets/pdf/scripts/cover.py +1579 -0
  92. package/bin/skills-assets/pdf/scripts/fill_inspect.py +200 -0
  93. package/bin/skills-assets/pdf/scripts/fill_write.py +242 -0
  94. package/bin/skills-assets/pdf/scripts/make.sh +491 -0
  95. package/bin/skills-assets/pdf/scripts/merge.py +112 -0
  96. package/bin/skills-assets/pdf/scripts/palette.py +521 -0
  97. package/bin/skills-assets/pdf/scripts/reformat_parse.py +374 -0
  98. package/bin/skills-assets/pdf/scripts/render_body.py +1052 -0
  99. package/bin/skills-assets/pdf/scripts/render_cover.js +111 -0
  100. package/bin/skills-assets/pptx-generator/SKILL.md +248 -0
  101. package/bin/skills-assets/pptx-generator/references/design-system.md +392 -0
  102. package/bin/skills-assets/pptx-generator/references/editing.md +162 -0
  103. package/bin/skills-assets/pptx-generator/references/pitfalls.md +112 -0
  104. package/bin/skills-assets/pptx-generator/references/pptxgenjs.md +420 -0
  105. package/bin/skills-assets/pptx-generator/references/slide-types.md +413 -0
  106. package/bin/skills-assets/skill-creator/SKILL.md +368 -0
  107. package/bin/skills-assets/skill-creator/agents/openai.yaml +5 -0
  108. package/bin/skills-assets/skill-creator/assets/skill-creator-small.svg +3 -0
  109. package/bin/skills-assets/skill-creator/assets/skill-creator.png +0 -0
  110. package/bin/skills-assets/skill-creator/license.txt +202 -0
  111. package/bin/skills-assets/skill-creator/references/openai_yaml.md +49 -0
  112. package/bin/skills-assets/skill-creator/scripts/generate_openai_yaml.py +226 -0
  113. package/bin/skills-assets/skill-creator/scripts/init_skill.py +397 -0
  114. package/bin/skills-assets/skill-creator/scripts/quick_validate.py +101 -0
  115. package/bin/skills-assets/skill-installer/LICENSE.txt +202 -0
  116. package/bin/skills-assets/skill-installer/SKILL.md +58 -0
  117. package/bin/skills-assets/skill-installer/agents/openai.yaml +5 -0
  118. package/bin/skills-assets/skill-installer/assets/skill-installer-small.svg +3 -0
  119. package/bin/skills-assets/skill-installer/assets/skill-installer.png +0 -0
  120. package/bin/skills-assets/skill-installer/scripts/github_utils.py +21 -0
  121. package/bin/skills-assets/skill-installer/scripts/install-skill-from-github.py +308 -0
  122. package/bin/skills-assets/skill-installer/scripts/list-skills.py +107 -0
  123. package/bin/skills-assets/xlsx/SKILL.md +137 -0
  124. package/bin/skills-assets/xlsx/references/create.md +691 -0
  125. package/bin/skills-assets/xlsx/references/edit.md +684 -0
  126. package/bin/skills-assets/xlsx/references/fix.md +37 -0
  127. package/bin/skills-assets/xlsx/references/format.md +768 -0
  128. package/bin/skills-assets/xlsx/references/ooxml-cheatsheet.md +231 -0
  129. package/bin/skills-assets/xlsx/references/read-analyze.md +97 -0
  130. package/bin/skills-assets/xlsx/references/validate.md +772 -0
  131. package/bin/skills-assets/xlsx/scripts/formula_check.py +422 -0
  132. package/bin/skills-assets/xlsx/scripts/libreoffice_recalc.py +248 -0
  133. package/bin/skills-assets/xlsx/scripts/shared_strings_builder.py +163 -0
  134. package/bin/skills-assets/xlsx/scripts/style_audit.py +575 -0
  135. package/bin/skills-assets/xlsx/scripts/xlsx_add_column.py +395 -0
  136. package/bin/skills-assets/xlsx/scripts/xlsx_insert_row.py +274 -0
  137. package/bin/skills-assets/xlsx/scripts/xlsx_pack.py +87 -0
  138. package/bin/skills-assets/xlsx/scripts/xlsx_reader.py +362 -0
  139. package/bin/skills-assets/xlsx/scripts/xlsx_shift_rows.py +396 -0
  140. package/bin/skills-assets/xlsx/scripts/xlsx_unpack.py +130 -0
  141. package/bin/skills-assets/xlsx/templates/minimal_xlsx/[Content_Types].xml +9 -0
  142. package/bin/skills-assets/xlsx/templates/minimal_xlsx/_rels/.rels +6 -0
  143. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/_rels/workbook.xml.rels +19 -0
  144. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/sharedStrings.xml +33 -0
  145. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/styles.xml +160 -0
  146. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/workbook.xml +30 -0
  147. package/bin/skills-assets/xlsx/templates/minimal_xlsx/xl/worksheets/sheet1.xml +70 -0
  148. package/package.json +1 -1
package/bin/dimcode CHANGED
Binary file
@@ -0,0 +1,15 @@
1
+ {
2
+ "version": 2,
3
+ "protocolVersion": 1,
4
+ "platform": "darwin",
5
+ "arch": "x64",
6
+ "targetName": "darwin-x64",
7
+ "fileName": "dim-sandbox-runner",
8
+ "sha256": "56f66dfd86dfa4bb26ddcedf8f97453b7062bf8f487a7185fbc40459a6074700",
9
+ "files": [
10
+ {
11
+ "fileName": "dim-sandbox-runner",
12
+ "sha256": "56f66dfd86dfa4bb26ddcedf8f97453b7062bf8f487a7185fbc40459a6074700"
13
+ }
14
+ ]
15
+ }
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: deep-investigate
3
+ description: "First-principles deep investigation framework. Applies to any domain — technology, market, product, strategy. Use whenever the user asks to research, investigate, analyze, compare, evaluate, or make decisions requiring deep understanding. Also trigger proactively when discussing choices or tradeoffs that need structured analysis."
4
+ ---
5
+
6
+ # Deep Investigate
7
+
8
+ Multi-agent research protocol. Fully autonomous after Phase 1.
9
+
10
+ ```
11
+ FRAME → EXPLORE (loop) → ANALYZE → DELIVER
12
+ ↑ ↓
13
+ explorers → verifier → GAPS? → next round
14
+ → PASS? → exit loop
15
+ ```
16
+
17
+ **Hard rules:**
18
+ 1. Phase 1 is the ONLY user interaction. Phases 2-4 complete before returning to user.
19
+ 2. Every round: PARALLEL explorer agents. Never one agent doing all work.
20
+ 3. Every round ends with a fresh VERIFIER agent. Never self-review.
21
+ 4. Verifier cannot PASS before `min_rounds`. No shortcuts.
22
+
23
+ ---
24
+
25
+ ## Phase 1: Frame
26
+
27
+ Orchestrator does this directly, with user.
28
+
29
+ 1. Core question — one sentence
30
+ 2. Key concepts — verify externally, don't trust memory
31
+ 3. Dimensions — derive from the problem
32
+ 4. Preliminary search — calibrate dimensions
33
+ 5. `min_rounds` — minimum exploration rounds (default 10, adjust by complexity)
34
+ 6. Completion criteria — derive from the question, not from a template
35
+ 7. Confirm with user → go autonomous
36
+
37
+ Output: research plan document. See `references/templates.md` for format.
38
+
39
+ ---
40
+
41
+ ## Phase 2: Explore
42
+
43
+ Autonomous loop. Each round has 3 steps.
44
+
45
+ ### Step 1: parallel(explorer agents)
46
+
47
+ Split problem space across agents. Slicing strategies — by dimension, by source, by angle. Pick what fits. Each agent:
48
+ - Covers its assigned territory as deep as possible
49
+ - Traces to primary sources, verifies empirically when possible
50
+ - Flags `[UNVERIFIED]` claims
51
+ - Lists new questions discovered
52
+ - If verifier feedback exists from last round: reads it, decides how to address
53
+
54
+ See `references/prompts.md § Explorer` for prompt template.
55
+
56
+ ### Step 2: Merge
57
+
58
+ Orchestrator reads all outputs, updates working document:
59
+ - Organize by dimension, not by agent
60
+ - Cross-check conflicts between agents
61
+ - Collect `[UNVERIFIED]` and new questions
62
+
63
+ ### Step 3: Verifier gate
64
+
65
+ Spawn fresh verifier agent (no prior context). It is an **auditor, not a planner**:
66
+ - Evaluates breadth (dimension coverage) and depth (surface vs root-cause)
67
+ - Detects failure patterns: lazy, shallow, blind spots, fake verification, low coverage
68
+ - Knows current round number and `min_rounds`
69
+ - Outputs problem characteristics + PASS or GAPS
70
+
71
+ **It does NOT tell explorers what to do.** It only describes what's wrong. Explorers decide how to fix it.
72
+
73
+ See `references/prompts.md § Verifier` for prompt template.
74
+
75
+ **PASS** (only after `min_rounds`) → Phase 3
76
+ **GAPS** → verifier's problem list goes to next round's explorers → Step 1
77
+
78
+ ---
79
+
80
+ ## Phase 3: Analyze & Structure
81
+
82
+ Orchestrator transforms raw working document into final deliverable.
83
+
84
+ **Analyze**: Draw boundaries, distinguish essential differences from surface similarities, check against ecosystem consensus, reason backward from user scenarios, interrogate your own conclusions. See `references/thinking-tools.md` for details.
85
+
86
+ **Structure**: Reorganize by topic (not by round), merge duplicates, attach verification records inline, classify gaps by priority, build roadmap, extract blind spots.
87
+
88
+ ---
89
+
90
+ ## Phase 4: Deliver
91
+
92
+ Write final document. See `references/templates.md § Final document` for format.
93
+
94
+ For large efforts, also write `handoff.md` — enables a new agent to continue in under 10 minutes.
95
+
96
+ ---
97
+
98
+ ## Conventions
99
+
100
+ - **Language**: follow user's language
101
+ - **Save location**: ask user in Phase 1, or use project convention
@@ -0,0 +1,75 @@
1
+ # Agent Prompt Templates
2
+
3
+ ## Explorer
4
+
5
+ ```
6
+ You are a research explorer investigating a specific territory within a larger research effort.
7
+
8
+ RESEARCH PLAN:
9
+ {plan}
10
+
11
+ YOUR TERRITORY:
12
+ {assignment}
13
+
14
+ VERIFIER FEEDBACK FROM LAST ROUND (if any):
15
+ {feedback — read it, decide for yourself how to address the problems}
16
+
17
+ INSTRUCTIONS:
18
+ - Go as deep as possible on your assigned territory
19
+ - Trace claims to primary sources — don't restate summaries
20
+ - Verify empirically when possible (run code, test APIs, check data, read original documents)
21
+ - Distinguish root causes from surface descriptions
22
+ - Flag claims you couldn't verify as [UNVERIFIED]
23
+ - List new questions and dimensions discovered during exploration
24
+
25
+ OUTPUT:
26
+ Findings organized by sub-topic. For each:
27
+ - What you found
28
+ - Source (URL, file path, or document reference)
29
+ - Verified? (how) or [UNVERIFIED]
30
+ - New questions this raises
31
+ ```
32
+
33
+ ## Verifier
34
+
35
+ ```
36
+ You are a research auditor. Evaluate this investigation's quality with fresh eyes. You have NO prior context — this is deliberate.
37
+
38
+ RESEARCH PLAN:
39
+ {plan}
40
+
41
+ WORKING DOCUMENT:
42
+ {document}
43
+
44
+ CURRENT ROUND: {N} of minimum {min_rounds}
45
+
46
+ ## Evaluate on two axes
47
+
48
+ BREADTH — is the problem space covered?
49
+ - For each dimension: COVERED / PARTIAL / NOT COVERED
50
+ - Missing dimensions that should exist?
51
+ - Sources per dimension? (1 source = unreliable)
52
+
53
+ DEPTH — are findings real?
54
+ - For each major finding: DEEP / SURFACE / UNVERIFIED
55
+ - Confident claims that just restate one source?
56
+ - Verifications done or just claimed?
57
+
58
+ ## Failure patterns to detect
59
+ - Lazy: lists without analysis
60
+ - Shallow: WHAT without WHY
61
+ - Blind spots: obvious angles unchecked
62
+ - Fake verification: claims verified but no evidence
63
+ - Low count: fewer findings than domain should yield
64
+
65
+ ## Output
66
+
67
+ Problem characteristics: {each problem with evidence}
68
+
69
+ DETERMINATION:
70
+ - Round < min_rounds → GAPS (always)
71
+ - Round >= min_rounds, all COVERED, no critical SURFACE/UNVERIFIED → PASS
72
+ - Otherwise → GAPS
73
+
74
+ You describe problems. You do NOT prescribe solutions.
75
+ ```
@@ -0,0 +1,73 @@
1
+ # Document Templates
2
+
3
+ ## Research plan (Phase 1 output)
4
+
5
+ ```markdown
6
+ # Research Plan: {title}
7
+
8
+ > Core question: {one sentence}
9
+ > min_rounds: {N}
10
+
11
+ ## Dimensions
12
+ 1. {dimension} — {why it matters}
13
+
14
+ ## Completion criteria
15
+ {Derive from the question. Examples:}
16
+ - [ ] Each dimension covered by ≥2 agents from different angles
17
+ - [ ] Key claims verified empirically
18
+ - [ ] Landscape mapped with concrete examples
19
+ - [ ] Verifier PASS (after min_rounds)
20
+
21
+ ## Scope
22
+ - In: {list}
23
+ - Out: {list with reasons}
24
+ ```
25
+
26
+ ## Final document (Phase 4 output)
27
+
28
+ ```markdown
29
+ # {Title}
30
+
31
+ > Date: {date}
32
+ > Core question: {one sentence}
33
+ > Related docs: {links}
34
+ > Exploration: {K} rounds, {N} verified, {M} unverified
35
+
36
+ ---
37
+
38
+ ## 一、Current state
39
+ {Quantified — numbers, not adjectives}
40
+
41
+ ## 二、Comparison
42
+ {Tables by dimension}
43
+
44
+ ## 三、Gaps
45
+ {Classified by priority, each with: current state → others' approach → suggestion}
46
+
47
+ ## 四、Verification records
48
+ | Claim | Method | Result |
49
+ |-------|--------|--------|
50
+
51
+ ## 五、Priority roadmap
52
+ | Priority | Item | Scope | Effort | Dependency |
53
+ |----------|------|-------|--------|------------|
54
+
55
+ ## 六、Conclusion
56
+ {3-5 concrete next steps}
57
+
58
+ ## 七、Blind spots
59
+ {What not covered, why}
60
+ ```
61
+
62
+ ## Handoff document (optional, for large efforts)
63
+
64
+ ```markdown
65
+ # Handoff: {title}
66
+
67
+ ## Why — original motivation
68
+ ## How — methods, sources, classification
69
+ ## What — top 5 findings
70
+ ## Progress — done vs remaining
71
+ ## Continue — next steps for whoever picks this up
72
+ ## Blind spots — deliberately not covered, why
73
+ ```
@@ -0,0 +1,36 @@
1
+ # Thinking Tools for Phase 3
2
+
3
+ Use these during analysis. They are thinking aids, not a checklist — pick what fits.
4
+
5
+ ## Boundary drawing
6
+
7
+ "What principle determines whether X belongs in our scope?"
8
+
9
+ Define the principle first, then audit every item against it. Items that fail → explicitly out of scope with documented reason.
10
+
11
+ Example: "Anything affecting whether a request succeeds → our scope. Anything affecting how data is represented → not our scope."
12
+
13
+ ## Essential difference vs surface similarity
14
+
15
+ "What is the lifecycle / failure mode / mental model of each thing I'm comparing?"
16
+
17
+ Things that look alike may be fundamentally different. The analysis that distinguishes them is where real insight lives.
18
+
19
+ Example: packet loss, connection reset, and route blackhole all look like "request failed" — but their detection, recovery, and design implications are completely different.
20
+
21
+ ## Ecosystem consensus
22
+
23
+ If the entire ecosystem does it one way and we're different, can we articulate why? If not, reconsider.
24
+
25
+ Works both ways: consensus validates ("no one combines HTTP+WS+upload → split is right") and consensus challenges ("every client supports cancellation → we must too").
26
+
27
+ ## User-scenario-backward
28
+
29
+ Start from "who needs what when", not "what can we do". Map 3-5 concrete scenarios, list needed capabilities, compare against what exists. Gaps from scenarios are real gaps.
30
+
31
+ ## Self-interrogation
32
+
33
+ After reaching a conclusion:
34
+ - "Am I confusing 'we built it' with 'users need it'?"
35
+ - "Is the problem the what or the tempo?"
36
+ - "What would I think seeing this for the first time?"
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: docs-sprint
3
+ description: Docs-driven delivery workflow. Use when splitting design docs into tasks, creating implementation plans under docs/plan, executing develop/verify/merge cycles, maintaining design doc consistency, or writing UI layout documentation with ASCII diagrams.
4
+ ---
5
+
6
+ # Docs Sprint
7
+
8
+ Docs-driven delivery workflow — given design docs, manage the process from task split to verified merge. Agent-agnostic. Platform-specific agent configs live under `agents/`.
9
+
10
+ ## Role
11
+
12
+ You are the orchestrator. You plan, dispatch, monitor, and merge. You do NOT write code or run tests yourself. All implementation and verification work must be delegated to sub-agents.
13
+
14
+ | You do | You delegate |
15
+ |---|---|
16
+ | Read and update design docs | Code implementation (develop agent) |
17
+ | Write analysis and split tasks | Code review and verification (verify agent) |
18
+ | Check task status and dispatch | Fix blocking findings (develop agent) |
19
+ | Execute merge and run full test | |
20
+ | Manage recovery from interruption | |
21
+
22
+ ## Parallel Execution
23
+
24
+ You have worktree capability. When the execution mode allows parallel dispatch, create worktrees for sub-agents following [worktree-guide.md](references/worktree-guide.md). Create the worktree before dispatching; pass the worktree path as the sub-agent's working directory.
25
+
26
+ ## Core Workflow
27
+
28
+ 1. Read `docs/INDEX.md`, then read the design docs related to the request.
29
+ 2. For planning work, read `docs/plan/README.md` and use the plan/task/review loop.
30
+ 3. For UI work, read the relevant layout docs and represent interface changes with ASCII diagrams.
31
+ 4. If implementation needs behavior missing from docs, update the design docs first and ask for confirmation before changing code.
32
+ 5. Dispatch develop agents for implementation. Dispatch verify agents for review. Do not do both in the same agent.
33
+ 6. Treat review findings as delivery gates: fix blocking findings via develop agent, archive or record non-blocking findings according to project docs.
34
+
35
+ ## Task Classification
36
+
37
+ | Request type | Action |
38
+ |---|---|
39
+ | Architecture/design docs | Read [documentation-system.md](references/documentation-system.md), then update design docs |
40
+ | Development plan or task split | Read [delivery-plan.md](references/delivery-plan.md), then create analysis/tasks/backlog entries |
41
+ | Code implementation | Read task file and referenced design docs; follow [contract-discipline.md](references/contract-discipline.md) |
42
+ | Review or fix review findings | Use the verify/develop loop in [delivery-plan.md](references/delivery-plan.md) |
43
+ | UI layout docs | Read [ui-layout.md](references/ui-layout.md), then write layout definition docs with ASCII diagrams |
44
+
45
+ ## Documentation Rules
46
+
47
+ - Keep one source of truth for each rule or process.
48
+ - Use scope README files for ownership, relationships, state ownership, lifecycle, and cross-module flows.
49
+ - Use module docs for local contract: inputs, outputs, state boundary, errors, extension points, and tests.
50
+ - Prefer diagrams, tables, and explicit flow charts over broad prose.
51
+ - Define only necessary terms. Keep terms concrete and traceable to code or user-visible behavior.
52
+ - When docs and implementation need different behavior, update docs first.
53
+ - Doc changes and code changes in the same task are one atomic delivery.
54
+
55
+ ## Implementation Rules
56
+
57
+ - Follow [contract-discipline.md](references/contract-discipline.md) for type, error, and fallback rules.
58
+ - Tests must cover contract behavior and error handling for the touched boundary.
59
+
60
+ ## UI Layout Rules
61
+
62
+ - Show UI structure with ASCII diagrams.
63
+ - Write each layout doc around one page or component.
64
+ - Use this section order when it fits: overall structure, page-level layout, region layout, interactions, state variants, responsive behavior, size reference, component tree, page entry points.
65
+ - Include input behavior, dialog/overlay layering, and loading/empty/error states.
66
+
67
+ ## References
68
+
69
+ - `references/documentation-system.md`: docs directory structure, maintenance rules, writing style.
70
+ - `references/delivery-plan.md`: analysis, tasks, develop/verify review loop, isolation, merge rules.
71
+ - `references/contract-discipline.md`: type, error, fallback, and implementation discipline.
72
+ - `references/ui-layout.md`: UI layout documentation style, ASCII diagrams, interaction contracts.
73
+ - `references/worktree-guide.md`: worktree creation, dispatch, cleanup, and recovery.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Docs Sprint"
3
+ short_description: "Docs-driven delivery workflow"
4
+ default_prompt: "Use $docs-sprint to split design docs into tasks and execute develop/verify/merge cycles."
@@ -0,0 +1,30 @@
1
+ # Contract Discipline
2
+
3
+ Design docs are the source of truth for contracts. When code and docs disagree, update docs and confirm before changing code.
4
+
5
+ ## Type And Error Rules
6
+
7
+ | Situation | Required behavior |
8
+ |---|---|
9
+ | required data missing | fail fast with explicit typed error |
10
+ | unknown variant | fail fast with explicit typed error |
11
+ | invalid input | fail fast with explicit typed error |
12
+ | contract mismatch | fail fast with explicit typed error |
13
+ | optional lookup missing | return absent value (`undefined` in TS, `None` in Python, etc.) |
14
+ | fallback/default value | allowed only when design docs explicitly authorize |
15
+ | empty container / zero / noop fallback | allowed only when design docs explicitly authorize |
16
+ | silent recovery / best-effort normalize | allowed only when design docs explicitly authorize |
17
+
18
+ Do not use empty containers, zero values, or no-op callbacks to mask missing required state.
19
+
20
+ ## Test Expectations
21
+
22
+ | Change type | Verification |
23
+ |---|---|
24
+ | type / interface | compile or typecheck + contract tests |
25
+ | error behavior | tests for typed errors and missing optional lookups |
26
+ | storage / state | tests for persistence, versioning, and mutation path |
27
+ | integration | tests using real implementations across boundary |
28
+ | UI / TUI | layout docs + interaction tests or snapshots when implementation exists |
29
+
30
+ Document any verification that cannot run and why.
@@ -0,0 +1,162 @@
1
+ # Delivery Plan Workflow
2
+
3
+ ## Plan Directory
4
+
5
+ ```text
6
+ docs/plan/
7
+ ├─ README.md
8
+ ├─ analysis/
9
+ │ └─ {topic}.md
10
+ ├─ tasks/
11
+ │ └─ {area}-{seq}.md
12
+ ├─ reviews/
13
+ │ └─ {id}-{seq}.md
14
+ └─ backlog.md
15
+ ```
16
+
17
+ ## Analysis
18
+
19
+ Write analysis for planning and orchestration. Do not assign analysis docs directly to implementation agents.
20
+
21
+ Analysis must cover:
22
+
23
+ 1. **Module decomposition**: package/module scope, inputs, outputs, dependencies. Produce module-level delivery tasks.
24
+ 2. **Integration enumeration**: enumerate every documented "module A creates/calls/injects module B" relationship. Produce integration tasks that verify each connection with real implementations, not mocks.
25
+
26
+ Common miss: only analyzing module-internal responsibilities without enumerating creation chains, injection chains, and call chains between modules. Result: every module passes its own tests, but stub boundaries are never broken through.
27
+
28
+ | Task type | Objective | Verification |
29
+ |---|---|---|
30
+ | Module task | Implement module X | Module tests cover types, contract, and errors |
31
+ | Integration task | Connect A → B, replace stub | Real call path works, integration test covers path |
32
+ | E2E task | Validate user-observable flow | Entry-to-output path executes |
33
+
34
+ Integration task `depends-on` points to the module tasks it connects.
35
+
36
+ Task boundary = the smallest independently verifiable deliverable. If fixing task A's blocking findings necessarily produces task B's deliverable, they are one task.
37
+
38
+ ## Task File Format
39
+
40
+ ```yaml
41
+ id: {area}-{seq}
42
+ scope: ...
43
+ status: pending | ready | in-progress | done | blocked
44
+ depends-on: [task-id, ...]
45
+ ```
46
+
47
+ `area` can be a package prefix, module prefix, or capability prefix (e.g. `acp-001`). `scope` identifies which part of the project this task belongs to.
48
+
49
+ Required sections: `objective`, `context` (design doc paths to read), `path` (files and directories this task touches), `verification`.
50
+
51
+ ```text
52
+ pending ── depends-on all done ──► ready ──► in-progress ──► done
53
+
54
+ blocked
55
+ ```
56
+
57
+ ## Develop Prompt
58
+
59
+ ```text
60
+ 你的任务文件是 docs/plan/tasks/{id}.md。
61
+
62
+ 阅读任务文件,只完成 objective 中定义的开发目标,不超出任务范围。
63
+
64
+ context 指向的设计文档是你理解需求的来源。docs/INDEX.md 是文档总索引。
65
+
66
+ 完成后运行 typecheck 和任务要求的测试。
67
+ ```
68
+
69
+ For review fixes:
70
+
71
+ ```text
72
+ 你的任务文件是 docs/plan/tasks/{id}.md。
73
+
74
+ 阅读 docs/plan/reviews/{id}-{seq}.md,修复其中标记为 blocking 的 findings。
75
+
76
+ 完成后运行 typecheck 和任务要求的测试。
77
+ ```
78
+
79
+ ## Verify Prompt
80
+
81
+ ```text
82
+ review 任务 {id} 的开发产出。
83
+
84
+ 任务文件:docs/plan/tasks/{id}.md
85
+ 开发产出:任务文件中 path 指向的路径
86
+ 设计文档:任务文件中 context 指向的路径
87
+ 项目规范:docs/INDEX.md 是文档总索引。
88
+
89
+ 详细阅读源码与设计文档,判断实现是否达到可交付状态,是否与设计文档完全一致。
90
+
91
+ 写入 docs/plan/reviews/{id}-{seq}.md,格式:
92
+
93
+ 1. Findings 列表,每条标注:
94
+ - 严重程度(P1/P2/P3)
95
+ - 是否阻塞交付(blocking / non-blocking)
96
+ - 设计文档位置与代码位置
97
+
98
+ blocking = 与设计文档 contract 不一致,或对接路径残留 stub/mock/fake。
99
+ non-blocking = 实现合理但设计文档未提及。
100
+
101
+ 2. 结论:pass 或 blocked
102
+ ```
103
+
104
+ ## Isolation
105
+
106
+ All task development happens on isolation branches. Branch sees only its creation-time baseline.
107
+
108
+ | Rule | Detail |
109
+ |---|---|
110
+ | Branch naming | `task/{id}` |
111
+ | Branch base | Main HEAD at creation time |
112
+ | Depends-on | Wait until all predecessors merge to main before creating branch |
113
+ | Commit before verify | Verify agent only sees committed code |
114
+ | Lifecycle | create → develop → commit → verify → (pass → merge → delete) or (blocked → fix → re-verify) |
115
+
116
+ ## Execution Mode
117
+
118
+ ```text
119
+ ready tasks ──► has worktree? ──► no ──► serialize all
120
+ yes ──► path overlap? ──► yes ──► serialize
121
+ no ──► parallel
122
+ ```
123
+
124
+ Without worktree, all tasks execute serially — one working directory cannot sustain concurrent branches.
125
+
126
+ With worktree, two tasks can run in parallel only when no entry in one task's `path` is a parent, child, or same path as another's. Tasks with `depends-on` chains are inherently serial.
127
+
128
+ Serial tasks need no extra coordination — each starts from updated main HEAD after its predecessor merges.
129
+
130
+ For worktree creation, dispatch, and cleanup procedures, see [worktree-guide.md](worktree-guide.md).
131
+
132
+ ## Merge
133
+
134
+ ```text
135
+ develop ──► verify ──► pass ──► merge to main ──► full test ──► done
136
+
137
+ └─ blocked ──► fix ──► re-verify
138
+ ```
139
+
140
+ On pass:
141
+
142
+ - Merge to main. Resolve conflicts file-by-file, preserving both sides.
143
+ - Run full test. If tests fail, revert merge — task must rebase and re-verify.
144
+ - Mark task `done`. Append non-blocking findings to `backlog.md`. Delete review file and branch.
145
+
146
+ On blocked:
147
+
148
+ - Fix blocking findings on the same branch. Run typecheck and task tests. Re-verify.
149
+
150
+ When multiple parallel tasks pass simultaneously, merge one at a time. Each subsequent merge may require conflict resolution and re-test.
151
+
152
+ ## Recovery
153
+
154
+ When resuming after interruption, reconstruct state from task files and git:
155
+
156
+ | Observed state | Action |
157
+ |---|---|
158
+ | Task `in-progress`, branch `task/{id}` exists, no review file | Resume develop or re-dispatch develop |
159
+ | Task `in-progress`, review file exists with `blocked` | Re-dispatch fix |
160
+ | Task `in-progress`, review file exists with `pass`, not merged | Execute merge |
161
+ | Task `in-progress`, branch missing | Reset task to `ready`, re-dispatch |
162
+ | Task `blocked`, no review file | Reset task to `ready`, re-dispatch |