wtf-p 0.4.0 → 0.5.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 (175) hide show
  1. package/README.md +146 -226
  2. package/bin/commands/doctor.js +88 -2
  3. package/bin/commands/install-logic.js +121 -26
  4. package/bin/commands/status.js +22 -4
  5. package/bin/commands/update.js +5 -4
  6. package/bin/install.js +66 -26
  7. package/bin/lib/checkpoint.js +183 -0
  8. package/bin/lib/context-primer.js +214 -0
  9. package/bin/lib/manifest.js +62 -2
  10. package/bin/lib/utils.js +22 -1
  11. package/bin/uninstall.js +270 -111
  12. package/core/write-the-f-paper/references/agent-model-matrix.md +62 -0
  13. package/core/write-the-f-paper/references/checkpoints.md +160 -9
  14. package/core/write-the-f-paper/references/context-fidelity.md +153 -0
  15. package/core/write-the-f-paper/references/deviation-rules.md +150 -0
  16. package/core/write-the-f-paper/references/git-integration.md +80 -0
  17. package/core/write-the-f-paper/references/orchestrator-pattern.md +167 -0
  18. package/core/write-the-f-paper/references/planning-config.md +135 -0
  19. package/core/write-the-f-paper/references/ui-brand.md +186 -0
  20. package/core/write-the-f-paper/templates/UAT.md +80 -0
  21. package/core/write-the-f-paper/templates/base-prefs.yaml +42 -0
  22. package/core/write-the-f-paper/templates/config.json +31 -5
  23. package/core/write-the-f-paper/workflows/create-outline.wcn.md +1 -1
  24. package/core/write-the-f-paper/workflows/execute-outline.md +163 -0
  25. package/core/write-the-f-paper/workflows/execute-outline.wcn.md +73 -0
  26. package/core/write-the-f-paper/workflows/execute-section.wcn.md +141 -169
  27. package/core/write-the-f-paper/workflows/plan-section.wcn.md +96 -103
  28. package/core/write-the-f-paper/workflows/research-gap.md +27 -3
  29. package/core/write-the-f-paper/workflows/research-gap.wcn.md +18 -1
  30. package/core/write-the-f-paper/workflows/verify-work.md +251 -0
  31. package/core/write-the-f-paper/workflows/verify-work.wcn.md +74 -0
  32. package/package.json +19 -7
  33. package/vendors/claude/.claude-plugin/plugin.json +2 -2
  34. package/vendors/claude/agents/wtfp/argument-verifier.md +189 -0
  35. package/vendors/claude/agents/wtfp/citation-expert.md +1 -1
  36. package/vendors/claude/agents/wtfp/citation-formatter.md +1 -1
  37. package/vendors/claude/agents/wtfp/coherence-checker.md +167 -0
  38. package/vendors/claude/agents/wtfp/outliner.md +259 -0
  39. package/vendors/claude/agents/wtfp/plan-checker.md +249 -0
  40. package/vendors/claude/agents/wtfp/prose-polisher.md +166 -0
  41. package/vendors/claude/agents/wtfp/research-synthesizer.md +215 -0
  42. package/vendors/claude/agents/wtfp/section-planner.md +364 -0
  43. package/vendors/claude/agents/wtfp/section-reviewer.md +182 -0
  44. package/vendors/claude/agents/wtfp/section-writer.md +312 -0
  45. package/vendors/claude/commands/wtfp/add-todo.md +108 -0
  46. package/vendors/claude/commands/wtfp/analyze-bib.md +58 -236
  47. package/vendors/claude/commands/wtfp/audit-milestone.md +286 -0
  48. package/vendors/claude/commands/wtfp/check-refs.md +60 -133
  49. package/vendors/claude/commands/wtfp/check-todos.md +152 -0
  50. package/vendors/claude/commands/wtfp/checkpoint.md +105 -0
  51. package/vendors/claude/commands/wtfp/contribute.md +1 -1
  52. package/vendors/claude/commands/wtfp/create-outline.md +109 -195
  53. package/vendors/claude/commands/wtfp/create-poster.md +1 -1
  54. package/vendors/claude/commands/wtfp/create-slides.md +1 -1
  55. package/vendors/claude/commands/wtfp/discuss-section.md +1 -1
  56. package/vendors/claude/commands/wtfp/execute-outline.md +257 -0
  57. package/vendors/claude/commands/wtfp/export-latex.md +1 -1
  58. package/vendors/claude/commands/wtfp/help.md +174 -280
  59. package/vendors/claude/commands/wtfp/insert-section.md +1 -1
  60. package/vendors/claude/commands/wtfp/list-assumptions.md +1 -1
  61. package/vendors/claude/commands/wtfp/map-project.md +35 -124
  62. package/vendors/claude/commands/wtfp/new-paper.md +85 -320
  63. package/vendors/claude/commands/wtfp/pause-writing.md +1 -1
  64. package/vendors/claude/commands/wtfp/plan-milestone-gaps.md +255 -0
  65. package/vendors/claude/commands/wtfp/plan-revision.md +1 -1
  66. package/vendors/claude/commands/wtfp/plan-section.md +165 -190
  67. package/vendors/claude/commands/wtfp/polish-prose.md +66 -118
  68. package/vendors/claude/commands/wtfp/progress.md +82 -254
  69. package/vendors/claude/commands/wtfp/quick.md +107 -0
  70. package/vendors/claude/commands/wtfp/remove-section.md +1 -1
  71. package/vendors/claude/commands/wtfp/report-bug.md +1 -1
  72. package/vendors/claude/commands/wtfp/request-feature.md +1 -1
  73. package/vendors/claude/commands/wtfp/research-gap.md +138 -150
  74. package/vendors/claude/commands/wtfp/resume-writing.md +1 -1
  75. package/vendors/claude/commands/wtfp/review-section.md +55 -333
  76. package/vendors/claude/commands/wtfp/settings.md +197 -0
  77. package/vendors/claude/commands/wtfp/submit-milestone.md +248 -99
  78. package/vendors/claude/commands/wtfp/update.md +112 -0
  79. package/vendors/claude/commands/wtfp/verify-work.md +254 -0
  80. package/vendors/claude/commands/wtfp/write-section.md +144 -180
  81. package/vendors/gemini/agents/wtfp/argument-verifier.md +184 -0
  82. package/vendors/gemini/agents/wtfp/citation-expert.md +41 -0
  83. package/vendors/gemini/agents/wtfp/citation-formatter.md +38 -0
  84. package/vendors/gemini/agents/wtfp/coherence-checker.md +162 -0
  85. package/vendors/gemini/agents/wtfp/outliner.md +252 -0
  86. package/vendors/gemini/agents/wtfp/plan-checker.md +244 -0
  87. package/vendors/gemini/agents/wtfp/prose-polisher.md +158 -0
  88. package/vendors/gemini/agents/wtfp/research-synthesizer.md +205 -0
  89. package/vendors/gemini/agents/wtfp/section-planner.md +355 -0
  90. package/vendors/gemini/agents/wtfp/section-reviewer.md +175 -0
  91. package/vendors/gemini/agents/wtfp/section-writer.md +304 -0
  92. package/vendors/gemini/commands/wtfp/add-todo.toml +102 -0
  93. package/vendors/gemini/commands/wtfp/analyze-bib.toml +126 -0
  94. package/vendors/gemini/commands/wtfp/audit-milestone.toml +278 -0
  95. package/vendors/gemini/commands/wtfp/check-refs.toml +123 -0
  96. package/vendors/gemini/commands/wtfp/check-todos.toml +145 -0
  97. package/vendors/gemini/commands/wtfp/checkpoint.toml +96 -0
  98. package/vendors/gemini/commands/wtfp/contribute.toml +269 -0
  99. package/vendors/gemini/commands/wtfp/create-outline.toml +180 -0
  100. package/vendors/gemini/commands/wtfp/create-poster.toml +36 -0
  101. package/vendors/gemini/commands/wtfp/create-slides.toml +35 -0
  102. package/vendors/gemini/commands/wtfp/discuss-section.toml +62 -0
  103. package/vendors/gemini/commands/wtfp/execute-outline.toml +247 -0
  104. package/vendors/gemini/commands/wtfp/export-latex.toml +209 -0
  105. package/vendors/gemini/commands/wtfp/help.toml +184 -0
  106. package/vendors/gemini/commands/wtfp/insert-section.toml +123 -0
  107. package/vendors/gemini/commands/wtfp/list-assumptions.toml +104 -0
  108. package/vendors/gemini/commands/wtfp/map-project.toml +99 -0
  109. package/vendors/gemini/commands/wtfp/new-paper.toml +160 -0
  110. package/vendors/gemini/commands/wtfp/pause-writing.toml +140 -0
  111. package/vendors/gemini/commands/wtfp/plan-milestone-gaps.toml +249 -0
  112. package/vendors/gemini/commands/wtfp/plan-revision.toml +171 -0
  113. package/vendors/gemini/commands/wtfp/plan-section.toml +212 -0
  114. package/vendors/gemini/commands/wtfp/polish-prose.toml +114 -0
  115. package/vendors/gemini/commands/wtfp/progress.toml +145 -0
  116. package/vendors/gemini/commands/wtfp/quick.toml +96 -0
  117. package/vendors/gemini/commands/wtfp/remove-section.toml +140 -0
  118. package/vendors/gemini/commands/wtfp/report-bug.toml +126 -0
  119. package/vendors/gemini/commands/wtfp/request-feature.toml +155 -0
  120. package/vendors/gemini/commands/wtfp/research-gap.toml +214 -0
  121. package/vendors/gemini/commands/wtfp/resume-writing.toml +136 -0
  122. package/vendors/gemini/commands/wtfp/review-section.toml +121 -0
  123. package/vendors/gemini/commands/wtfp/settings.toml +191 -0
  124. package/vendors/gemini/commands/wtfp/submit-milestone.toml +351 -0
  125. package/vendors/gemini/commands/wtfp/update.toml +107 -0
  126. package/vendors/gemini/commands/wtfp/verify-work.toml +245 -0
  127. package/vendors/gemini/commands/wtfp/write-section.toml +228 -0
  128. package/vendors/opencode/agents/wtfp/argument-verifier.md +184 -0
  129. package/vendors/opencode/agents/wtfp/citation-expert.md +41 -0
  130. package/vendors/opencode/agents/wtfp/citation-formatter.md +38 -0
  131. package/vendors/opencode/agents/wtfp/coherence-checker.md +162 -0
  132. package/vendors/opencode/agents/wtfp/outliner.md +252 -0
  133. package/vendors/opencode/agents/wtfp/plan-checker.md +244 -0
  134. package/vendors/opencode/agents/wtfp/prose-polisher.md +158 -0
  135. package/vendors/opencode/agents/wtfp/research-synthesizer.md +205 -0
  136. package/vendors/opencode/agents/wtfp/section-planner.md +355 -0
  137. package/vendors/opencode/agents/wtfp/section-reviewer.md +175 -0
  138. package/vendors/opencode/agents/wtfp/section-writer.md +304 -0
  139. package/vendors/opencode/commands/wtfp/add-todo.md +103 -0
  140. package/vendors/opencode/commands/wtfp/analyze-bib.md +127 -0
  141. package/vendors/opencode/commands/wtfp/audit-milestone.md +279 -0
  142. package/vendors/opencode/commands/wtfp/check-refs.md +124 -0
  143. package/vendors/opencode/commands/wtfp/check-todos.md +146 -0
  144. package/vendors/opencode/commands/wtfp/checkpoint.md +97 -0
  145. package/vendors/opencode/commands/wtfp/contribute.md +266 -0
  146. package/vendors/opencode/commands/wtfp/create-outline.md +181 -0
  147. package/vendors/opencode/commands/wtfp/create-poster.md +37 -0
  148. package/vendors/opencode/commands/wtfp/create-slides.md +36 -0
  149. package/vendors/opencode/commands/wtfp/discuss-section.md +63 -0
  150. package/vendors/opencode/commands/wtfp/execute-outline.md +248 -0
  151. package/vendors/opencode/commands/wtfp/export-latex.md +210 -0
  152. package/vendors/opencode/commands/wtfp/help.md +185 -0
  153. package/vendors/opencode/commands/wtfp/insert-section.md +124 -0
  154. package/vendors/opencode/commands/wtfp/list-assumptions.md +105 -0
  155. package/vendors/opencode/commands/wtfp/map-project.md +100 -0
  156. package/vendors/opencode/commands/wtfp/new-paper.md +161 -0
  157. package/vendors/opencode/commands/wtfp/pause-writing.md +141 -0
  158. package/vendors/opencode/commands/wtfp/plan-milestone-gaps.md +250 -0
  159. package/vendors/opencode/commands/wtfp/plan-revision.md +174 -0
  160. package/vendors/opencode/commands/wtfp/plan-section.md +214 -0
  161. package/vendors/opencode/commands/wtfp/polish-prose.md +115 -0
  162. package/vendors/opencode/commands/wtfp/progress.md +146 -0
  163. package/vendors/opencode/commands/wtfp/quick.md +97 -0
  164. package/vendors/opencode/commands/wtfp/remove-section.md +141 -0
  165. package/vendors/opencode/commands/wtfp/report-bug.md +127 -0
  166. package/vendors/opencode/commands/wtfp/request-feature.md +156 -0
  167. package/vendors/opencode/commands/wtfp/research-gap.md +215 -0
  168. package/vendors/opencode/commands/wtfp/resume-writing.md +137 -0
  169. package/vendors/opencode/commands/wtfp/review-section.md +123 -0
  170. package/vendors/opencode/commands/wtfp/settings.md +192 -0
  171. package/vendors/opencode/commands/wtfp/submit-milestone.md +352 -0
  172. package/vendors/opencode/commands/wtfp/update.md +108 -0
  173. package/vendors/opencode/commands/wtfp/verify-work.md +246 -0
  174. package/vendors/opencode/commands/wtfp/write-section.md +228 -0
  175. package/vendors/claude/agents/wtfp/citation-retriever.md +0 -31
