Skip to content

Commit 4c6aba6

Browse files
Update Readme
1 parent 943f13c commit 4c6aba6

File tree

4 files changed

+159
-78
lines changed

4 files changed

+159
-78
lines changed

.cursorrules

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
## Project Overview
44
Pipeline Neo is a modern, fully modular Swift 6 framework for Final Cut Pro FCPXML processing with TimecodeKit integration. The codebase is 100% protocol-oriented, with all major operations defined as protocols and implemented via dependency injection for maximum flexibility, testability, and future-proofing. This project targets macOS 12+, Xcode 16+, and Swift 6.0 with full concurrency support.
55

6+
### Current Status
7+
- All 40 tests passing
8+
- Full FCPXML version support (1.5-1.13)
9+
- Final Cut Pro frame rate support (23.976, 24, 25, 29.97, 30, 50, 59.94, 60)
10+
- Thread-safe and concurrency-compliant
11+
- No known security vulnerabilities
12+
- Comprehensive modular architecture
13+
614
## Modularity & Safety
715
- All core operations (parsing, timecode conversion, XML manipulation, error handling) are defined as protocols (e.g., FCPXMLParsing, TimecodeConversion, XMLDocumentOperations, ErrorHandling).
816
- Default implementations are provided, but any component can be swapped or extended via dependency injection.
@@ -86,7 +94,7 @@ All Swift files must include the standard header format:
8694
- Descriptive test method names
8795
- Comprehensive test data
8896
- Proper setup and teardown
89-
- Test all supported frame rates
97+
- Test all supported frame rates (Final Cut Pro compatible)
9098

9199
## Development Patterns
92100

