From pad
Write your Pad (a markdown file named `pad.md` in this repository). Use when the user instructs you to write a pad.md.
npx claudepluginhub geb-algebra/stationery --plugin padThis skill uses the workspace's default tool permissions.
Write your Pad (a markdown file named `pad.md` in this repository that has instructions for you) following the "Execution" section below.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Write your Pad (a markdown file named pad.md in this repository that has instructions for you) following the "Execution" section below.
You can write only the Pad throughout this session. DO NOT implement anything and DO NOT change any other docs.
/write-pad {instructions}):
pad.md at the project root with title # [Change Name] and ## Instruction section## Instruction section with NO MODIFICATIONS (except formatting as markdown if needed)pad.md in this repo# [Change Name] and ## Instruction section## Instruction section## Current and ## New) exist and are already filled in.## Current and ## NewDocs may lie; implementations do not.
When working, you may use only the following four types of information as authoritative:
### Current sectionDocuments that describe the implementation—including specifications, design docs, and the contents of the Pad’s ## Current section—may be used only as guidance to help you understand the implementation, guidelines, or instructions.
They must never be treated as authoritative.
After reading any implementation description, you must verify that the actual implementation matches the description. If it does not, treat the description as false and ignore it.
DO NOT use any vague terms (e.g., "or", "probably", "seems to be"). Keep investigating until ambiguity is gone; if you still can't find the info, DO NOT guess, instead mark it as [NEEDS INFORMATION: {describe what you need}].
Describe the changes. This section should already be written by the user before you start working.
Expected contents:
Both "Current" and "New" sections have three subsections: Behavior, Key Entities, and Implementation/Implementation Plan. Follow these guidelines for all subsections:
Describe the outermost interface behavior only.
Interface Boundary Rules:
Requirements:
Describe the conceptual model, NOT implementation.
Focus on:
DO NOT mention:
Map conceptual model to actual code.
Requirements:
Investigate current implementation and its gap from "Instruction" section requirements.
Attach file paths and line numbers for every item. NO vague terms ("or", "probably", "seems to be"). If unclear, mark [NEEDS INFORMATION: {describe what you need}].
This section has four subsections:
See "Behavior Subsection Guidelines" above for detailed requirements.
Format:
### Behavior
1. **Given** [initial state], **When** [action], **Then** [current outcome]
2. **Given** [initial state], **When** [action], **Then** [current outcome]
[... continue for ALL scenarios including edge cases and errors]
Example for a function:
### Behavior
1. **Given** a valid email address, **When** validateEmail() is called, **Then** returns true
2. **Given** an email without @ symbol, **When** validateEmail() is called, **Then** returns false
3. **Given** null, **When** validateEmail() is called, **Then** throws TypeError
Example for an API:
### Behavior
1. **Given** valid credentials in request body, **When** POST /api/login, **Then** returns 200 with JWT token
2. **Given** incorrect password, **When** POST /api/login, **Then** returns 401 with error message
See "Key Entities Subsection Guidelines" above for detailed requirements.
Trace entity relations and extract all related entities without omission.
Format:
### Key Entities
- **[Entity Name]**: [What it represents in domain terms, key attributes, relationships to other entities]
- **[Entity Name]**: [What it represents in domain terms, key attributes, relationships to other entities]
Example:
### Key Entities
- **User**: Represents a person using the system. Has name and email. Can create multiple Projects.
- **Project**: Represents a work item that Users can collaborate on. Has a title and description. Belongs to one owner User.
See "Implementation Subsection Guidelines" above for detailed requirements.
Map each entity from "Key Entities" to actual code implementation.
Format:
### Implementation
**[Entity Name from Key Entities]**:
- Implemented in [file path:line number]
- Data structure defined at [file path:line number]
- Key operations: [operation name] at [file path:line number]
**Reusable implementations**:
- [Shared utility/component] at [file path:line number]
- [Similar implementation reference] at [file path:line number]
Example:
### Implementation
**User**:
- Implemented as `User` class in src/models/user.ts:15-45
- Database schema defined in src/db/schema.ts:30-40
- User creation handled by `createUser()` in src/services/userService.ts:100-120
**Project**:
- Implemented as `Project` interface in src/types/project.ts:10-25
- Stored in PostgreSQL, schema at src/db/migrations/003_create_projects.sql:1-20
- CRUD operations in src/services/projectService.ts:30-150
**Reusable implementations**:
- Validation utility functions in src/utils/validation.ts:20-50 can be reused for input validation
- Error handling pattern from src/services/userService.ts:200-210 should be followed
Summarize what is missing or different from the Instruction section requirements across all aspects (behavior, entities, implementation).
Format:
### Gap from Requirements
- [What behavior is missing or different]
- [What entities or attributes are missing]
- [What implementation is missing or needs modification]
Example:
### Gap from Requirements
- validateEmail() does not validate emails with multiple @ symbols (should return false)
- validateEmail() does not handle empty string input (should return false)
- validateEmail() does not check for domain name validity
- User entity is missing authentication credentials (password hash, authentication tokens)
- Project entity is missing status and creation date attributes
- Missing "ProjectMember" entity for collaboration feature
- No authentication logic implemented (src/auth/authenticate.ts does not exist)
- Missing API endpoints for user registration and login
Based on "Instruction" and investigated current implementation, describe only the changes from Current section.
Requirements:
This section has three subsections:
See "Behavior Subsection Guidelines" above for detailed requirements.
List only new behaviors and updated existing behaviors. DO NOT list unchanged behaviors.
Format:
### Behavior
1. **Given** [initial state], **When** [action], **Then** [expected outcome]
2. **Given** [initial state], **When** [action], **Then** [expected outcome]
[... continue for ALL new/changed scenarios including edge cases and errors]
See "Key Entities Subsection Guidelines" above for detailed requirements.
List only new entities and updated existing entities. DO NOT list unchanged entities. For updated entities, describe only the changes (e.g., "Add X attribute to Y entity").
Format:
### Key Entities
- **[New Entity Name]**: [What it represents in domain terms, key attributes, relationships to other entities]
- **[Existing Entity Name]** (update): [Only the changes - new attributes, new relationships]
See "Implementation Subsection Guidelines" above for detailed requirements.
Structure:
After writing, verify plan fulfills all instructions, entity updates, and behaviors.
Format:
### Implementation Plan
**Entity Implementation**:
**[New Entity Name]**:
- Will be implemented as [class/interface/type] in [file path]
- Data structure: [description] at [file path]
- Key operations: [list operations with file paths]
**[Existing Entity Name]** (update):
- Add [new field/method] to [file path]
- Modify [existing element] at [file path]
**Step-by-step Implementation**:
1. [Step description]
- Modify [file path]
- Add/Update [specific code element]
- Follow pattern from [reference file path]
2. [Step description]
- Create [file path]
- Implement [specific functionality]
- Use [existing utility/pattern from file path]
[Continue for all steps...]
Example:
### Implementation Plan
**Entity Implementation**:
**ProjectMember** (new):
- Will be implemented as `ProjectMember` interface in src/types/projectMember.ts (new file)
- Data structure: Add `project_members` table schema in src/db/schema.ts
- Key operations: addMember(), removeMember() in src/services/projectService.ts
**User** (update):
- Add passwordHash, authTokens fields to User class in src/models/user.ts:15-45
- Add authentication methods to src/services/userService.ts
**Project** (update):
- Add status, createdAt fields to Project interface in src/types/project.ts:10-25
**Step-by-step Implementation**:
1. Add authentication fields to User
- Modify src/models/user.ts
- Add passwordHash: string and authTokens: string[] properties after line 20
- Follow the field definition pattern from src/models/user.ts:16-18
2. Create ProjectMember entity
- Create src/types/projectMember.ts
- Define ProjectMember interface with userId, projectId, role properties
- Follow the pattern from src/types/project.ts:10-25
3. Implement authentication service
- Create src/services/authService.ts
- Implement login(), register(), validateToken() methods
- Use bcrypt for password hashing (similar to src/utils/crypto.ts:20-30)
- Use JWT for tokens (pattern from src/middleware/auth.ts:15-25)
[Continue for all steps...]