@@ -0,0 +1,214 @@
1
+ /**
2
+ * Context Primer - Section-specific context extraction
3
+ *
4
+ * Reduces context burn for long papers by loading only relevant
5
+ * portions of PROJECT.md, argument-map.md, etc. for each task.
6
+ */
7
+
8
+ const fs = require('fs');
9
+ const path = require('path');
10
+
11
+ /**
12
+ * Section type → relevant context files mapping
13
+ */
14
+ const SECTION_CONTEXT_MAP = {
15
+ abstract: ['argument-map.md', 'outline.md', 'narrative-arc.md'],
16
+ introduction: ['argument-map.md', 'narrative-arc.md'],
17
+ 'literature-review': ['argument-map.md'],
18
+ 'related-work': ['argument-map.md'],
19
+ methods: ['argument-map.md'],
20
+ results: ['argument-map.md'],
21
+ discussion: ['argument-map.md', 'narrative-arc.md'],
22
+ conclusion: ['argument-map.md', 'narrative-arc.md'],
23
+ // Grant-specific
24
+ 'specific-aims': ['argument-map.md'],
25
+ background: ['argument-map.md', 'narrative-arc.md'],
26
+ approach: ['argument-map.md'],
27
+ };
28
+
29
+ /**
30
+ * Extract relevant sections from PROJECT.md based on task type
31
+ * @param {string} projectContent - Full PROJECT.md content
32
+ * @param {string} taskType - Type of task (plan, write, review, research)
33
+ * @returns {string} - Filtered PROJECT.md content
34
+ */
35
+ function filterProject(projectContent, taskType) {
36
+ if (!projectContent) return '';
37
+
38
+ // Always include: What This Is, Core Argument
39
+ const alwaysSections = ['What This Is', 'Core Argument'];
40
+
41
+ // Task-specific sections
42
+ const taskSections = {
43
+ plan: ['Requirements', 'Target Audience', 'Constraints'],
44
+ write: ['Core Argument', 'Target Audience'],
45
+ review: ['Requirements', 'Core Argument', 'Constraints'],
46
+ research: ['Core Argument', 'Target Audience', 'Key Decisions'],
47
+ polish: ['Target Audience'],
48
+ };
49
+
50
+ const needed = [...alwaysSections, ...(taskSections[taskType] || alwaysSections)];
51
+ return extractSections(projectContent, needed);
52
+ }
53
+
54
+ /**
55
+ * Extract relevant structure files for a section type
56
+ * @param {string} planningDir - Path to .planning directory
57
+ * @param {string} sectionSlug - Section slug (e.g., 'introduction', 'methods')
58
+ * @returns {Object} - Map of filename → content
59
+ */
60
+ function getStructureContext(planningDir, sectionSlug) {
61
+ const structureDir = path.join(planningDir, 'structure');
62
+ const result = {};
63
+
64
+ // Normalize section slug for lookup
65
+ const normalized = sectionSlug.toLowerCase().replace(/\d+-/, '').replace(/\s+/g, '-');
66
+
67
+ // Find matching context files
68
+ const relevantFiles = SECTION_CONTEXT_MAP[normalized] || ['argument-map.md'];
69
+
70
+ for (const file of relevantFiles) {
71
+ const filePath = path.join(structureDir, file);
72
+ if (fs.existsSync(filePath)) {
73
+ result[file] = fs.readFileSync(filePath, 'utf8');
74
+ }
75
+ }
76
+
77
+ return result;
78
+ }
79
+
80
+ /**
81
+ * Load section-specific context (CONTEXT.md + RESEARCH.md)
82
+ * @param {string} sectionDir - Path to section directory
83
+ * @returns {Object} - { context, research }
84
+ */
85
+ function getSectionContext(sectionDir) {
86
+ const result = { context: '', research: '' };
87
+
88
+ if (!fs.existsSync(sectionDir)) return result;
89
+
90
+ const files = fs.readdirSync(sectionDir);
91
+ for (const f of files) {
92
+ if (f.endsWith('-CONTEXT.md')) {
93
+ result.context = fs.readFileSync(path.join(sectionDir, f), 'utf8');
94
+ }
95
+ if (f.endsWith('-RESEARCH.md')) {
96
+ result.research = fs.readFileSync(path.join(sectionDir, f), 'utf8');
97
+ }
98
+ }
99
+
100
+ return result;
101
+ }
102
+
103
+ /**
104
+ * Get prior section summaries relevant to current section
105
+ * @param {string} sectionsDir - Path to .planning/sections/
106
+ * @param {number} currentSection - Current section number
107
+ * @param {number} limit - Max characters to return
108
+ * @returns {string} - Concatenated relevant summaries
109
+ */
110
+ function getPriorSummaries(sectionsDir, currentSection, limit = 3000) {
111
+ if (!fs.existsSync(sectionsDir)) return '';
112
+
113
+ const dirs = fs.readdirSync(sectionsDir)
114
+ .filter(d => {
115
+ const num = parseInt(d.split('-')[0], 10);
116
+ return !isNaN(num) && num < currentSection;
117
+ })
118
+ .sort();
119
+
120
+ let output = '';
121
+ // Work backwards from most recent, within limit
122
+ for (const dir of dirs.reverse()) {
123
+ const dirPath = path.join(sectionsDir, dir);
124
+ const summaries = fs.readdirSync(dirPath).filter(f => f.endsWith('-SUMMARY.md'));
125
+
126
+ for (const s of summaries) {
127
+ const content = fs.readFileSync(path.join(dirPath, s), 'utf8');
128
+ // Extract just the header section (up to first ---)
129
+ const header = content.split('---')[0] || content.slice(0, 500);
130
+ if (output.length + header.length > limit) return output;
131
+ output = header + '\n---\n' + output;
132
+ }
133
+ }
134
+
135
+ return output;
136
+ }
137
+
138
+ /**
139
+ * Build complete primed context for an agent spawn
140
+ * @param {Object} options
141
+ * @param {string} options.planningDir - Path to .planning/
142
+ * @param {string} options.sectionDir - Path to section directory
143
+ * @param {number} options.sectionNumber - Section number
144
+ * @param {string} options.sectionSlug - Section slug
145
+ * @param {string} options.taskType - plan|write|review|research|polish
146
+ * @returns {Object} - All context pieces, filtered for relevance
147
+ */
148
+ function primeContext({ planningDir, sectionDir, sectionNumber, sectionSlug, taskType }) {
149
+ const projectPath = path.join(planningDir, 'PROJECT.md');
150
+ const statePath = path.join(planningDir, 'STATE.md');
151
+ const roadmapPath = path.join(planningDir, 'ROADMAP.md');
152
+ const sectionsDir = path.join(planningDir, 'sections');
153
+
154
+ const projectContent = fs.existsSync(projectPath)
155
+ ? fs.readFileSync(projectPath, 'utf8') : '';
156
+
157
+ return {
158
+ project: filterProject(projectContent, taskType),
159
+ state: fs.existsSync(statePath) ? fs.readFileSync(statePath, 'utf8') : '',
160
+ roadmap: fs.existsSync(roadmapPath) ? fs.readFileSync(roadmapPath, 'utf8') : '',
161
+ structure: getStructureContext(planningDir, sectionSlug),
162
+ section: getSectionContext(sectionDir),
163
+ priorSummaries: getPriorSummaries(sectionsDir, sectionNumber),
164
+ };
165
+ }
166
+
167
+ // --- Helpers ---
168
+
169
+ /**
170
+ * Extract named sections from markdown content
171
+ * @param {string} content - Markdown content
172
+ * @param {string[]} sectionNames - Section heading names to extract
173
+ * @returns {string} - Extracted sections joined
174
+ */
175
+ function extractSections(content, sectionNames) {
176
+ if (!content) return '';
177
+
178
+ const lines = content.split('\n');
179
+ const extracted = [];
180
+ let capturing = false;
181
+ let currentLevel = 0;
182
+
183
+ for (const line of lines) {
184
+ const headingMatch = line.match(/^(#{1,3})\s+(.+)/);
185
+
186
+ if (headingMatch) {
187
+ const level = headingMatch[1].length;
188
+ const name = headingMatch[2].trim();
189
+
190
+ if (sectionNames.some(s => name.includes(s))) {
191
+ capturing = true;
192
+ currentLevel = level;
193
+ extracted.push(line);
194
+ } else if (capturing && level <= currentLevel) {
195
+ capturing = false;
196
+ } else if (capturing) {
197
+ extracted.push(line);
198
+ }
199
+ } else if (capturing) {
200
+ extracted.push(line);
201
+ }
202
+ }
203
+
204
+ return extracted.join('\n');
205
+ }
206
+
207
+ module.exports = {
208
+ filterProject,
209
+ getStructureContext,
210
+ getSectionContext,
211
+ getPriorSummaries,
212
+ primeContext,
213
+ SECTION_CONTEXT_MAP,
214
+ };
@@ -52,8 +52,68 @@ const MANIFEST = {
52
52
  }
53
53
  ]
54
54
  },
