OptionalprivacyFilter: PrivacyFilterOptionalfeedbackStorage: FeedbackStorageOptionalfeedbackValidator: FeedbackValidatorEnd session and calculate aggregated outcome
Loads all transformations from the session, calculates aggregated metrics (success/failure counts, quality, duration), extracts and aggregates learnings, and saves the final session with outcome to storage.
Session ID to end
Promise resolving to aggregated session outcome
Extract learnings from transformation feedback
Analyzes transformation feedback to identify patterns and extract actionable learnings. Detects 4 types of learnings: success patterns (high confidence successes), failure patterns, quality degradation (anti-patterns), and build failures.
Transformation feedback to analyze
Array of learnings extracted from feedback
Record transformation feedback for a session
Extracts learnings, validates, anonymizes, and stores transformation feedback with privacy audit enforcement. Feedback is written to both storage locations (by default) and includes metadata about reliability and completeness.
Pipeline Order (CRITICAL):
Session ID returned from startSession
Transformation feedback to record (learnings array may be empty, will be populated)
await collector.recordTransformation(sessionId, {
transformationId: 'uuid',
timestamp: new Date().toISOString(),
rule: { ... },
target: { ... },
decision: { ... },
execution: { ... },
validation: { ... },
outcome: { ... },
learnings: [], // Will be populated automatically
metadata: { ... }
});
Start a new transformation session
Initializes a feedback collection session with project context capture and dual-location file creation. The session tracks all transformations performed during the lifecycle until endSession is called.
Transform context containing project root and ts-morph Project
Promise resolving to the unique session ID (UUID v4)
Orchestrates transformation feedback collection: start a session, record transformations, end the session with aggregated metrics.
Each recorded transformation runs through: extract learnings, validate (with FeedbackValidator), anonymize and audit (with PrivacyFilter; a failed audit throws), add metadata, store (with FeedbackStorage). Stored records hold no code snippets, only metadata with hashed paths.
Records go to the project root, the platform root or both (
storageLocation, default 'both').