Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/skills/example-data-pipeline-skill.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: data-pipeline
description: Expert in ETL and data processing workflows

instructions: |
When planning a data pipeline project, structure work into these phases:

1. **Data Extraction**: Source connections and data retrieval
- Set up connectors to data sources (databases, APIs, files)
- Implement scheduled or event-driven extraction
- Handle authentication and connection pooling
- Add retry logic and error handling

2. **Data Transformation**: Processing and enrichment
- Design transformation logic (cleaning, validation, enrichment)
- Implement data quality checks
- Create reusable transformation functions
- Add data lineage tracking

3. **Data Loading**: Destination setup and loading
- Configure target database/warehouse schema
- Implement batch or streaming loading
- Add idempotency and deduplication
- Set up incremental loading strategies

4. **Monitoring & Observability**: Health and performance tracking
- Configure logging for each pipeline stage
- Set up alerts for failures and data quality issues
- Create dashboards for pipeline metrics
- Implement data reconciliation checks

Consider idempotency, error handling, and data quality throughout.
Maximize parallelism where independent transformations can run concurrently.

examples:
- input: "Build ETL pipeline from REST API to data warehouse"
tasks:
- Create API connector with authentication
- Implement data extraction scheduler
- Build transformation functions for data cleaning
- Design target warehouse schema
- Implement batch loading with deduplication
- Add error handling and retry logic
- Configure monitoring and alerting
- Create data quality validation tests

- input: "Real-time streaming pipeline from Kafka to analytics DB"
tasks:
- Setup Kafka consumer with proper offset management
- Implement real-time transformation logic
- Configure target database for streaming writes
- Add exactly-once processing guarantees
- Setup monitoring dashboard
- Create backfill process for historical data
63 changes: 63 additions & 0 deletions .github/skills/example-web-app-skill.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: web-app
description: Expert in web application development with frontend, backend, and deployment tasks

instructions: |
When planning a web application project, follow these best practices:

1. **Frontend Tasks**: Break down UI work into distinct components
- Set up UI framework (React, Vue, Angular, etc.)
- Create reusable component library
- Implement routing and navigation
- Add state management if needed
- Style with CSS framework or custom styles

2. **Backend Tasks**: Structure API and business logic
- Design and implement REST/GraphQL API
- Set up database schema and migrations
- Implement authentication and authorization
- Add data validation and error handling
- Create background job processing if needed

3. **Database Tasks**: Plan data layer
- Design normalized database schema
- Set up database connections and pooling
- Create seed data and test fixtures
- Implement database backups

4. **Infrastructure & Deployment**: Prepare for production
- Configure CI/CD pipeline
- Set up environment variables and secrets
- Containerize application (Docker)
- Deploy to cloud platform (AWS, Azure, GCP, Vercel, etc.)
- Configure monitoring and logging

5. **Testing**: Ensure quality
- Unit tests for business logic
- Integration tests for API endpoints
- E2E tests for critical user flows
- Performance and load testing

When generating tasks, maximize parallelism by minimizing dependencies between
frontend and backend work where possible.

examples:
- input: "Build a task management web app"
tasks:
- Setup frontend with React and TypeScript
- Create task list component with CRUD operations
- Design REST API for task management
- Implement PostgreSQL schema for tasks and users
- Add JWT authentication
- Deploy to Vercel (frontend) and Railway (backend)
- Write E2E tests for task creation flow

- input: "Create an e-commerce site"
tasks:
- Setup Next.js with App Router
- Create product catalog UI components
- Build shopping cart functionality
- Design product and order database schema
- Implement payment processing (Stripe)
- Add admin dashboard for product management
- Configure CDN for product images
- Set up monitoring with Sentry
113 changes: 113 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,123 @@ planeteer list
| `↑` `↓` | Navigate task list |
| `⏎` | Submit input / proceed to next screen |
| `Esc` | Go back |
| `⇥` | Toggle view (Tree / Batches / Skills) |
| `Space` | Toggle skill on/off (Skills view) |
| `/` | Command mode (refine screen) |
| `s` | Save plan (refine screen) |
| `x` | Start execution (refine/execute screen) |
| `q` | Quit |

## Custom Copilot Skills

Planeteer supports custom Copilot skills for domain-specific planning. Skills help Copilot generate better work breakdowns by providing context about specific project types.

### Using Skills

Skills are automatically loaded from the `.github/skills/` directory. On first run, this directory is created with example skills. To use skills:

1. View active skills in the **Refine** screen by pressing `⇥` to cycle to the Skills view
2. Use `↑`/`↓` to navigate and `Space` to toggle skills on/off
3. Skills are applied during work breakdown generation and refinement

### Creating Skills

Create a new YAML file in `.github/skills/` with this structure:

```yaml
name: my-custom-skill
description: Brief description of what this skill helps with

instructions: |
When planning this type of project, follow these guidelines:

1. **Category 1**: Guidelines for this aspect
- Specific point 1
- Specific point 2

2. **Category 2**: More guidelines
- Another point
- Another point

General advice about task structure, dependencies, etc.

examples:
- input: "Example project description"
tasks:
- Task 1 that would be generated
- Task 2 that would be generated
- Task 3 that would be generated
```

