pi-maestro-flow 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 (179) hide show
  1. package/README.md +124 -0
  2. package/agents/aggregator.md +27 -0
  3. package/agents/cli-explore-agent.md +188 -0
  4. package/agents/cross-role-reviewer.md +171 -0
  5. package/agents/delegate.md +19 -0
  6. package/agents/explorer.md +23 -0
  7. package/agents/impeccable-agent.md +99 -0
  8. package/agents/ralph-executor.md +81 -0
  9. package/agents/reference.md +24 -0
  10. package/agents/role-design-author.md +220 -0
  11. package/agents/team-supervisor.md +143 -0
  12. package/agents/team-worker.md +237 -0
  13. package/agents/ui-design-agent.md +270 -0
  14. package/agents/workflow-analyzer.md +116 -0
  15. package/agents/workflow-codebase-mapper.md +77 -0
  16. package/agents/workflow-collab-planner.md +147 -0
  17. package/agents/workflow-debugger.md +104 -0
  18. package/agents/workflow-executor.md +133 -0
  19. package/agents/workflow-external-researcher.md +86 -0
  20. package/agents/workflow-integration-checker.md +83 -0
  21. package/agents/workflow-nyquist-auditor.md +85 -0
  22. package/agents/workflow-phase-researcher.md +85 -0
  23. package/agents/workflow-plan-checker.md +100 -0
  24. package/agents/workflow-planner.md +200 -0
  25. package/agents/workflow-project-researcher.md +74 -0
  26. package/agents/workflow-research-synthesizer.md +70 -0
  27. package/agents/workflow-reviewer.md +82 -0
  28. package/agents/workflow-roadmapper.md +81 -0
  29. package/agents/workflow-verifier.md +120 -0
  30. package/package.json +58 -0
  31. package/skills/codify-to-knowhow/SKILL.md +167 -0
  32. package/skills/delegation-check/SKILL.md +297 -0
  33. package/skills/domain-add/SKILL.md +75 -0
  34. package/skills/insight-challenge/SKILL.md +226 -0
  35. package/skills/learn-decompose/SKILL.md +124 -0
  36. package/skills/learn-follow/SKILL.md +163 -0
  37. package/skills/learn-investigate/SKILL.md +160 -0
  38. package/skills/learn-second-opinion/SKILL.md +128 -0
  39. package/skills/maestro/SKILL.md +239 -0
  40. package/skills/maestro-amend/SKILL.md +169 -0
  41. package/skills/maestro-analyze/SKILL.md +173 -0
  42. package/skills/maestro-blueprint/SKILL.md +159 -0
  43. package/skills/maestro-brainstorm/SKILL.md +193 -0
  44. package/skills/maestro-collab/SKILL.md +181 -0
  45. package/skills/maestro-companion/SKILL.md +536 -0
  46. package/skills/maestro-composer/SKILL.md +192 -0
  47. package/skills/maestro-execute/SKILL.md +193 -0
  48. package/skills/maestro-fork/SKILL.md +104 -0
  49. package/skills/maestro-grill/SKILL.md +151 -0
  50. package/skills/maestro-guard/SKILL.md +124 -0
  51. package/skills/maestro-help/SKILL.md +328 -0
  52. package/skills/maestro-impeccable/SKILL.md +302 -0
  53. package/skills/maestro-init/SKILL.md +151 -0
  54. package/skills/maestro-merge/SKILL.md +90 -0
  55. package/skills/maestro-milestone-audit/SKILL.md +117 -0
  56. package/skills/maestro-milestone-complete/SKILL.md +133 -0
  57. package/skills/maestro-milestone-release/SKILL.md +131 -0
  58. package/skills/maestro-next/SKILL.md +269 -0
  59. package/skills/maestro-overlay/SKILL.md +203 -0
  60. package/skills/maestro-plan/SKILL.md +194 -0
  61. package/skills/maestro-player/SKILL.md +184 -0
  62. package/skills/maestro-quick/SKILL.md +117 -0
  63. package/skills/maestro-ralph/SKILL.md +905 -0
  64. package/skills/maestro-ralph-cli/SKILL.md +976 -0
  65. package/skills/maestro-ralph-cli-execute/SKILL.md +229 -0
  66. package/skills/maestro-ralph-execute/SKILL.md +409 -0
  67. package/skills/maestro-ralph-v2/SKILL.md +1198 -0
  68. package/skills/maestro-roadmap/SKILL.md +157 -0
  69. package/skills/maestro-swarm-workflow/SKILL.md +272 -0
  70. package/skills/maestro-tools-execute/SKILL.md +143 -0
  71. package/skills/maestro-tools-register/SKILL.md +192 -0
  72. package/skills/maestro-ui-codify/SKILL.md +127 -0
  73. package/skills/maestro-universal-workflow/SKILL.md +622 -0
  74. package/skills/maestro-update/SKILL.md +156 -0
  75. package/skills/manage-codebase-rebuild/SKILL.md +111 -0
  76. package/skills/manage-drift-realign/SKILL.md +159 -0
  77. package/skills/manage-harvest/SKILL.md +121 -0
  78. package/skills/manage-issue/SKILL.md +88 -0
  79. package/skills/manage-issue-discover/SKILL.md +104 -0
  80. package/skills/manage-kg-extractors/SKILL.md +147 -0
  81. package/skills/manage-knowhow/SKILL.md +102 -0
  82. package/skills/manage-knowhow-capture/SKILL.md +109 -0
  83. package/skills/manage-knowledge-audit/SKILL.md +147 -0
  84. package/skills/manage-status/SKILL.md +80 -0
  85. package/skills/manage-wiki/SKILL.md +104 -0
  86. package/skills/odyssey-debug/SKILL.md +344 -0
  87. package/skills/odyssey-improve/SKILL.md +423 -0
  88. package/skills/odyssey-planex/SKILL.md +542 -0
  89. package/skills/odyssey-review-test-fix/SKILL.md +392 -0
  90. package/skills/odyssey-ui/SKILL.md +388 -0
  91. package/skills/prompt-generator/SKILL.md +470 -0
  92. package/skills/quality-auto-test/SKILL.md +168 -0
  93. package/skills/quality-debug/SKILL.md +176 -0
  94. package/skills/quality-refactor/SKILL.md +108 -0
  95. package/skills/quality-retrospective/SKILL.md +134 -0
  96. package/skills/quality-review/SKILL.md +169 -0
  97. package/skills/quality-sync/SKILL.md +90 -0
  98. package/skills/quality-test/SKILL.md +183 -0
  99. package/skills/scholar-anti-ai-writing/SKILL.md +173 -0
  100. package/skills/scholar-anti-ai-writing/references/patterns-chinese.md +242 -0
  101. package/skills/scholar-anti-ai-writing/references/patterns-english.md +242 -0
  102. package/skills/scholar-citation-verify/SKILL.md +166 -0
  103. package/skills/scholar-citation-verify/references/api-usage.md +372 -0
  104. package/skills/scholar-citation-verify/references/common-errors.md +384 -0
  105. package/skills/scholar-citation-verify/references/verification-rules.md +399 -0
  106. package/skills/scholar-experiment/SKILL.md +321 -0
  107. package/skills/scholar-ideation/SKILL.md +288 -0
  108. package/skills/scholar-latex-organizer/SKILL.md +186 -0
  109. package/skills/scholar-publish/SKILL.md +220 -0
  110. package/skills/scholar-rebuttal-pro/README.md +313 -0
  111. package/skills/scholar-rebuttal-pro/SKILL.md +511 -0
  112. package/skills/scholar-review/SKILL.md +227 -0
  113. package/skills/scholar-thesis-docx/README.md +111 -0
  114. package/skills/scholar-thesis-docx/README_EN.md +108 -0
  115. package/skills/scholar-thesis-docx/SKILL.md +212 -0
  116. package/skills/scholar-thesis-docx/references/failure-patterns-and-quality-gates.md +178 -0
  117. package/skills/scholar-thesis-docx/references/figure-and-code-rules.md +33 -0
  118. package/skills/scholar-thesis-docx/references/paper-format-workflow.md +68 -0
  119. package/skills/scholar-thesis-docx/references/script-usage.md +157 -0
  120. package/skills/scholar-thesis-docx/scripts/audit_docx_ooxml.py +429 -0
  121. package/skills/scholar-thesis-docx/scripts/check_word_com.ps1 +50 -0
  122. package/skills/scholar-thesis-docx/scripts/export_word_pdf.ps1 +62 -0
  123. package/skills/scholar-thesis-docx/scripts/normalize_word_styles.ps1 +498 -0
  124. package/skills/scholar-thesis-docx/scripts/render_mermaid_figure.ps1 +148 -0
  125. package/skills/scholar-writing/SKILL.md +296 -0
  126. package/skills/security-audit/SKILL.md +244 -0
  127. package/skills/skill-generator/SKILL.md +472 -0
  128. package/skills/skill-iter-tune/SKILL.md +382 -0
  129. package/skills/skill-simplify/SKILL.md +63 -0
  130. package/skills/skill-tuning/SKILL.md +174 -0
  131. package/skills/spec-add/SKILL.md +105 -0
  132. package/skills/spec-load/SKILL.md +98 -0
  133. package/skills/spec-remove/SKILL.md +74 -0
  134. package/skills/spec-setup/SKILL.md +75 -0
  135. package/skills/team-adversarial-swarm/SKILL.md +233 -0
  136. package/skills/team-adversarial-swarm/scripts/__pycache__/pheromone.cpython-313.pyc +0 -0
  137. package/skills/team-adversarial-swarm/scripts/__pycache__/scoring.cpython-313.pyc +0 -0
  138. package/skills/team-adversarial-swarm/scripts/aco.py +473 -0
  139. package/skills/team-adversarial-swarm/scripts/pheromone.py +144 -0
  140. package/skills/team-adversarial-swarm/scripts/scoring.py +92 -0
  141. package/skills/team-adversarial-swarm/scripts/test_aco.py +475 -0
  142. package/skills/team-arch-opt/SKILL.md +158 -0
  143. package/skills/team-brainstorm/SKILL.md +171 -0
  144. package/skills/team-coordinate/SKILL.md +266 -0
  145. package/skills/team-designer/SKILL.md +160 -0
  146. package/skills/team-executor/SKILL.md +189 -0
  147. package/skills/team-frontend/SKILL.md +136 -0
  148. package/skills/team-frontend-debug/SKILL.md +198 -0
  149. package/skills/team-interactive-craft/SKILL.md +141 -0
  150. package/skills/team-issue/SKILL.md +171 -0
  151. package/skills/team-lifecycle-v4/SKILL.md +209 -0
  152. package/skills/team-motion-design/SKILL.md +142 -0
  153. package/skills/team-perf-opt/SKILL.md +175 -0
  154. package/skills/team-planex/SKILL.md +137 -0
  155. package/skills/team-quality-assurance/SKILL.md +147 -0
  156. package/skills/team-review/SKILL.md +147 -0
  157. package/skills/team-roadmap-dev/SKILL.md +169 -0
  158. package/skills/team-swarm/SKILL.md +178 -0
  159. package/skills/team-swarm/scripts/aco.py +473 -0
  160. package/skills/team-swarm/scripts/pheromone.py +144 -0
  161. package/skills/team-swarm/scripts/scoring.py +92 -0
  162. package/skills/team-swarm/scripts/test_aco.py +475 -0
  163. package/skills/team-tech-debt/SKILL.md +128 -0
  164. package/skills/team-testing/SKILL.md +143 -0
  165. package/skills/team-ui-polish/SKILL.md +141 -0
  166. package/skills/team-uidesign/SKILL.md +144 -0
  167. package/skills/team-ultra-analyze/SKILL.md +173 -0
  168. package/skills/team-ux-improve/SKILL.md +151 -0
  169. package/skills/team-visual-a11y/SKILL.md +156 -0
  170. package/skills/workflow-skill-designer/SKILL.md +496 -0
  171. package/src/extension/index.ts +222 -0
  172. package/src/extension/schemas.ts +131 -0
  173. package/src/providers/cli-tools-loader.ts +74 -0
  174. package/src/providers/provider-registry.ts +130 -0
  175. package/src/tools/delegate.ts +85 -0
  176. package/src/tools/explore.ts +134 -0
  177. package/src/tools/moa.ts +213 -0
  178. package/src/tools/status.ts +99 -0
  179. package/src/tools/wait.ts +166 -0
