mirror of
https://github.com/documenso/documenso
synced 2026-04-21 13:27:18 +00:00
Adds OpenCode support for AI-assisted development, including custom commands and skills to help contributors maintain consistency and streamline common workflows. #### Changes - Added "AI-Assisted Development with OpenCode" section to CONTRIBUTING.md with: - Installation instructions and provider configuration - Documentation for 8 custom commands (/implement, /continue, /interview, /document, /commit, /create-plan, /create-scratch, /create-justification) - Typical workflow guide - Clear policy that AI-generated code must be reviewed before submission - Added .agents/ directory for plans, scratches, and justifications - Added .opencode/ commands and skills for the agent - Added helper scripts for creating agent files
3.7 KiB
3.7 KiB
| description | argument-hint |
|---|---|
| Continue implementing a spec from a previous session | <spec-file-path> |
You are continuing implementation of a specification that was started in a previous session. Work autonomously until the feature is complete and tests pass.
Your Task
- Read the spec at
$ARGUMENTS - Read CODE_STYLE.md for formatting conventions
- Assess current state:
- Check git status for uncommitted changes
- Run tests to see what's passing/failing (if E2E tests exist)
- Review any existing implementation
- Determine what remains by comparing the spec to the current state
- Plan remaining work using TodoWrite
- Continue implementing until complete
Assessing Current State
Run these commands to understand where the previous session left off:
git status # See uncommitted changes
git log --oneline -10 # See recent commits
npm run typecheck -w @documenso/remix # Check for type errors
npm run lint:fix # Check for linting issues
Review the code that's already been written to understand:
- What's already implemented
- What's partially done
- What's not started yet
Implementation Guidelines
During Implementation
- Follow CODE_STYLE.md strictly (2-space indent, double quotes, braces always, etc.)
- Follow workspace rules for TypeScript, React, TRPC patterns, and Remix conventions
- Mark todos complete as you finish each task
- Commit logical chunks of work
Code Quality
- No stubbed implementations
- Handle edge cases and error conditions
- Include descriptive error messages with context
- Use async/await for all I/O operations
- Use AppError class when throwing errors
- Use Zod for validation and react-hook-form for forms
Testing
Important: E2E tests are time-consuming. Only write tests for non-trivial functionality.
- Write E2E tests in
packages/app-tests/e2e/using Playwright - Test critical user flows and edge cases
- Follow existing E2E test patterns in the codebase
- Use descriptive test names that explain what is being tested
- Skip tests for trivial changes (simple UI tweaks, minor refactors, etc.)
Autonomous Workflow
Work continuously through these steps:
- Implement - Write the code for the current task
- Typecheck - Run
npm run typecheck -w @documenso/remixto verify types - Lint - Run
npm run lint:fixto fix linting issues - Test - If non-trivial, run E2E tests:
npm run test:dev -w @documenso/app-tests - Fix - If tests fail, fix and re-run
- Repeat - Move to next task
Stopping Conditions
Stop and report success when:
- All spec requirements are implemented
- Typecheck passes
- Lint passes
- E2E tests pass (if written for non-trivial functionality)
Stop and ask for help when:
- The spec is ambiguous and you need clarification
- You encounter a blocking issue you cannot resolve
- You need to make a decision that significantly deviates from the spec
- External dependencies are missing
Commands
# Type checking
npm run typecheck -w @documenso/remix
# Linting
npm run lint:fix
# E2E Tests (only for non-trivial work)
npm run test:dev -w @documenso/app-tests # Run E2E tests in dev mode
npm run test-ui:dev -w @documenso/app-tests # Run E2E tests with UI
npm run test:e2e # Run full E2E test suite
# Development
npm run dev # Start dev server
Begin
Read the spec file and CODE_STYLE.md, assess the current implementation state, then continue where the previous session left off. Use TodoWrite to track your progress throughout.