### Skill Examples

**Example 1: Web Application Skill**

```yaml
name: web-app
description: Expert in web application development

instructions: |
Break down web projects into frontend, backend, database, and deployment:

1. **Frontend**: Component structure, routing, state management
2. **Backend**: API design, business logic, authentication
3. **Database**: Schema design, migrations, seed data
4. **Infrastructure**: CI/CD, containerization, cloud deployment

Maximize parallelism between frontend and backend work.

examples:
- input: "Build a task management web app"
tasks:
- Setup React frontend with TypeScript
- Design REST API for task CRUD
- Implement PostgreSQL schema
- Add JWT authentication
- Deploy to cloud platform
```

**Example 2: Data Pipeline Skill**

```yaml
name: data-pipeline
description: Expert in ETL and data processing workflows

instructions: |
Structure data pipelines with these phases:

1. **Extraction**: Data sources, connectors, scheduling
2. **Transformation**: Cleaning, validation, enrichment
3. **Loading**: Destination setup, batch vs streaming
4. **Monitoring**: Logging, alerts, data quality checks

Consider idempotency, error handling, and reprocessing.

examples:
- input: "Build ETL pipeline from API to data warehouse"
tasks:
- Implement API data extractor
- Create transformation functions
- Setup data warehouse schema
- Add error handling and retries
- Configure monitoring and alerts
```

### Skill Best Practices

- **One skill per domain**: Create focused skills (e.g., `mobile-app`, `ml-pipeline`) rather than generic ones
- **Clear instructions**: Be specific about task breakdown patterns and dependencies
- **Provide examples**: Include 2-3 representative examples with typical task structures
- **Enable selectively**: Toggle skills on/off based on your current project type

### Built-in Example

Two example skills are included in the repository to help you get started:
- **example-web-app-skill.yaml** - Web application development best practices
- **example-data-pipeline-skill.yaml** - ETL and data processing workflow patterns

These files are automatically available in `.github/skills/` and can be used as templates for creating your own custom skills.

## Development

### Build & Run
Expand Down
3 changes: 2 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import { render } from 'ink';
import App from './app.js';
import type { Screen } from './models/plan.js';
import { listPlans } from './services/persistence.js';
import { loadModelPreference } from './services/copilot.js';
import { loadModelPreference, ensureSkillsDirectory } from './services/copilot.js';

const args = process.argv.slice(2);
const command = args[0] || 'home';

async function main(): Promise<void> {
await loadModelPreference();
await ensureSkillsDirectory();

if (command === 'list') {
const plans = await listPlans();
Expand Down
6 changes: 6 additions & 0 deletions src/models/plan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,19 @@ export interface Task {
agentResult?: string;
}

export interface SkillConfig {
name: string;
enabled: boolean;
}

export interface Plan {
id: string;
name: string;
description: string;
createdAt: string;
updatedAt: string;
tasks: Task[];
skills?: SkillConfig[];
}

export interface ChatMessage {
Expand Down
24 changes: 20 additions & 4 deletions src/screens/breakdown.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import React, { useState, useEffect } from 'react';
import { Box, Text, useInput } from 'ink';
import type { Plan, Task, ChatMessage } from '../models/plan.js';
import type { Plan, Task, ChatMessage, SkillConfig } from '../models/plan.js';
import { createPlan } from '../models/plan.js';
import { generateWBS } from '../services/planner.js';
import { getSkillOptions, loadSkillConfigs } from '../services/copilot.js';
import { detectCycles, computeBatches } from '../utils/dependency-graph.js';
import TaskTree from '../components/task-tree.js';
import BatchView from '../components/batch-view.js';
Expand Down Expand Up @@ -37,16 +38,30 @@ export default function BreakdownScreen({
const [viewMode, setViewMode] = useState<ViewMode>('tree');
const [attempt, setAttempt] = useState(0);
const [streamText, setStreamText] = useState('');
const [skillConfigs, setSkillConfigs] = useState<SkillConfig[]>([]);

useEffect(() => {
if (existingPlan) return;

setLoading(true);
setError(null);
setStreamText('');
generateWBS(scopeDescription, (_delta, fullText) => {
setStreamText(fullText);
}, 2, codebaseContext || undefined)

// Load skills and generate WBS
Promise.all([getSkillOptions(), loadSkillConfigs()])
.then(([skillOptions, skills]) => {
setSkillConfigs(skills);
return generateWBS(
scopeDescription,
(_delta, fullText) => {
setStreamText(fullText);
},
2,
codebaseContext || undefined,
skillOptions,
skills
);
})
.then((tasks) => {
// Use first line only, strip markdown bold markers, and cap length
const planName = scopeDescription
Expand All @@ -59,6 +74,7 @@ export default function BreakdownScreen({
name: planName,
description: scopeDescription,
tasks,
skills: skillConfigs,
});
setPlan(newPlan);
setLoading(false);
Expand Down
Loading