RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Diff/csells-dotprompt-dart-claude ↔ csells-dotprompt-dart-cursor-rules-prd-handling

Comparison

A · CLAUDE.md · csells/dotprompt_dartB · Cursor rules · csells/dotprompt_dart
What each file covers, counted
DimensionSharedOnly in AOnly in BOverlap
Sections02400%
Commands0800%
Section tags0800%

What each file covers

Sections

0 shared · 24 only in A · 0 only in B
  • − CLAUDE.md
  • − Project Overview
  • − Common Commands
  • − Testing
  • − Run all tests
  • − Run a single test file
  • − Run tests with verbose output
  • − Development
  • − Run the example
  • − Analyze code
  • − Format code
  • − Publishing
  • − Check package for publish readiness
  • − Publish to pub.dev
  • − Architecture
  • − Core Components
  • − Template System
  • − Web/WASM Compatibility
  • − Project-Specific Rules
  • − PRD Reference
  • − Collaboration Boundaries
  • − Validation & Planning
  • − Key Dependencies
  • − Testing Philosophy

Commands

0 shared · 8 only in A · 0 only in B
  • − dart test
  • − dart test test/pico_schema_test.dart
  • − dart test --reporter=expanded
  • − dart run example/main.dart
  • − dart analyze
  • − dart format .
  • − dart pub publish --dry-run
  • − dart pub publish

Section tags

0 shared · 8 only in A · 0 only in B
  • − test
  • − lint-format
  • − architecture
  • − types
  • − dependencies
  • − deployment
  • − do-not
  • − agent-behaviour

Line diff

+32 added−113 removed6 unchanged5.0% identical
csells/dotprompt_dart · CLAUDE.md
@@ −1 @@
1# CLAUDE.md
 
 
 
 
 
