@a-company/purpose-core
v3.5.0
Published
Purpose file parsing, validation, and aggregation
Downloads
23
Maintainers
Readme
@a-company/purpose-core
Purpose file parsing, validation, and aggregation
Core library for working with .purpose files - the structured documentation format that provides AI-friendly context about your codebase.
Installation
npm install @a-company/purpose-coreUsage
import {
findPurposeFiles,
parsePurposeFile,
validatePurposeFile
} from '@a-company/purpose-core';
// Find all .purpose files in a directory
const files = await findPurposeFiles('./src');
// Parse a .purpose file
const purpose = await parsePurposeFile('./src/.purpose');
// Validate a .purpose file
const result = validatePurposeFile(purpose);
if (!result.valid) {
console.error(result.errors);
}Purpose File Format
purpose: User authentication module
context:
- Handles login, logout, and session management
- Integrates with OAuth providers
features:
- "@email-login": Email/password authentication
- "@oauth-google": Google OAuth integration
components:
- "#AuthProvider": React context for auth state
- "#LoginForm": Login form componentDocumentation
See the main repository for full documentation.
License
MIT
