|
11 | 11 | ### 1.1 Project Structure |
12 | 12 |
|
13 | 13 | - [x] Create directory structure: |
14 | | - - `src/extractors/builtin/basic-astro/` |
15 | | - - `src/extractors/builtin/basic-astro/index.ts` |
| 14 | + - `src/extractors/builtin/basic-astro.ts` (entry point) |
| 15 | + - `src/extractors/builtin/basic-astro/` (helper modules) |
16 | 16 | - `src/extractors/builtin/basic-astro/types.ts` |
17 | 17 | - `src/extractors/builtin/basic-astro/file-finder.ts` |
18 | 18 | - `src/extractors/builtin/basic-astro/file-parser.ts` |
|
142 | 142 |
|
143 | 143 | ### 4.1 JSDoc Tag Extraction |
144 | 144 |
|
145 | | -- [ ] Implement `extractFileComponent()` in `component-detector.ts`: |
| 145 | +- [x] Implement `extractFileComponent()` in `component-detector.ts`: |
146 | 146 | - Parse frontmatter for JSDoc comments |
147 | 147 | - Support `@component`, `@module`, `@namespace` tags |
148 | 148 | - Extract component name and description |
149 | 149 | - Use `sanitizeId()` for IDs |
150 | 150 |
|
151 | | -- [ ] Implement `extractFileActors()`: |
| 151 | +- [x] Implement `extractFileActors()`: |
152 | 152 | - Parse `@actor` tags from frontmatter JSDoc |
153 | 153 | - Format: `@actor Name {Person|System} {in|out|both}? description` |
154 | 154 | - Use `sanitizeId()` for actor IDs |
155 | 155 |
|
156 | | -- [ ] Implement `extractFileRelationships()`: |
| 156 | +- [x] Implement `extractFileRelationships()`: |
157 | 157 | - Parse `@uses` tags from frontmatter JSDoc |
158 | 158 | - Create component dependencies |
159 | 159 |
|
160 | 160 | **Commit:** `feat: implement JSDoc tag extraction for Astro components` |
161 | 161 |
|
162 | 162 | ### 4.2 Folder-Based Inference |
163 | 163 |
|
164 | | -- [ ] Implement `inferComponentFromPath()`: |
| 164 | +- [x] Implement `inferComponentFromPath()`: |
165 | 165 | - Use immediate parent folder name as component |
166 | 166 | - Use `ROOT_COMPONENT_MARKER` for root directory files |
167 | 167 | - Match basic-node behavior exactly |
|
170 | 170 |
|
171 | 171 | ### 4.3 Testing Component Detection |
172 | 172 |
|
173 | | -- [ ] Test explicit `@component` tags |
174 | | -- [ ] Test folder-based inference |
175 | | -- [ ] Test root directory handling |
176 | | -- [ ] Test `@actor` and `@uses` tags |
| 173 | +- [x] Test explicit `@component` tags |
| 174 | +- [x] Test folder-based inference |
| 175 | +- [x] Test root directory handling |
| 176 | +- [x] Test `@actor` and `@uses` tags |
177 | 177 |
|
178 | 178 | **Commit:** `test: add tests for Astro component detection` |
179 | 179 |
|
|
183 | 183 |
|
184 | 184 | ### 5.1 TypeScript Code Extraction |
185 | 185 |
|
186 | | -- [ ] Extract classes from frontmatter |
187 | | -- [ ] Extract functions from frontmatter |
188 | | -- [ ] Extract interfaces/types (component props) |
189 | | - |
190 | | -- [ ] Extract constants/variables |
191 | | -- [ ] Follow basic-node code extraction patterns |
| 186 | +- [x] Extract classes from frontmatter |
| 187 | +- [x] Extract functions from frontmatter |
| 188 | +- [x] Extract interfaces/types (component props) |
| 189 | +- [x] Extract constants/variables |
| 190 | +- [x] Follow basic-node code extraction patterns |
192 | 191 |
|
193 | 192 | **Commit:** `feat: extract TypeScript code items from Astro frontmatter` |
194 | 193 |
|
195 | 194 | ### 5.2 Documentation Extraction |
196 | 195 |
|
197 | | -- [ ] Extract JSDoc from classes/functions |
198 | | - |
199 | | -- [ ] Support `@example`, `@remarks`, `@deprecated` |
200 | | -- [ ] Extract parameter descriptions |
201 | | -- [ ] Extract return types/descriptions |
| 196 | +- [x] Extract JSDoc from classes/functions |
| 197 | +- [x] Support `@example`, `@remarks`, `@deprecated` |
| 198 | +- [x] Extract parameter descriptions |
| 199 | +- [x] Extract return types/descriptions |
202 | 200 |
|
203 | 201 | **Commit:** `feat: extract documentation from Astro component code` |
204 | 202 |
|
205 | 203 | ### 5.3 Component Metadata |
206 | 204 |
|
207 | | -- [ ] Extract component props (TypeScript interface) |
208 | | -- [ ] Extract slots (named and default) |
209 | | -- [ ] Extract client directives (affects architecture) |
210 | | -- [ ] Store as code item metadata |
| 205 | +- [x] Extract component props (TypeScript interface) |
| 206 | +- [x] Extract slots (named and default) |
| 207 | +- [x] Extract client directives (affects architecture) |
| 208 | +- [x] Store as code item metadata |
211 | 209 |
|
212 | 210 | **Commit:** `feat: extract Astro-specific component metadata (props, slots, directives)` |
213 | 211 |
|
214 | 212 | ### 5.4 Testing Code Extraction |
215 | 213 |
|
216 | | -- [ ] Test class extraction |
217 | | -- [ ] Test function extraction |
218 | | -- [ ] Test prop interface extraction |
219 | | - |
220 | | -- [ ] Test documentation extraction |
| 214 | +- [x] Test class extraction |
| 215 | +- [x] Test function extraction |
| 216 | +- [x] Test prop interface extraction |
| 217 | +- [x] Test documentation extraction |
221 | 218 |
|
222 | 219 | **Commit:** `test: add tests for code extraction from Astro files` |
223 | 220 |
|
|
227 | 224 |
|
228 | 225 | ### 6.1 Basic IR Structure |
229 | 226 |
|
230 | | -- [ ] Implement `mapToIR()` in `to-ir-mapper.ts`: |
| 227 | +- [x] Implement `mapToIR()` in `to-ir-mapper.ts`: |
231 | 228 | - Aggregate components, actors, relationships |
232 | 229 | - Create code items array |
233 | 230 | - Follow basic-node mapping pattern exactly |
|
236 | 233 |
|
237 | 234 | ### 6.2 Container Detection |
238 | 235 |
|
239 | | -- [ ] Map files to nearest package.json |
240 | | -- [ ] Create containers from packages |
241 | | -- [ ] Handle files without packages (default container) |
242 | | -- [ ] Match basic-node container logic |
| 236 | +- [x] Map files to nearest package.json |
| 237 | +- [x] Create containers from packages |
| 238 | +- [x] Handle files without packages (default container) |
| 239 | +- [x] Match basic-node container logic |
243 | 240 |
|
244 | 241 | **Commit:** `feat: implement container detection and assignment` |
245 | 242 |
|
246 | 243 | ### 6.3 Hierarchical IDs |
247 | 244 |
|
248 | | -- [ ] Build `componentIdMap` (old ID → new ID) |
249 | | -- [ ] Apply container-level IDs: `${containerId}__${componentId}` |
250 | | -- [ ] Handle `ROOT_COMPONENT_MARKER` replacement |
251 | | -- [ ] Apply code-level IDs: `${componentId}__${codeName}` |
252 | | -- [ ] Update all relationship references |
| 245 | +- [x] Build `componentIdMap` (old ID → new ID) |
| 246 | +- [x] Apply container-level IDs: `${containerId}__${componentId}` |
| 247 | +- [x] Handle `ROOT_COMPONENT_MARKER` replacement |
| 248 | +- [x] Apply code-level IDs: `${componentId}__${codeName}` |
| 249 | +- [x] Update all relationship references |
253 | 250 |
|
254 | 251 | **Commit:** `feat: implement hierarchical ID system for Astro IR` |
255 | 252 |
|
256 | 253 | ### 6.4 Relationship Mapping |
257 | 254 |
|
258 | | -- [ ] Map component → component relationships |
259 | | -- [ ] Map component → actor relationships |
260 | | -- [ ] Handle actor direction (in/out/both) |
261 | | -- [ ] Deduplicate relationships |
| 255 | +- [x] Map component → component relationships |
| 256 | +- [x] Map component → actor relationships |
| 257 | +- [x] Handle actor direction (in/out/both) |
| 258 | +- [x] Deduplicate relationships |
262 | 259 |
|
263 | 260 | **Commit:** `feat: map Astro component relationships to IR` |
264 | 261 |
|
265 | 262 | ### 6.5 Testing IR Mapping |
266 | 263 |
|
267 | | -- [ ] Test component mapping |
268 | | -- [ ] Test hierarchical ID generation |
269 | | - |
270 | | -- [ ] Test ROOT_COMPONENT_MARKER replacement |
271 | | -- [ ] Test relationship mapping |
272 | | -- [ ] Test container assignment |
| 264 | +- [x] Test component mapping |
| 265 | +- [x] Test hierarchical ID generation |
| 266 | +- [x] Test ROOT_COMPONENT_MARKER replacement |
| 267 | +- [x] Test relationship mapping |
| 268 | +- [x] Test container assignment |
273 | 269 |
|
274 | 270 | **Commit:** `test: add comprehensive IR mapping tests` |
275 | 271 |
|
|
279 | 275 |
|
280 | 276 | ### 7.1 Orchestration |
281 | 277 |
|
282 | | -- [ ] Implement main extractor in `index.ts`: |
| 278 | +- [x] Implement main extractor in `index.ts`: |
283 | 279 | - Parse inputs (include, exclude patterns) |
284 | 280 | - Call file finder |
285 | 281 | - Call parser |
|
291 | 287 |
|
292 | 288 | ### 7.2 Export Configuration |
293 | 289 |
|
294 | | -- [ ] Export as default for dynamic loading |
295 | | -- [ ] Implement `ArchletteExtractor` interface |
296 | | -- [ ] Match basic-node/basic-python patterns |
| 290 | +- [x] Export as default for dynamic loading |
| 291 | +- [x] Implement `ArchletteExtractor` interface |
| 292 | +- [x] Match basic-node/basic-python patterns |
297 | 293 |
|
298 | 294 | **Commit:** `feat: configure Astro extractor for dynamic loading` |
299 | 295 |
|
|
0 commit comments