mirror of
https://github.com/IgorWarzocha/Opencode-Workflows.git
synced 2026-09-14 16:22:53 +08:00
2f1583e227
Replace the Commander-based CLI with a TUI built on Bun, Solid.js, and OpenTUI. This version provides hierarchical navigation for selecting workflow packs and standalone items. - Migrate code from packages/cli to howaboua-cli - Support global (~/.config/opencode/) and local (.opencode/) sync - Add one-shot verification rules to howaboua-cli/AGENTS.md
1.6 KiB
1.6 KiB
## Verification & Dev Flow
This project is a **Workflow Selector CLI** built with Bun, Solid.js, and OpenTUI.
- **Type Check**: `bun x tsc --noEmit` (MANDATORY verification command).
- **Execution**: `bun run src/index.tsx` (PROHIBITED; direct execution is for users only).
- **Dev Mode**: `bun run --watch src/index.tsx` (PROHIBITED; long-running process).
- **Constraints**: MUST NOT run `bun run src/index.tsx` or `bun run dev`. MUST use one-shot verification commands like `tsc`.
## Technical Conventions
- **Solid.js + OpenTUI**: Uses `@opentui/solid` for TUI rendering. Follow Solid.js reactive patterns (`createSignal`, `createMemo`, `Show`, `For`).
- **Keyboard Handling**: Use the `useKeyboard` hook from `@opentui/solid` for input management.
- **Registry Management**: Interacts with `registry.json` at the repository root. Uses `fs-extra` for file operations.
- **RFC 2119**: MUST use uppercase keywords (MUST, SHOULD, MAY) for requirements.
## Task Navigation
| Feature | Path |
|---------|------|
| TUI Components & UI Logic | `src/index.tsx` |
| Sync & File Ops Logic | `src/index.tsx` (see `performSync`) |
| Registry Definition | `../registry.json` |
| TS Configuration | `tsconfig.json` |
## Architecture Details
- **Path Resolution**: The app resolves `ROOT_DIR` relative to `src/index.tsx` (pointing two levels up).
- **Registry Structure**: Supports `packs` (collections) and `standalone` items (agents, skills, commands, docs).
- **Target Paths**: Specialized items are automatically prefixed with `.opencode/` unless already present.