Skip to content
Back to skills

188 Fn 93 9a9959c1

ASecurity

Define TypeScript types/interfaces for all data structures.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added May 31, 2026
testingtypescriptbashtesting

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned May 31, 2026

npx -y skills add tools-only/X-Skills --skill 188-fn-93_9a9959c1 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 188 Fn 93 9a9959c1?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 188 Fn 93 9a9959c1
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-188-fn-93-9a9959c1/badge)](https://www.skillsdirectory.com/skills/tools-only-188-fn-93-9a9959c1)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# fn-9.3 Types and interfaces

## Description

Define TypeScript types/interfaces for all data structures.

### File

`src/lib/types.ts`

### Types needed

```typescript
// NOTE: Status values match flowctl.py EPIC_STATUS and TASK_STATUS constants
interface Epic {
  id: string;          // fn-N
  title: string;
  status: 'open' | 'done';  // flowctl EPIC_STATUS
  branch_name: string;
  spec_path: string;
}

interface Task {
  id: string;          // fn-N.M
  epic: string;
  title: string;
  status: 'todo' | 'in_progress' | 'done' | 'blocked';  // flowctl TASK_STATUS
  depends_on: string[];
  spec_path: string;
}

interface Run {
  id: string;          // YYYY-MM-DD-NNN
  path: string;        // full path to run dir
  epic?: string;
  active: boolean;
  iteration: number;
}

interface LogEntry {
  type: 'tool' | 'response' | 'error';
  tool?: string;       // Read, Write, Bash, etc.
  content: string;
  success?: boolean;
}

type TaskStatus = Task['status'];
type RunState = 'running' | 'complete' | 'crashed';
```

### Matching flowctl JSON output

Types should match structure from `flowctl --json` commands.

### Test fixtures

Create `test/fixtures/` with sample JSON:
- `epic.json` - sample epic from `flowctl show fn-9 --json`
- `task.json` - sample task from `flowctl show fn-9.1 --json`
- `tasks.json` - sample tasks from `flowctl tasks --epic fn-9 --json`
- `ready.json` - sample from `flowctl ready --epic fn-9 --json`

Use fixtures in tests to validate type compatibility.
## Acceptance
- [ ] All types exportable from `./lib/types`
- [ ] Types match flowctl JSON output structure
- [ ] Test fixtures in `test/fixtures/` validate types
- [ ] No `any` types
- [ ] TypeScript compiles without errors
## Done summary
- Added complete TypeScript types matching flowctl JSON output
- Created Epic, Task, Run, LogEntry, ReadyResponse interfaces
- Added test fixtures from actual flowctl output (epic.json, task.json, ready.json)
- Tests validate type compatibility

Why:
- TUI needs typed parsing of flowctl commands
- Fixtures enable testing without live flowctl

Verification:
- bun test passes (4 tests)
- bun run lint passes (0 warnings)
- bunx tsc --noEmit passes
## Evidence
- Commits: 2a78dc25c8c99da4c44f83ce1cb6b2d9dfffd829
- Tests: bun test, bun run lint, bunx tsc --noEmit
- PRs:

Files in this skill

  • README.md820 B
  • skill.md2.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.