@@ -0,0 +1,242 @@
1
+ # English AI Writing Patterns - Complete Reference
2
+
3
+ 完整的英文 AI 写作模式参考指南。
4
+
5
+ ## CONTENT PATTERNS (内容模式)
6
+
7
+ ### 1. Undue Emphasis on Significance (过度强调意义)
8
+
9
+ **Words to watch**: stands/serves as, is a testament/reminder, a vital/significant/crucial/pivotal/key role/moment, underscores/highlights its importance/significance, reflects broader, symbolizing its ongoing/enduring/lasting, contributing to the, setting the stage for, marking/shaping the, represents/marks a shift, key turning point, evolving landscape, focal point, indelible mark, deeply rooted
10
+
11
+ **Before**:
12
+ > The Statistical Institute of Catalonia was officially established in 1989, marking a pivotal moment in the evolution of regional statistics in Spain. This initiative was part of a broader movement across Spain to decentralize administrative functions and enhance regional governance.
13
+
14
+ **After**:
15
+ > The Statistical Institute of Catalonia was established in 1989 to collect and publish regional statistics independently from Spain's national statistics office.
16
+
17
+ ---
18
+
19
+ ### 2. Undue Emphasis on Notability (过度强调知名度)
20
+
21
+ **Words to watch**: independent coverage, local/regional/national media outlets, written by a leading expert, active social media presence
22
+
23
+ **Before**:
24
+ > Her views have been cited in The New York Times, BBC, Financial Times, and The Hindu. She maintains an active social media presence with over 500,000 followers.
25
+
26
+ **After**:
27
+ > In a 2024 New York Times interview, she argued that AI regulation should focus on outcomes rather than methods.
28
+
29
+ ---
30
+
31
+ ### 3. Superficial Analyses with -ing Endings (-ing 结尾的肤浅分析)
32
+
33
+ **Words to watch**: highlighting/underscoring/emphasizing..., ensuring..., reflecting/symbolizing..., contributing to..., cultivating/fostering..., encompassing..., showcasing...
34
+
35
+ **Before**:
36
+ > The temple's color palette of blue, green, and gold resonates with the region's natural beauty, symbolizing Texas bluebonnets, the Gulf of Mexico, and the diverse Texan landscapes, reflecting the community's deep connection to the land.
37
+
38
+ **After**:
39
+ > The temple uses blue, green, and gold colors. The architect said these were chosen to reference local bluebonnets and the Gulf coast.
40
+
41
+ ---
42
+
43
+ ### 4. Promotional Language (宣传性语言)
44
+
45
+ **Words to watch**: boasts a, vibrant, rich (figurative), profound, enhancing its, showcasing, exemplifies, commitment to, natural beauty, nestled, in the heart of, groundbreaking (figurative), renowned, breathtaking, must-visit, stunning
46
+
47
+ **Before**:
48
+ > Nestled within the breathtaking region of Gonder in Ethiopia, Alamata Raya Kobo stands as a vibrant town with a rich cultural heritage and stunning natural beauty.
49
+
50
+ **After**:
51
+ > Alamata Raya Kobo is a town in the Gonder region of Ethiopia, known for its weekly market and 18th-century church.
52
+
53
+ ---
54
+
55
+ ### 5. Vague Attributions (模糊归因)
56
+
57
+ **Words to watch**: Industry reports, Observers have cited, Experts argue, Some critics argue, several sources/publications (when few cited)
58
+
59
+ **Before**:
60
+ > Due to its unique characteristics, the Haolai River is of interest to researchers and conservationists. Experts believe it plays a crucial role in the regional ecosystem.
61
+
62
+ **After**:
63
+ > The Haolai River supports several endemic fish species, according to a 2019 survey by the Chinese Academy of Sciences.
64
+
65
+ ---
66
+
67
+ ### 6. Formulaic "Challenges" Sections (公式化的"挑战"部分)
68
+
69
+ **Words to watch**: Despite its... faces several challenges..., Despite these challenges, Challenges and Legacy, Future Outlook
70
+
71
+ **Before**:
72
+ > Despite its industrial prosperity, Korattur faces challenges typical of urban areas, including traffic congestion and water scarcity. Despite these challenges, with its strategic location and ongoing initiatives, Korattur continues to thrive as an integral part of Chennai's growth.
73
+
74
+ **After**:
75
+ > Traffic congestion increased after 2015 when three new IT parks opened. The municipal corporation began a stormwater drainage project in 2022 to address recurring floods.
76
+
77
+ ---
78
+
79
+ ## LANGUAGE PATTERNS (语言模式)
80
+
81
+ ### 7. AI Vocabulary (AI 词汇表)
82
+
83
+ **High-frequency AI words**: Additionally, align with, crucial, delve, emphasizing, enduring, enhance, fostering, garner, highlight (verb), interplay, intricate/intricacies, key (adjective), landscape (abstract noun), pivotal, showcase, tapestry (abstract noun), testament, underscore (verb), valuable, vibrant
84
+
85
+ **Before**:
86
+ > Additionally, a distinctive feature of Somali cuisine is the incorporation of camel meat. An enduring testament to Italian colonial influence is the widespread adoption of pasta in the local culinary landscape, showcasing how these dishes have integrated into the traditional diet.
87
+
88
+ **After**:
89
+ > Somali cuisine also includes camel meat, which is considered a delicacy. Pasta dishes, introduced during Italian colonization, remain common, especially in the south.
90
+
91
+ ---
92
+
93
+ ### 8. Copula Avoidance (回避系动词)
94
+
95
+ **Words to watch**: serves as/stands as/marks/represents [a], boasts/features/offers [a]
96
+
97
+ **Before**:
98
+ > Gallery 825 serves as LAAA's exhibition space for contemporary art. The gallery features four separate spaces and boasts over 3,000 square feet.
99
+
100
+ **After**:
101
+ > Gallery 825 is LAAA's exhibition space for contemporary art. The gallery has four rooms totaling 3,000 square feet.
102
+
103
+ ---
104
+
105
+ ### 9. Negative Parallelisms (否定式排比)
106
+
107
+ **Before**:
108
+ > It's not just about the beat riding under the vocals; it's part of the aggression and atmosphere. It's not merely a song, it's a statement.
109
+
110
+ **After**:
111
+ > The heavy beat adds to the aggressive tone.
112
+
113
+ ---
114
+
115
+ ### 10. Rule of Three (三段式法则)
116
+
117
+ **Before**:
118
+ > The event features keynote sessions, panel discussions, and networking opportunities. Attendees can expect innovation, inspiration, and industry insights.
119
+
120
+ **After**:
121
+ > The event includes talks and panels. There's also time for informal networking between sessions.
122
+
123
+ ---
124
+
125
+ ### 11. Elegant Variation (刻意换词)
126
+
127
+ **Before**:
128
+ > The protagonist faces many challenges. The main character must overcome obstacles. The central figure eventually triumphs. The hero returns home.
129
+
130
+ **After**:
131
+ > The protagonist faces many challenges but eventually triumphs and returns home.
132
+
133
+ ---
134
+
135
+ ### 12. False Ranges (虚假范围)
136
+
137
+ **Before**:
138
+ > Our journey through the universe has taken us from the singularity of the Big Bang to the grand cosmic web, from the birth and death of stars to the enigmatic dance of dark matter.
139
+
140
+ **After**:
141
+ > The book covers the Big Bang, star formation, and current theories about dark matter.
142
+
143
+ ---
144
+
145
+ ## STYLE PATTERNS (风格模式)
146
+
147
+ ### 13. Em Dash Overuse (破折号过度使用)
148
+
149
+ **Before**:
150
+ > The term is primarily promoted by Dutch institutions—not by the people themselves. You don't say "Netherlands, Europe" as an address—yet this mislabeling continues—even in official documents.
151
+
152
+ **After**:
153
+ > The term is primarily promoted by Dutch institutions, not by the people themselves. You don't say "Netherlands, Europe" as an address, yet this mislabeling continues in official documents.
154
+
155
+ ---
156
+
157
+ ### 14. Overuse of Boldface (粗体过度使用)
158
+
159
+ **Before**:
160
+ > It blends **OKRs (Objectives and Key Results)**, **KPIs (Key Performance Indicators)**, and visual strategy tools such as **Business Model Canvas (BMC)** and **Balanced Scorecard (BSC)**.
161
+
162
+ **After**:
163
+ > It blends OKRs, KPIs, and visual strategy tools like Business Model Canvas and Balanced Scorecard.
164
+
165
+ ---
166
+
167
+ ### 15. Inline-Header Vertical Lists (内联标题垂直列表)
168
+
169
+ **Before**:
170
+ > - **User Experience:** The user experience has been significantly improved with a new interface.
171
+ > - **Performance:** Performance has been enhanced through optimized algorithms.
172
+ > - **Security:** Security has been strengthened with end-to-end encryption.
173
+
174
+ **After**:
175
+ > The update improves the interface, speeds up load times through optimized algorithms, and adds end-to-end encryption.
176
+
177
+ ---
178
+
179
+ ## COMMUNICATION PATTERNS (交流模式)
180
+
181
+ ### 16. Collaborative Communication Artifacts (协作交流痕迹)
182
+
183
+ **Words to watch**: I hope this helps, Of course!, Certainly!, You're absolutely right!, Would you like..., let me know, here is a...
184
+
185
+ **Before**:
186
+ > Here is an overview of the French Revolution. I hope this helps! Let me know if you'd like me to expand on any section.
187
+
188
+ **After**:
189
+ > The French Revolution began in 1789 when financial crisis and food shortages led to widespread unrest.
190
+
191
+ ---
192
+
193
+ ### 17. Knowledge-Cutoff Disclaimers (知识截止免责声明)
194
+
195
+ **Words to watch**: as of [date], Up to my last training update, While specific details are limited/scarce..., based on available information...
196
+
197
+ **Before**:
198
+ > While specific details about the company's founding are not extensively documented in readily available sources, it appears to have been established sometime in the 1990s.
199
+
200
+ **After**:
201
+ > The company was founded in 1994, according to its registration documents.
202
+
203
+ ---
204
+
205
+ ## FILLER PATTERNS (填充模式)
206
+
207
+ ### 18. Filler Phrases (填充短语)
208
+
209
+ | Before | After |
210
+ |--------|-------|
211
+ | "In order to achieve this goal" | "To achieve this" |
212
+ | "Due to the fact that it was raining" | "Because it was raining" |
213
+ | "At this point in time" | "Now" |
214
+ | "In the event that you need help" | "If you need help" |
215
+ | "The system has the ability to process" | "The system can process" |
216
+ | "It is important to note that the data shows" | "The data shows" |
217
+
218
+ ---
219
+
220
+ ### 19. Excessive Hedging (过度限定)
221
+
222
+ **Before**:
223
+ > It could potentially possibly be argued that the policy might have some effect on outcomes.
224
+
225
+ **After**:
226
+ > The policy may affect outcomes.
227
+
228
+ ---
229
+
230
+ ### 20. Generic Positive Conclusions (通用积极结论)
231
+
232
+ **Before**:
233
+ > The future looks bright for the company. Exciting times lie ahead as they continue their journey toward excellence. This represents a major step in the right direction.
234
+
235
+ **After**:
236
+ > The company plans to open two more locations next year.
237
+
238
+ ---
239
+
240
+ ## Source
241
+
242
+ [Based on Wikipedia: Signs of AI writing](https://en.wikipedia.org/wiki/Wikipedia/Signs_of_AI_writing)
@@ -0,0 +1,166 @@
1
+ ---
2
+ name: scholar-citation-verify
3
+ description: "Four-layer citation verification for academic papers. Scans LaTeX/BibTeX files, verifies every citation via WebSearch and Google Scholar, generates verification report with fix suggestions. Triggers on \"verify citations\", \"check references\", \"citation verification\", \"prevent fake citations\", \"引用验证\"."
4
+ allowed-tools: Read Write Edit Bash Glob Grep WebSearch WebFetch AskUserQuestion TodoWrite
5
+ ---
6
+
7
+ # Scholar Citation Verify
8
+
9
+ Four-layer citation verification workflow for academic papers. Scans paper files, verifies every citation through WebSearch/Google Scholar/APIs, and produces a verification report with actionable fixes.
10
+
11
+ ## Pre-load (before execution)
12
+
13
+ 1. **Codebase docs**: If `.workflow/codebase/ARCHITECTURE.md` exists, read for project context
14
+ 2. **Specs**: `maestro load --type spec --category coding` — load coding conventions
15
+ 3. **Wiki knowledge**: `maestro search "academic writing research paper" --json` — top 5 entries as prior context
16
+ 4. All optional — proceed without if unavailable
17
+
18
+ ## Architecture Overview
19
+
20
+ ```
21
+ User: "Verify citations in my paper"
22
+ |
23
+ v
24
+ ┌──────────────────────────────────────────────────────────────┐
25
+ │ SKILL.md (Orchestrator) │
26
+ │ Collect preferences → Dispatch phases → Track progress │
27
+ └──────────┬───────────────────────────────────────────────────┘
28
+ |
29
+ ┌───────┼───────────┬──────────────┐
30
+ v v v v
31
+ ┌──────┐┌──────────┐┌──────────────┐
32
+ │ P1 ││ P2 ││ P3 │
33
+ │ Scan ││ Verify ││ Report │
34
+ │ & ││ 4-Layer ││ & Fix │
35
+ │Extract││ ││ │
36
+ └──┬───┘└────┬─────┘└──────┬───────┘
37
+ │ │ │
38
+ v v v
39
+ citation verified report.md
40
+ entries results + fixed .bib
41
+ ```
42
+
43
+ ## Key Design Principles
44
+
45
+ 1. **Never trust AI-generated citations**: AI citations have ~40% error rate. Every single citation must be verified via external search.
46
+ 2. **Verify during writing, not after**: Proactive verification integrated into the writing process.
47
+ 3. **Four-layer verification**: Format → Existence → Information Matching → Content Validation.
48
+ 4. **Clear failure marking**: Unverifiable citations marked as `[CITATION NEEDED]`, never silently skipped.
49
+
50
+ ## Interactive Preference Collection
51
+
52
+ Before dispatching to any phase, collect these preferences:
53
+
54
+ ```
55
+ Questions to ask the user:
56
+
57
+ 1. Paper Location
58
+ "Where are the paper files? (directory path)"
59
+ → paperDir
60
+
61
+ 2. Verification Mode
62
+ Options: Full (all citations) | Incremental (new/changed only) | Spot Check (random sample)
63
+ → verificationMode
64
+
65
+ 3. Strictness Level
66
+ Options: Strict (for submission) | Normal (for draft) | Lenient (quick check)
67
+ → strictness
68
+
69
+ 4. Auto-fix
70
+ Options: Yes (auto-fix format issues) | No (report only)
71
+ → autoFix
72
+ ```
73
+
74
+ Store responses as `verifyPreferences` context for all phases.
75
+
76
+ ## Auto Mode Defaults
77
+
78
+ When `workflowPreferences.autoYes === true`:
79
+ - Detect paper directory from cwd
80
+ - Full verification mode, Normal strictness
81
+ - Auto-fix enabled
82
+ - Skip confirmation prompts
83
+
84
+ ## Execution Flow
85
+
86
+ > **COMPACT DIRECTIVE**: Context compression MUST check TodoWrite phase status.
87
+ > The phase currently marked `in_progress` is the active execution phase — preserve its FULL content.
88
+ > Only compress phases marked `completed` or `pending`.
89
+
90
+ ### TodoWrite Setup
91
+
92
+ ```
93
+ Citation Verification:
94
+ - [ ] Phase 1: Scan & Extract — find .tex/.bib files, extract all citations
95
+ - [ ] Phase 2: 4-Layer Verify — format, existence, matching, content checks
96
+ - [ ] Phase 3: Report & Fix — generate report, apply fixes
97
+ ```
98
+
99
+ ### Phase Sequence
100
+
101
+ ```
102
+ Phase 1: Scan & Extract
103
+ └─ Ref: phases/01-scan-extract.md
104
+ ├─ Input: paperDir, verificationMode
105
+ └─ Output: citationEntries (list of all citations with metadata)
106
+
107
+ Phase 2: 4-Layer Verify
108
+ └─ Ref: phases/02-verify.md
109
+ ├─ Input: citationEntries, strictness
110
+ └─ Output: verificationResults (per-citation status + details)
111
+
112
+ Phase 3: Report & Fix
113
+ └─ Ref: phases/03-report-fix.md
114
+ ├─ Input: verificationResults, autoFix
115
+ └─ Output: report.md + optionally fixed .bib file
116
+ ```
117
+
118
+ **Phase Reference Documents** (read on-demand when phase executes):
119
+
120
+ | Phase | Document | Purpose | Compact |
121
+ |-------|----------|---------|---------|
122
+ | 1 | [phases/01-scan-extract.md](phases/01-scan-extract.md) | Scan files, extract citations | TodoWrite driven |
123
+ | 2 | [phases/02-verify.md](phases/02-verify.md) | 4-layer verification | TodoWrite driven + sentinel |
124
+ | 3 | [phases/03-report-fix.md](phases/03-report-fix.md) | Generate report, apply fixes | TodoWrite driven |
125
+
126
+ **Compact Rules**:
127
+ 1. **TodoWrite `in_progress`** → preserve full content, do not compress
128
+ 2. **TodoWrite `completed`** → may compress to summary
129
+ 3. **sentinel fallback** → phases marked with sentinel contain compact sentinel; if only sentinel remains, **must immediately `Read()` to recover**
130
+
131
+ ## Core Rules
132
+
133
+ 1. **Every citation must be checked**: No citation passes without at least existence verification.
134
+ 2. **Use real APIs**: Verify via WebSearch, Google Scholar, Semantic Scholar, CrossRef, arXiv — never trust memory.
135
+ 3. **Mark failures clearly**: Use `[CITATION NEEDED]` for unverifiable references.
136
+ 4. **Preserve user's formatting choices**: When auto-fixing, only fix errors, don't restyle.
137
+ 5. **Report honestly**: Show verification confidence levels, don't hide partial matches.
138
+
139
+ ## Data Flow
140
+
141
+ ```
142
+ Phase 1 ──citationEntries──→ Phase 2
143
+ Phase 2 ──verificationResults──→ Phase 3
144
+
145
+ Data persistence: Results written to paperDir/.verify/
146
+ paperDir/.verify/
147
+ ├── citations-extracted.json (Phase 1 output)
148
+ ├── verification-results.json (Phase 2 output)
149
+ ├── verification-report.md (Phase 3 output)
150
+ └── references-fixed.bib (Phase 3 output, if autoFix)
151
+ ```
152
+
153
+ ## Error Handling
154
+
155
+ | Error | Action |
156
+ |-------|--------|
157
+ | No .tex/.bib files found | Ask user for correct directory |
158
+ | API rate limit hit | Wait and retry with exponential backoff |
159
+ | Citation not found in any API | Mark as `[CITATION NEEDED]`, continue |
160
+ | BibTeX parse error | Report unparseable entry, skip and continue |
161
+ | Network unavailable | Fall back to format-only verification |
162
+
163
+ ## Related Skills
164
+
165
+ - **scholar-writing**: Phase 4 (Citation Management) uses these verification principles
166
+ - **scholar-review**: References verification as part of paper quality check