55
- // Future:
56
- // gemini: { ... }
55
+ gemini: {
56
+ name: 'Gemini CLI',
57
+ configDirEnv: 'GEMINI_CONFIG_DIR',
58
+ defaultDir: '.config/gemini',
59
+ components: [
60
+ {
61
+ id: 'workflows',
62
+ src: path.join(ROOT, 'core', 'write-the-f-paper'),
63
+ dest: 'write-the-f-paper',
64
+ type: 'dir'
65
+ },
66
+ {
67
+ id: 'commands',
68
+ src: path.join(ROOT, 'vendors', 'gemini', 'commands', 'wtfp'),
69
+ dest: 'commands/wtfp',
70
+ type: 'dir'
71
+ },
72
+ {
73
+ id: 'agents',
74
+ src: path.join(ROOT, 'vendors', 'gemini', 'agents', 'wtfp'),
75
+ dest: 'agents/wtfp',
76
+ type: 'dir'
77
+ },
78
+ {
79
+ id: 'scripts',
80
+ src: path.join(ROOT, 'bin', 'lib'),
81
+ dest: 'bin',
82
+ type: 'dir'
83
+ }
84
+ ]
85
+ },
86
+ opencode: {
87
+ name: 'OpenCode',
88
+ configDirEnv: 'OPENCODE_CONFIG_DIR',
89
+ defaultDir: '.opencode',
90
+ components: [
91
+ {
92
+ id: 'workflows',
93
+ src: path.join(ROOT, 'core', 'write-the-f-paper'),
94
+ dest: 'write-the-f-paper',
95
+ type: 'dir'
96
+ },
97
+ {
98
+ id: 'commands',
99
+ src: path.join(ROOT, 'vendors', 'opencode', 'commands', 'wtfp'),
100
+ dest: 'commands/wtfp',
101
+ type: 'dir'
102
+ },
103
+ {
104
+ id: 'agents',
105
+ src: path.join(ROOT, 'vendors', 'opencode', 'agents', 'wtfp'),
106
+ dest: 'agents/wtfp',
107
+ type: 'dir'
108
+ },
109
+ {
110
+ id: 'scripts',
111
+ src: path.join(ROOT, 'bin', 'lib'),
112
+ dest: 'bin',
113
+ type: 'dir'
114
+ }
115
+ ]
116
+ }
57
117
  };
