Configure PAC (Product as Code) Project
Configure and initialize a project following the Product as Code specification for structured, version-controlled product management
Instructions
-
Analyze Project Context
- Check if the current directory is a git repository
- Verify if a PAC configuration already exists (look for epic-.yaml or ticket-.yaml files)
- Parse any arguments provided:
$ARGUMENTS
- If PAC files exist, analyze them to understand current structure
-
Interactive Setup (if no existing PAC config)
- Ask user for project details:
- Project name
- Project description
- Primary product owner
- Default ticket assignee
- Initial epic name
- Validate inputs and confirm with user before proceeding
-
Create PAC Directory Structure
- Create
.pac/ directory if it doesn't exist
- Create subdirectories:
.pac/epics/ - for epic definitions
.pac/tickets/ - for ticket definitions
.pac/templates/ - for reusable templates
- Add
.pac/README.md explaining the structure and PAC specification
-
Generate PAC Configuration Files
-
Create Initial Epic Template
-
Create Initial Ticket Template
-
Create First Epic and Ticket
- Based on user input, create first epic in
.pac/epics/
- Create an initial ticket linked to the epic
- Use proper naming convention and unique IDs
- Set appropriate timestamps
-
Set Up Validation Scripts
- Create
.pac/scripts/validate.sh to check PAC compliance:
- Verify YAML syntax
- Check required fields
- Validate unique IDs
- Ensure epic-ticket relationships are valid
- Make script executable
-
Configure Git Integration
-
Generate PAC Documentation
- Create
.pac/GUIDE.md with:
- Quick start guide for team members
- Common PAC workflows
- How to create new epics and tickets
- How to update ticket status
- Link to full PAC specification
-
Create Helper Commands
- Generate
.pac/scripts/new-epic.sh for creating new epics
- Generate
.pac/scripts/new-ticket.sh for creating new tickets
- Include prompts for required fields and validation
-
Final Validation and Summary
- Run validation script on created files
- Display summary of created structure
- Show next steps:
- How to create new epics:
cp .pac/templates/epic-template.yaml .pac/epics/epic-[name].yaml
- How to create new tickets:
cp .pac/templates/ticket-template.yaml .pac/tickets/ticket-[name].yaml
- How to validate PAC files:
.pac/scripts/validate.sh
- Suggest integrating with CI/CD for automatic validation
Arguments
--minimal: Create minimal PAC structure without templates and scripts
--epic-name <name>: Specify initial epic name
--owner <name>: Specify product owner name
--no-git: Skip git integration setup
Example Usage
/project:pac-configure
/project:pac-configure --epic-name "user-authentication" --owner "john.doe"
/project:pac-configure --minimal