Skip to content

Add TypeScript interfaces for Epic/Task frontmatter#69

Merged
johnproblems merged 2 commits intoenhancementsfrom
copilot/create-typescript-interfaces
Dec 3, 2025
Merged

Add TypeScript interfaces for Epic/Task frontmatter#69
johnproblems merged 2 commits intoenhancementsfrom
copilot/create-typescript-interfaces

Conversation

Copy link
Copy Markdown

Copilot AI commented Nov 30, 2025

Defines TypeScript types for Epic and Task frontmatter to provide type safety and IntelliSense when working with .claude/epics/ file metadata.

Changes

  • src/types/frontmatter.ts - Core type definitions:

    • TaskStatus: 'open' | 'in_progress' | 'blocked' | 'completed' | 'cancelled'
    • EpicStatus: 'backlog' | 'in_progress' | 'completed' | 'cancelled'
    • TaskFrontmatter / EpicFrontmatter interfaces matching actual file structure
    • ParsedTaskFrontmatter / ParsedEpicFrontmatter variants with optional fields for lenient parsing
    • Type guards isTaskStatus() / isEpicStatus() for runtime validation
    • TASK_STATUS_VALUES / EPIC_STATUS_VALUES arrays for iteration
  • src/types/index.ts - Central re-exports

  • src/test/suite/frontmatter.test.ts - Unit tests for type guards and interface validation

Usage

import { TaskFrontmatter, isTaskStatus } from './types';

const task: TaskFrontmatter = {
  name: 'Initialize extension',
  status: 'open',
  created: '2025-10-04T12:22:30Z',
  updated: '2025-10-04T12:39:29Z',
  github: 'https://github.com/johnproblems/formaltask/issues/2',
  depends_on: [1, 'Task 3.md'],
  parallel: true,
  conflicts_with: []
};

if (isTaskStatus(rawStatus)) {
  // rawStatus is narrowed to TaskStatus
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • update.code.visualstudio.com
    • Triggering command: /usr/local/bin/node node ./out/test/runTest.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Create TypeScript interfaces for Epic/Task frontmatter</issue_title>
<issue_description>

Task: Create TypeScript interfaces for Epic/Task frontmatter

Description

Define TypeScript interfaces that represent the structure of Epic and Task frontmatter. These interfaces will provide type safety and IntelliSense support when working with Epic and Task metadata throughout the VSCode extension.

Acceptance Criteria

  • EpicFrontmatter interface created with all required fields (name, status, created, updated, github, etc.)
  • TaskFrontmatter interface created with all required fields (name, status, created, updated, github, depends_on, parallel, conflicts_with)
  • Shared types/enums created for common fields (e.g., TaskStatus, EpicStatus)
  • Interfaces exported from a central types file

Technical Details

  • Create a new types/frontmatter.ts file in the extension source
  • Define Status enum: 'open', 'in_progress', 'blocked', 'completed', 'cancelled'
  • Include ISO 8601 date string types for created/updated fields
  • Add JSDoc comments for all interfaces and fields
  • Consider using string literal types for status fields
  • Files affected: src/types/frontmatter.ts (new file)

Dependencies

  • None - this is a foundational task

Effort Estimate

  • Size: XS
  • Hours: 2
  • Parallel: true

Definition of Done

  • Code implemented
  • Tests written and passing
  • Documentation updated
  • Code reviewed
    </issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: johnproblems <124836611+johnproblems@users.noreply.github.com>
Copilot AI changed the title [WIP] Create TypeScript interfaces for Epic and Task frontmatter Add TypeScript interfaces for Epic/Task frontmatter Nov 30, 2025
Copilot AI requested a review from johnproblems November 30, 2025 09:48
Copy link
Copy Markdown
Owner

@johnproblems johnproblems left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Good!

@johnproblems johnproblems marked this pull request as ready for review December 3, 2025 16:15
@johnproblems johnproblems merged commit 509bcb1 into enhancements Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create TypeScript interfaces for Epic/Task frontmatter

2 participants