Guidelines for contributing to App Factory.
- Code of Conduct
- How to Contribute
- Development Setup
- Contribution Guidelines
- Pull Request Process
- Documentation Standards
- Testing Standards
- Be respectful and inclusive
- Focus on constructive feedback
- Accept criticism gracefully
- Prioritize the community's best interests
- Harassment or discrimination
- Personal attacks
- Publishing private information
- Inappropriate content
| Type | Description |
|---|---|
| Bug Reports | Report issues via GitHub Issues |
| Feature Requests | Suggest new features or improvements |
| Documentation | Improve docs, fix typos, add examples |
| Code | Fix bugs, implement features |
| Testing | Add tests, improve coverage |
Look for issues labeled good-first-issue for beginner-friendly tasks.
| Requirement | Version |
|---|---|
| Node.js | 18+ |
| npm | 9+ |
| Git | Latest |
# Fork the repo on GitHub, then:
git clone https://github.com/YOUR-USERNAME/AppFactory.git
cd AppFactorygit checkout -b feature/my-feature
# or
git checkout -b fix/bug-description| Type | Format | Example |
|---|---|---|
| Feature | feature/description |
feature/add-dark-mode |
| Bug Fix | fix/description |
fix/ralph-timeout |
| Docs | docs/description |
docs/update-readme |
| Refactor | refactor/description |
refactor/cleanup-types |
If modifying a pipeline:
- Follow the constitution: Each pipeline has a CLAUDE.md that defines its rules
- Maintain phase model: Don't skip or reorder phases
- Preserve invariants: Never remove safety constraints
- Update documentation: Keep README and CLAUDE.md in sync
| Language | Style Guide |
|---|---|
| TypeScript | ESLint + Prettier |
| Markdown | Consistent headers, clear structure |
| JSON | 2-space indentation |
// Use explicit types
const name: string = 'example';
// Use interfaces for objects
interface User {
id: string;
name: string;
}
// Use async/await over promises
async function fetchData(): Promise<Data> {
const response = await fetch(url);
return response.json();
}
// Handle errors
try {
await riskyOperation();
} catch (error) {
logger.error('Operation failed', { error });
throw error;
}src/
├── index.ts # Entrypoint
├── types/ # Type definitions
├── lib/ # Shared utilities
├── components/ # UI components (if applicable)
└── __tests__/ # Tests
-
Test your changes:
npm run build npm run test npm run lint -
Update documentation if needed
-
Follow commit message format
type(scope): description
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentationstyle: Formattingrefactor: Code restructuringtest: Adding testschore: Maintenance
Examples:
feat(agent-factory): add support for streaming responses
fix(dapp-factory): resolve hydration mismatch in wallet component
docs(readme): update installation instructions
- Code follows style guidelines
- Tests pass locally
- Documentation updated
- Commit messages follow convention
- No unrelated changes
- PR description explains changes
## Description
[Brief description of changes]
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
[How did you test this?]
## Checklist
- [ ] Code follows style guidelines
- [ ] Tests pass
- [ ] Documentation updated- Automated checks run on PR
- Maintainer review within 48 hours
- Address feedback if requested
- Merge when approved
Every documentation file should have:
- Title - Clear, descriptive
- Table of Contents - For files > 100 lines
- Sections - Logically organized
- Examples - Code samples where applicable
- Related Links - Cross-references
| Element | Format |
|---|---|
| Headers | Title Case |
| Code | Fenced blocks with language |
| Tables | Markdown tables |
| Lists | Consistent formatting |
Always include:
- Language identifier
- Working code (tested)
- Comments for complex logic
// Example: Creating an agent definition
interface AgentDefinition {
name: string;
tools: Tool[];
preamble: string;
}Each pipeline must have:
| File | Purpose |
|---|---|
CLAUDE.md |
Constitution (12 sections) |
README.md |
User documentation |
| Type | Location | Purpose |
|---|---|---|
| Unit | src/__tests__/ |
Function-level |
| Integration | tests/ |
Module-level |
| E2E | tests/e2e/ |
Full pipeline |
import { describe, it, expect } from 'vitest';
import { normalizeIntent } from '../lib/normalize';
describe('normalizeIntent', () => {
it('should upgrade vague input to professional spec', () => {
const input = 'make a todo app';
const result = normalizeIntent(input);
expect(result).toContain('task management');
expect(result.length).toBeGreaterThan(input.length);
});
it('should preserve explicit requirements', () => {
const input = 'make a todo app with dark mode';
const result = normalizeIntent(input);
expect(result).toContain('dark mode');
});
});Aim for:
- Critical paths: 90%+
- Utilities: 80%+
- Overall: 70%+
# All tests
npm test
# Specific file
npm test -- path/to/test.ts
# With coverage
npm test -- --coverageIf you're adding a new pipeline:
new-pipeline/
├── CLAUDE.md # Constitution (follow 12-section template)
├── README.md # User documentation
├── templates/
│ └── system/
├── builds/ # Output directory
└── runs/ # Execution logs
Use the 12-section structure from existing pipelines:
- PURPOSE & SCOPE
- CANONICAL USER FLOW
- DIRECTORY MAP
- MODES
- PHASE MODEL
- DELEGATION MODEL
- HARD GUARDRAILS
- REFUSAL TABLE
- VERIFICATION & COMPLETION
- ERROR RECOVERY
- CROSS-LINKS
- COMPLETION PROMISE
Add to root CLAUDE.md pipeline table.
- Update
/docs/ARCHITECTURE.md - Add to pipeline comparison tables
- Add examples to
/docs/EXAMPLES.md
- Open a GitHub Discussion for questions
- Tag maintainers for urgent issues
- Check existing issues before creating new ones
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to App Factory!