2 
3This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
 
 
4 
5## Project Overview
 
 
 
 
6 
7A Dart package for parsing `.prompt` files for LLM interactions. Based on [Google's dotprompt specification](https://google.github.io/dotprompt/getting-started/), this implementation converts Pico Schema to JSON Schema, provides schema validation, template rendering with Handlebars/Mustache, and model configuration management.
 
 
 
 
 
8 
9This package does NOT execute prompts itself - it parses and prepares them for execution by other libraries like [dartantic_ai](https://pub.dev/packages/dartantic_ai).
 
 
 
 
 
 
10 
11## Common Commands
12 
13### Testing
14```bash
15# Run all tests
16dart test
17 
18# Run a single test file
19dart test test/pico_schema_test.dart
20 
21# Run tests with verbose output
22dart test --reporter=expanded
23```
24 
25### Development
26```bash
27# Run the example
28dart run example/main.dart
29 
30# Analyze code
31dart analyze
32 
33# Format code
34dart format .
35```
36 
37### Publishing
38```bash
39# Check package for publish readiness
40dart pub publish --dry-run
41 
42# Publish to pub.dev
43dart pub publish
44```
45 
46## Architecture
47 
48### Core Components
49 
501. **DotPrompt** ([lib/src/dot_prompt.dart](lib/src/dot_prompt.dart)) - Main entry point
51 - Parses .prompt files with YAML front-matter and Handlebars templates
52 - Factory constructor `DotPrompt(String)` for string content
53 - Static method `DotPrompt.stream(Stream<List<int>>, {name, defaults})` for loading from streams (required for web/wasm compatibility)
54 - `render(Map<String, dynamic>)` method validates input against schema and renders template
55 - Merges default values with input before validation
56 
572. **PicoSchema** ([lib/src/pico_schema.dart](lib/src/pico_schema.dart)) - Schema conversion engine
58 - Detects schema type (JSON Schema vs Pico Schema) using `schemaType()`
59 - Top-level `type` property triggers JSON Schema mode (short-circuits Pico Schema parsing)
60 - Mixed schemas throw `FormatException`
61 - Expands Pico Schema shorthand into valid JSON Schema
62 - 100+ tests ensure spec compliance
63 - Key features:
64 - Optional fields: `name?: string`
65 - Type annotations: `settings(object)`, `tags(array)`
66 - Enums: `theme: [light, dark]` or `theme(enum): [light, dark]`
67 - Wildcards: `(*): any` for additionalProperties
68 - Inline descriptions: `name: string, The user's name`
69 
703. **DotPromptFrontMatter** ([lib/src/dot_prompt_front_matter.dart](lib/src/dot_prompt_front_matter.dart))
71 - Parses YAML front-matter between `---` delimiters
72 - Includes model config, input/output schemas, and custom extensions
73 - Supports namespaced keys (e.g., `myext.temperature`)
74 
754. **InputOutputConfig** ([lib/src/input_output_config.dart](lib/src/input_output_config.dart))
76 - Manages input/output schemas and defaults
77 - Creates `JsonSchema` objects from Pico Schema or JSON Schema
78 - Stores default values for input validation
79 
80### Template System
81 
82Uses [mustache_template](https://pub.dev/packages/mustache_template) package for template expansion. NOT fully spec-compliant with Google's Handlebars implementation - see README.md "Handlebar Implementation Shortcomings" section for known limitations.
83 
84### Web/WASM Compatibility
85 
86Version 0.3.0+ replaced `DotPrompt.file(filename)` with `DotPrompt.stream(bytes, name: filename)` for web/wasm compatibility. Use `File(filename).openRead()` to create the stream for file system sources.
87 
88## Project-Specific Rules
89 
90### PRD Reference
91- Read [PRD.md](PRD.md) at the start of each session
92- Reference PRD when implementing features
93- Update PRD if implementation requires requirement changes
94- Document changes to core functionality, API design, architecture, dependencies, or user stories
95 
96### Collaboration Boundaries
97- Only implement what is explicitly requested
98- Present ideas as suggestions ("I have an idea...") without implementing
99- Ask for clarification if scope is unclear
100- Wait for explicit approval before actions beyond immediate request
101 
102### Validation & Planning
103- Verify understanding before implementation
104- Validate against [official dotprompt docs](https://google.github.io/dotprompt/)
105- Check library implementation details and best practices
106- Ensure changes align with existing codebase patterns
107 
108## Key Dependencies
109 
110- `json_schema`: ^5.2.1 - JSON Schema validation
111- `yaml`: ^3.1.2 - YAML front-matter parsing
112- `mustache_template`: ^2.0.0 - Template expansion
113- `path`: ^1.8.0 - Path manipulation
114- `collection`: ^1.19.1 - Collection utilities
115 
116## Testing Philosophy
117 
118Tests are comprehensive with 100+ tests focused on Pico Schema conversion. Tests should be silent on success and report failures via `expect()`. No print statements except for diagnostics (which should be removed before commit).
119 
csells/dotprompt_dart · .cursor/rules/prd-handling.mdc
@@ +1 @@
1---
2description:
3globs:
4alwaysApply: true
5---
6When working with the dotprompt project:
7 
81. **Initial Reading**
9 - At the start of each new chat session, read and understand the contents of `PRD.md`
10 - The PRD contains the core requirements and specifications for the dotprompt Dart package
11 
122. **Feature Development**
13 - When implementing new features:
14 - Reference relevant sections of the PRD
15 - Ensure the implementation aligns with the PRD specifications
16 - Update the PRD if the implementation requires changes to the requirements
17 
183. **PRD Updates**
19 - When updating the PRD:
20 - Maintain the existing structure and formatting
21 - Clearly mark any changes or additions
22 - Ensure all updates are consistent with the overall project goals
23 - Document any new requirements or changes to existing requirements
24 
254. **Documentation**
26 - All code changes must be documented in the PRD if they affect:
27 - Core functionality
28 - API design
29 - Architecture decisions
30 - Dependencies
31 - User stories
32 
335. **Validation**
34 - Before completing any feature implementation:
35 - Verify that the changes align with the PRD
36 - Ensure all requirements are met
37 - Check for any inconsistencies between implementation and documentation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38 
@@ −1 +1 @@
1−# CLAUDE.md
1+---
2+description:
3+globs:
4+alwaysApply: true
5+---
6+When working with the dotprompt project:
27  
3−This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
8+1. **Initial Reading**
9+ - At the start of each new chat session, read and understand the contents of `PRD.md`
10+ - The PRD contains the core requirements and specifications for the dotprompt Dart package
411  
5−## Project Overview
12+2. **Feature Development**
13+ - When implementing new features:
14+ - Reference relevant sections of the PRD
15+ - Ensure the implementation aligns with the PRD specifications
16+ - Update the PRD if the implementation requires changes to the requirements
617  
7−A Dart package for parsing `.prompt` files for LLM interactions. Based on [Google's dotprompt specification](https://google.github.io/dotprompt/getting-started/), this implementation converts Pico Schema to JSON Schema, provides schema validation, template rendering with Handlebars/Mustache, and model configuration management.
18+3. **PRD Updates**
19+ - When updating the PRD:
20+ - Maintain the existing structure and formatting
21+ - Clearly mark any changes or additions
22+ - Ensure all updates are consistent with the overall project goals
23+ - Document any new requirements or changes to existing requirements
824  
9−This package does NOT execute prompts itself - it parses and prepares them for execution by other libraries like [dartantic_ai](https://pub.dev/packages/dartantic_ai).
25+4. **Documentation**
26+ - All code changes must be documented in the PRD if they affect:
27+ - Core functionality
28+ - API design
29+ - Architecture decisions
30+ - Dependencies
31+ - User stories
1032  
11−## Common Commands
12− 
13−### Testing
14−```bash
15−# Run all tests
16−dart test
17− 
18−# Run a single test file
19−dart test test/pico_schema_test.dart
20− 
21−# Run tests with verbose output
22−dart test --reporter=expanded
23−```
24− 
25−### Development
26−```bash
27−# Run the example
28−dart run example/main.dart
29− 
30−# Analyze code
31−dart analyze
32− 
33−# Format code
34−dart format .
35−```
36− 
37−### Publishing
38−```bash
39−# Check package for publish readiness
40−dart pub publish --dry-run
41− 
42−# Publish to pub.dev
43−dart pub publish
44−```
45− 
46−## Architecture
47− 
48−### Core Components
49− 
50−1. **DotPrompt** ([lib/src/dot_prompt.dart](lib/src/dot_prompt.dart)) - Main entry point
51− - Parses .prompt files with YAML front-matter and Handlebars templates
52− - Factory constructor `DotPrompt(String)` for string content
53− - Static method `DotPrompt.stream(Stream<List<int>>, {name, defaults})` for loading from streams (required for web/wasm compatibility)
54− - `render(Map<String, dynamic>)` method validates input against schema and renders template
55− - Merges default values with input before validation
56− 
57−2. **PicoSchema** ([lib/src/pico_schema.dart](lib/src/pico_schema.dart)) - Schema conversion engine
58− - Detects schema type (JSON Schema vs Pico Schema) using `schemaType()`
59− - Top-level `type` property triggers JSON Schema mode (short-circuits Pico Schema parsing)
60− - Mixed schemas throw `FormatException`
61− - Expands Pico Schema shorthand into valid JSON Schema
62− - 100+ tests ensure spec compliance
63− - Key features:
64− - Optional fields: `name?: string`
65− - Type annotations: `settings(object)`, `tags(array)`
66− - Enums: `theme: [light, dark]` or `theme(enum): [light, dark]`
67− - Wildcards: `(*): any` for additionalProperties
68− - Inline descriptions: `name: string, The user's name`
69− 
70−3. **DotPromptFrontMatter** ([lib/src/dot_prompt_front_matter.dart](lib/src/dot_prompt_front_matter.dart))
71− - Parses YAML front-matter between `---` delimiters
72− - Includes model config, input/output schemas, and custom extensions
73− - Supports namespaced keys (e.g., `myext.temperature`)
74− 
75−4. **InputOutputConfig** ([lib/src/input_output_config.dart](lib/src/input_output_config.dart))
76− - Manages input/output schemas and defaults
77− - Creates `JsonSchema` objects from Pico Schema or JSON Schema
78− - Stores default values for input validation
79− 
80−### Template System
81− 
82−Uses [mustache_template](https://pub.dev/packages/mustache_template) package for template expansion. NOT fully spec-compliant with Google's Handlebars implementation - see README.md "Handlebar Implementation Shortcomings" section for known limitations.
83− 
84−### Web/WASM Compatibility
85− 
86−Version 0.3.0+ replaced `DotPrompt.file(filename)` with `DotPrompt.stream(bytes, name: filename)` for web/wasm compatibility. Use `File(filename).openRead()` to create the stream for file system sources.
87− 
88−## Project-Specific Rules
89− 
90−### PRD Reference
91−- Read [PRD.md](PRD.md) at the start of each session
92−- Reference PRD when implementing features
93−- Update PRD if implementation requires requirement changes
94−- Document changes to core functionality, API design, architecture, dependencies, or user stories
95− 
96−### Collaboration Boundaries
97−- Only implement what is explicitly requested
98−- Present ideas as suggestions ("I have an idea...") without implementing
99−- Ask for clarification if scope is unclear
100−- Wait for explicit approval before actions beyond immediate request
101− 
102−### Validation & Planning
103−- Verify understanding before implementation
104−- Validate against [official dotprompt docs](https://google.github.io/dotprompt/)
105−- Check library implementation details and best practices
106−- Ensure changes align with existing codebase patterns
107− 
108−## Key Dependencies
109− 
110−- `json_schema`: ^5.2.1 - JSON Schema validation
111−- `yaml`: ^3.1.2 - YAML front-matter parsing
112−- `mustache_template`: ^2.0.0 - Template expansion
113−- `path`: ^1.8.0 - Path manipulation
114−- `collection`: ^1.19.1 - Collection utilities
115− 
116−## Testing Philosophy
117− 
118−Tests are comprehensive with 100+ tests focused on Pico Schema conversion. Tests should be silent on success and report failures via `expect()`. No print statements except for diagnostics (which should be removed before commit).
33+5. **Validation**
34+ - Before completing any feature implementation:
35+ - Verify that the changes align with the PRD
36+ - Ensure all requirements are met
37+ - Check for any inconsistencies between implementation and documentation
11938  
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack