Skip to content

Commit 1fd205b

Browse files
committed
fix: correct postInstall comment and expand How to Add a Feature guide
postInstall field comment said "for agents and TUI" but only agents use it — TUI hardcodes its own richer display. Updated to "for non-interactive JSON output". Expanded the feature checklist to include PostInstall.tsx and cli.tsx --help text as manual steps.
1 parent 4f33846 commit 1fd205b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

architecture.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ featureDefinitions: Record<FeatureName, {
6969
label: string // TUI multiselect display
7070
packages: string[] // pnpm packages to remove when deselected
7171
default: boolean // --info output
72-
postInstall?: string[] // post-install instructions for agents and TUI
72+
postInstall?: string[] // post-install instructions for non-interactive JSON output
7373
}>
7474
```
7575

@@ -168,11 +168,15 @@ Components are presentation-only — they call operations via `useEffect` and re
168168

169169
2. **`source/operations/cleanupFiles.ts`** — add a cleanup function and call it from `cleanupFiles()` when the feature is deselected. If the feature has scripts in package.json, add removal to `patchPackageJson`.
170170

171-
3. **Tests**add test cases in `source/__tests__/operations/cleanupFiles.test.ts` for the new cleanup rules. The nonInteractive, info, installPackages, and utils tests pick up new features automatically since they read from `featureDefinitions`.
171+
3. **`source/components/steps/PostInstall.tsx`**if the feature has post-install instructions, add TUI rendering here. The component hardcodes its own display (richer than the `postInstall` strings in config), so new features with post-install steps need manual JSX.
172172

173-
4. **Verify**`pnpm build && pnpm lint && pnpm test`
173+
4. **`source/cli.tsx`**update the `--help` text to include the new feature name and description.
174174

175-
Steps 1 and 4 are always required. Steps 2-3 only apply if the feature has files/folders to clean up.
175+
5. **Tests** — add test cases in `source/__tests__/operations/cleanupFiles.test.ts` for the new cleanup rules. The nonInteractive, info, installPackages, and utils tests pick up new features automatically since they read from `featureDefinitions`.
176+
177+
6. **Verify**`pnpm build && pnpm lint && pnpm test`
178+
179+
Steps 1 and 6 are always required. Steps 2-5 depend on whether the feature has cleanup rules, post-install instructions, or descriptions for `--help`.
176180

177181
## How to Add a New Operation
178182

0 commit comments

Comments
 (0)