@@ -126,7 +134,7 @@ do {
126134
### TimecodeKit Integration
127135
- Use TimecodeKit for all timecode operations
128136
- Follow TimecodeKit API conventions
129-
- Support all FCPXML frame rates
137+
- Support all FCPXML frame rates (Final Cut Pro compatible)
130138
- Implement proper frame rate conversions
131139

132140
## Testing Requirements
@@ -136,12 +144,13 @@ do {
136144
- Integration tests for complex workflows
137145
- Performance tests for time-critical operations
138146
- Concurrency tests for async operations
139-
- Test all supported frame rates
147+
- Test all supported frame rates (Final Cut Pro compatible)
148+
- Current: 40 comprehensive tests covering all functionality
140149

141150
### Test Data
142151
- Use realistic FCPXML samples
143152
- Include edge cases and error conditions
144-
- Test all supported frame rates
153+
- Test all supported frame rates (Final Cut Pro compatible)
145154
- Validate against actual Final Cut Pro output
146155

147156
### Test Organisation
@@ -150,6 +159,17 @@ do {
150159
- Include proper setup and teardown
151160
- Use meaningful assertions
152161

162+
### Supported Frame Rates
163+
Only test with Final Cut Pro supported frame rates:
164+
- 23.976 fps
165+
- 24 fps
166+
- 25 fps
167+
- 29.97 fps
168+
- 30 fps
169+
- 50 fps
170+
- 59.94 fps
171+
- 60 fps
172+
153173
## Performance Considerations
154174

155175
### Memory Management
@@ -224,12 +244,12 @@ do {
224244
### FCPXML Handling
225245
- Support FCPXML versions 1.5 through 1.13
226246
- Validate against DTD schemas
227-
- Handle all supported frame rates
247+
- Handle all supported frame rates (Final Cut Pro compatible)
228248
- Implement proper XML formatting
229249

230250
### Timecode Operations
231251
- Use TimecodeKit for all timecode operations
232-
- Support all FCPXML frame rates
252+
- Support all FCPXML frame rates (Final Cut Pro compatible)
233253
- Implement proper frame rate conversions
234254
- Handle drop frame and non-drop frame timecode
235255

AGENT.md

Lines changed: 83 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,31 @@ Pipeline Neo is a modern, protocol-oriented Swift 6 framework for FCPXML parsing
2929
### Core Objectives
3030
- Modern Swift 6 concurrency support with async/await patterns
3131
- Full TimecodeKit integration for professional timecode operations
32-
- Comprehensive test coverage for all functionality
32+
- Comprehensive test coverage for all functionality (40+ tests)
3333
- Modular architecture for future expansion
3434
- Professional documentation and examples
35+
- Support for FCPXML versions 1.5 through 1.13
3536

3637
### Target Platforms
3738
- macOS 12.0+
3839
- Xcode 16.0+
3940
- Swift 6.0+
4041

42+
### Current Status
43+
- All 40 tests passing
44+
- Full FCPXML version support (1.5-1.13)
45+
- Final Cut Pro frame rate support (23.976, 24, 25, 29.97, 30, 50, 59.94, 60)
46+
- Thread-safe and concurrency-compliant
47+
- No known security vulnerabilities
48+
- Comprehensive modular architecture
49+
4150
## Architecture
4251

43-
- **Protocols**: All core operations (parsing, timecode conversion, XML manipulation, error handling) are defined as protocols (e.g., FCPXMLParsing, TimecodeConversion, XMLDocumentOperations, ErrorHandling).
44-
- **Implementations**: Default implementations are provided, but you can inject your own for custom behaviour, testing, or extension.
45-
- **Extensions**: Modular extensions for CMTime, XMLElement, and XMLDocument allow dependency-injected operations.
46-
- **Service Layer**: FCPXMLService orchestrates all modular components for high-level workflows.
47-
- **Utilities**: ModularUtilities provides pipeline creation, validation, and error-handling helpers.
52+
- Protocols: All core operations (parsing, timecode conversion, XML manipulation, error handling) are defined as protocols (e.g., FCPXMLParsing, TimecodeConversion, XMLDocumentOperations, ErrorHandling).
53+
- Implementations: Default implementations are provided, but you can inject your own for custom behaviour, testing, or extension.
54+
- Extensions: Modular extensions for CMTime, XMLElement, and XMLDocument allow dependency-injected operations.
55+
- Service Layer: FCPXMLService orchestrates all modular components for high-level workflows.
56+
- Utilities: ModularUtilities provides pipeline creation, validation, and error-handling helpers.
4857

4958
## Modularity & Extensibility
5059

@@ -55,10 +64,10 @@ Pipeline Neo is a modern, protocol-oriented Swift 6 framework for FCPXML parsing
5564

5665
## Security & Safety
5766

58-
- **Thread-safe and concurrency-compliant**: All code is Sendable or @unchecked Sendable as appropriate, and passes thread sanitizer checks.
59-
- **No known vulnerabilities**: All dependencies (including TimecodeKit 1.6.13) are up to date and have no published security advisories as of July 2025.
60-
- **No unsafe code patterns**: No use of unsafe pointers, dynamic code execution, or C APIs. All concurrency is structured and type-safe.
61-
- **Static analysis**: The codebase passes thread sanitizer and static analysis checks, with no concurrency or memory safety issues detected.
67+
- Thread-safe and concurrency-compliant: All code is Sendable or @unchecked Sendable as appropriate, and passes thread sanitizer checks.
68+
- No known vulnerabilities: All dependencies (including TimecodeKit 1.6.13) are up to date and have no published security advisories as of July 2025.
69+
- No unsafe code patterns: No use of unsafe pointers, dynamic code execution, or C APIs. All concurrency is structured and type-safe.
70+
- Static analysis: The codebase passes thread sanitizer and static analysis checks, with no concurrency or memory safety issues detected.
6271

6372
## Development Guidelines
6473

@@ -107,6 +116,7 @@ Pipeline Neo is a modern, protocol-oriented Swift 6 framework for FCPXML parsing
107116
- Integration tests for complex workflows
108117
- Performance tests for time-critical operations
109118
- Concurrency tests for async operations
119+
- Current: 40 comprehensive tests covering all functionality
110120

111121
### Test Organisation
112122
- One test file per main component
@@ -117,15 +127,26 @@ Pipeline Neo is a modern, protocol-oriented Swift 6 framework for FCPXML parsing
117127
### Test Data
118128
- Use realistic FCPXML samples
119129
- Include edge cases and error conditions
120-
- Test all supported frame rates
130+
- Test all supported frame rates (Final Cut Pro compatible)
121131
- Validate against actual Final Cut Pro output
122132

133+
### Supported Frame Rates
134+
Only test with Final Cut Pro supported frame rates:
135+
- 23.976 fps
136+
- 24 fps
137+
- 25 fps
138+
- 29.97 fps
139+
- 30 fps
140+
- 50 fps
141+
- 59.94 fps
142+
- 60 fps
143+
123144
## Dependencies
124145

125146
### Primary Dependencies
126-
- **TimecodeKit**: Advanced timecode operations and conversions
127-
- **Foundation**: Core XML and data handling
128-
- **CoreMedia**: CMTime operations and conversions
147+
- TimecodeKit: Advanced timecode operations and conversions
148+
- Foundation: Core XML and data handling
149+
- CoreMedia: CMTime operations and conversions
129150

130151
### Version Requirements
131152
- TimecodeKit: 1.6.0 to 2.0.0
@@ -146,6 +167,20 @@ Sources/PipelineNeo/
146167
│ ├── CMTimeExtension.swift
147168
│ ├── XMLDocumentExtension.swift
148169
│ └── XMLElementExtension.swift
170+
├── Implementations/
171+
│ ├── FCPXMLParser.swift
172+
│ ├── TimecodeConverter.swift
173+
│ ├── XMLDocumentManager.swift
174+
│ └── ErrorHandler.swift
175+
├── Protocols/
176+
│ ├── FCPXMLParsing.swift
177+
│ ├── TimecodeConversion.swift
178+
│ ├── XMLDocumentOperations.swift
179+
│ └── ErrorHandling.swift
180+
├── Services/
181+
│ └── FCPXMLService.swift
182+
├── Utilities/
183+
│ └── ModularUtilities.swift
149184
└── FCPXML DTDs/
150185
├── Final_Cut_Pro_XML_DTD_version_1.5.dtd
151186
├── Final_Cut_Pro_XML_DTD_version_1.6.dtd
@@ -159,39 +194,36 @@ Sources/PipelineNeo/
159194
└── README.md
160195
161196
Tests/PipelineNeoTests/
162-
├── PipelineNeoTests.swift
197+
├── PipelineNeoTests.swift (40 comprehensive tests)
163198
└── XCTestManifests.swift
164199
```
165200

166201
## Key Components
167202

168-
### FCPXMLUtility
169-
Main utility class providing FCPXML operations:
170-
- Time conversions between CMTime and TimecodeKit
171-
- FCPXML time string parsing and generation
172-
- Line break conversion for XML attributes
173-
- Element filtering and manipulation
174-
175-
### XMLDocument Extensions
176-
Extensions for FCPXML-specific document operations:
177-
- FCPXML initialisation and parsing
178-
- Event and resource management
179-
- Document validation and output
180-
- Version-specific handling
181-
182-
### XMLElement Extensions
183-
Extensions for FCPXML element creation:
184-
- Event, project, and clip creation
185-
- Resource and format handling
186-
- Compound clip and multicam support
187-
- Audio and video element management
188-
189-
### CMTime Extensions
190-
Time-related utilities and conversions:
191-
- FCPXML time string formatting
192-
- Timecode conversion utilities
193-
- Frame duration calculations
194-
- Time validation and normalisation
203+
### FCPXMLService
204+
Main service class orchestrating all modular components:
205+
- Dependency-injected architecture
206+
- High-level FCPXML operations
207+
- Error handling and validation
208+
- Performance-optimized workflows
209+
210+
### Modular Components
211+
- FCPXMLParser: XML parsing and validation
212+
- TimecodeConverter: Timecode operations with TimecodeKit
213+
- XMLDocumentManager: Document creation and manipulation
214+
- ErrorHandler: Comprehensive error handling
215+
216+
### Modular Extensions
217+
- CMTime Extensions: Time-related utilities and conversions
218+
- XMLElement Extensions: Element creation and manipulation
219+
- XMLDocument Extensions: Document-level operations
220+
221+
### ModularUtilities
222+
Utility functions for:
223+
- Pipeline creation and configuration
224+
- Document validation
225+
- Error handling helpers
226+
- Performance monitoring
195227

196228
## Common Patterns
197229

@@ -247,10 +279,10 @@ public func convertTimecode(_ timecode: Timecode, to frameRate: TimecodeFrameRat
247279
## Error Handling
248280

249281
### Error Types
250-
- **FCPXMLError**: Main error type for FCPXML operations
251-
- **TimecodeError**: Timecode conversion errors
252-
- **ValidationError**: Document validation errors
253-
- **ParsingError**: XML parsing errors
282+
- FCPXMLError: Main error type for FCPXML operations
283+
- TimecodeError: Timecode conversion errors
284+
- ValidationError: Document validation errors
285+
- ParsingError: XML parsing errors
254286

255287
### Error Propagation
256288
- Use Swift's error handling system
@@ -347,13 +379,16 @@ public func convertTimecode(_ timecode: Timecode, to frameRate: TimecodeFrameRat
347379

348380
## Documentation Sync
349381

350-
**IMPORTANT**: Always ensure this AGENT.md file is kept in sync with the `.cursorrules` file. Both files should contain consistent information about:
382+
IMPORTANT: Always ensure this AGENT.md file is kept in sync with the `.cursorrules` file. Both files should contain consistent information about:
351383

352384
- Project overview and architecture
353385
- Code style and formatting guidelines
354386
- Development patterns and conventions
355387
- Security and safety requirements
356388
- Modularity and extensibility principles
389+
- FCPXML version support (1.5-1.13)
390+
- Final Cut Pro frame rate support
391+
- Current test coverage status
357392

358393
When updating either file, make sure to:
359394
1. Update both files with the same information
@@ -374,7 +409,7 @@ This ensures that AI agents working with the project have consistent guidance wh
374409
- Package.swift: Package configuration
375410
- README.md: User documentation
376411
- CHANGELOG.md: Version history
377-
- Tests/: Test suite and examples
412+
- Tests/: Test suite and examples (40 tests)
378413

379414
### Development Tools
380415
- Xcode 16.0+ for development

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ This codebase is developed using AI agents.
3636
- Easily manipulate timing values with modern Swift concurrency
3737
- Output FCPXML files with proper text formatting
3838
- Validate FCPXML documents with the DTD
39-
- Works with FCPXML v1.6 through v1.8 files
39+
- Works with FCPXML v1.5 through v1.13 files
4040
- Full TimecodeKit integration for advanced timecode operations
4141
- Swift 6 concurrency support with async/await patterns
4242
- macOS 12+ support with modern Swift features
@@ -327,11 +327,11 @@ Further information on FCPXML can be found [here](https://fcp.cafe/developers/fc
327327

328328
## FCPXML Version Support
329329

330-
Pipeline Neo supports FCPXML versions **1.5 through 1.13**. All DTDs for these versions are included in the codebase, ensuring compatibility with the latest Final Cut Pro XML workflows.
330+
Pipeline Neo supports FCPXML versions 1.5 through 1.13. All DTDs for these versions are included in the codebase, ensuring compatibility with the latest Final Cut Pro XML workflows.
331331

332332
## Migration from Original Pipeline
333333

334-
Pipeline Neo is a modernised fork of the original Pipeline library. Key changes include:
334+
Pipeline Neo is a modernised successor to [Pipeline](https://github.com/reuelk/pipeline). Key changes include:
335335

336336
- Swift 6 concurrency support with async/await
337337
- TimecodeKit integration for advanced timecode operations
@@ -345,17 +345,17 @@ Pipeline Neo is a modernised fork of the original Pipeline library. Key changes
345345

346346
Pipeline Neo is now fully modular, built on a protocol-oriented architecture. All major operations (parsing, timecode conversion, XML manipulation, error handling) are defined as protocols with default implementations, enabling easy extension, testing, and future-proofing. Dependency injection is used throughout for maximum flexibility and testability.
347347

348-
- **Thread-safe and concurrency-compliant**: All code is Sendable or @unchecked Sendable as appropriate, and passes thread sanitizer checks.
349-
- **No known vulnerabilities**: All dependencies (including TimecodeKit 1.6.13) are up to date and have no published security advisories as of July 2025.
350-
- **No unsafe code patterns**: No use of unsafe pointers, dynamic code execution, or C APIs. All concurrency is structured and type-safe.
348+
- Thread-safe and concurrency-compliant: All code is Sendable or @unchecked Sendable as appropriate, and passes thread sanitizer checks.
349+
- No known vulnerabilities: All dependencies (including TimecodeKit 1.6.13) are up to date and have no published security advisories as of July 2025.
350+
- No unsafe code patterns: No use of unsafe pointers, dynamic code execution, or C APIs. All concurrency is structured and type-safe.
351351

352352
## Architecture Overview
353353

354-
- **Protocols**: All core functionality is defined via protocols (e.g., FCPXMLParsing, TimecodeConversion, XMLDocumentOperations, ErrorHandling).
355-
- **Implementations**: Default implementations are provided, but you can inject your own for custom behaviour or testing.
356-
- **Extensions**: Modular extensions for CMTime, XMLElement, and XMLDocument allow dependency-injected operations.
357-
- **Service Layer**: FCPXMLService orchestrates all modular components for high-level workflows.
358-
- **Utilities**: ModularUtilities provides pipeline creation, validation, and error-handling helpers.
354+
- Protocols: All core functionality is defined via protocols (e.g., FCPXMLParsing, TimecodeConversion, XMLDocumentOperations, ErrorHandling).
355+
- Implementations: Default implementations are provided, but you can inject your own for custom behaviour or testing.
356+
- Extensions: Modular extensions for CMTime, XMLElement, and XMLDocument allow dependency-injected operations.
357+
- Service Layer: FCPXMLService orchestrates all modular components for high-level workflows.
358+
- Utilities: ModularUtilities provides pipeline creation, validation, and error-handling helpers.
359359

360360
See AGENT.md for a detailed breakdown for AI agents and contributors.
361361

0 commit comments

Comments
 (0)