58
118
 
59
119
  module.exports = MANIFEST;
package/bin/lib/utils.js CHANGED
@@ -160,21 +160,33 @@ function detectInstallation(vendorDir) {
160
160
  hasCommands: false,
161
161
  hasWorkflows: false,
162
162
  hasSkills: false,
163
+ hasAgents: false,
164
+ hasMcp: false,
165
+ hasBin: false,
163
166
  version: null,
164
167
  partial: false,
165
168
  corrupt: false,
166
169
  commandFiles: [],
167
170
  workflowFiles: [],
168
- skillFiles: []
171
+ skillFiles: [],
172
+ agentFiles: [],
173
+ mcpFiles: [],
174
+ binFiles: []
169
175
  };
170
176
 
171
177
  const commandsDir = path.join(vendorDir, 'commands', 'wtfp');
172
178
  const workflowsDir = path.join(vendorDir, 'write-the-f-paper');
173
179
  const skillsDir = path.join(vendorDir, 'skills', 'wtfp');
180
+ const agentsDir = path.join(vendorDir, 'agents', 'wtfp');
181
+ const mcpDir = path.join(vendorDir, 'mcp');
182
+ const binDir = path.join(vendorDir, 'bin');
174
183
 
175
184
  result.hasCommands = fs.existsSync(commandsDir);
176
185
  result.hasWorkflows = fs.existsSync(workflowsDir);
177
186
  result.hasSkills = fs.existsSync(skillsDir);
187
+ result.hasAgents = fs.existsSync(agentsDir);
188
+ result.hasMcp = fs.existsSync(mcpDir);
189
+ result.hasBin = fs.existsSync(binDir);
178
190
 
179
191
  if (result.hasCommands) {
180
192
  result.commandFiles = collectFiles(commandsDir);
@@ -185,6 +197,15 @@ function detectInstallation(vendorDir) {
185
197
  if (result.hasSkills) {
186
198
  result.skillFiles = collectFiles(skillsDir);
187
199
  }
200
+ if (result.hasAgents) {
201
+ result.agentFiles = collectFiles(agentsDir);
202
+ }
203
+ if (result.hasMcp) {
204
+ result.mcpFiles = collectFiles(mcpDir);
205
+ }
206
+ if (result.hasBin) {
207
+ result.binFiles = collectFiles(binDir);
208
+ }
188
209
 
189
210
  // Read version info
190
211
  const versionData = readInstalledVersion(vendorDir);