This section contains design documentation for Morphir .NET, including AI Skill Framework architecture, Product Requirements Documents, and architectural decision records.
AI Skill Framework
The morphir-dotnet project uses a sophisticated AI skill framework (gurus) for cross-agent development assistance:
Review Capability: Every guru includes proactive review capability
Cross-Agent Design: Ensure portability across Claude, Copilot, Cursor, and other agents
Retrospective Integration: Plan for continuous improvement through feedback loops
1 - AI Skill Framework Design
Design for unified, cross-agent AI skill architecture (gurus)
AI Skill Framework Design
Overview
This document establishes a comprehensive, scalable architecture for AI skills (known as “gurus” in this project) that work seamlessly across Claude Code, GitHub Copilot, and other coding agents. The goal is to create a repeatable pattern for developing specialized AI team members who improve continuously and provide expert guidance in specific domains.
Motivation
The morphir-dotnet project has implemented three sophisticated gurus (QA Tester, AOT Guru, Release Manager) that provide specialized expertise through:
Decision trees for problem-solving
Automation scripts (F#) for repetitive tasks
Playbooks for complex workflows
Templates for common scenarios
Pattern catalogs of domain knowledge
As the project plans to add more gurus (Elm-to-F# Guru, Documentation Guru, Security Guru, etc.), we need:
A clear definition of what makes a guru
Repeatable patterns for creation
Cross-agent accessibility (not Claude-only)
Continuous improvement mechanisms
Cross-project reuse strategy
What is a Guru?
A guru is not a tool or a prompt. It’s a knowledge stewardship system with these characteristics:
mindmap
root((Guru))
Stewardship
Owns a domain
Accountable for quality
Quality gate
Continuous Improvement
Learns from interactions
Quarterly reviews
Feedback loops
Proactive Review
Scans for issues
Detects problems early
Captures patterns
Automation-First
F# scripts
Reduces token cost
Improves with scale
Collaboration
Clear hand-offs
Escalation paths
Shared patterns
Stewardship
Owns a domain (Quality, Optimization, Releases, Migration, etc.)
Accountable for quality, velocity, and responsibility in that domain
Maintains and evolves best practices and decision frameworks
Acts as a quality gate preventing regressions and anti-patterns
Continuous Improvement
Learns from interactions - Every session captures patterns and discoveries
Feeds back into guidance - Playbooks, templates, and catalogs evolve
Release Manager → Could adapt for mono-repo versioning (CHANGELOG format may differ)
Elm-to-F# Guru → Pattern catalog portable, IR-specific knowledge less so
Reuse Checklist
When planning to use a guru in a new project:
Understand skill’s domain and scope
Assess project-specific config needs
Identify paths/repos that need adjustment
Read “Adapt to New Project” section in skill README
Test skill with sample scenario
Document adaptations (if any)
Report improvements back to origin project
Example: QA Tester in morphir-elm
Original (.morphir-dotnet): `.claude/skills/qa-tester/`
├── skill.md - Core QA philosophy, no project-specific content
├── README.md - Scripts references can be adapted
└── scripts/
├── smoke-test.fsx - Paths would need adjustment
├── regression-test.fsx - Test command would change
└── validate-packages.fsx - Package names would differ
Adapted (.morphir-elm):
├── Test: npm run test vs. dotnet test
├── Smoke: npm run build vs. dotnet build
├── Packages: npm packages vs. NuGet packages
├── Regression: Same BDD/TDD philosophy, different tech stack
Effort: 2-4 hours to adapt and test
Last Updated: December 19, 2025
Maintained By: @DamianReeves
Version: 1.0 (Initial Release)
2 - Guru Philosophy
The collaborative AI stewardship philosophy behind morphir-dotnet gurus
Guru Philosophy
The Core Concept
A guru is not a tool. It’s not a utility function or a helpful prompt. A guru is a knowledge stewardship system—a specialized AI team member who owns a domain, improves continuously, and acts as a collaborative partner in advancing project health, maintainability, and velocity.
graph LR
subgraph "Traditional AI Helper"
Q1[Question] --> A1[Answer]
Q2[Question] --> A2[Answer]
Q3[Question] --> A3[Answer]
end
subgraph "Guru Philosophy"
I[Interaction] --> L[Learning]
L --> K[Knowledge Base]
K --> G[Better Guidance]
G --> I
end
style Q1 fill:#ffcdd2
style Q2 fill:#ffcdd2
style Q3 fill:#ffcdd2
style I fill:#c8e6c9
style L fill:#c8e6c9
style K fill:#c8e6c9
style G fill:#c8e6c9
This philosophy distinguishes morphir-dotnet’s approach to AI collaboration from the typical “ask the AI for help with X” pattern.
The Guru is Not…
Not a Tool
❌ Tools are static; gurus evolve
❌ Tools answer one question; gurus build knowledge systems
❌ Tools don’t improve themselves; gurus have feedback loops
✅ Gurus capture patterns and feed them back into guidance
Process Steward (Release Manager) - Ensures releases are reliable and predictable
Migration Steward (Elm-to-F# Guru) - Preserves fidelity and quality in cross-language migration
What stewardship means:
Accountable for quality in the domain
Proactive, not reactive (“What problems can I prevent?”)
Maintains best practices and decision frameworks
Improves gradually, with intention
A Learning System
A guru improves over time through automated feedback:
flowchart TD
subgraph "Continuous Learning Cycle"
A[Session/Interaction] --> B{New Pattern<br/>Discovered?}
B -->|Yes| C[Document Pattern]
B -->|No| D[Apply Existing<br/>Patterns]
C --> E[Update Playbooks]
D --> F[Track Effectiveness]
E --> G[Quarterly Review]
F --> G
G --> H{Pattern Repeated<br/>3+ Times?}
H -->|Yes| I[Create Automation<br/>Script]
H -->|No| J[Continue Monitoring]
I --> K[Permanent<br/>Improvement]
J --> A
K --> A
end
style A fill:#e3f2fd
style C fill:#c8e6c9
style E fill:#c8e6c9
style I fill:#fff9c4
style K fill:#c8e6c9
Release Manager Example (Proof):
After every release failure → Automated retrospective captures “What went wrong?” and “How to prevent?”
After 3+ consecutive successes → Prompts for improvement ideas
When release procedures change → Detects and prompts playbook updates
Result: Release playbooks evolve each quarter, getting smarter
Elm-to-F# Guru Example (Planned):
Every migration discovers new Elm-to-F# patterns
Patterns repeated 3+ times trigger “Create Myriad plugin?” decision
Philosophy: “Every high-token task automated is a permanent improvement.”
A Collaborator
A guru coordinates transparently with other gurus:
sequenceDiagram
participant ELM as Elm-to-F# Guru
participant AOT as AOT Guru
participant QA as QA Tester
participant RM as Release Manager
ELM->>AOT: Generated code for review
Note over AOT: Verify AOT compatibility
AOT-->>ELM: ✓ AOT-safe + suggestions
ELM->>ELM: Apply recommendations
ELM->>QA: Code ready for testing
Note over QA: Run test suite
QA-->>ELM: ✓ Coverage 85%
ELM->>RM: Feature complete
Note over RM: Include in release
RM-->>ELM: ✓ Scheduled for v1.2.0
Collaboration principles:
Explicit hand-offs at domain boundaries
Clear communication of status and constraints
Escalation paths when uncertain
Mutual respect for expertise
A Reviewer
A guru proactively reviews the codebase and ecosystem for quality, adherence to principles, and opportunities:
Create automation scripts (F# for high-token work)
Build pattern catalog
Design templates
Phase 3: Learning Integration
Implement feedback capture
Establish review schedule
Design playbook evolution
Document improvement process
Phase 4: Review Implementation
Design review scope and criteria
Create review scripts/tooling
Establish review schedule and cadence
Design integration with playbooks and automation
Phase 5: Collaboration
Coordinate with other gurus
Test hand-offs
Verify escalation paths
Validate error handling
Phase 6: Teaching
Create decision trees
Document patterns
Write playbooks
Provide templates
Guiding Principles
1. Learn From Every Session
A guru that doesn’t improve is just a prompt.
Every session with a guru should feed insights back into its knowledge system. New patterns, edge cases, failures—all become part of the playbook.
2. Review Proactively
A guru that only reacts to problems is incomplete.
Gurus should scan their domain regularly for issues, guideline violations, and improvement opportunities. Reviews are how gurus stay engaged and make their presence felt. Combine review findings with retrospectives to create continuous improvement loops.
Review ≠ One-Off Code Review:
Code review is reactive (“Please review my PR”)
Guru review is proactive (“I scanned the project and found these issues”)
Code review gives feedback once
Guru review captures findings to improve guidance
3. Automate Repetitive Work
Token efficiency is a feature, not an afterthought.
Identify high-token-cost repetitive work and create scripts to automate it. This makes the guru more efficient and the entire project benefit from permanent automation.
4. Document Why, Not Just What
Teaching is as important as doing.
When a guru provides guidance, it should explain the reasoning, not just the answer. This teaches users to make better decisions independently.
5. Collaborate Transparently
Gurus are team members, not black boxes.
Clear hand-offs, explicit coordination, and honest escalation build trust and effectiveness across the guru team.
6. Respect Scope Boundaries
A guru should escalate gracefully when uncertain.
Gurus should know their limits and escalate decisions beyond their scope. This prevents over-confident guidance in unfamiliar territory.
7. Improve Continuously
Quarterly reviews are non-negotiable.
Regular retrospectives, proactive reviews, feedback capture, and playbook updates ensure gurus don’t ossify. A guru that never evolves is essentially deprecated.
The Vision
Imagine a morphir-dotnet project where:
Quality is maintained automatically through QA Tester’s standards
AOT goals are pursued pragmatically via AOT Guru’s guidance
Releases are reliable and predictable thanks to Release Manager’s playbooks
Elm-to-F# migration proceeds smoothly with Elm-to-F# Guru’s expertise
New domains are stewarded by additional gurus built using proven patterns
Every guru improves every quarter through automated feedback
Every guru automates high-token work so humans focus on decisions
Every guru collaborates gracefully with clear hand-offs
Knowledge is preserved and evolved organically through use
This is not a future state. It’s what morphir-dotnet is building now.
Last Updated: December 19, 2025
Philosophy Champion: @DamianReeves
Version: 1.0 (Initial Documentation)
3 - IR Classic Migration and Namespace Strategy
Design guide for Morphir.IR.Classic namespace strategy and migration from morphir-elm
IR Classic Migration and Namespace Strategy
Overview
This document describes the namespace strategy for Morphir IR in the F# implementation, specifically the separation between Morphir.IR.Classic (existing morphir-elm IR) and Morphir.IR (future evolution). This guide serves as a reference for AI agents and human contributors working on the Morphir IR model.
Purpose
The Morphir maintainers recognize that the generic attribute approach in the current IR complicates things, but we need to support existing morphir-elm tools and enable migration of existing code. The namespace strategy allows us to:
Support existing tools: Maintain compatibility with morphir-elm ecosystem
Enable migration: Allow existing morphir-elm code to migrate to F# (and eventually other languages)
Reserve evolution space: Keep Morphir.IR namespace free for future improvements
Document decisions: Provide clear guidance for contributors and AI agents
Namespace Strategy
Morphir.IR.Classic
Purpose: Represents the existing IR available in morphir-elm with generic attributes.
Strategy: Support existing tools while reserving space for future improvements
Migration: Enable morphir-elm → F# migration while planning for future evolution
4 - Guru Creation Guide
Step-by-step guide for creating new AI gurus in morphir-dotnet
Guru Creation Guide
Overview
This guide walks through the process of creating a new guru (AI skill) in morphir-dotnet. It establishes a repeatable pattern that ensures consistency, quality, and alignment with the guru philosophy.
A guru should be created when you have a domain of expertise that:
Is distinct and has clear boundaries
Crosses multiple project areas or is deep within one area
Has 3+ core competencies (expertise areas)
Contains repetitive work suitable for automation
Part 1: Should This Be a Guru?
Decision Framework
Use this flowchart to determine if you should create a guru:
Isolated domain (could be .agents/ guide or standalone skill)
Decision Result
If all 5 questions are YES → Create a guru skill
If any are NO → Consider alternatives:
Just 1-2 competencies? → Create .agents/{topic}.md guide instead
No automation opportunity? → Document decision trees in AGENTS.md
No coordination needed? → Create standalone utility or guide
Too narrow/specific? → Create template or plugin, not full guru
Part 2: Guru Definition
Step 1: Define the Domain
Write a clear 2-3 sentence description:
Domain: Release Management
Description: Orchestrating the complete release lifecycle from version planning
through deployment and verification. Ensures releases are reliable, predictable,
and recoverable.
Step 2: Define Competencies
List primary and secondary competencies:
Primary Competencies (3-6 core areas):
Version Management - Semantic versioning, version detection
Changelog Management - Keep a Changelog format, parsing, generation
Deployment Orchestration - Workflow automation, status tracking
Release Manager Responsibilities:
- Ensure releases happen on schedule without surprises
- Prevent release failures through pre-flight validation
- Enable fast recovery if failures occur
- Improve the release process continuously (quarterly reviews)
- Communicate clearly about status and blockers
- Coordinate with QA on verification and AOT Guru on version compatibility
Step 4: Define Scope Boundaries
What is explicitly NOT this guru’s responsibility?
Release Manager Does NOT:
- Make product decisions about what features to include
- Review code quality (that's QA Tester's job)
- Decide version numbering policies (that's maintainers' decision)
- Handle security issues (that's future Security Guru's job)
- Manage documentation (that's future Documentation Guru's job)
Step 5: Map Coordination Points
Identify other gurus this will coordinate with:
Release Manager Coordination:
- WITH QA Tester: Hand-off after release for verification
- Trigger: Release deployed
- Signal: "Ready for post-release QA?"
- Response: Test results, coverage, functional verification
- WITH AOT Guru: Verify version tags are AOT-compatible
- Trigger: Before publishing release
- Signal: "Can I publish this version?"
- Response: AOT status, any breaking changes
- WITH Elm-to-F# Guru: Track feature parity milestones
- Trigger: Migration progress updates
- Signal: "What's our migration status for this release?"
- Response: Completed modules, parity progress
Part 3: Implementation Structure
Directory Layout
Create the following structure:
graph TB
subgraph ".claude/skills/{guru-name}/"
SKILL["📄 skill.md<br/>Main skill prompt<br/>1000-1200 lines"]
README["📄 README.md<br/>Quick reference<br/>300-400 lines"]
MAINT["📄 MAINTENANCE.md<br/>Review process"]
subgraph "scripts/"
S1["automation-1.fsx"]
S2["automation-2.fsx"]
S3["common.fsx"]
end
subgraph "templates/"
T1["decision-template.md"]
T2["workflow-template.md"]
end
subgraph "patterns/"
P1["pattern-1.md"]
P2["pattern-2.md"]
P3["...grows over time"]
end
end
style SKILL fill:#fff3e0,stroke:#e65100
style README fill:#e8f5e9,stroke:#2e7d32
style MAINT fill:#e3f2fd,stroke:#1565c0
---
id: {guru-id}name: {Guru Name}triggers:
- keyword1 - keyword2 - keyword3---
# {Guru Name}
## Overview
[2-3 sentences about the guru]
## Responsibilities
[List of core responsibilities]
## Competencies
[Detailed list of competencies with examples]
## Decision Trees
[3-5 decision trees for common scenarios]
## Playbooks
[3-5 detailed workflows]
## Pattern Catalog
[Growing collection of patterns]
## Automation
[Available F# scripts]
## Integration Points
[How this guru coordinates with others]
## Feedback Loop
[How this guru improves over time]
## Related Resources
[Links to guides, documentation, templates]
Size Target: 1000-1200 lines (~50 KB)
README.md Structure
Quick reference for users:
# {Guru Name} - Quick Reference
## What This Guru Does
[One paragraph overview]
## When to Use This Guru
[List of scenarios]
## Core Competencies
[Quick bullet list]
## Available Scripts
[Table of scripts with descriptions]
## Common Tasks
[Quick how-tos]
## Pattern Catalog
[Index of patterns]
## Examples
[Real examples from the project]
## Integration
[How to use this guru with others]
## References
[Links to related documentation]
Size Target: 300-400 lines (~16 KB)
MAINTENANCE.md Structure
Guidance for maintaining this guru:
# Maintenance Guide
## Quarterly Review Checklist
- [ ] Read through collected feedback
- [ ] Identify 2-3 improvements for next quarter
- [ ] Update patterns that changed
- [ ] Create/update Myriad plugins if automation opportunities exist
- [ ] Document learnings in Implementation Notes
- [ ] Update success metrics
## Feedback Collection
- Where feedback is captured: [GitHub issue, tracking doc, etc.]
- Review schedule: [Quarterly, per-release, etc.]
- Stakeholders to consult: [maintainers, project leads]
## Improvement Process
1. Collect feedback
2. Identify patterns
3. Update playbooks/templates
4. Test changes
5. Document in changelog
6. Publish update
## Version History
[Track skill evolution]
#!/usr/bin/env -S dotnet fsi
/// Automation Script: {Purpose}
/// Saves {N} tokens per use by automating {high-token-cost task}
/// Usage: dotnet fsi {script-name}.fsx [args]
#r"nuget: Spectre.Console"open Spectre.Console
let main argv =// Parse arguments
// Analyze/test/validate something
// Print results
0
exit (main fsx.CommandLineArgs.[1..])
Script checklist:
Clear purpose stated in comments
Token savings estimated
Usage documented
Error handling included
JSON output option (for automation)
Progress indicators (for long-running scripts)
Templates
Create domain-specific templates:
Decision Template:
# Decision: {Decision Type}
## Scenario
[When would you make this decision?]
## Options
1. Option A
- Pros: ...
- Cons: ...
- When to use: ...
2. Option B
- Pros: ...
- Cons: ...
- When to use: ...
## Recommendation
[What does the guru recommend?]
## Examples
[Real examples from the project]
Workflow Template:
# Workflow: {Workflow Name}
## Overview
[What does this workflow accomplish?]
## Prerequisites
[What must be true before starting?]
## Steps
1. Step 1 - [description]
2. Step 2 - [description]
...
## Validation
[How do you know it worked?]
## Rollback
[How do you undo if it fails?]
## Related Workflows
[Links to similar workflows]
Pattern Catalog
Start with 5-10 seed patterns, add more as discovered:
Pattern Entry Template:
# Pattern: {Pattern Name}
## Description
[What is this pattern?]
## Context
[When and why would you use it?]
## Examples
[Real code examples]
## Pros and Cons
[Trade-offs]
## Related Patterns
[Similar or complementary patterns]
## References
[Links to documentation or standards]
Part 4: Automation Strategy
Identify High-Token-Cost Tasks
For your guru domain, identify 5-10 repetitive tasks:
Release Manager Example:
Check GitHub Actions status (manual every 5 min = many tokens)
Validate post-release status (manual testing = tokens)
Extract release history for notes (manual searching = tokens)
Detect process changes (manual review = tokens)
Prioritize for Automation
Score tasks on:
Frequency: How often does this happen? (1-5 scale)
Token Cost: How many tokens does it cost? (1-5 scale)
Repetitiveness: Is this the same every time? (1-5 scale)
Task Frequency Token Cost Repetitive Priority
Monitor release status 5 (every few min) 3 5 Critical
Prepare checklist 3 (per release) 2 5 High
Post-release validation 3 (per release) 3 5 High
Extract release history 2 (per release) 2 3 Medium
Detect process changes 1 (quarterly) 2 4 Medium
Select top 3-5 for automation
Design Automation Scripts
For each task, design an F# script:
Script Design Pattern:
Input: What data does this need?
Processing: What analysis/transformation?
Output: What does it return?
Token Savings: How much does this save?
Example: Monitor Release Status
Input: GitHub Action workflow ID
Processing: Poll GitHub Actions API, track status
Output: Current status, elapsed time, next check
Token Savings: 100+ tokens per hour (vs. manual polling)
Capture Trigger: After each module migration
Capture Method: Migration template includes "Patterns Discovered" section
Review Schedule: Quarterly pattern inventory review
Improvement Action: If pattern appears 3+ times, create Myriad plugin
Q1: Discovered 15 new patterns
Q2: Created 2 Myriad plugins for repetitive patterns
Q3: Updated decision trees based on learnings
Q4: Plan next quarter's automation
Design Review Process
Define quarterly reviews:
Collect: Gather all feedback from past quarter
Analyze: Identify 2-3 key improvements
Decide: What will change? What won’t?
Update: Modify playbooks, templates, patterns
Document: Record what changed and why
Communicate: Let users know about improvements
Review Checklist:
Feedback reviewed (N items)
Improvement areas identified (3-5 topics)
Playbooks updated (X changes)
Patterns added/modified (Y patterns)
Automation opportunities identified (Z scripts to create)
Version bumped if user-facing changes
Part 5B: Review Capability
Design the Review Scope
A guru should proactively review its domain for issues, guideline violations, and improvement opportunities.
To playbooks: “We found 3 reflection patterns, add to decision tree”
To automation: “This pattern appears repeatedly, create detection script”
To retrospectives: “Q1 findings suggest process changes”
To next review criteria: “Focus on this area going forward”
Create Review Scripts
Design and implement F# scripts that perform reviews:
Example: AOT Guru’s Quarterly Review
// scripts/aot-scan.fsx - Quarterly review of all projects
// Scans for:
// - Reflection usage (IL2026 patterns)
// - Binary sizes vs. targets
// - Trimming-unfriendly patterns (static fields, etc.)
//
// Output: Markdown report with findings, trends, recommendations
Findings:- Reflection in 7 locations (5 in serialization, 2 in codegen)- Binary sizes: 8.2 MB (target 8 MB)- creeping by ~200 KB/quarter
- New pattern: ValueTuple boxing in LINQ chains (appears 3x)- Opportunities: 2 patterns ready for Myriad plugin automation
Recommendations:- Create aot-serializer.fsx (Myriad plugin)for serialization reflection
- Add ValueTuple boxing detection to aot-diagnostics.fsx
- Set size limit at 8.5 MB (buffer)or refactor
Next Quarter Focus:- Monitor ValueTuple pattern frequency
- Implement Myriad plugin if pattern appears >5 more times
- Evaluate serialization library alternatives
Integrate Review with Retrospectives
Design how reviews and retrospectives work together:
Review (Proactive):
"I scanned the code and found these issues"
└─ Findings feed into retrospectives
Retrospective (Reactive):
"That failure happened because of X"
└─ Root cause feeds into reviews: "Start looking for X pattern"
Together: Continuous improvement cycle
Findings → Prevention → Process update → Review criteria → Next quarter
Example Integration:
Q1 Review Findings:
- "We found 5 ignored tests. Why?"
Q1 Retrospective:
- "Test X was failing intermittently. We skipped it to unblock releases."
Q1 Outcomes:
- Fix root cause of flaky test
- Add test to monitoring criteria
- Playbook update: "Always investigate skipped tests in Q1 review"
Q2 Review:
- Monitors for skipped tests automatically
- Finds 0 skipped tests (improvement!)
- Pattern: "Skipped tests went from 5 → 0"
Design Review Integration Points
Define where reviews fit in the workflow:
Option A: Continuous Review
Trigger: Every code push to main
Runs: During CI/CD
Output: GitHub check or PR comment
Effort: Medium (depends on scan speed)
Option B: Scheduled Review
Trigger: Weekly or quarterly
Runs: Off-hours or on-demand
Output: Report + GitHub issues for findings
Effort: Low (scheduled, low impact)
Option C: Session-Based Review
Trigger: After each major workflow (migration, release)
Runs: As part of workflow
Output: Integrated into workflow results
Effort: Varies (per-session analysis)
Option D: Manual Review
Trigger: User request ("@guru review")
Runs: On-demand
Output: Full report generated immediately
Effort: Medium (real-time analysis)
Review Checklist
When implementing review capability:
Review scope clearly defined (what issues to look for)
Review trigger designed (when does review run)
Review scripts created (F# implementation)
Review output format chosen (report/issues/notification)
Review findings documented (findings structure)
Integration with retrospectives designed
Integration with automation strategy designed
Integration with playbooks designed
Review schedule established (continuous/weekly/quarterly/on-demand)
Tested on real project data (not just examples)
Part 6: Cross-Agent Compatibility
Ensure Scripts Work Everywhere
Your F# scripts should work for Claude Code, Copilot, and all other agents:
Checklist:
Scripts use standard F# (no Claude-specific features)
## Using This Guru
**Claude Code:** Mention keywords like "release", "deploy", "publish"
**Copilot:** Read .agents/release-manager.md for equivalent guidance
**Other agents:** Run scripts directly: `dotnet fsi scripts/monitor-release.fsx`
Cross-Project Portability
Document how this guru could be used in other projects:
## Using This Guru in Other Projects
### Portable Components
- Decision trees (universal for this domain)
- Pattern catalog (concepts apply broadly)
- Script utilities (adapt paths for new project)
### Non-Portable Components
- Project-specific playbooks (morphir-dotnet release process)
- Integration with NUKE build system
- Version numbering conventions
### To Adapt to New Project
1. Update script paths (if paths differ)
2. Update build system integration (if not NUKE)
3. Adapt playbooks to new project's process
4. Customize templates for new project conventions
Estimated effort: 4-8 hours
Part 7: Workflow & Validation
Red-Green-Refactor for Skill Development
Follow TDD principles even for skills:
Red: Write test scenarios for the skill
Create BDD features showing how the guru should behave
Create decision tree tests (“Given this scenario, recommend this”)
Feature: Release Manager Guru
Scenario: Release fails and guru captures retrospective
Given a release is in progress
When the release fails
Then the guru should prompt for "What went wrong?"
And capture the response in the tracking issue
And suggest prevention strategies
Scenario: After 3 successful releases, guru prompts for improvements
Given 3 consecutive successful releases
When starting the 4th release
Then the guru should ask "What could we improve?"
Testing Checklist
Before releasing your guru:
Read through skill.md (is it clear? comprehensive?)
Test all automation scripts (do they work? return correct output?)
Validate decision trees (do they handle real scenarios?)
Check playbooks (are they complete? any steps missing?)
Review templates (are they usable? any clarifications needed?)
Test cross-agent compatibility (can Copilot users find equivalent info?)
Verify coordination (do other gurus know about this one?)
Get team feedback (does this feel useful? any blind spots?)
Part 8: Success Criteria
For Skill Delivery
Directory structure created
skill.md written (1000+ lines)
README.md created (300-400 lines)
MAINTENANCE.md documented
3-5 automation scripts implemented
5-10 seed patterns documented
3-5 templates created
Coordination points identified
Cross-agent compatibility verified
Team feedback incorporated
For Skill Maturity (After First Quarter)
Feedback capture mechanism working
Quarterly review completed
15+ patterns in catalog
3+ improvements made based on feedback
1+ new automation scripts created (if opportunities found)
This document defines the requirements for a new Technical Writer skill (guru) for the morphir-dotnet project. The Technical Writer is more than a documentation maintainer—they are a communication craftsperson who transforms complex technical concepts into clear, engaging, and visually compelling documentation.
Documentation Infrastructure: Hugo static site generator, Docsy theme mastery
Brand Identity: Consistent voice, tone, and visual identity across all documentation
This skill ensures that Morphir .NET has a consistent, well-crafted identity that makes complex concepts accessible and helps users succeed.
Part 1: Should This Be a Guru?
Decision Framework Validation
Question
Answer
Justification
1. Is it a distinct domain?
YES
Technical writing, visual communication, Hugo/Docsy expertise, documentation structure, and content governance are distinct from coding, testing, AOT optimization, and release management
2. Does it justify deep expertise?
YES
30+ patterns possible: API documentation, tutorials, ADRs, code examples, README structure, changelog format, What’s New documents, troubleshooting guides, Mermaid diagrams, PlantUML architecture diagrams, Hugo shortcodes, Docsy customization, visual storytelling, etc.
3. Will it have 3+ core competencies?
YES
9 core competencies: Documentation strategy, Hugo/Docsy mastery, visual communication (Mermaid/PlantUML), API documentation, example code management, style guide enforcement, brand identity, markdown mastery, content governance
4. Is there high-token-cost repetitive work?
YES
Link validation, example code freshness checking, documentation coverage analysis, style consistency checking, diagram validation, Hugo build troubleshooting, Docsy theme configuration
5. Will it coordinate with other gurus?
YES
Release Manager (release notes, What’s New), QA Tester (test documentation, BDD scenarios), AOT Guru (AOT/trimming guide maintenance), all gurus (consistent visual identity and communication patterns)
Result: All 5 questions are YES - proceed with guru creation.
Part 2: Domain Definition
Domain Description
Domain: Technical Documentation, Visual Communication, and Documentation Infrastructure
Description: Expert communication craftsperson for morphir-dotnet who transforms complex technical concepts into clear, engaging, and visually compelling documentation. Masters the complete documentation stack from content creation through Hugo/Docsy infrastructure. Ensures Morphir .NET has a consistent, well-crafted identity that fosters understanding and helps users succeed.
The Technical Writer is the go-to team member for:
Solving communication challenges through writing
Making Hugo and Docsy comply with project needs
Creating diagrams and visuals that make concepts pop
Applying patterns and templates from successful documentation sites
Maintaining consistent brand identity across all documentation
Primary Competencies (9 Core Areas)
Documentation Strategy & Architecture
Design documentation structure and navigation
Define content types and their purposes
Establish documentation hierarchy
Plan documentation roadmap aligned with features
Analyze successful documentation sites for applicable patterns
Hugo & Static Site Expertise
Master of Hugo static site generator configuration
Expert troubleshooter for Hugo build issues
Deep understanding of Hugo templating and shortcodes
Content organization using Hugo sections and taxonomies
Hugo modules and dependency management
Performance optimization for documentation sites
Docsy Theme Mastery
Complete understanding of Docsy theme architecture
Customization of Docsy components and layouts
Navigation configuration and sidebar management
Search configuration (offline and online)
Feedback widgets and user engagement features
Version switcher and multi-version documentation
Responsive design and mobile optimization
Visual Communication & Diagramming
Mermaid Mastery: Flowcharts, sequence diagrams, class diagrams, state diagrams, entity relationship diagrams, Gantt charts, pie charts, journey maps
---
name: technical-writerdescription: "Expert communication craftsperson for morphir-dotnet. Master of Hugo/Docsy, Mermaid/PlantUML diagrams, and technical writing. Use when user asks to create documentation, update docs, write tutorials, create diagrams, fix Hugo issues, customize Docsy, validate examples, check links, enforce style guide, or solve communication challenges. Triggers include 'document', 'docs', 'README', 'tutorial', 'example', 'API docs', 'style guide', 'link check', 'hugo', 'docsy', 'diagram', 'mermaid', 'plantuml', 'visual', 'navigation'."# Common short forms: docs, writer, doc-writer (documentation only - aliases not functional)---
# Technical Writer Skill
You are an expert communication craftsperson for the morphir-dotnet project. Your role
extends beyond documentation maintenance—you transform complex technical concepts into
clear, engaging, and visually compelling content that fosters understanding and helps
users succeed.
You are the go-to team member for:
- Solving communication challenges through writing
- Making Hugo and Docsy comply with project needs
- Creating diagrams and visuals that make ideas and concepts pop
- Applying patterns and templates from successful documentation sites
- Maintaining Morphir's consistent and well-crafted identity
[Content following the established pattern from other skills]
Automation Scripts (7 Scripts)
1. link-validator.fsx
Purpose: Validate internal and external documentation links
The Technical Writer skill should proactively look for:
Broken Links: Internal and external links that no longer work
Stale Examples: Code examples that don’t compile or produce wrong output
Missing Documentation: Public APIs without documentation
Style Violations: Documentation not following style guide
Outdated Content: Documentation that doesn’t match current behavior
Orphaned Content: Documentation that’s no longer referenced
Accessibility Issues: Content that isn’t accessible
Translation Issues: Content with culture-specific idioms
Review Frequency
Continuous: Link validation on documentation changes (CI/CD)
Per-PR: Example freshness check for PRs touching examples
Weekly: Style consistency scan
Quarterly: Comprehensive documentation audit
Review Triggers
Trigger Type
When
Output
CI/CD Push
Documentation file changed
Link validation report
PR Review
PR includes documentation
Doc quality checklist
Weekly Schedule
Sunday midnight
Style compliance report
Quarterly Review
First week of quarter
Comprehensive audit
Manual Request
User invokes review
Full documentation report
Release Preparation
Before release
Release docs checklist
Review Output Format
# Documentation Review Report
## Summary
- Total documents scanned: N
- Issues found: N
- Critical: N | High: N | Medium: N | Low: N
## Broken Links (Critical)
| File | Line | Link | Status |
|------|------|------|--------|
| docs/readme.md | 42 | [link](./missing.md) | 404 Not Found |
## Stale Examples (High)
| File | Example | Issue |
|------|---------|-------|
| docs/tutorials/getting-started.md | Code block L15-25 | Compilation error |
## Missing Documentation (Medium)
| Type | Name | Location |
|------|------|----------|
| Public API | Morphir.Core.Validate | src/Morphir.Core/Validate.fs |
## Style Violations (Low)
| File | Issue | Suggestion |
|------|-------|------------|
| docs/api/readme.md | Heading style | Use sentence case |
## Recommendations
1. Fix broken links immediately
2. Update stale examples in next sprint
3. Add XML docs to new public APIs
4. Schedule style cleanup
Integration with Retrospectives
Review → Findings → Retrospectives → Process Improvement
Example Flow:
1. Q1 Review finds 15 broken links
2. Retrospective: "Links break when files move"
3. Process Update: Add link check to PR checklist
4. Q2 Review finds 3 broken links (improvement!)
5. Pattern: Link validation at PR time prevents breakage
Part 5: Decision Trees
Decision Tree 1: “What type of diagram should I create?”
What are you trying to communicate?
├── Process or workflow
│ └── Use: Mermaid Flowchart
│ ├── Start/end nodes
│ ├── Decision diamonds
│ ├── Process rectangles
│ └── Directional arrows
│
├── Sequence of interactions (who calls whom)
│ └── Use: Mermaid Sequence Diagram
│ ├── Actors and participants
│ ├── Message arrows
│ ├── Activation boxes
│ └── Notes and loops
│
├── Object relationships and structure
│ └── Use: Mermaid Class Diagram
│ ├── Classes with attributes/methods
│ ├── Inheritance arrows
│ ├── Composition/aggregation
│ └── Interface implementations
│
├── State transitions
│ └── Use: Mermaid State Diagram
│ ├── States and transitions
│ ├── Entry/exit actions
│ ├── Nested states
│ └── Fork/join for parallel states
│
├── Data relationships
│ └── Use: Mermaid ER Diagram
│ ├── Entities and attributes
│ ├── Relationships with cardinality
│ └── Primary/foreign keys
│
├── System architecture (high-level)
│ └── Use: Mermaid Flowchart with subgraphs
│ ├── Components as subgraphs
│ ├── Data flow arrows
│ └── Clear boundaries
│
├── System architecture (detailed)
│ └── Use: PlantUML Component/Deployment Diagram
│ ├── Components with interfaces
│ ├── Dependencies
│ ├── Deployment nodes
│ └── Technology annotations
│
├── Timeline or project plan
│ └── Use: Mermaid Gantt Chart
│ ├── Tasks and durations
│ ├── Dependencies
│ ├── Milestones
│ └── Sections
│
└── User journey or experience
└── Use: Mermaid Journey Diagram
├── Journey stages
├── Actions per stage
├── Satisfaction scores
└── Actor perspective
Decision Tree 2: “Hugo is not building - what do I check?”
Hugo build failing?
├── Error mentions "module"
│ └── Hugo module issue
│ ├── Run: hugo mod tidy
│ ├── Run: hugo mod get -u
│ ├── Check: go.mod and go.sum exist
│ └── Verify: Network access to GitHub
│
├── Error mentions "template" or "shortcode"
│ └── Template/shortcode issue
│ ├── Check: Shortcode exists in layouts/shortcodes/
│ ├── Check: Docsy shortcode name (alert vs warning)
│ ├── Verify: Closing tags match opening tags
│ └── Look for: Unclosed shortcode delimiters
│
├── Error mentions "frontmatter" or "YAML"
│ └── Frontmatter issue
│ ├── Check: Valid YAML syntax
│ ├── Verify: Required fields (title, linkTitle)
│ ├── Look for: Tabs vs spaces issues
│ └── Check: Special characters need quoting
│
├── Error mentions "taxonomy" or "term"
│ └── Taxonomy issue
│ ├── Check: hugo.toml taxonomies config
│ ├── Verify: Taxonomy pages exist
│ └── Check: Singular vs plural naming
│
├── Error mentions "page not found" or "ref"
│ └── Reference issue
│ ├── Check: Target page exists
│ ├── Verify: Path is relative to content/
│ ├── Use: relref instead of ref for sections
│ └── Check: Case sensitivity
│
├── Site builds but looks wrong
│ └── Docsy/styling issue
│ ├── Check: Docsy module version
│ ├── Verify: assets/scss/custom.scss syntax
│ ├── Check: layouts/ override conflicts
│ └── Clear: hugo cache (resources/_gen/)
│
└── Site builds but navigation is wrong
└── Navigation issue
├── Check: _index.md files in sections
├── Verify: weight in frontmatter
├── Check: linkTitle for menu display
└── Review: hugo.toml menu configuration
Decision Tree 3: “What type of documentation should I create?”
What are you documenting?
├── Public API (class, method, interface)
│ └── Create: XML doc comments + API reference page
│ ├── Parameters and return values
│ ├── Exceptions thrown
│ ├── Code example
│ └── See also references
│
├── Feature or capability
│ └── Create: Conceptual guide + tutorial
│ ├── What it does (conceptual)
│ ├── How to use it (tutorial)
│ ├── Examples (code samples)
│ └── Troubleshooting (common issues)
│
├── Configuration or setup
│ └── Create: Configuration reference + getting started
│ ├── All options documented
│ ├── Default values
│ ├── Examples for common scenarios
│ └── Validation and error messages
│
├── CLI command
│ └── Create: Command reference + usage examples
│ ├── Synopsis with all options
│ ├── Detailed option descriptions
│ ├── Examples for each use case
│ └── Exit codes and errors
│
├── Architecture decision
│ └── Create: ADR (Architecture Decision Record)
│ ├── Context and problem
│ ├── Decision and rationale
│ ├── Consequences
│ └── Status and date
│
└── Breaking change
└── Create: Migration guide
├── What changed
├── Why it changed
├── How to migrate
└── Deprecation timeline
Decision Tree 2: “Is this documentation good enough?”
Documentation Quality Checklist:
1. Accuracy
└── Does it match current behavior?
YES → Continue
NO → Update or flag for update
2. Completeness
└── Does it cover all aspects?
├── Happy path? ✓
├── Edge cases? ✓
├── Errors? ✓
└── Examples? ✓
3. Clarity
└── Can target audience understand it?
├── No jargon without explanation ✓
├── Logical structure ✓
├── Visual aids where helpful ✓
└── Scannable headings ✓
4. Discoverability
└── Can users find it?
├── In navigation ✓
├── Proper keywords/tags ✓
├── Cross-referenced ✓
└── Linked from related docs ✓
5. Maintainability
└── Will it stay accurate?
├── Code examples tested ✓
├── Links validated ✓
├── No hard-coded versions ✓
└── Owner assigned ✓
Decision Tree 3: “How should I handle outdated documentation?”
Is the documentation outdated?
├── Minor inaccuracy (typo, small detail)
│ └── Fix immediately in same PR
│
├── Moderate drift (feature changed slightly)
│ └── Create issue to track update
│ ├── Label: documentation
│ ├── Priority: medium
│ └── Link to related code change
│
├── Major drift (feature significantly changed)
│ └── Coordinate with feature owner
│ ├── Understand new behavior
│ ├── Rewrite documentation
│ ├── Update all examples
│ └── Create migration guide if breaking
│
├── Feature removed
│ └── Deprecation workflow
│ ├── Mark as deprecated (if applicable)
│ ├── Add removal notice
│ ├── Schedule removal date
│ └── Remove after grace period
│
└── Unsure if outdated
└── Verify against code
├── Run examples
├── Check API signatures
├── Test documented behavior
└── Flag for review if uncertain
Part 6: Playbooks
Playbook 1: New Feature Documentation
When: A new feature is being implemented or has been implemented
Prerequisites:
Feature PR is available or merged
Feature behavior is understood
Target audience identified
Steps:
Understand the feature
Read PR description and linked issues
Review code changes
Identify public APIs
Note configuration options
Plan documentation
Identify documentation types needed:
API reference (XML docs)
Conceptual guide
Tutorial
Configuration reference
CLI command reference (if applicable)
Determine target audience
Plan examples needed
Create API documentation
Add XML doc comments to all public members
Include <summary>, <param>, <returns>, <exception>
Add <example> blocks for non-obvious usage
Add <seealso> references
Create user-facing documentation
Write conceptual overview (what and why)
Create step-by-step tutorial (how)
Add code examples (tested and working)
Document configuration options
Add troubleshooting section
Integrate with existing documentation
Add to navigation/table of contents
Cross-reference from related documents
Update What’s New (if for upcoming release)
Update README if feature is major
Validate documentation
Run link validator
Test all code examples
Review for style compliance
Get peer review
Output: Complete documentation package for the feature
Don’t modify Docsy files directly (they’re in go modules)
For layout changes
Copy Docsy template to layouts/ with same path
Modify the copy (original stays in module)
Test thoroughly - Docsy updates may conflict
For navigation changes
Configure in hugo.toml under [menu]
Use weight in frontmatter for ordering
Use _index.md files for section pages
For new shortcodes
Create in layouts/shortcodes/
Name file shortcodename.html
Reference in content using angle-bracket shortcode syntax
Test changes
hugo server -D # Include drafts# Check at http://localhost:1313
Document customizations
Add to patterns/hugo-docsy/docsy-customization.md
Explain why customization was needed
Note any Docsy version dependencies
Output: Customized documentation site with documented changes
Part 7: Pattern Catalog (Seed Patterns)
Pattern 1: API Documentation Structure
Context: Documenting a public API (class, method, interface)
Pattern:
/// <summary>/// Brief one-line description of what this does.
/// </summary>/// <remarks>/// Extended explanation if needed.
/// Use when you need to explain concepts, caveats, or usage patterns.
/// </remarks>/// <paramname="paramName">Description of parameter including valid values.</param>/// <returns>Description of return value, including null/empty cases.</returns>/// <exceptioncref="ArgumentException">When paramName is invalid because...</exception>/// <example>/// <code>/// var result = MyMethod("value");
/// // Use result for...
/// </code>/// </example>/// <seealsocref="RelatedClass"/>/// <seealsohref="https://docs.example.com/concept">Concept explanation</seealso>
Anti-pattern:
/// <summary>/// Gets the thing.
/// </summary>// Missing: what thing, when to use, what could go wrong
Pattern 2: Tutorial Structure
Context: Writing a step-by-step tutorial
Pattern:
# Tutorial: [Action] with [Feature]
## Overview
What you'll learn and what you'll build.
## Prerequisites
- Requirement 1
- Requirement 2
## Step 1: [First action]
Explanation of what and why.
```code
Example code
Expected result: [what user should see]
Step 2: [Next action]
…
Summary
What was accomplished.
Next Steps
Related tutorial 1
Related concept guide
API reference
Troubleshooting
Issue: [Common problem]
Solution: How to fix it.
---
### Pattern 3: CLI Command Documentation
**Context**: Documenting a CLI command
**Pattern**:
```markdown
# command-name
Brief description of what command does.
## Synopsis
command-name [options] [optional-arg]
## Description
Extended description explaining:
- Purpose and use cases
- How it relates to other commands
- Important concepts
## Arguments
| Argument | Description | Required |
|----------|-------------|----------|
| `<required-arg>` | Description | Yes |
| `[optional-arg]` | Description | No |
## Options
| Option | Shorthand | Description | Default |
|--------|-----------|-------------|---------|
| `--verbose` | `-v` | Enable verbose output | false |
## Examples
### Basic usage
```bash
command-name input.json
### Cause
Explanation of what causes this error.
### Solution
1. First thing to try
2. Second thing to try
3. If still failing, check...
### Example
```bash
# Command that causes error
$ morphir verify invalid.json
Error: INVALID_SCHEMA - Schema validation failed
# How to fix
$ morphir verify --schema v3 valid.json
---
### Pattern 5: Configuration Documentation
**Context**: Documenting configuration options
**Pattern**:
```markdown
# Configuration Reference
## Overview
Brief explanation of configuration system.
## Configuration File
Location: `morphir.config.json`or`package.json` under `morphir`key## Options
### `optionName`
-**Type**: `string | string[]`-**Default**: `"default value"`-**Required**: No
-**Since**: v1.2.0Description of what this option does andwhentouse it.
**Valid Values**:
-`"value1"`- Description
-`"value2"`- Description
**Example**:
```json
{"optionName": "value1"}
Notes:
Special consideration 1
Special consideration 2
---
### Pattern 6: Cross-Reference Best Practices
**Context**: Linking between documentation pages
**Pattern**:
- Use relative paths: `[Link text](./related.md)` not absolute URLs
- Link to specific sections: `[Section](./page.md#section-id)`
- Use descriptive link text: `[how to configure X](./config.md)` not `[click here](./config.md)`
- Add "See also" sections at end of documents
- Cross-link from conceptual to API to tutorial
**Anti-pattern**:
- `[here](./page.md)` - non-descriptive
- `https://github.com/.../docs/page.md` - will break on forks
- No cross-references - orphaned content
---
### Pattern 7: Mermaid Flowchart Best Practices
**Context**: Creating process or workflow diagrams
**Pattern**:
```mermaid
graph TD
subgraph "Input Phase"
A[Start] --> B{Validate Input}
end
subgraph "Processing Phase"
B -->|Valid| C[Process Data]
B -->|Invalid| D[Handle Error]
C --> E{Check Result}
end
subgraph "Output Phase"
E -->|Success| F[Return Result]
E -->|Failure| D
D --> G[Log Error]
G --> H[End]
F --> H
end
style A fill:#90EE90
style H fill:#FFB6C1
style D fill:#FFD700
Best Practices:
Use subgraphs to group related steps
Consistent node shapes: rectangles for actions, diamonds for decisions
Color code: green for start, red for end, yellow for errors
Label edges with conditions
Flow top-to-bottom or left-to-right
Keep diagrams focused - split if > 15 nodes
Anti-pattern:
No grouping - flat, hard-to-follow diagram
Inconsistent shapes - confuses readers
Missing edge labels on decisions
Overly complex - trying to show everything
Pattern 8: Mermaid Sequence Diagram Best Practices
Context: Showing interactions between components/actors
Pattern:
sequenceDiagram
autonumber
participant U as User
participant CLI as Morphir CLI
participant V as Validator
participant FS as File System
U->>CLI: morphir verify input.json
activate CLI
CLI->>FS: Read input file
FS-->>CLI: File contents
CLI->>V: Validate(content)
activate V
V->>V: Parse JSON
V->>V: Check schema
alt Valid
V-->>CLI: ValidationResult.Success
else Invalid
V-->>CLI: ValidationResult.Errors
end
deactivate V
CLI-->>U: Display result
deactivate CLI
Best Practices:
Use autonumber for step references
Name participants clearly with aliases
Show activation bars for processing time
Use alt/else for conditional flows
Use loop for repeated operations
Add notes for important clarifications
Keep interactions readable (< 20 messages)
Pattern 9: Hugo Frontmatter Best Practices
Context: Setting up Hugo page frontmatter
Pattern:
---
title: "Page Title for SEO and Browser Tab"linkTitle: "Short Nav Title"description: "One-line description for search results and social sharing"weight: 10date: 2025-01-15lastmod: 2025-01-20draft: falsetoc: truecategories:
- Guidestags:
- getting-started - tutorial---
Field Guidelines:
Field
Purpose
Best Practice
title
SEO, browser tab
Descriptive, include keywords
linkTitle
Navigation menu
Short (2-4 words)
description
Search/social preview
Single sentence, < 160 chars
weight
Menu ordering
Lower = higher in menu
date
Creation date
ISO 8601 format
lastmod
Last modification
Auto if enableGitInfo=true
draft
Hide from build
Set false when ready
toc
Table of contents
true for long pages
Anti-pattern:
Missing linkTitle - navigation shows full title
No description - poor search results
Random weights - chaotic navigation
Draft pages in production
Pattern 10: Visual Storytelling
Context: Explaining complex concepts with visuals
Pattern: The “Zoom In” Technique
Start with the big picture
High-level architecture diagram
3-5 main components
No implementation details
Then zoom into details
Detailed view of each component
Show interfaces and interactions
Include relevant code snippets
Connect back to the whole
Reference the big picture
Explain how detail fits in
Link to related detailed views
Example Structure:
## Architecture Overview
Here's how the Morphir pipeline works at a high level:
[High-level flowchart - 5 boxes]
Let's dive into each stage...
### Stage 1: Input Processing
This stage handles [description]. Here's a closer look:
[Detailed sequence diagram for Stage 1]
This connects to Stage 2 via [interface description].
### Stage 2: Validation
[Continue pattern...]
Why This Works:
Readers understand context first
Details make sense within the whole
Easy to navigate to specific areas
Supports different reading depths
Pattern 11: Docsy Navigation Structure
Context: Organizing documentation for discoverability
Starting Work: Check the status to see what’s being worked on
Implementation: Update the PRD’s Feature Status Tracking table as you complete features
Design Decisions: Add Implementation Notes to capture important decisions
Questions: Document answers to Open Questions as they’re resolved
For AI Agents
When asked “What should I work on?” or “What’s the current status?”:
Check this index for active PRDs
Open the relevant PRD and find the Feature Status Tracking table
Look for features with status ⏳ Planned (ready to start) or 🚧 In Progress
Update feature status in real-time as work progresses
Add Implementation Notes for significant design decisions
Creating a New PRD
Copy an existing PRD as a template
Fill in all sections with comprehensive detail
Include Feature Status Tracking table with all planned features
Add to this index with “Draft” status
Submit for review and approval before implementation begins
6.1 - PRD: IR JSON Schema Verification
Product Requirements Document for Morphir IR JSON schema verification tooling
Product Requirements Document: IR JSON Schema Verification
Status: ✅ Phase 1 Complete | ⏳ Phase 2 Ready
Created: 2025-12-13
Last Updated: 2025-12-15
Phase 1 Completion Date: 2025-12-15
Current Phase: Phase 1 Complete - Ready for Phase 2
Author: Morphir .NET Team
Overview
This PRD defines the requirements for adding JSON schema verification capabilities to the Morphir .NET CLI and tooling. This feature will enable developers to validate Morphir IR JSON files against the official schema specifications for all supported format versions (v1, v2, v3).
The implementation will introduce WolverineFx as a messaging layer between the CLI and core tooling services, using Vertical Slice Architecture to organize features by use case rather than technical layers.
Problem Statement
Currently, developers working with Morphir IR JSON files have no built-in way to:
Validate IR correctness: Verify that generated or hand-written IR files conform to the expected schema
Debug format issues: Quickly identify structural problems in IR files
Ensure version compatibility: Confirm which schema version an IR file uses and whether it’s valid
Catch errors early: Detect malformed IR before it causes runtime failures in downstream tools
Current Pain Points
Manual validation: Developers must use external tools (Python jsonschema, Node.js ajv-cli) to validate IR
Version confusion: No automated way to detect which schema version an IR file uses
Poor error messages: External validators provide generic JSON schema errors without Morphir-specific context
Workflow friction: Validation requires switching between tools and languages
Goals
Primary Goals
Enable IR validation via CLI command for all supported schema versions (v1, v2, v3)
Establish WolverineFx integration with Vertical Slice Architecture as the foundation for future tooling commands
Provide excellent developer experience with clear, actionable error messages and multiple output formats
Support flexible input starting with file paths, with extensibility for stdin and multiple files
Auto-detect schema versions while allowing manual override when needed
Secondary Goals
Create reusable validation services in Morphir.Tooling that can be leveraged by other tools
Establish testing patterns using BDD scenarios for validation use cases
Document architectural decisions for Vertical Slice Architecture adoption
Non-Goals
Explicitly Out of Scope
IR migration/upgrade tooling: Will be addressed in a separate PRD (tracked below)
Schema generation: Creating schemas from .NET types
Real-time validation: IDE plugins or language servers
IR parsing/deserialization: This already exists in Morphir.Core
Schema authoring: Schemas are maintained in the upstream Morphir repository
User Stories
Story 1: Validate IR File
As a Morphir developer
I want to validate my IR JSON file against the official schema
So that I can catch structural errors before using the IR in other tools
Acceptance Criteria:
User runs morphir ir verify path/to/morphir-ir.json
Tool auto-detects schema version from JSON
Tool validates against appropriate schema
Tool returns clear success or detailed error messages
Exit code is 0 for valid, non-zero for invalid
Story 2: Validate Specific Schema Version
As a Morphir tooling developer
I want to validate IR against a specific schema version
So that I can test version-specific compatibility
Acceptance Criteria:
User runs morphir ir verify --schema-version 3 path/to/morphir-ir.json
Tool validates against specified schema version regardless of file content
Tool reports validation results for the specified version
Story 3: Machine-Readable Output
As a CI/CD pipeline
I want to get validation results in JSON format
So that I can parse and process errors programmatically
Acceptance Criteria:
User runs morphir ir verify --json path/to/morphir-ir.json
Tool outputs structured JSON with validation results
JSON includes error locations, messages, and metadata
Story 4: Quick Status Check
As a developer in a CI pipeline
I want to validate IR without verbose output
So that I can keep build logs clean
Acceptance Criteria:
User runs morphir ir verify --quiet path/to/morphir-ir.json
Tool only outputs errors (if any)
Exit code indicates success/failure
Story 5: Detect IR Version
As a Morphir developer
I want to identify which schema version my IR file uses
So that I know which tools and features are compatible
Acceptance Criteria:
User runs morphir ir detect-version path/to/morphir-ir.json
Tool analyzes IR structure and reports detected version
Tool provides confidence level or rationale for detection
Detailed Requirements
Functional Requirements
FR-1: Command Interface
Command Structure:
morphir ir verify <file-path> [options]
Required Arguments:
<file-path>: Path to the Morphir IR JSON file to validate
Options:
--schema-version <version>: Explicitly specify schema version (1, 2, or 3)
--json: Output results in JSON format
--quiet: Suppress output except errors
-v, --verbose: Show detailed validation information
Exit Codes:
0: Validation successful
1: Validation failed (schema errors)
2: Operational error (file not found, invalid JSON, etc.)
FR-2: Input Format Support
Phase 1 (Initial Release):
✅ File paths (absolute and relative)
Phase 2 (Future):
⏳ Stdin support: cat morphir-ir.json | morphir ir verify -
⏳ Multiple files: morphir ir verify file1.json file2.json file3.json
⏳ Directory validation: morphir ir verify --recursive ./ir-files/
FR-3: Schema Version Handling
Auto-Detection Logic (default behavior):
Look for formatVersion field in JSON
Analyze tag capitalization patterns:
All lowercase tags → v1
Mixed capitalization → v2
All capitalized tags → v3
If ambiguous, report detection failure with suggestions
Manual Override:
--schema-version option forces validation against specified version
Validate against JSON Schema Draft 07 specification
Provide detailed error locations using JSON Path notation
Include contextual information in error messages
FR-6: Version Detection Helper
Command:
morphir ir detect-version <file-path>
Output Example:
Detected schema version: v3
Confidence: High
Rationale:
- All tags are capitalized ("Library", "Public", "Apply", etc.)
- Contains formatVersion: 3
Implementation Status: ⏳ Planned for Phase 2
FR-7: Error Reporting Quality
Error Messages Must Include:
JSON Path to the error location
Expected value/format
Actual value found
Line and column numbers (when possible)
Suggested fixes (when applicable)
Example Error:
Error: Invalid access control tag
Location: $.modules[0].types["Account"].accessControlled[0]
Expected: One of ["Public", "Private"]
Found: "public"
Suggestion: Change "public" to "Public" (capitalize first letter)
Non-Functional Requirements
NFR-1: Performance
Targets:
Small files (<100KB): Validation completes in <100ms
Typical files (<1MB): Validation completes in <500ms
Large files (>1MB): Validation completes in <2 seconds
Benchmarking:
Use BenchmarkDotNet for performance testing
Test with representative IR files of varying sizes
Profile schema loading and validation separately
NFR-2: Reliability
Error Handling:
Gracefully handle malformed JSON with clear error messages
Catch and report file I/O errors (file not found, permission denied, etc.)
Handle edge cases: empty files, extremely large files, invalid UTF-8
Never crash; always return meaningful error messages
Validation Accuracy:
100% compliance with JSON Schema Draft 07 specification
Zero false positives (valid IR rejected)
Zero false negatives (invalid IR accepted)
NFR-3: Usability
CLI Experience:
Clear, consistent command naming following morphir <noun> <verb> pattern
Colored output for terminal readability (green=success, red=errors, yellow=warnings)
Progress indicators for large files
Helpful error messages with actionable suggestions
Documentation:
CLI help text: morphir ir verify --help
User guide in main docs: /docs/guides/validating-ir.md
// Add new IR subcommandvar irCommand = new Command("ir", "Morphir IR operations");
var verifyCommand = new Command("verify", "Verify IR against JSON schema")
{
filePathArgument,
schemaVersionOption,
jsonFormatOption,
quietOption
};
verifyCommand.SetHandler(async (string filePath, int? version, bool json, bool quiet) =>
{
// Dispatch to WolverineFx handler via message busvar command = new VerifyIR(filePath, version, json, quiet);
var result = await messageBus.InvokeAsync<VerifyIRResult>(command);
// Format and display result DisplayResult(result, json, quiet);
});
irCommand.AddCommand(verifyCommand);
rootCommand.AddCommand(irCommand);
# Features/VerifyMultipleIR.featureScenario: Validate multiple files in batch
Given I have 10 valid IR files
When I run "morphir ir verify file1.json file2.json ... file10.json"
Then all 10 files should be validated
And the summary should show "10 valid, 0 invalid"
# Features/DetectVersion.featureScenario: Detect version with high confidence
Given a valid IR v3 file with formatVersion field
When I run "morphir ir detect-version file.json"
Then the detected version should be "3"
And the confidence level should be "High"
Integration Tests to Add:
CLI with stdin input (pipe)
CLI with multiple file arguments
CLI with glob patterns
Parallel processing performance
📚 Documentation Updates for Phase 2
New Documentation:
docs/content/docs/cli/ir-detect-version.md - New command reference
6.2 - BDD Test Scenarios: IR JSON Schema Verification
Comprehensive BDD test scenarios in Gherkin syntax for IR schema verification feature
BDD Test Scenarios: IR JSON Schema Verification
This document defines comprehensive BDD scenarios using Gherkin syntax for the IR JSON Schema Verification feature. These scenarios will be implemented as Reqnroll feature files in tests/Morphir.Core.Tests/Features/.
Feature: IR Schema Verification
As a Morphir developer
I want to validate IR JSON files against schemas
So that I can catch structural errors early
Background: Given the Morphir CLI is installed
And the schema files v1, v2, and v3 are available
Rule: Valid IR files pass validation
Scenario: Validate a valid v3 IR file
Given a valid Morphir IR v3 JSON file "valid-v3.json"
When I run "morphir ir verify valid-v3.json"
Then the exit code should be 0And the output should contain "✓ Validation successful"
And the output should contain "Schema: v3 (auto-detected)"
And the output should contain "File: valid-v3.json"
Scenario: Validate a valid v2 IR file
Given a valid Morphir IR v2 JSON file "valid-v2.json"
When I run "morphir ir verify valid-v2.json"
Then the exit code should be 0And the output should contain "✓ Validation successful"
And the output should contain "Schema: v2 (auto-detected)"
Scenario: Validate a valid v1 IR file
Given a valid Morphir IR v1 JSON file "valid-v1.json"
When I run "morphir ir verify valid-v1.json"
Then the exit code should be 0And the output should contain "✓ Validation successful"
And the output should contain "Schema: v1 (auto-detected)"
Scenario Outline: Validate various valid IR files across versions
Given a valid Morphir IR <version> JSON file "<filename>"
When I run "morphir ir verify <filename>"
Then the exit code should be 0And the output should contain "✓ Validation successful"
And the output should contain "Schema: <version> (auto-detected)"
Examples:
| version | filename | | v1 | library-v1.json | | v1 | complex-types-v1.json | | v2 | library-v2.json | | v2 | complex-types-v2.json | | v3 | library-v3.json | | v3 | complex-types-v3.json |
Rule: Invalid IR files fail validation with clear errors
Scenario: Validate an IR file with incorrect tag capitalization
Given an invalid Morphir IR v3 JSON file "invalid-tags.json" with lowercase tags
When I run "morphir ir verify invalid-tags.json"
Then the exit code should be 1And the output should contain "✗ Validation failed"
And the output should contain "Invalid type tag"
And the output should contain "Expected: \"Public\" or \"Private\""
And the output should contain "Found: \"public\""
Scenario: Validate an IR file with missing required fields
Given an invalid Morphir IR v3 JSON file "missing-fields.json" missing the "name" field
When I run "morphir ir verify missing-fields.json"
Then the exit code should be 1And the output should contain "✗ Validation failed"
And the output should contain "Missing required field"
And the output should contain "Path: $.package.modules"
And the output should contain "Required property 'name' is missing"
Scenario: Validate an IR file with invalid type structure
Given an invalid Morphir IR v3 JSON file "invalid-structure.json" with malformed type definitions
When I run "morphir ir verify invalid-structure.json"
Then the exit code should be 1And the output should contain "✗ Validation failed"
And the error count should be greater than 0Scenario: Validate an IR file with multiple errors
Given an invalid Morphir IR v3 JSON file "multiple-errors.json" with 5 validation errors
When I run "morphir ir verify multiple-errors.json"
Then the exit code should be 1And the output should contain "5 errors found"
And the output should list all 5 errors with JSON paths
Rule: Schema version can be manually specified
Scenario: Force validation against specific schema version
Given a Morphir IR JSON file "mixed-version.json"
When I run "morphir ir verify --schema-version 2 mixed-version.json"
Then the validation should use schema v2And the output should contain "Schema: v2 (manual)"
Scenario: Override auto-detection with explicit version
Given a valid Morphir IR v3 JSON file "valid-v3.json"
When I run "morphir ir verify --schema-version 3 valid-v3.json"
Then the exit code should be 0And the output should contain "Schema: v3 (manual)"
Scenario: Validate v2 file against v3 schema (should fail)
Given a valid Morphir IR v2 JSON file "valid-v2.json"
When I run "morphir ir verify --schema-version 3 valid-v2.json"
Then the exit code should be 1And the output should contain "✗ Validation failed against schema v3"
Scenario Outline: Validate with explicit version specification
Given a valid Morphir IR <actual-version> JSON file "<filename>"
When I run "morphir ir verify --schema-version <specified-version><filename>"
Then the exit code should be <exit-code>And the output should contain "Schema: <specified-version> (manual)"
Examples:
| filename | actual-version | specified-version | exit-code | | valid-v1.json | v1 | 1 | 0 | | valid-v2.json | v2 | 2 | 0 | | valid-v3.json | v3 | 3 | 0 | | valid-v1.json | v1 | 3 | 1 | | valid-v2.json | v2 | 1 | 1 |
Rule: Multiple output formats are supported
Scenario: Output validation results as JSON
Given an invalid Morphir IR JSON file "errors.json"
When I run "morphir ir verify --json errors.json"
Then the output should be valid JSON
And the JSON should have field "valid" with value false
And the JSON should have field "errors" as an array
And each error should include "path", "message", "expected", and "found"
Scenario: Output successful validation as JSON
Given a valid Morphir IR v3 JSON file "valid-v3.json"
When I run "morphir ir verify --json valid-v3.json"
Then the output should be valid JSON
And the JSON should have field "valid" with value true
And the JSON should have field "schemaVersion" with value "3"
And the JSON should have field "detectionMethod" with value "auto"
And the JSON should have field "errorCount" with value 0Scenario: Quiet mode suppresses success messages
Given a valid Morphir IR v3 JSON file "valid-v3.json"
When I run "morphir ir verify --quiet valid-v3.json"
Then the exit code should be 0And the output should be empty
Scenario: Quiet mode shows only errors
Given an invalid Morphir IR v3 JSON file "invalid-tags.json"
When I run "morphir ir verify --quiet invalid-tags.json"
Then the exit code should be 1And the output should contain error messages
And the output should not contain "✗ Validation failed"
And the output should not contain headers or decorations
Scenario: Verbose mode shows detailed information
Given a valid Morphir IR v3 JSON file "valid-v3.json"
When I run "morphir ir verify --verbose valid-v3.json"
Then the exit code should be 0And the output should contain "✓ Validation successful"
And the output should contain "Schema: v3 (auto-detected)"
And the output should contain "File: valid-v3.json"
And the output should contain validation timestamp
And the output should contain schema file path
Rule: Error messages are clear and actionable
Scenario: Error message includes JSON path
Given an invalid Morphir IR v3 JSON file "bad-path.json" with error at "$.modules[0].types.MyType"
When I run "morphir ir verify bad-path.json"
Then the exit code should be 1And the output should contain "Path: $.modules[0].types.MyType"
Scenario: Error message includes line and column numbers
Given an invalid Morphir IR v3 JSON file "line-col-error.json" with error at line 42, column 12When I run "morphir ir verify line-col-error.json"
Then the exit code should be 1And the output should contain "Line: 42, Column: 12"
Scenario: Error message suggests fixes
Given an invalid Morphir IR v3 JSON file "lowercase-tag.json" with lowercase "public" tag
When I run "morphir ir verify lowercase-tag.json"
Then the exit code should be 1And the output should contain 'Suggestion: Change "public" to "Public"'
Rule: Edge cases and error handling
Scenario: File not found
When I run "morphir ir verify non-existent-file.json"
Then the exit code should be 2And the output should contain "File not found: non-existent-file.json"
Scenario: Malformed JSON
Given a file "malformed.json" with invalid JSON syntax
When I run "morphir ir verify malformed.json"
Then the exit code should be 2And the output should contain "Invalid JSON"
And the output should contain the JSON parsing error location
Scenario: Empty file
Given an empty file "empty.json"
When I run "morphir ir verify empty.json"
Then the exit code should be 2And the output should contain "File is empty"
Scenario: Very large file
Given a valid Morphir IR v3 JSON file "large-10mb.json" of size 10MB
When I run "morphir ir verify large-10mb.json"
Then the validation should complete within 2 seconds
And the exit code should be 0Scenario: Invalid schema version specified
Given a valid Morphir IR v3 JSON file "valid-v3.json"
When I run "morphir ir verify --schema-version 5 valid-v3.json"
Then the exit code should be 2And the output should contain "Schema version must be 1, 2, or 3"
Scenario: File with invalid UTF-8 encoding
Given a file "invalid-utf8.json" with invalid UTF-8 bytes
When I run "morphir ir verify invalid-utf8.json"
Then the exit code should be 2And the output should contain "Invalid file encoding"
Feature 2: Version Detection
Feature File: IrVersionDetection.feature
Feature: IR Version Detection
As a Morphir developer
I want to automatically detect which schema version my IR uses
So that I can validate against the correct schema
Background: Given the Morphir CLI is installed
And the schema files v1, v2, and v3 are available
Rule: Auto-detection works for files with formatVersion field
Scenario: Detect version from formatVersion field (v3)
Given a Morphir IR JSON file "with-format-v3.json" containing "formatVersion": 3When I run "morphir ir verify with-format-v3.json"
Then the validation should use schema v3And the output should contain "Schema: v3 (auto-detected)"
Scenario Outline: Detect version from formatVersion field
Given a Morphir IR JSON file "<filename>" containing "formatVersion": <version>When I run "morphir ir verify <filename>"
Then the validation should use schema v<version>And the output should contain "Schema: v<version> (auto-detected)"
Examples:
| filename | version | | format-v1.json | 1 | | format-v2.json | 2 | | format-v3.json | 3 |
Rule: Auto-detection uses tag capitalization when formatVersion is absent
Scenario: Detect v1 from lowercase tags
Given a Morphir IR JSON file "no-format-v1.json" without formatVersion
And the file uses all lowercase tags like "library", "public", "apply"
When I run "morphir ir verify no-format-v1.json"
Then the validation should use schema v1And the output should contain "Schema: v1 (auto-detected)"
Scenario: Detect v3 from capitalized tags
Given a Morphir IR JSON file "no-format-v3.json" without formatVersion
And the file uses all capitalized tags like "Library", "Public", "Apply"
When I run "morphir ir verify no-format-v3.json"
Then the validation should use schema v3And the output should contain "Schema: v3 (auto-detected)"
Scenario: Detect v2 from mixed capitalization
Given a Morphir IR JSON file "no-format-v2.json" without formatVersion
And the file uses mixed case tags
When I run "morphir ir verify no-format-v2.json"
Then the validation should use schema v2And the output should contain "Schema: v2 (auto-detected)"
Rule: Standalone version detection command
Scenario: Detect version with dedicated command
Given a Morphir IR JSON file "detect-me.json" with v3 structure
When I run "morphir ir detect-version detect-me.json"
Then the exit code should be 0And the output should contain "Detected schema version: v3"
And the output should contain "Confidence: High"
And the output should contain "Rationale:"
Scenario: Version detection shows rationale
Given a Morphir IR JSON file "v3-with-format.json" containing "formatVersion": 3When I run "morphir ir detect-version v3-with-format.json"
Then the output should contain "Contains formatVersion: 3"
Scenario: Version detection analyzes tag patterns
Given a Morphir IR JSON file "v3-no-format.json" without formatVersion but with capitalized tags
When I run "morphir ir detect-version v3-no-format.json"
Then the output should contain 'All tags are capitalized ("Library", "Public", "Apply")'
Scenario Outline: Detect version with varying confidence levels
Given a Morphir IR JSON file "<filename>" with <indicators>When I run "morphir ir detect-version <filename>"
Then the output should contain "Confidence: <confidence>"
Examples:
| filename | indicators | confidence | | clear-v3.json | formatVersion and cap tags | High | | likely-v1.json | lowercase tags only | Medium | | ambiguous.json | minimal structure | Low |
Feature 3: Multiple File Support (Phase 2)
Feature File: IrMultiFileVerification.feature
Feature: Multiple File Verification
As a Morphir developer working with multiple IR files
I want to validate several files at once
So that I can efficiently verify my entire project
Background: Given the Morphir CLI is installed with Phase 2 features
Rule: Multiple files can be validated in one command
Scenario: Validate two valid files
Given valid IR files "file1.json" and "file2.json"
When I run "morphir ir verify file1.json file2.json"
Then the exit code should be 0And the output should show results for "file1.json"
And the output should show results for "file2.json"
And both files should pass validation
Scenario: Validate mix of valid and invalid files
Given a valid IR file "valid.json"
And an invalid IR file "invalid.json"
When I run "morphir ir verify valid.json invalid.json"
Then the exit code should be 1And the output should show "valid.json" passed
And the output should show "invalid.json" failed with errors
Scenario: Validate multiple files with summary
Given 10 valid IR files
And 3 invalid IR files
When I run "morphir ir verify *.json"
Then the exit code should be 1And the output should contain "Summary: 10 passed, 3 failed"
Rule: Stdin support for piped input
Scenario: Validate IR from stdin
Given a valid Morphir IR v3 JSON file "valid-v3.json"
When I run "cat valid-v3.json | morphir ir verify -"
Then the exit code should be 0And the output should contain "✓ Validation successful"
And the output should contain "Source: stdin"
Scenario: Validate invalid IR from stdin
Given an invalid Morphir IR JSON file "invalid.json"
When I run "cat invalid.json | morphir ir verify -"
Then the exit code should be 1And the output should contain "✗ Validation failed"
Scenario: Combine file and stdin (stdin represented as -)
Given a valid IR file "file.json"
And valid IR JSON content in stdin
When I run "cat stdin.json | morphir ir verify file.json -"
Then the exit code should be 0And the output should show results for "file.json"
And the output should show results for "stdin"
Rule: Batch processing is efficient
Scenario: Validate 100 files efficiently
Given 100 valid IR files in "batch/" directory
When I run "morphir ir verify batch/*.json"
Then the validation should complete within 10 seconds
And the exit code should be 0And the output should contain "Summary: 100 passed, 0 failed"
Scenario: Stop on first error (--fail-fast option)
Given 5 valid IR files and 1 invalid IR file
When I run "morphir ir verify --fail-fast *.json"
Then the validation should stop at the first error
And the exit code should be 1And not all files should be processed
Feature 4: Directory Validation (Phase 3)
Feature File: IrDirectoryVerification.feature
Feature: Directory Verification
As a Morphir developer with many IR files
I want to validate entire directories
So that I can ensure all my IR files are correct
Background: Given the Morphir CLI is installed with Phase 3 features
Rule: Directories can be validated recursively
Scenario: Validate all JSON files in directory
Given a directory "ir-files/" with 5 valid IR JSON files
When I run "morphir ir verify --recursive ir-files/"
Then the exit code should be 0And all 5 files should be validated
And the output should contain "5 files validated, 5 passed"
Scenario: Validate directory with mixed results
Given a directory "mixed/" with 3 valid and 2 invalid IR files
When I run "morphir ir verify --recursive mixed/"
Then the exit code should be 1And the output should contain "5 files validated, 3 passed, 2 failed"
Scenario: Skip non-JSON files in directory
Given a directory "mixed-types/" with JSON and non-JSON files
When I run "morphir ir verify --recursive mixed-types/"
Then only JSON files should be validated
And the output should list which files were skipped
Scenario: Validate nested directory structure
Given a nested directory structure:
""" project/
├── src/
│ ├── module1/
│ │ └── ir.json
│ └── module2/
│ └── ir.json
└── tests/
└── fixtures/
└── ir.json
"""When I run "morphir ir verify --recursive project/"
Then all 3 IR files should be validated
And the output should show the relative paths of all files
Rule: Directory validation supports filtering
Scenario: Validate only specific file patterns
Given a directory with various JSON files
When I run "morphir ir verify --recursive --pattern 'morphir-*.json' dir/"
Then only files matching "morphir-*.json" should be validated
Scenario: Exclude specific directories
Given a directory structure with "node_modules/" and "src/"
When I run "morphir ir verify --recursive --exclude 'node_modules' ."
Then files in "node_modules/" should be skipped
And files in "src/" should be validated
Feature 5: Error Reporting Quality
Feature File: IrValidationErrorReporting.feature
Feature: Validation Error Reporting
As a Morphir developer fixing validation errors
I want detailed, actionable error messages
So that I can quickly identify and fix issues
Background: Given the Morphir CLI is installed
Rule: Errors include precise location information
Scenario: Error with JSON path
Given an IR file "error.json" with invalid value at "$.modules[0].types.MyType.accessControlled[0]"
When I run "morphir ir verify error.json"
Then the output should contain the exact JSON path
And the path should be formatted as "$.modules[0].types.MyType.accessControlled[0]"
Scenario: Error with line and column numbers
Given an IR file "error.json" with syntax error at line 42, column 12When I run "morphir ir verify error.json"
Then the output should contain "Line: 42, Column: 12"
Scenario: Error shows context snippet
Given an IR file with error at line 42When I run "morphir ir verify --verbose error.json"
Then the output should include a code snippet around line 42And the error line should be highlighted
Rule: Errors explain what was expected vs found
Scenario: Type mismatch error
Given an IR file with string where number is expected
When I run "morphir ir verify error.json"
Then the output should contain "Expected: number"
And the output should contain 'Found: "some string"'
Scenario: Enum value error
Given an IR file with invalid access control tag
When I run "morphir ir verify error.json"
Then the output should contain 'Expected: One of ["Public", "Private"]'
And the output should contain 'Found: "public"'
Scenario: Array length constraint error
Given an IR file with array that violates length constraints
When I run "morphir ir verify error.json"
Then the output should contain "Expected: Array with 2 elements"
And the output should contain "Found: Array with 3 elements"
Rule: Errors provide helpful suggestions
Scenario: Suggest capitalization fix
Given an IR file with lowercase tag in v3 IR
When I run "morphir ir verify error.json"
Then the output should contain 'Suggestion: Change "public" to "Public"'
Scenario: Suggest adding missing field
Given an IR file missing required "name" field
When I run "morphir ir verify error.json"
Then the output should contain 'Suggestion: Add required field "name"'
Scenario: Suggest similar field names for typos
Given an IR file with "nmae" instead of "name"
When I run "morphir ir verify error.json"
Then the output should contain 'Did you mean "name"?'
Rule: Multiple errors are clearly enumerated
Scenario: List multiple errors with numbering
Given an IR file with 3 validation errors
When I run "morphir ir verify error.json"
Then the output should contain "Error 1:"
And the output should contain "Error 2:"
And the output should contain "Error 3:"
And the output should contain "3 errors found"
Scenario: Group errors by category
Given an IR file with type errors and missing field errors
When I run "morphir ir verify error.json"
Then errors should be grouped by type
And the output should show "Type Errors (2)" and "Missing Fields (3)"
Scenario: Limit error display with --max-errors option
Given an IR file with 50 validation errors
When I run "morphir ir verify --max-errors 10 error.json"
Then only the first 10 errors should be displayed
And the output should contain "... and 40 more errors"
Rule: Error output is machine-readable in JSON mode
Scenario: JSON error format includes all details
Given an IR file with validation errors
When I run "morphir ir verify --json error.json"
Then the JSON output should include:
| field | description | | valid | false | | errors | Array of error objects | | errors[].path | JSON path to error | | errors[].line | Line number | | errors[].column | Column number | | errors[].message| Human-readable error message | | errors[].code | Machine-readable error code |
Scenario: Error codes are consistent and documented
Given an IR file with a missing required field
When I run "morphir ir verify --json error.json"
Then the error should have code "MISSING_REQUIRED_FIELD"
And the error code should be documented
Feature 6: Performance and Scalability
Feature File: IrValidationPerformance.feature
Feature: Validation Performance
As a developer integrating validation in CI/CD
I want fast validation even for large files
So that builds remain efficient
Background: Given the Morphir CLI is installed
Rule: Validation meets performance targets
Scenario Outline: Validate files of varying sizes
Given a valid Morphir IR v3 JSON file of size <size>When I run "morphir ir verify <filename>"
Then the validation should complete within <max-time>And the exit code should be 0Examples:
| size | filename | max-time | | 10KB | small.json | 100ms | | 100KB | medium.json | 100ms | | 1MB | large.json | 500ms | | 10MB | very-large.json | 2000ms |
Scenario: Schema caching improves performance
Given 10 valid IR files
When I run "morphir ir verify file1.json ... file10.json"
Then schemas should only be loaded once
And subsequent validations should be faster
Scenario: Memory usage remains bounded
Given a 50MB IR file
When I run "morphir ir verify huge.json"
Then memory usage should not exceed 500MB
And validation should complete successfully
Rule: Validation supports progress reporting
Scenario: Show progress for multiple files
Given 100 IR files to validate
When I run "morphir ir verify --progress *.json"
Then the output should show a progress indicator
And the progress should update as files are validated
Scenario: Show progress for large single file
Given a 10MB IR file
When I run "morphir ir verify --progress large.json"
Then the output should show validation progress
Implementation Notes
Step Definition Organization
Step definitions should be organized in the following files within tests/Morphir.Core.Tests/StepDefinitions/:
IrVerificationSteps.cs: Common steps for file setup, CLI execution, output assertions
IrSchemaSteps.cs: Steps specific to schema validation
IrVersionDetectionSteps.cs: Steps for version detection scenarios
IrFileManagementSteps.cs: Steps for file and directory operations
Test Data Strategy
Test IR JSON files should be stored in tests/Morphir.Core.Tests/TestData/IrFiles/:
6.3 - PRD: Product Manager Skill for Morphir Ecosystem
Product Requirements Document for an AI Product Manager skill with comprehensive Morphir ecosystem knowledge
Product Requirements Document: Product Manager Skill for Morphir Ecosystem
Status: 📋 Draft
Created: 2025-12-18
Last Updated: 2025-12-18
Current Phase: Phase 1 - Planning and Design
Author: Morphir .NET Team
Related Issue: #228
Overview
This PRD defines requirements for creating a specialized Product Manager skill for AI coding agents. This skill will provide comprehensive product management capabilities tailored to the Morphir ecosystem across all FINOS Morphir repositories, helping users create better PRDs, craft meaningful issues, understand the ecosystem, and make product decisions aligned with Morphir’s philosophy.
Problem Statement
Currently, contributors working across the Morphir ecosystem face several challenges:
Fragmented Knowledge: Morphir spans multiple repositories (morphir-elm, morphir-jvm, morphir-scala, morphir-dotnet, etc.) with varying maturity levels, features, and conventions
Inconsistent Issue Quality: Issues and PRs often lack context, proper categorization, or alignment with project goals
PRD Gaps: Not all features have comprehensive PRDs, and creating high-quality PRDs requires deep Morphir knowledge
Cross-Repo Blind Spots: Contributors may duplicate work or miss opportunities for cross-repository synergies
UX/DX Debt: User experience and developer experience improvements need dedicated advocacy
Manual Ecosystem Tracking: No automated way to track trends, backlogs, or health metrics across the ecosystem
Current Pain Points
New contributors struggle to understand where to contribute and how to write good issues
Maintainers spend time triaging poorly-written issues and PRs
Product decisions lack ecosystem-wide context and may not align with Morphir’s functional modeling philosophy
Documentation gaps make it hard to understand feature status across implementations
Backlog management is manual and repository-siloed
Goals
Primary Goals
Expert PRD Guidance: Help users create comprehensive, well-structured PRDs aligned with Morphir principles
Issue Quality Improvement: Assist in crafting high-quality issues (bugs, features, enhancements) with proper context
Ecosystem Intelligence: Provide real-time awareness of backlogs, trends, and status across all Morphir repositories
UX/DX Advocacy: Champion user and developer experience improvements
Intelligent Questioning: Push back constructively on features that don’t align with Morphir’s ethos
GitHub Automation: Provide F# scripts for querying, analyzing, and reporting across the ecosystem
Secondary Goals
Cross-Skill Integration: Coordinate effectively with qa-tester and release-manager skills
Knowledge Management: Maintain and share institutional knowledge about Morphir
Template Library: Provide reusable templates for common product management tasks
Metrics & Analytics: Track and report ecosystem health metrics
Non-Goals
Explicitly Out of Scope
Code Implementation: Development agents handle implementation
As a contributor
I want to validate that my feature idea aligns with Morphir’s philosophy
So that I don’t waste effort on something that won’t be accepted
Acceptance Criteria:
User proposes a feature idea
Product Manager asks probing questions about motivation, alternatives
Filter by label, state, milestone, assignee, author
Sort by created, updated, comments, reactions
Format output as JSON, Markdown, or table
Cache results for performance
Script: analyze-backlog.fsx
// Analyze backlog health metrics
// Usage: dotnet fsi analyze-backlog.fsx --repo "finos/morphir-dotnet"
// Output: Health report with metrics and recommendations
Features:
Calculate backlog age distribution
Identify stale issues (no activity in 90+ days)
Analyze priority distribution
Compare against ecosystem averages
Generate recommendations for triage
Script: trend-analysis.fsx
// Identify trending topics across ecosystem
// Usage: dotnet fsi trend-analysis.fsx --since "30 days ago"
// Output: Trend report with top labels, themes, activity
Features:
Most active labels in time period
Emerging themes from issue titles/descriptions
Spike detection (unusual activity)
Cross-repository correlation
Sentiment analysis (positive/negative)
Script: check-ecosystem.fsx
// Check status across all Morphir repositories
// Usage: dotnet fsi check-ecosystem.fsx
// Output: Ecosystem health dashboard
Features:
Latest release versions
CI/CD status
Open PR counts
Recent activity summary
Documentation status
Test coverage (if available)
Script: generate-prd.fsx
// Generate PRD from template with interactive prompts
// Usage: dotnet fsi generate-prd.fsx --template "standard"
// Output: PRD markdown file
Features:
Interactive questionnaire for PRD sections
Pre-fill from existing issues or discussions
Validate completeness
Preview before saving
Save to docs/content/contributing/design/prds/
FR-5: Integration with Other Skills
With qa-tester:
Coordinate on acceptance criteria definition
Align test plans with PRD requirements
Validate feature completeness against PRD
Review test coverage for PRD features
With release-manager:
Align features with release roadmap
Coordinate changelog entries
Review “What’s New” documentation
Prioritize features for releases
With development agents:
Provide clear requirements and context
Answer questions during implementation
Validate implementation against PRD
Document design decisions in PRD
FR-6: Knowledge Management
Morphir Core Concepts:
Functional modeling approach
Type-driven development
Business domain modeling
Distribution and intermediate representation
Cross-language support strategy
Architecture Patterns:
Vertical Slice Architecture
Railway-oriented programming
ADT-first design
Immutability and pure functions
Effect management at boundaries
Decision-Making Framework:
IR fidelity over convenience
Minimize dependencies
Performance requires benchmarks
Keep effects at edges
Prefer explicit ADTs
Non-Functional Requirements
NFR-1: Response Time
Script execution < 30 seconds for single-repo queries
Script execution < 2 minutes for ecosystem-wide queries
PRD generation interactive (responds to each question in < 5 seconds)
NFR-2: Accuracy
Cross-repository queries return 100% accurate results
Trend analysis validated against manual review (>95% agreement)
Issue recommendations relevant (>80% user acceptance)
NFR-3: Maintainability
Scripts use GitHub CLI (gh) for authentication
Scripts use standard F# libraries (no exotic dependencies)
Scripts include help text and examples
Scripts handle rate limiting gracefully
NFR-4: Usability
Clear, conversational interaction style
Asks clarifying questions before making assumptions
Provides rationale for recommendations
Offers alternatives when pushing back
Links to relevant documentation
NFR-5: Documentation
Comprehensive skill.md with all capabilities
README with quick start guide
Script documentation with usage examples
Template documentation with instructions
Integration guide for other skills
Technical Design
Skill Structure
.claude/skills/product-manager/
├── skill.md # Main skill definition and playbooks
├── README.md # Quick start and overview
├── scripts/ # F# automation scripts
│├── query-issues.fsx # Multi-repo issue queries
│├── analyze-backlog.fsx # Backlog health analysis
│├── trend-analysis.fsx # Trend detection and reporting
│├── check-ecosystem.fsx # Ecosystem status dashboard
│├── generate-prd.fsx # Interactive PRD generation
│├── update-knowledge.fsx # Update knowledgebase from live sources
│└── common/ # Shared utilities
│├── github-api.fsx # GitHub API helpers
│├── formatting.fsx # Output formatting
│└── cache.fsx # Result caching
├── templates/ # Document templates
│├── prd-standard.md # Standard feature PRD
│├── prd-architecture.md # Architecture change PRD
│├── prd-breaking.md # Breaking change PRD
│├── issue-feature.md # Feature request template
│├── issue-bug.md # Bug report template
│└── issue-enhancement.md # Enhancement proposal template
├── knowledge/ # Curated knowledgebase (markdown)
│├── README.md # Knowledgebase overview and index
│├── morphir-principles.md # Core Morphir philosophy and principles
│├── ecosystem-map.md # Repository overview and relationships
│├── architecture/ # Architecture patterns and decisions
││├── ir-design.md # IR architecture and versioning
││├── vertical-slices.md # Vertical Slice Architecture
││├── type-system.md # Morphir type system
││└── distribution-model.md # Cross-language distribution
│├── repositories/ # Per-repository knowledge
││├── morphir-core.md # finos/morphir (specs)
││├── morphir-elm.md # finos/morphir-elm (reference)
││├── morphir-jvm.md # finos/morphir-jvm
││├── morphir-scala.md # finos/morphir-scala
││├── morphir-dotnet.md # finos/morphir-dotnet (this repo)
││└── morphir-examples.md # finos/morphir-examples
│├── features/ # Feature status across repos
││├── cli-tools.md # CLI feature parity
││├── ir-versions.md # IR version support matrix
││├── backends.md # Backend/codegen support
││└── testing-tools.md # Testing capabilities
│├── conventions/ # Standards and conventions
││├── naming.md # Naming conventions
││├── code-style.md # Code style per language
││├── commit-messages.md # Commit message format
││└── issue-labels.md # Standard labels across repos
│├── workflows/ # Common workflows and processes
││├── contributing.md # Contribution workflow
││├── prd-process.md # PRD creation and review
││├── release-process.md # Release workflow
││└── issue-triage.md # Issue triage guidelines
│└── faq/ # Frequently asked questions
│├── product-decisions.md # Common product decision rationales
│├── technical-choices.md # Technical architecture FAQs
│└── cross-repo-alignment.md # How to align features across repos
└── docs/ # Skill-specific documentation
└── integration-guide.md # Integration with other skills
Morphir Ecosystem Model
Repository Categories:
Core Specification (finos/morphir)
Language specification
IR schema definitions (v1, v2, v3)
Authoritative documentation
Reference Implementation (finos/morphir-elm)
Elm frontend compiler
CLI tools
Example models
Most mature implementation
Platform Implementations:
finos/morphir-jvm: Java/Kotlin support
finos/morphir-scala: Scala support
finos/morphir-dotnet: C#/F# support
Resources:
finos/morphir-examples: Example models and documentation
Cross-Repository Queries:
// Example: Find all IR-related issues across ecosystem
let irIssues = MorphirRepos.All
|> Seq.collect (fun repo -> GitHub.queryIssues repo "label:IR")|> Seq.sortByDescending (_.UpdatedAt)
queryEcosystemIssues {
search(query: "org:finos morphir in:name is:issue label:enhancement", type: ISSUE, first: 100) {
nodes {
...on Issue {
title
number
repository { name }
labels(first: 10) { nodes { name } }
}
}
}
}
Knowledgebase Management
Purpose: The Product Manager skill maintains a curated knowledgebase of Morphir ecosystem knowledge as markdown files within the skill directory. This enables offline access, version control, and structured knowledge organization.
// update-knowledge.fsx: Fetch latest info from live sources
// Usage: dotnet fsi update-knowledge.fsx --category repositories
// Fetch latest README from each repo
let updateRepositoryDocs repos = repos
|> Seq.iter (fun repo ->let readme = GitHub.fetchFile repo "README.md"let repoDoc = Knowledge.parseRepositoryInfo readme
Knowledge.save $"knowledge/repositories/{repo.name}.md" repoDoc
)// Fetch latest feature status
let updateFeatureMatrix () =let cliFeatures = MorphirRepos.All
|> Seq.collect (fun repo -> GitHub.searchCode repo "CLI commands") Knowledge.generateFeatureMatrix cliFeatures
|> Knowledge.save "knowledge/features/cli-tools.md"// Validate knowledgebase consistency
let validateKnowledge () = Knowledge.checkBrokenLinks ()
Knowledge.validateMarkdown ()
Knowledge.checkOutdatedInfo ()
Knowledge Access Patterns:
When asked about Morphir principles:
1. Read knowledge/morphir-principles.md
2. Cite specific sections with links
3. Provide examples from knowledge/faq/
When comparing repos:
1. Read knowledge/ecosystem-map.md for overview
2. Read specific knowledge/repositories/{repo}.md
3. Consult knowledge/features/ for capability matrix
When validating feature alignment:
1. Reference knowledge/morphir-principles.md
2. Check knowledge/architecture/ for design patterns
3. Review knowledge/faq/product-decisions.md for precedents
Knowledge Maintenance:
Manual Curation: Maintainers update knowledge files as authoritative sources
Periodic Updates: Run update-knowledge.fsx quarterly to refresh from live sources
Version Control: Knowledge evolves with the skill, tracked in git
Validation: CI validates markdown formatting and internal links
Review Process: Knowledge changes reviewed like code changes
Knowledge vs. Live Data:
Knowledgebase: Stable, curated, architectural, and philosophical knowledge
Live Queries: Real-time issue data, PR status, recent activity
Hybrid Approach: Use knowledge for context, live queries for current state
PRD Template Engine
Interactive Generation:
// Prompt user for each section
let prd = PRD.Interactive [ Section.Overview [ Question "What feature are you proposing?" Question "Why is this feature needed?"] Section.Goals [ Question "What are the primary goals? (one per line)" Question "What is explicitly out of scope?"]// ... more sections
]// Validate completeness
let validation = PRD.validate prd
// Save to file
PRD.save "docs/content/contributing/design/prds/my-feature.md" prd
Skill Activation Triggers
Keywords:
“PRD”, “product requirements”, “feature spec”
“create issue”, “file bug”, “report enhancement”
“ecosystem”, “cross-repo”, “morphir repos”
“backlog”, “triage”, “issue health”
“trend”, “popular”, “common issues”
“align with morphir”, “morphir philosophy”
Scenarios:
User asks for help creating a PRD
User wants to file an issue
User asks “what should I work on?”
User asks about feature status across repos
User proposes a feature that may not align
User asks about Morphir architecture or principles
Q3: Should F# scripts use GitHub CLI or direct API calls?
Status: Open
Options:
GitHub CLI (gh) for simplicity and auth
Direct API calls via HTTP client for flexibility
Hybrid approach
Recommendation: GitHub CLI for Phase 1, evaluate direct API if needed
Decision Needed By: Phase 1 (Week 1)
Impact: Affects script architecture and dependencies
Q4: How deep should trend analysis go?
Status: Open
Options:
Label frequency and time-series only
Add NLP for theme extraction from titles/descriptions
Add sentiment analysis
Recommendation: Start with label frequency, add NLP in Phase 3 if valuable
Decision Needed By: Phase 3 (Week 3)
Impact: Affects trend-analysis.fsx complexity and dependencies
Refactor the morphir-dotnet deployment architecture to fix critical packaging issues, separate tool distribution from executable distribution, implement comprehensive build testing, and establish changelog-driven versioning as the single source of truth.
Problem: The current deployment failed due to package naming mismatches (lowercase “morphir” vs “Morphir”), inconsistent tool command naming, and lack of automated testing to catch these issues before CI deployment.
Solution: Separate concerns into distinct projects (Morphir.Tool for dotnet tool, Morphir for executables), reorganize build system following vertical slice architecture, implement Ionide.KeepAChangelog for version management, and add comprehensive build testing infrastructure.
Impact: Eliminates deployment failures, provides clear distribution strategy for different user personas, enables confident releases with automated validation, and establishes maintainable build architecture.
Successful deployment to NuGet.org and GitHub Releases
✅ Separate concerns
Distinct Morphir.Tool project for dotnet tool
Morphir project for standalone executables
Clear boundaries and responsibilities
✅ Implement comprehensive testing
Package structure validation
Metadata correctness verification
Local installation smoke tests
Catch issues before CI deployment
✅ Establish changelog-driven versioning
CHANGELOG.md as single source of truth
Ionide.KeepAChangelog integration
Support pre-release versions (alpha, beta, rc)
Automated release preparation
✅ Dual distribution strategy
NuGet tool package for .NET developers
GitHub releases with executables for non-SDK users
Persona-based documentation
✅ Organize build system
Split Build.cs by domain (vertical slices)
Extract helper classes for testability
Align with Morphir.Tooling architecture
Maintainable and scalable structure
Non-Goals
❌ Automated pre-release version bumping (Phase 2, future work)
❌ TestContainers integration (Phase 3 of testing, when needed)
❌ Package rename/migration (Keeping current names for backward compatibility)
❌ Breaking changes to public APIs (Maintain compatibility)
var toolPackage = OutputDir.GlobFiles("Morphir.Tool.*.nupkg")
.FirstOrDefault();
BDD Tests:
Feature: Project structure refactor
Scenario: Build Morphir.Tool package
Given Morphir.Tool project exists
When I run "./build.sh PackTool"
Then Morphir.Tool.*.nupkg should be created
And package should contain tools/net10.0/any/morphir.dll
Scenario: Build split successfully
Given Build.cs is split into partial classes
When I run "./build.sh --help"
Then all targets should be available
And no build errors should occur
cd build
dotnet add package Ionide.KeepAChangelog --version 0.2.0
Add using statement to Build.cs:
using KeepAChangelogParser;
using Semver;
2.2 Implement Version Extraction
Create ChangelogHelper.GetVersionFromChangelog():
publicstatic SemVersion GetVersionFromChangelog(AbsolutePath changelogPath)
{
var content = File.ReadAllText(changelogPath);
var parser = new ChangelogParser();
var result = parser.Parse(content);
if (!result.IsSuccess)
thrownew Exception($"Failed to parse CHANGELOG.md: {result.Error}");
var changelog = result.Value;
var latest = changelog.SectionCollection.FirstOrDefault()
?? thrownew Exception("No releases found in CHANGELOG.md");
if (!SemVersion.TryParse(latest.MarkdownVersion, SemVersionStyles.Any, outvar version))
thrownew Exception($"Invalid version: {latest.MarkdownVersion}");
return version;
}
2.3 Implement Release Notes Extraction
Create ChangelogHelper.GetReleaseNotes():
publicstaticstring GetReleaseNotes(AbsolutePath changelogPath)
{
var content = File.ReadAllText(changelogPath);
var parser = new ChangelogParser();
var result = parser.Parse(content);
if (!result.IsSuccess) returnstring.Empty;
var latest = result.Value.SectionCollection.FirstOrDefault();
if (latest == null) returnstring.Empty;
var notes = new StringBuilder();
AppendSection("Added", latest.SubSections.Added);
AppendSection("Changed", latest.SubSections.Changed);
// ... other sectionsreturn notes.ToString();
}
publicstatic SemVersion GetNextPreReleaseVersion(AbsolutePath changelogPath)
{
var currentVersion = GetVersionFromChangelog(changelogPath);
if (!currentVersion.IsPrerelease)
thrownew Exception("Cannot auto-bump non-prerelease version");
// Extract pre-release type and number// e.g., "alpha.1" → type: "alpha", number: 1var prereleaseParts = currentVersion.Prerelease.Split('.');
var type = prereleaseParts[0]; // alpha, beta, preview, rcvar number = int.Parse(prereleaseParts.Length > 1 ? prereleaseParts[1] : "0");
// Increment number number++;
// Create new versionvar newPrerelease = $"{type}.{number}";
returnnew SemVersion(
currentVersion.Major,
currentVersion.Minor,
currentVersion.Patch,
newPrerelease
);
}
Create target for auto-bump (used in CI):
Target BumpPreRelease => _ => _
.Description("Auto-bump pre-release version (CI only)")
.Executes(() =>
{
var currentVersion = Version;
if (!currentVersion.IsPrerelease)
{
Serilog.Log.Information("Not a pre-release, skipping auto-bump");
return;
}
var nextVersion = ChangelogHelper.GetNextPreReleaseVersion(ChangelogFile);
Serilog.Log.Information("Auto-bumping {0} → {1}", currentVersion, nextVersion);
// Update CHANGELOG.md with empty section for next pre-release ChangelogHelper.AddPreReleaseSection(ChangelogFile, nextVersion.ToString());
});
BDD Tests:
Feature: Changelog-driven versioning
Scenario: Extract version from CHANGELOG
Given CHANGELOG.md has [0.2.1] - 2025-12-20When I call GetVersionFromChangelog()
Then version should be 0.2.1Scenario: Prepare release
Given CHANGELOG.md has [Unreleased] with content
When I run "./build.sh PrepareRelease --version 0.2.1"
Then CHANGELOG.md should have [0.2.1] - 2025-12-20And [Unreleased] should be empty
And changes should be staged
Scenario: Block release without content
Given CHANGELOG.md [Unreleased] is empty
When I run "./build.sh PrepareRelease --version 0.2.1"
Then build should fail
And error should mention "empty"
Feature: Build testing infrastructure
Scenario: Validate tool package structure
Given Morphir.Tool package is built
When I run package structure tests
Then all required files should be present
And tool settings should be correct
Scenario: Validate version consistency
Given all packages are built
When I run metadata tests
Then all packages should have same version
And version should match CHANGELOG.md
Scenario: Test local installation
Given tool package is in local folder
When I install tool from local source
Then installation should succeed
And morphir command should be available
Phase 4: Deployment & Distribution (2-3 days)
Goal: Update workflows for dual distribution
Tasks
4.1 Update Deployment Workflow
Update .github/workflows/deployment.yml:
name: Deploymenton:
push:
tags:
- 'v*'# Trigger on version tags (e.g., v0.2.1)workflow_dispatch:
inputs:
release_version:
description: 'Version to deploy (optional, reads from CHANGELOG if not provided)'required: falsejobs:
validate-version:
runs-on: ubuntu-latestoutputs:
version: ${{ steps.get-version.outputs.version }}steps:
- uses: actions/checkout@v4 - name: Get version from CHANGELOGid: get-versionrun: | # Extract from tag name (v0.2.1 → 0.2.1)
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
elif [[ -n "${{ github.event.inputs.release_version }}" ]]; then
echo "version=${{ github.event.inputs.release_version }}" >> $GITHUB_OUTPUT
else
echo "No version specified"
exit 1
fi - name: Validate version in CHANGELOGrun: | VERSION=${{ steps.get-version.outputs.version }}
if ! grep -q "\[$VERSION\]" CHANGELOG.md; then
echo "Version $VERSION not found in CHANGELOG.md"
exit 1
fibuild-executables:
needs: validate-version# ... existing build-executables jobs ...release:
needs: [validate-version, build-executables]runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v4 - name: Setup .NET SDKuses: actions/setup-dotnet@v4with:
global-json-file: global.json - name: Restore dependenciesrun: ./build.sh Restore - name: Buildrun: ./build.sh Compile - name: Run testsrun: ./build.sh TestAll # Includes build tests! - name: Download executablesuses: actions/download-artifact@v4 - name: Pack packagesrun: ./build.sh PackAll - name: Run build testsrun: ./build.sh TestBuild - name: Publish to NuGetrun: ./build.sh PublishAll --api-key ${{ secrets.NUGET_TOKEN }}env:
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}create-github-release:
needs: [validate-version, build-executables, release]runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v4 - name: Download executablesuses: actions/download-artifact@v4with:
path: artifacts/executables - name: Extract release notes from CHANGELOGid: release-notesrun: | VERSION=${{ needs.validate-version.outputs.version }}
# Extract section for this version from CHANGELOG.md
awk '/## \['$VERSION'\]/,/## \[/ {print}' CHANGELOG.md | head -n -1 > release-notes.md - name: Create GitHub Releaseuses: softprops/action-gh-release@v1with:
tag_name: v${{ needs.validate-version.outputs.version }}name: Release v${{ needs.validate-version.outputs.version }}body_path: release-notes.mdfiles: | artifacts/executables/morphir-*
artifacts/executables/morphir.exeenv:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Target PublishTool => _ => _
.DependsOn(PackTool)
.Description("Publish Morphir.Tool to NuGet.org")
.Executes(() =>
{
if (string.IsNullOrEmpty(ApiKey))
thrownew Exception("API_KEY required");
var toolPackage = OutputDir.GlobFiles("Morphir.Tool.*.nupkg")
.FirstOrDefault();
if (toolPackage == null)
thrownew Exception($"Morphir.Tool package not found in {OutputDir}");
Serilog.Log.Information($"Publishing {toolPackage}");
DotNetNuGetPush(s => s
.SetTargetPath(toolPackage)
.SetSource(NuGetSource)
.SetApiKey(ApiKey)
.SetSkipDuplicate(true));
});
BDD Tests:
Feature: Deployment workflow
Scenario: Deploy on tag push
Given tag v0.2.1 is pushed
When deployment workflow runs
Then version should be extracted from CHANGELOG.md
And packages should be built
And build tests should run
And packages should be published to NuGet
And executables should be uploaded to GitHub release
Scenario: Block deployment if version not in CHANGELOG
Given tag v0.2.2 is pushed
But CHANGELOG.md doesn't have [0.2.2]
When deployment workflow runs
Then workflow should fail
And no packages should be published
Phase 5: Documentation (1-2 days)
Goal: Comprehensive documentation for all stakeholders
Tasks
5.1 Update AGENTS.md
Add section: “Build System Configuration”
## Build System Configuration
### Nuke Parameters
The build system uses Nuke with these parameters:
-`--configuration`: Build configuration (Debug/Release)
-`--version`: Version override (reads from CHANGELOG.md by default)
-`--api-key`: NuGet API key for publishing
-`--nuget-source`: NuGet source URL
-`--skip-tests`: Skip test execution
### Environment Variables
-`NUGET_TOKEN`: NuGet API key (CI only)
-`CONFIGURATION`: Build configuration override
-`MORPHIR_TEST_TARGET`, `MORPHIR_TEST_EXECUTABLE`: the target of the black-box tests and the path of an executable
Add section: “Changelog-Driven Versioning”
## Changelog-Driven Versioning
Morphir uses CHANGELOG.md as the single source of truth for versions.
### Version Format
Follows [Semantic Versioning](https://semver.org/):
-`MAJOR.MINOR.PATCH` for releases (e.g., `0.2.1`)
-`MAJOR.MINOR.PATCH-TYPE.NUMBER` for pre-releases (e.g., `0.2.1-beta.2`)
Supported pre-release types: alpha, beta, preview, rc
### Release Preparation Workflow
1. During development, add changes to `[Unreleased]` section
2. When ready to release, run: `./build.sh PrepareRelease --version X.Y.Z`3. Review staged changes: `git diff --staged`4. Commit: `git commit -m "chore: prepare release X.Y.Z"`5. Create release branch: `git checkout -b release/X.Y.Z`6. Push and create PR to main
7. After PR merge, create tag: `git tag -a vX.Y.Z -m "Release X.Y.Z"`8. Push tag: `git push origin vX.Y.Z` (triggers deployment)
Add section: “Dual Distribution Strategy”
## Dual Distribution Strategy
Morphir provides two distribution channels:
### NuGet Tool Package (Morphir.Tool)
**For**: .NET developers with SDK installed
**Install**: `dotnet tool install -g Morphir.Tool`**Update**: `dotnet tool update -g Morphir.Tool`**Command**: `morphir`### Platform Executables
**For**: Shell scripts, containers, non-.NET environments
**Install**: Use install scripts or download from GitHub releases
**Platforms**: linux-x64, linux-arm64, win-x64, osx-arm64
**Command**: `morphir` or `./morphir-{platform}`
5.2 Update CLAUDE.md
Add build organization guidance
Document PrepareRelease workflow
Add testing requirements
Update commit message examples
5.3 Update README.md
Add persona-based installation instructions:
## Installation
### For .NET Developers
If you have the .NET SDK installed:
```bash
dotnet tool install -g Morphir.Tool
morphir --version
For Shell Scripts / Containers
If you don’t have .NET SDK or need a standalone executable:
Feature: Morphir Tool Installation
As a .NET developer
I want to install Morphir as a dotnet tool
So that I can use it in my development workflow
Scenario: Install from NuGet
Given I am a .NET developer with SDK installed
When I run "dotnet tool install -g Morphir.Tool"
Then the tool should install successfully
And I should be able to run "morphir --version"
And the version should match CHANGELOG.md
Scenario: Update tool
Given Morphir.Tool is already installed
When I run "dotnet tool update -g Morphir.Tool"
Then the tool should update successfully
And the new version should be active
Feature: Morphir Executable Download
As a shell script user
I want to download a standalone executable
So that I can use Morphir without installing .NET SDK
Scenario: Download from GitHub releases
Given I am using a minimal container
When I download morphir-linux-x64 from GitHub releases
Then I should be able to run "./morphir-linux-x64 --version"
And the version should match CHANGELOG.md
Scenario: Install via script
Given I have curl available
When I run the install script
Then morphir should be installed to /usr/local/bin
And morphir command should be in PATH
BDD Tests:
Feature: Documentation completeness
Scenario: All distribution methods documented
Given README.md exists
When I read installation instructions
Then I should see dotnet tool installation
And I should see executable download instructions
And I should see persona-based recommendations
Scenario: Release process documented
Given AGENTS.md exists
When I read the release preparation section
Then I should see PrepareRelease workflow
And I should see tag creation steps
And I should see deployment trigger explanation
BDD Acceptance Criteria
Epic-Level Scenarios
Feature: Morphir Deployment Architecture
As a Morphir maintainer
I want a robust deployment architecture
So that releases are reliable and users can install easily
Background: Given the morphir-dotnet repository is up to date
And all dependencies are installed
Scenario: Successful deployment to NuGet and GitHub
Given CHANGELOG.md has [0.2.1] - 2025-12-20And all changes are committed
When I create and push tag v0.2.1Then deployment workflow should complete successfully
And Morphir.Tool.0.2.1.nupkg should be published to NuGet.org
And Morphir.Core.0.2.1.nupkg should be published to NuGet.org
And Morphir.Tooling.0.2.1.nupkg should be published to NuGet.org
And morphir-linux-x64 should be in GitHub release v0.2.1And morphir-win-x64 should be in GitHub release v0.2.1And morphir-osx-arm64 should be in GitHub release v0.2.1And release notes should match CHANGELOG.md
Scenario: Build tests catch package issues
Given I modify package structure incorrectly
When I run "./build.sh TestBuild"
Then tests should fail
And I should see clear error message
And CI deployment should be blocked
Scenario: Version consistency across packages
Given I prepare release 0.2.1When I build all packages
Then all packages should have version 0.2.1And version should match CHANGELOG.md [0.2.1]
And all package release notes should match
Scenario: .NET developer installation
Given Morphir.Tool is published to NuGet
When .NET developer runs "dotnet tool install -g Morphir.Tool"
Then tool should install successfully
And "morphir --version" should work
And version should match published version
Scenario: Container user installation
Given morphir-linux-x64 is in GitHub releases
When container user downloads executable
Then "./morphir-linux-x64 --version" should work
And version should match release version
And no .NET SDK should be required
Shared configuration, project discovery, and configuration inspection and editing
Layered configuration and workspaces
Status: In Progress; campaigns 1 through 5 landed and cleaned; campaign 6 workspace migration in progress under #479
Created: 2025-12-22
Last updated: 2026-11-03
Overview
Provide one reusable Morphir configuration and project system for the CLI and other hosts. Read TOML, YAML, JSON, and JSON5; discover projects and declared workspaces; and resolve settings with provenance. Shared APIs support morphir config inspection/editing, morphir project migrate for one classic project, and morphir workspace migrate for coordinated workspace adoption.
The original cache-only TOML implementation keeps its Git-first compatibility behavior. Campaign 1 added typed multi-format documents, normalization, resolution, named profiles, validation, and provenance. Campaign 2 adds document-aware discovery through separate library entry points. Campaign 3 adds inspection and standard .NET consumption. Campaign 4 added shared editing and TOML transactions. Campaign 5 added loss-checked classic project migration. Campaign 6 implements bounded workspace migration and explicit transaction recovery.
The guide describes target rules. The CLI reference records implemented inspection and editing interfaces.
Goals
Share core functionality across hosts without a dependency on the CLI.
Match MoonBit discovery, precedence, legacy manifest normalization, and project selection.
Preserve typed values and winning origins.
Integrate with Microsoft.Extensions.Configuration through an adapter.
Support scoped inspection and validated TOML editing.
Document current support separately from planned behavior.
Migrate classic morphir.json projects and adopt repositories into workspaces without silently losing settings or changing project behavior.
Non-goals
Implementing a task runner, compiler, cache store, or every consumer of configuration fields.
Writing YAML/JSON configuration or silently converting existing files.
Reproducing Git’s complete command set or multi-valued INI semantics.
Executing scripts or resolving secrets during inspection.
User stories
A developer invokes a tool from a member’s source directory and finds its declared workspace.
A repository retains identity in morphir.json while TOML overrides compiler settings.
A developer explicitly migrates a classic manifest to TOML, previews the changes, and checks that the new configuration works independently of the old file.
A repository maintainer adopts several classic projects through one bounded workspace plan while preserving existing membership and settings.
A developer inspects why a setting wins and edits a specific project, workspace, personal, or machine scope.
An IDE or embedded host loads the same configuration without invoking the CLI.
A CI job obtains valid JSON output and selects profiles explicitly.
Functional requirements
Discovery and project system
Inspect root, hidden, and dot-config primary stems with all five extensions. Include supplemental morphir-workspace.json below ordinary JSON primaries.
Parse primaries during the upward walk. Remember the nearest project, but stop at the nearest declared workspace. Respect host boundaries. Git or empty .morphir directories do not declare workspaces.
Merge JSON/JSON5, then YAML/YML, then TOML. Reject multiple candidates in one format group across layouts. Apply the same rules to members and eligible overrides/profiles.
Expand workspace.members, apply workspace.exclude, respect workspace.root and workspace.default_member, and distinguish virtual workspaces from root projects.
Support explicit path/name and invocation-based project selection. Refuse multi-project edit targets.
Use canonical snake-case fields, including project.source_directory and workspace.out_dir. Diagnose member attempts to relocate the workspace output root.
Resolution
Apply defaults, system, global, root primaries, selected file, member primaries, active profiles, adjacent user overrides, environment, and explicit CLI values in that order.
Preserve lower-format-only keys; recursively merge maps; replace complete arrays and incompatible shapes; treat secret references as leaves.
Retain typed documents, winning leaf/array provenance, source reports, and structured diagnostics. Preserve unknown settings allowed by the shared model.
Exclude whole project and workspace subtrees from system/global defaults and from root-to-member document inheritance. Supply owning workspace topology/output-root context separately.
Implement OS-specific system/global paths, MORPHIR_HOME, same-format ambiguity across alternate global locations, and isolated loading.
Use __ for environment nesting. Match upstream typing and deterministic scalar/nested-key conflict behavior.
Implement named profiles, explicit disabling, base-only controls, includes/groups, active-name order, and workspace-before-member files. Inactive files are not loaded. No implicit CI or default profile is active.
Report upstream mixed-format warning codes. Only host controls and system/global settings may suppress them.
Inspection and editing
Expose get, list, show, path, explain, set, and unset under morphir config.
Reads default to effective configuration. Scope selectors limit source inspection; origin/scope options expose the winner. explain reports contributing layers and the winner.
Writes target one project, workspace, adjacent user, global, system, or explicit TOML file. Resolve an unambiguous current project/workspace by default. Do not write implicitly to an environment or profile source just because it supplies the winning value.
Support explicit strings, booleans, integers, numbers, arrays, and objects. Separate input typing from JSON output.
Preserve TOML formatting/comments. Create the corresponding TOML primary when only lower-format files exist. Write full replacement arrays/objects when those values are set.
unset removes only the target entry; inherited values may reappear. Report the resulting effective value and whether an edited value remains overridden.
Validate before applying; install writes atomically; detect concurrent changes; leave files unchanged on validation or conflict failures.
Redact sensitive values. Return structured results for non-CLI hosts.
Classic project migration
Provide a reusable migration planner and apply operation, exposed by the planned morphir project migrate [<path>] command. The path accepts one project directory or classic manifest. This migrates project configuration, not morphir-ir.json or IR versions.
Accept a classic morphir-elm morphir.json; use the current unambiguous project’s classic manifest when the source is omitted. Do not implicitly migrate every workspace member.
Default to adjacent morphir.toml. An explicit output may select a supported primary layout within the same project location. Refuse targets that introduce same-format ambiguity or change project-relative path meaning.
Map name, sourceDirectory, and exposedModules to their canonical project fields. Materialize legacy-derived frontend/pipeline defaults, including Elm and checkpoint behavior, wherever needed for the new file to retain behavior without the classic manifest.
Preserve supported additional settings and relative-path meaning. Diagnose every unmapped or unrepresentable field, including legacy dependency/decorations shapes. Block application when any value would be lost or its meaning cannot be preserved; a reader’s warning-and-ignore policy is not sufficient for migration.
Reject same-file legacy/canonical conflicts and conflicting existing TOML values. Add nonconflicting missing values to an existing target while preserving unrelated settings, comments, and formatting. Identical existing values are unchanged; a repeat migration is a no-op.
Provide a read-only --dry-run that reports source, target, field mappings, planned edits, conflicts, and verification results. Redact sensitive values in previews and JSON reports.
Before applying, compare project-scoped resolution before migration with resolution of the candidate with the legacy source excluded. Exclude ambient machine, personal, environment, CLI, and activated-profile overlays from this comparison so they cannot hide a change; keep relevant declared workspace context. Fail if values or path meaning differ. Provenance paths may change and must be reported, not treated as value differences.
Keep the classic source unchanged. Removing it is a separate deliberate action after users have migrated any consumers that still require morphir.json. Apply only verified edits atomically, detecting changes to source, target, and relevant workspace context. Validation or stale-plan failures leave both files unchanged; incomplete write recovery must report affected paths and retain recovery data.
Workspace migration
Expose morphir workspace migrate [<directory>] through shared bounded inventory, planning, and application services, including when no workspace declaration exists yet.
Inventory only the selected root. Respect include/exclude patterns and existing declared exclusions; skip discovered links, nested declared workspaces, and version-control/dependency/build-output directories.
Propose explicit root-relative membership, preserve existing settings/defaults and already migrated members, and distinguish root projects from virtual workspaces. Report duplicate names without conflating project paths.
Reuse project migration plans and their loss checks. Verify classic-to-TOML equivalence in the same proposed workspace context, preserving project source-path meaning and settings. Report topology, member/default-selection, and shared-output-root changes separately as intended adoption effects; no generated files are moved. Verify the aggregate workspace against those declared effects. A blocked selected project blocks the batch.
Support read-only --dry-run and JSON reports listing the full inventory, exclusions, edits, blockers, and verification outcomes.
Validate and stage the entire plan before replacing destinations. Coordinate overlapping writers, recheck preconditions, and journal replacements with rollback/recovery reporting. Do not claim crash-atomic multi-file writes. Retain all classic sources and unresolved recovery evidence; successful or fully rolled-back operations clean temporary artifacts.
Equivalent repeats are no-ops. A valid existing workspace with nothing to convert succeeds unchanged; an undeclared root without eligible projects reports no adoption plan.
Delivery campaigns
Each campaign is one cohesive implementation change delivered through one reviewable PR. Start dependent campaigns from the verified main result of their prerequisites rather than accumulating an unmerged branch stack. Tests and documentation land with the behavior they describe.
Order
OpenSpec change
Outcome
Prerequisites
1
add-shared-configuration
Typed documents, format readers, resolution, profiles, provenance, and validation shared by hosts
None
2
add-project-workspace-discovery
Bounded roots, member discovery/selection, and applicable sources
1
3
add-config-inspection
Shared queries, read-only config commands, and opt-in Microsoft configuration adapter
1, 2
4
add-config-editing
Shared TOML edit planning/application and config set/unset
3
5
add-classic-project-migration
Shared loss-checked migration and project migrate
2, 4
6
add-workspace-migration
Bounded repository adoption and coordinated workspace migrate
5
Planning artifacts are under openspec/changes/<change-name>/, or their dated archive after implementation. Campaigns 1 through 5 are landed and cleaned. Campaign 3 tracks issue #468; its delivery journal records shared queries, CLI reads, Microsoft integration and verified landing/cleanup evidence. Campaign 4 tracks issue #473, landed through PR #475 at 56d9de917f6c3035c8a2f994f49dfc96294619d8 with parent cleanup confirmed. Its delivery journal and completion receipt retain qualification evidence. Campaign 5 tracks issue #476; its delivery journal records implementation and validation. PR #477 landed campaign 5 at e3b9a053120a49e94c70c30cd4f62ef783672c64; its completion receipt confirms review, checks and owned cleanup. Campaign 6 tracks #479 and its delivery journal.
Campaign completion
A campaign is complete only when all of these outcomes are verified:
Its implementation, tests, and docs are in a reviewable PR; required checks and reviews pass on the delivered head.
Its OpenSpec changes are archived and the main specs are synchronized coherently with the delivered implementation.
The PR is merged to main, and authoritative merge evidence identifies a merged commit reachable from the updated main branch.
The campaign-owned worktree is clean and contains no sole copy of unmerged work. Its worktree and local/remote feature branches are removed after verifying the merged state.
The completion receipt records the PR URL, merged SHA, validation/review evidence, archive location, and worktree/branch cleanup verification.
Finishing code or obtaining green checks is not campaign completion. Cleanup is limited to artifacts owned by that campaign. Preserve unrelated branches/worktrees, unmerged changes, and recovery data; do not use forced removal or broad pruning to manufacture a clean result. Pending recovery or cleanup remains outstanding work and must be reported. Follow repository merge authorization and protection rules; this plan does not imply admin bypass or force-push permission.
Architecture
Core behavior belongs to reusable libraries. Morphir.Configuration is the existing home for immutable models and pure rules. Discovery/resolution services must be callable without the CLI; file, directory, environment, and write access are supplied through adapters. A host can provide native filesystem access or an in-memory/mounted tree.
A Microsoft configuration adapter exposes the resolved model through the proposed AddMorphirConfiguration(...). The typed document remains authoritative because flattened strings cannot alone preserve array, key, type, and provenance semantics. Editing uses explicit shared services.
The CLI handles arguments, output, and exit codes. Library services handle queries, explanations, edit and migration planning, validation, equivalence checks, and application. Other hosts can preview and apply the same migration without invoking the CLI. Keep Native AOT support through explicit/source-generated binding. Final package names and signatures remain to be designed.
Documentation acceptance criteria
A guide explains formats, layouts, boundaries, discovery, ambiguity, precedence, membership, profiles, environment values, legacy fields, and host integration.
A CLI reference covers every subcommand, selectors, typed inputs, output, exit codes, and write semantics.
A walkthrough demonstrates a workspace/member, inspection, personal overrides, inheritance after unset, and CI inspection.
Project and workspace migration references include before/after files, dry-run/apply commands, bounded inventory, existing-target conflicts, unsupported fields, source retention, and verification independent of legacy files.
Delivery tracking records each campaign’s landed PR, synchronized/archive specs, and campaign-owned worktree/branch cleanup.
CLI, guide, getting-started, and PRD indexes link to these pages.
Planned examples stay labeled until implemented and verified. Update examples and status with implementation.
Verification strategy
Follow red-green-refactor for implementation. Start with BDD scenarios and focused behavioral tests using upstream compatibility fixtures where possible.
Discovery: every layout/extension, nested workspaces, fallback, boundaries, input files, absent primaries, and same-group ambiguities.
Resolution: each precedence boundary, types, complete/empty array replacement, shape replacement, casing, origins, environment conflicts, and legacy mappings.
Projects/profiles: membership/exclusions, virtual/root projects, default selection, duplicates, invalid members, active ordering, and disabled profiles.
Editing: targets, comments, unrelated keys, lower-format promotion, composite values, inheritance after removal, overridden writes, invalid edits, and concurrent writers.
Migration: classic field mappings, explicit legacy defaults, relative paths, supported extra fields, unmapped-field failures, existing-target conflicts, idempotence, source preservation, dry-run with no writes, concurrent source/target changes, and equivalence with the classic source excluded. Cover standalone and member projects.
Campaigns 3 and 4, PR #475; shared plans, TOML editor, transactions and parent cleanup confirmed
Classic project migration
Implemented and landed
Campaign 5, #476; pure planner, independent verification, guarded IO, project migrate and managed/trimmed/native qualification
Workspace migration
In Progress
Bounded inventory, coordinated project plans, membership, and recovery
Config CLI commands
Implemented and landed
Campaign 3 get/list/show/path/explain are landed. Campaign 4 set/unset use shared services; all 360 tooling tests pass, including 33 editing subprocess scenarios. Published-host qualification and parent landing/cleanup are recorded in the prerequisite receipts
Documentation foundation
Updated for inspection and editing
Shared API and Microsoft consumer examples, read CLI schema/options, walkthrough and troubleshooting; editing API, preview/recovery and CLI examples are implemented; classic project migration reference and walkthrough implemented; workspace migration reference, API and recovery docs are implemented in campaign 6
Compatibility and end-to-end verification
In Progress
Campaign 1 landed baseline tooling 245, reader 66, core 95 and warning-qualified runtime evidence; current campaign results recorded separately
Keep existing DocumentResolution, Resolver.resolve, ProjectSystem.Load
and cache-only APIs compatible. Add detailed resolution with canonical and
applied layers for pure queries. Scope filtering precedes query merging;
effective queries preserve source ownership. Shared redaction handles nested
sensitive values and opaque references before presentation.
Morphir.Configuration.Microsoft projects a single resolved document. It
rejects case/separator/empty-segment collisions, preserves canonical metadata
and masks stale descendants from earlier related host providers. Concrete
source-generated binding preserves replaced and empty arrays. Its managed,
trimmed and native hosts each pass 43 checks with pinned dependency warnings
retained. No warning-free dependency claim is made.
Register CLI inspection through one scenario/provider. Discovery is deferred
until validated command invocation. Help disables unrelated host defaults
that would read appsettings. Normal command execution retains host defaults.
Configuration reads do not imply adoption by every existing IR command.
JSON nonfinite values use tagged nodes with an external JSON Pointer type
discriminator, preserving ordinary tag-shaped user objects. Finite values
retain normal JSON types. The output schema and published serializer host
qualify this representation.
Discovery landing receipt, 2026-11-03
PR #467 landed at
23d274d4c87b367fdc79bd21843a9fdf5d74b13d after PR #461.
The parent completion receipt
records its landing and owned worktree/branch/temporary-artifact cleanup.
Baseline core 124, adapters/BDD 166, tooling 245 and all eight host checks are
prerequisite evidence, not a substitute for campaign 3’s validation.
Project/workspace discovery campaign, 2026-11-03
Track campaign 2 in issue #466.
The delivery journal records red/green
checkpoints, validation, base/head identities and outstanding parent gates.
Local qualification passes core 124, reader/BDD 153 and tooling 245; authored
source coverage is 94.89% core and 96.45% adapters. The implementation change
is archived at openspec/changes/archive/2026-11-03-add-project-workspace-discovery/,
with the synchronized morphir-project-system main spec. These are local
results; PR CI and review remain parent-owned.
Keep snapshot/request discovery and project selection pure in
Morphir.Configuration. File parsing, native access, mounted trees and
machine/environment capture belong to reusable .NET adapters in
Morphir.Configuration.IO; no CLI dependency is introduced.
Preserve WorkspaceDiscovery, ManagementScenario, and artifact callers as
Git-first compatibility entry points. New consumers choose document-aware
ProjectSystem explicitly. Discover returns inventory and selection; Load
resolves a root or one selected project independently.
Keep inventory separate from selection, and owning workspace context separate
from root-to-member settings. Invalid literal members remain identifiable.
Members cannot relocate the workspace output root.
Apply the same format groups to primaries, platform/global alternatives,
eligible personal overrides and active profiles. Isolation excludes machine
and personal sources before reading them, while retaining declared primaries,
explicitly selected configuration, active profiles and supplied values. Machine
inputs require explicit locations and a separately authorized MachineTree.
Shared configuration landing receipt, 2026-11-03
PR #461 landed at
3d5b41c0f839c7b2648403ad6aba5c5644f7dfb5, with verified squash tree
66609771da2eb88ac9e3cab3c21b6e8d201a6748.
The parent completion receipt
records its campaign worktree, local/remote branches and 33 reproducible
temporary artifacts cleaned. Campaign 2 starts from this main result.
Earlier core 95, readers 66, tooling 245, SDK conformance 27, full solution
build and trimmed/native smoke results are prerequisite evidence. They do not
substitute for validation of campaign 2’s final tree.
Add typed document APIs beside cache-only records. Parsing and explicit file
reading live in Morphir.Configuration.IO; core normalization, profile planning,
source resolution and schema validation remain pure.
Accept Moon-Lander 0.8.0 Default YAML behavior by explicit user decision,
including nulls, anchors/aliases, empty streams and custom scalar tags. Record
the intentional difference from core’s stricter YAML profile. JSON/JSON5
duplicate rejection is an approved stricter difference from Moon-Lander.
Pin core/MoonBit/framework revisions and fixture hashes. Qualify JSON5 with
the official grammar corpus, not comments-only System.Text.Json options.
Preserve raw nulls for control typing and raw legacy fields for loss accounting.
Ordinary null overlays preserve earlier values; completed loads omit null
object fields. Classic checkpoint defaults precede machine settings.
Keep commits at coherent task boundaries, with red checkpoints identified.
See delivery evidence for exact validation
commands/checkpoints. Parent coordination owns review, landing and cleanup;
campaign 1 is now complete per the parent landing receipt above. Campaign 2
has its own review, landing and cleanup gates.
Foundation decisions, 2026-11-02
Adopt MoonBit’s layered policy instead of the older single-serialization rule.
Share configuration/project behavior with other hosts; keep it out of the CLI.
Integrate with Microsoft configuration while preserving a typed canonical model.
Expose Git-style inspection/editing with scopes, provenance, and typed values.
Keep TOML as the written format and explain when another layer reappears or wins.
Include explicit classic morphir.json migration with source retention, dry-run, and semantic equivalence checks; loading legacy files alone does not satisfy migration support.
Own migration under project/workspace commands, with no config migrate alias. Workspace migration reuses the single-project planner.
Deliver six campaigns through merged PRs to main, synchronized/archived specs, and verified campaign-owned worktree/branch cleanup.
These foundation notes describe the original planning revision. Later implementation campaigns add APIs without changing the cache-only compatibility entry points.
Open implementation questions
Campaign 1 boundaries are Morphir.Configuration and Morphir.Configuration.IO;
discovery now uses DiscoveryPolicy, IProjectTree, and ProjectSystem.
Editing now uses shared immutable plans, ConfigurationEditService and preconditioned transactions; Microsoft integration landed in campaign 3.
Existing cache-only APIs retain their legacy behavior through additive compatibility entry points. Document how consumers explicitly opt into the new discovery and profile model before moving them.
Inspection signatures and generated JSON schema are documented in the shared API and CLI references. The editing result schema is published and checked against subprocess reports. The project migration result schema is implemented in campaign 5; workspace migration schema and shared outcomes are implemented in campaign 6.
Campaign 1 pins parser/merge/profile fixtures and records coverage/native
results. Pinned dependency linker/AOT warnings remain a qualification limitation;
strict warning-free trimming is not claimed.
Configuration editing campaign, 2026-11-03
Locally qualified and archived under #473, after merged PR #471. Shared plans, presentation-preserving TOML editing, preconditioned transactions and thin CLI adapters are tracked in the delivery journal. Migration campaigns remain separate.
Classic project migration campaign, 2026-11-03
Campaign 5 tracks #476.
The pure planner preserves raw source loss accounting. Independent verification
removes converted source and runtime overlays, retaining declared base workspace
context. The IO coordinator reuses exact-buffer observations, the TOML editor
and transaction boundary. Read-only hosts receive a redacted Presentation.
The CLI remains a separate thin project provider. Qualification and parent gates
are recorded in the delivery journal.
Workspace migration campaign, 2026-11-03
Campaign 6 tracks #479.
The delivery journal records ownership,
prerequisite ancestry, task progress and qualification. PR #477 landed at
e3b9a053120a49e94c70c30cd4f62ef783672c64; its receipt confirms campaign 5
cleanup. Implementation is locally qualified (all nine tasks), with the OpenSpec change synchronized and archived at openspec/changes/archive/2026-11-03-add-workspace-migration/. Parent owns campaign 6 review, CI watch, landing and cleanup; the campaign remains incomplete.
6.6 - Vulnerability Resolver Skill Requirements
Product requirements for the Vulnerability Resolver skill - automated CVE detection, resolution, and suppression
Vulnerability Resolver Skill Requirements
Executive Summary
The Vulnerability Resolver skill provides automated assistance for managing security vulnerabilities detected by OWASP Dependency-Check. It enables developers to efficiently triage, fix, or suppress CVEs while maintaining a documented audit trail of security decisions.
Background
Context
FINOS active projects require CVE scanning alongside Dependabot. morphir-dotnet implemented OWASP Dependency-Check scanning in PR #273, which runs:
On push/PR to main
Weekly on Monday at 3:00 UTC
Fails builds on CVSS score >= 7
PR #276 addressed initial vulnerabilities, identifying that some reported CVEs were false positives due to binary scanning misidentification of package versions or confusion with similarly-named packages.
Problem Statement
When dependency scanning detects vulnerabilities:
Developers must manually research each CVE to determine if it’s genuine or a false positive
There’s no standardized process for documenting suppression decisions
Suppression files must be manually created following OWASP Dependency-Check XML schema
No easy way to trigger scans on specific branches during development
No guided workflow for fix vs. suppress decisions
Success Criteria
Automation: Reduce manual effort for vulnerability resolution by 70%
Documentation: 100% of suppressions have documented rationale
Auditability: Clear audit trail for all security decisions
Developer Experience: Interactive prompts guide users through resolution
CI Integration: Ability to trigger scans on any branch
Functional Requirements
FR-1: Scan Triggering
FR-1.1: Trigger dependency-check workflow on any branch
# Example invocation@skill vulnerability-resolver
Scan branch feature/new-dependency for vulnerabilities
FR-1.2: Support manual workflow dispatch with parameters:
Branch/ref to scan
Fail threshold (CVSS score, default 7)
Output format (HTML, JSON, XML)
Suppression file path
FR-1.3: Report scan status and provide link to workflow run
FR-2: Vulnerability Analysis
FR-2.1: Parse dependency-check reports (HTML, JSON, XML formats)
FR-2.2: For each vulnerability, extract:
CVE identifier
CVSS score and severity
Affected package/file
Package identifier (purl, CPE)
Description and references
Whether it’s a transitive dependency
FR-2.3: Categorize vulnerabilities by:
Severity (Critical, High, Medium, Low)
Fix availability (update available, no fix, N/A)
False positive likelihood (based on patterns)
FR-3: Interactive Resolution
FR-3.1: Present vulnerabilities with resolution options:
CVE-2022-4742 (CVSS 9.8) in JsonPointer.Net@6.0.0
Options:
1. Fix: Update to version 6.0.1 (recommended)
2. Suppress: Mark as false positive with reason
3. Skip: Handle later
4. Research: Open CVE details in browser
FR-3.2: For each resolution choice:
Fix: Generate package update commands, verify fix in scan
Suppress: Create/update suppression XML with documented rationale
Skip: Track for follow-up, don’t block
FR-3.3: Detect false positive patterns:
Version misidentification in binary scanning
Package name confusion (e.g., Cecil vs Mono.Cecil)
Already-fixed transitive dependencies
Suggest suppression when patterns match
FR-4: Suppression Management
FR-4.1: Create and manage suppression file (dependency-check-suppressions.xml)
FR-4.2: Suppression file structure following OWASP schema:
FR-5.1: Generate fix commands for different package managers:
# NuGet (Directory.Packages.props)# Update JsonPointer.Net from 6.0.0 to 6.0.1# In Directory.Packages.props:<PackageVersion Include="JsonPointer.Net" Version="6.0.1" />
FR-5.2: Verify fix effectiveness:
Check if new version resolves CVE
Warn if update introduces breaking changes
Validate update doesn’t introduce new CVEs
FR-5.3: Handle transitive dependencies:
Identify which direct dependency pulls the vulnerable package
Suggest upgrade path
Note when fix requires waiting for upstream update
FR-6: Reporting and Documentation
FR-6.1: Generate resolution summary:
## Vulnerability Resolution Summary
**Scan Date**: 2024-01-15
**Branch**: main
**Total Vulnerabilities**: 4
### Fixed (1)
- CVE-2022-4742 in JsonPointer.Net: Updated 6.0.0 → 6.0.1
### Suppressed (3)
- CVE-2023-36415 in Azure.Identity: Already fixed in 1.17.1 (transitive)
- CVE-2023-4914 in Mono.Cecil.Mdb: False positive (different package)
- CVE-2012-2055 in Octokit: Not applicable to this library
### Pending (0)
None
FR-6.2: Maintain resolution history for audit purposes
FR-6.3: Generate PR description for vulnerability fixes
Non-Functional Requirements
NFR-1: Security
Never expose actual vulnerability details in logs
Suppression decisions must be committed to version control
Support for security team review workflow
NFR-2: Performance
Skill invocation < 5 seconds for analysis
Report parsing < 10 seconds for typical reports
No impact on regular CI pipeline speed
NFR-3: Maintainability
Follow existing skill template patterns
Reusable scripts for automation
Clear documentation for manual fallback
NFR-4: Auditability
All suppressions traceable to commits
Suppression history preserved
Quarterly review reminders
Technical Design
Workflow Modifications
Update .github/workflows/cve-scanning.yml to support:
on:
push:
branches: [main]pull_request:
branches: [main]schedule:
- cron: '0 3 * * 1'workflow_dispatch:
inputs:
branch:
description: 'Branch to scan'required: falsedefault: 'main'fail-cvss:
description: 'Fail on CVSS score >= N'required: falsedefault: '7'suppression-file:
description: 'Path to suppression file'required: falsedefault: './dependency-check-suppressions.xml'
QA Tester Skill: Coordinate for regression testing after dependency updates
Release Manager Skill: Ensure no unresolved vulnerabilities before release
AOT Guru Skill: Verify dependency updates don’t break AOT compatibility
User Stories
US-1: Developer Fixes Vulnerability
As a developer, when the dependency check fails, I want to quickly identify which vulnerabilities are genuine and how to fix them so I can unblock my PR.
US-2: Security Review for False Positive
As a developer, when I identify a false positive, I want to suppress it with proper documentation so future scans don’t flag the same issue.
US-3: Pre-merge Vulnerability Check
As a developer, I want to check my branch for vulnerabilities before creating a PR so I can address issues proactively.
US-4: Quarterly Security Review
As a maintainer, I want to review all active suppressions quarterly to ensure they’re still valid and no fixes have become available.
US-5: Audit Trail
As a security auditor, I want to see a complete history of vulnerability decisions so I can verify the project follows security best practices.
Implementation Phases
Phase 1: Core Infrastructure (MVP)
Update workflow for manual dispatch
Create suppression file with initial false positives
Basic skill definition with manual resolution workflow
Owned branch: t3/add-config-editing. Initial checkout was clean.
Base: 422ff4efa3139868bc73f79d1cdf4df529e2b34f.
Prerequisite PR #471 is merged at that base. Validated head a5efd7dc9dec893025c7da05cc4d7c8017efc00a and base have identical tree 43f9469cce6a64009cda037ef856f9663ee67a97.
Campaign temporary root: /private/tmp/morphir-config-editing, including physical tmp, editor, transaction and validation evidence. Parent owns eventual cleanup; unresolved recovery artifacts must be preserved.
Parent owns independent review, CI monitoring, merge and checkout/branch/temp cleanup. This implementation worker will not watch, merge, force-push or delete branches.
Work allocation
The implementation worker owns shared F# models/planner, IO orchestration, CLI, documentation and delivery. Two helpers own disjoint TOML editor and transaction implementation/test files. Only one heavy .NET job runs at a time, with DOTNET_PROCESSOR_COUNT=2, -m:1 -p:BuildInParallel=false, bounded executable test workers and sequenced Expecto. All processes use physical TMPDIR, TEMP, TMP beneath the campaign root.
Validation
Tests are recorded red before production behavior, then green after implementation. No baseline count is claimed as a result.
Shared plans boundary
core-red-01.log proves missing plan API; core-green-01.log passes the initial immutable string plan.
core-red-02.log/core-green-02.log qualify complete typed values. Selection, unset/inheritance, hidden invalid values, numeric/path-shape guards and virtual-root personal ownership have subsequent red/green checkpoints 03–07.
core-full-build.log and core-full.log pass all 147 core Expecto tests after formatting. The 11 new tests cover typed values, scope selection, quoted paths, immutable observations, inheritance, redaction and numeric semantics.
io-plan-red.log proves the reusable IO planning API is absent before implementation. io-plan-green.log proves an in-memory preview invokes no writer operations.
Exact-buffer evidence, independent explicit-path authorization and canonical candidate topology resolution have io-plan-red-02.log/io-plan-green-02.log evidence. Isolated-read parity has io-plan-red-03.log/io-plan-green-03.log. The latter passes 10 integrated IO cases.
Actual CLI subprocess BDD is red before registration. cli-red-02-current.log, after rebuilding the actual CLI, fails 11 of 23 cases for unimplemented flags and raw-reference presentation. cli-green-03.log passes all 23 after implementation; builds refresh src/Morphir/bin before subprocess tests.
The global CLI fixture uses a separate captured home beneath its test root, preventing a global fallback from also becoming a conflicting project primary. On this macOS host /etc is a link. Native system preview obeys the existing no-follow policy and returns typed exit 2 without a write. Pure system selection and explicitly authorized physical targets remain available. No filesystem-link policy was widened to pass a test.
TOML editor boundary
The editor qualification records red/green checkpoints 01–12 and the final 30/30 focused tests. Source and test builds have zero warnings/errors. The editor preserves token spans, comments, BOM, line endings, quoted/dotted key spelling and following-header presentation. Complete inline/table/array edits are verified against the canonical reader, including temporal/nonfinite values, NaN equality, signed zero, opaque references and the pinned TOML corpus. No parser dependency or accepted TOML version changed.
The extended IO host passes 37 new managed checks plus the existing 228 JSON5 checks, 26 Morphir fixture documents and discovery/machine-routing checks. smoke/managed-build.log has zero warnings/errors; smoke/managed-run.log records editor 9, shared editing 15 and transaction 13. Trimmed/native publication is still pending at this boundary.
IO and transaction boundary
The transaction qualification records 32 focused passing cases and paired failing/passing receipts for staging, replacement, rollback, cleanup, ownership, same-process and actual cross-process coordination. In-memory application and immutable candidate copies are verified. Native coordination is machine-local, not distributed.
Integrated io-workspace-red.log proves both explicit workspace and root-default writes originally reported the wrong effective view when a selected member still won. io-workspace-green.log passes both after target selection was separated from effective resolution. io-edge-red.log identifies unstable planning evidence as incorrectly categorized I/O; io-edge-green.log proves it now reports a conflict. Tests also retain selected member/personal ownership under isolation, refuse explicit alternate-primary ambiguity, exercise complete inline dotted subtrees, reject lossy Unicode, retain BOM encodings and detect blocked parent paths without modifying them.
After these cases, core-final.log passes 148/148 Expecto tests and io-edge-green.log passes the full 266/266 IO/TUnit/Reqnroll tests. Builds report zero warnings/errors. Current-source coverage in coverage-final-summary.json unions core-final-coverage/*/coverage.cobertura.xml and io-edge-coverage.cobertura.xml: core 3757/3913, 96.01%; IO 1381/1425, 96.91%. Both exceed the prerequisite’s authored-source measurements. The executable Expecto runner is the correctness gate; the adapter-based invocation supplies coverage only.
The actual generated report sources also pass a 71-check managed serializer host with reflection serialization disabled, including editing before/after, raw-reference redaction, overridden values, recovery ownership and depth 127. serializer-managed-build.log reports zero warnings/errors.
CLI boundary
validation/Morphir.Tooling.Tests.log passes all 360 TUnit/Reqnroll cases, including 33 editing subprocess scenarios and 18 no-discovery/host-binding checks. Every editing subprocess report is checked against docs/spec/schemas/config-edit-result.schema.json with a fresh schema registry. Persisted values prove default strings, booleans, Int64, floats including large finite literals, complete arrays/objects and literal dotted keys. Unset reveals classic JSON with its origin. Before/after opaque references are redacted, previews preserve bytes, successful overridden writes return 0 and missing unset returns 1.
core-number-red.log reproduces rejection of a large literal despite explicit floating input; core-number-green.log passes after accepting finite explicit numbers while retaining Int64/composite integer limits. This changes edit input typing only; canonical readers and accepted TOML/YAML/JSON/JSON5 profiles remain unchanged.
The first broad local driver stopped after five passing suites on Bash 3.2’s empty-array handling. That driver was repaired to use positional arguments and infer Expecto from project metadata; no product change was needed. Its evidence is preserved in validation-initial/. The current broad run uses each configured executable runner, one TUnit worker, sequenced Expecto, bounded nested builds and a process-local path to the already installed PowerShell 7.5.3. No global tool setting changed.
Final local qualification
The source checkpoint is cb6ff29. All 17 configured runners pass; validation/summary.json records these exact counts.
Runner
Passed
Morphir.CodeGeneration.FSharp.Tests
333
Morphir.Configuration.IO.Tests
266
Morphir.Configuration.Inspection.Smoke
71
Morphir.Configuration.Microsoft.Tests
22
Morphir.Configuration.Tests
149
Morphir.Core.Tests
237
Morphir.IR.Pipeline.Plugins.Tests
141
Morphir.IR.Pipeline.Tests
299
Morphir.Internal.CodeGeneration.Tests
25
Morphir.Ion.Tests
463
Morphir.Models.Tests
791
Morphir.Myriad.Integration.Tests
12
Morphir.Myriad.Tests
4
Morphir.SDK.CSharp.Tests
20
Morphir.SDK.Conformance.Tests
27
Morphir.SDK.Tests
403
Morphir.Tooling.Tests
360
The solution build passes with 20 existing package/generated-code warnings and no errors. C# formatter verification and Fantomas verification pass. The new managed configuration and serializer builds have no warnings/errors. delivery-coverage.json records core 3766/3922, 96.02%, and IO 1381/1425, 96.91% on the final source.
Both non-CLI hosts pass managed, trimmed and native osx-arm64 qualification. The IO host passes 37 new checks, all 228 JSON5 grammar cases, 26 pinned Morphir documents and its existing host/discovery/machine-root checks. The linked-source CLI serializer host passes 71 checks in each mode, with reflection serialization disabled. publish-summary.json records actual receipts and warning counts. IO trimmed/native retain 44/47 pinned dependency warning lines; serializer trimmed/native retain 42/47. ILLinkTreatWarningsAsErrors=false is explicit on each publish, no diagnostic is suppressed, and no warning-free dependency claim is made. No authored-source linker/AOT diagnostic occurs. Exact prepublish lockfile bytes were restored through the captured SHA-256 manifest.
Reproduction
Run one heavy job at a time from the repository root. Use physical paths on macOS:
export DOTNET_PROCESSOR_COUNT=2 BuildInParallel=false
export TMPDIR=/private/tmp/morphir-config-editing/tmp
export TEMP="$TMPDIR" TMP="$TMPDIR"export PATH="/Users/damian/.local/share/mise/installs/powershell/7.5.3:$PATH"dotnet build Morphir.slnx -m:1 -p:BuildInParallel=false
# For each runner in the table, use its compiled executable:dotnet tests/Morphir.Configuration.Tests/bin/Debug/net10.0/Morphir.Configuration.Tests.dll --sequenced
dotnet tests/Morphir.Configuration.IO.Tests/bin/Debug/net10.0/Morphir.Configuration.IO.Tests.dll --maximum-parallel-tests 1# Other Expecto projects use --sequenced; other TUnit projects use one worker.dotnet format Morphir.slnx --no-restore --verify-no-changes --verbosity quiet
dotnet fantomas --check src/Morphir.Configuration/Editing.fs tests/Morphir.Configuration.Tests/EditingTests.fs
run-validation.sh under the campaign evidence root contains the complete 17-runner sequence and bounded process environment. It reads each test project’s framework metadata; the serializer smoke takes no runner flags. Nested SDK packs/builds remain serial, using the installed process-local PowerShell. Runtime source is unchanged by the later archive and documentation commits.
Each smoke README gives exact managed/trimmed/native commands. The published modes use -m:1 -p:BuildInParallel=false -p:PublishTrimmed=true -p:PublishAot=<false|true> -p:TrimmerSingleWarn=false -p:ILLinkTreatWarningsAsErrors=false -p:JsonSerializerIsReflectionEnabledByDefault=false. The IO executable receives --fixtures <repo>/tests/Fixtures/Configuration. run-publish.sh and the lockfile capture/restore manifest retain the exact successful sequence.
Main integration and archive
Main advanced through the documentation-only SDK archive PR #472, landing at 618fbf7b6c5b542122450bf61f4f794e590fe4f5. It was merged normally into the owned branch. Runtime sources and configuration/tooling tests are byte-identical to cb6ff29. Independent SDK main specs and archives match main exactly. Fresh SDK conformance passes 27/27 after integrating its readiness metadata. No SDK archive was authored or altered by this campaign.
Only add-config-editing was synchronized and archived at openspec/changes/archive/2026-11-03-add-config-editing/. Its main capability is openspec/specs/configuration-editing/spec.md. All eight tasks are complete. The nine requirement bodies, 13 scenarios and Purpose match the approved delta exactly. The archived design/proposal/task links are checked; the classic migration prerequisite link is repaired. Independent migration work remains unimplemented.
Strict OpenSpec validation passes 22/22 active/spec items before and after archiving. The html-design snapshot check and both extension tests pass. The generated-output publication main spec and implementation remain unchanged. The archive receipt and task-boundary instruction snapshots are retained under the campaign evidence root.
Handoff limits and ownership
Local qualification does not claim current-head CI, independent review, landing or campaign completion. Parent owns those gates, including the explicitly authorized workstream admin bypass and subsequent checkout/local-branch/remote-branch/temp cleanup. The implementation worker does not watch, merge, force-push, delete branches or publish releases.
Native writes coordinate cooperating processes on one machine; shared stores needing distributed coordination must supply it through their host. Per-file atomic installation does not provide multi-file group/crash atomicity. Native no-follow policy can reject the conventional macOS /etc alias; an authorized physical TOML target avoids that alias. Windows paths and separate drive/UNC hosts are covered by the shared host fixtures; the local native publication target is osx-arm64.
All owned external build/test/publish evidence is under /private/tmp/morphir-config-editing/, including tmp, editor, transaction, smoke, publish, publish-locks, validation, validation-initial, coverage files and instruction/archive receipts. Generated bin, obj and test outputs inside the retained owned checkout also belong to this campaign. Shared tool/package caches are not campaign cleanup targets. No unresolved native recovery artifact was found after the successful qualification runs. Preserve any recovery data discovered during later review instead of deleting it to manufacture a clean result.
Parent Windows CI fixture correction
Windows run 41671846502 on 9b683b9 passed all 360 tooling tests but failed
21 IO transaction cases. The native observations returned canonical ‘/’ paths,
while the test helper supplied native backslash paths as change destinations.
The existing plan-ownership guard correctly rejected that mismatch before any
write, producing typed I/O outcomes and preventing fault/staging callbacks.
Transaction fixtures now construct canonical paths with ProjectPath.join,
and normalize directory-enumeration results before path assertions. The public
example uses observed.Path for the corresponding change, making its ownership
contract explicit on Windows. No production guard or native locking behavior
was weakened. The unchanged native CLI execution had already passed Windows CI.
The corrected full IO runner passes 266/266 locally; test compilation, formatter
verification and whitespace checks pass. Evidence is owned under
/private/tmp/morphir-config-editing/parent-review/, including the downloaded
Windows failure log and windows-path-io-full.log. Ubuntu and macOS were
cancelled by matrix fail-fast after Windows failed; fresh CI remains required.
The independent TOML/transaction review completed without actionable findings.
Its existing-DLL probes passed 1,438 editor operations, 10,000 sampled finite
double roundtrips and 8 native transaction cases. Its disposable evidence is
/private/tmp/morphir-config-editing-review-writes; no recovery data was retained.
Parent shared-planning review fixes
The independent planning/CLI review reproduced two contract defects on 9b683b9.
A user edit filtered personal candidates by the preferred primary’s directory,
missing an existing personal TOML or lower-format stem in another eligible layout.
It could reject a valid set through a newly introduced ambiguity or return not
found for an existing unset entry. Target selection now filters by the complete
set of eligible personal paths from the actual owner, preserving format-group
ambiguity checks and keeping another owner’s personal sources separate.
An explicit personal file in another declared member was treated as an arbitrary
Selected source because only the default member’s inventory was considered. Its
workspace output could then relocate the reported owning workspace. The reusable
IO service now identifies an explicit member-personal owner from every discovered
member’s eligible layouts, and uses that owner for both initial and candidate
resolution. The target keeps its UserOverride role and member scope, including
under isolation or an otherwise ambiguous virtual-root selection. Workspace-root
personal sources and arbitrary explicit files retain their existing handling.
Eleven public IO regressions failed before these fixes, in ownership-red.log.
They cover standalone/member set and unset, lower-format promotion, personal TOML
ambiguity, all three personal layouts, isolated selection and a virtual root.
The final 30-case editing-service group passes, ownership-io-focused.log. One
intermediate test expected the member primary to win after unset; its fixture
also supplied a higher workspace-personal value, so that assertion was corrected
to the unchanged layering contract. No production layering rule changed.
Three new subprocess BDD cases failed against the previous actual CLI, in
ownership-cli-red.log, then passed after rebuilding the CLI with the shared
fixes, ownership-cli-green.log. They assert set/unset on a nonpreferred personal
layout and explicit other-member ownership. The IO smoke adds seven shared checks
for those same paths. Managed qualification passes editor 9, shared editing 22,
transaction 13, plus all 228 JSON5 cases, 26 Morphir fixtures and existing host
checks, in ownership-io-managed.log. Shared API and CLI documentation describe
the corrected selection/ownership behavior. The main spec’s nine requirements
and 13 approved scenarios remain unchanged.
The reviewer probes are owned at /private/tmp/morphir-config-editing-review-planning.
No review was posted as a human approval. Parent-owned current-head CI, final
qualification, landing and cleanup remain outstanding at this checkpoint.
Parent final review qualification
Runtime fixes are committed at fa7782d; the separate Windows fixture correction
is 214eee4. All 17 configured runners pass on the final runtime source, using
one TUnit worker, sequenced Expecto and serial nested builds. The refreshed
counts are core 149, IO/BDD 277, tooling/BDD 363 and Microsoft 22; the other
configured suites retain their baseline counts. All three new subprocess
regressions pass. parent-review/final-validation.json records every exit code
and links to the corresponding final-<project>.log receipts.
The full solution build succeeds with no errors and 9 existing warnings on this
incremental invocation. Changed C# formatter verification and F# Fantomas checks
pass. OpenSpec verification passes all 22 active/spec items and both extension
tests. Current-source coverage unions the refreshed core collector and IO
coverage files, never the pre-edit source-line mappings: core 3775/3932, 96.01%,
and IO 1392/1436, 96.94%, in ownership-coverage-summary.json.
Fresh managed, trimmed and native osx-arm64 IO hosts pass all 44 editing checks,
9 editor, 22 shared planning/application and 13 transaction, as well as 228 JSON5
syntax checks, 26 pinned Morphir documents and existing host/discovery/machine
checks. New mixed-layout personal and explicit other-member owner paths execute
in each published mode. Receipts are ownership-io-managed.log,
io-trimmed-result.json and io-native-result.json; published stderr is empty.
Pinned dependency linker diagnostics remain visible under explicit
ILLinkTreatWarningsAsErrors=false, with no authored-source diagnostic suppression.
Publish-only lockfile changes were restored byte-for-byte from the captured
SHA-256 manifest; the checkout is clean apart from this qualification record.
The serializer host still passes 71 managed checks in the full run. Its prior
71-check trimmed/native receipts remain applicable: neither report/DTO/context
source nor dependency versions, target framework or publish options changed.
The changed F# selection helper and IO planning service are outside that host’s
call graph; its shared Editing.plan calls and serialization/redaction behavior
remain unchanged. Newly changed selection paths have the fresh IO-host native
qualification above.
Main was refreshed and remains validated base
618fbf7b6c5b542122450bf61f4f794e590fe4f5. Both independent reviews have completed;
all reported material findings are addressed. Fresh current-head CI remains
required before the authorized landing and owned cleanup. All added parent
evidence remains under /private/tmp/morphir-config-editing/parent-review/.
6.8 -
TOML editor qualification
Configuration editing uses the existing pinned CsToml 1.8.6 reader to accept source documents and verify rendered candidates. It adds no parser package and makes no change to the reader’s accepted TOML profile. The existing TOML 1.0 compatibility contract remains in force. The installed package README states that 1.0 is the default and 1.1 is optional through CsTomlSerializerOptions.Spec; the editor does not enable that option. Its NuGet metadata identifies the MIT license and upstream commit 6e3b51a9ac9b4bf8f51c9175ffa6f74cd73940ea. Reader conformance fixtures and rejection tests remain authoritative for parsing.
TomlEditor scans source spans for the requested edit. It changes a value token or the necessary named entries and table declarations. It does not serialize the whole document. Before returning a successful edit it reparses the candidate and compares the entire raw typed tree with the intended tree. A lexical mistake therefore returns config.edit.verification and the original text. Parse failures and unrepresentable values likewise return safe codes and the original text. No input values appear in these diagnostics.
The editor is repository-authored code under the repository’s Apache-2.0 license. CsToml continues as the unchanged MIT-licensed package dependency. No upstream source is copied into the editor. It uses explicit discriminated-union matches, source text operations and invariant primitive formatting. It has no dynamic code, reflection serializer or runtime secret resolution. Existing pinned CsToml/FSharp.Core trimming diagnostics remain the dependency qualification limitation; this change does not suppress them.
The transaction adapter owns encoding and atomic file installation. The editor returns text without normalizing unrelated whitespace or line endings. Missing unset results and byte-identical writes do not require installation. Syntax fixtures cover both presentation and complete semantic equality through the canonical reader.
Presentation and semantic checks
The focused tests exercise CRLF and inline comments, exact quoted and literal key spelling, dotted paths, implicit empty parent objects, complete table replacement and removal, nested inline objects, and array-of-tables replacement. Multiline strings containing comment/header characters, arrays with comments, temporal values and unrelated nonfinite numbers remain byte-identical. Candidate comparison treats two NaNs as the same typed number; ordinary F# structural equality alone would reject an unrelated edit in a document containing NaN.
Red and green checkpoints are recorded under /private/tmp/morphir-config-editing/editor/. red-01.log fails because the editor does not yet exist. Subsequent pairs record unset, insertion, missing-unset, complete table changes, inline changes, implicit-parent preservation and the NaN regression. green-08.log passes the first 17 cases. Later qualification expands this suite; the campaign delivery journal records the final counts and host-publishing results.
Unsetting the final leaf retains its parent object. If a parent existed only through dotted entries, the editor may add an explicit empty object to preserve that semantic container. Unsetting the parent itself removes its declarations and descendants. Arrays are complete values. Traversal through an array, scalar or opaque secret reference fails before rendering. Setting a complete object replaces that object’s authored entries; it does not merge the object with its previous value.
New entries are inserted after the last complete statement line in their containing table. Leading comments and indentation on the next unrelated header stay together. Existing key spelling and quote style remain intact when changing only a value. Newly rendered values use invariant types, including an explicit float marker for integral doubles and the sign of negative zero.
Final focused qualification passes 30/30 cases in editor/final.log, after formatting the owned source and test files. The build reports zero warnings and errors. The additional cases cover canonical opaque references, sign changes between positive and negative zero, typed scalar/composite roundtrips including subnormal/maximal doubles and Unicode controls, null/range rejection, BOM and 127-segment quoted paths, TOML 1.1-only syntax rejection, and all three pinned upstream TOML documents. The HTML result is under editor/results/. These are local managed checks; the campaign journal records the separate trim/native and integrated suite evidence.
Parent integration adds four passing cases for complete inline dotted subtrees, multiline array comments/partial string quotes, control escapes and safe refusal of lossy Unicode. The integrated editor count is 34; the full IO suite has 266 passing tests at this boundary.
6.9 -
Configuration file transactions
Morphir.Configuration.IO exposes ConfigurationTransaction independently of CLI discovery and presentation. A host captures ConfigurationObservation values for every input used by a preview, including absent candidate files, and passes those observations with immutable ConfigurationFileChange values to ConfigurationTransactionPlan.
var observed = ConfigurationTransaction.Observe(target);
var plan = new ConfigurationTransactionPlan(
observations: new[] { observed },
changes: new[] { new ConfigurationFileChange(observed.Path, observed, candidateBytes) });
var result = new ConfigurationTransaction().Apply(plan);
Native observations return canonical / paths on every platform. When starting with a native path, use the returned observation path for the corresponding change, as above.
The editing service supplies the complete observation set. Constructing a transaction directly makes the caller responsible for including its source and target-selection evidence. The target’s expected observation is automatically included even if the caller omits it from the general observation list.
IConfigurationTransactionHost is the explicit host boundary for in-memory or embedded applications. Its methods capture content/inventory identities, coordinate writers, stage bytes, install one destination, and remove owned artifacts. A host’s Install implementation must replace a single file atomically. Multiple installations do not constitute a group-atomic transaction.
Native coordination
The native host serializes cooperating configuration writers with one named OS mutex. This deliberately serializes disjoint edits too. Configuration writes are infrequent, and a single coordinator avoids filesystem case aliases and overlapping directory inventories bypassing separate path locks. The Unix name is Morphir.Configuration.Edit.v1; Windows uses Global\Morphir.Configuration.Edit.v1. Access or platform failures return an I/O outcome; the implementation does not fall back to an unlocked write. An abandoned mutex grants a new lease, after which every planned observation is checked again.
The lease remains held through recovery and artifact cleanup. Native coordination creates no files alongside configuration targets. The OS owns the named synchronization resource and releases its handles when the lease is disposed or its process exits. Custom hosts must provide a coordination protocol shared by all their writers.
Content identities use SHA-256 rather than timestamps. Directory observations capture inventory evidence; missing files and absent alternate primaries have explicit observations. The transaction rechecks every input after staging and immediately before each installation. It excludes only its own artifact paths from directory inventories and accounts for directories it created for the target. A cooperative writer that obtained an old preview conflicts after the current writer releases its lease.
The named OS coordinator is machine-local. A shared network store with writers on multiple machines needs an injected host with shared-store coordination. The native adapter does not claim distributed locking.
The protocol coordinates hosts that use this transaction service. An unrelated program can still change a file after the final observation; portable filesystem rename does not provide content compare-and-swap. Such edits are outside the coordinator. Recovery never overwrites a target whose current bytes differ from both the original and the staged candidate.
Validation and fault-test evidence will be recorded in the campaign delivery journal before handback.
Recovery evidence
Each changed destination receives a stage, an original-byte backup when it existed, and a versioned JSON recovery journal before installation. Names contain a unique transaction identifier and do not use the configuration-primary filenames. The journal records ownership, target, original and candidate identities, and stage/backup paths. It contains no raw configuration values. Unix staging files are created with mode 0600; the backup and staged configuration may contain secrets and must be protected as user configuration.
ConfigurationTransactionPhase hooks inject faults at staging, replacement, recovery, and cleanup boundaries. A failure after replacement attempts rollback while holding the coordinator. The original bytes are restored only when the current target still matches this transaction’s candidate. A missing original is restored by removing the newly installed candidate. Another writer’s bytes are preserved.
The result categories distinguish written, unchanged, conflict, I/O failure before installation, fully rolled-back failure, and recovery required. A recovery-required result identifies every retained artifact by path, kind, and transaction owner. It never represents an unchanged or successful outcome. Keep its journal and backup together, compare the journal’s identities with the current target and backup, then recover under the same writer coordination. The API does not automatically recover or delete a previous transaction’s artifacts.
Each destination is installed atomically, but earlier destinations can be visible before a later installation fails. Recovery can also fail. Callers must not describe multiple file changes as group atomic.
An injected host that fails after creating an artifact must remove it before throwing or throw ConfigurationArtifactFailureException with its owned paths, kinds, and transaction identifier. The service cleans artifacts owned by its transaction if possible. It preserves artifacts with another owner and reports recovery required instead of deleting them. Native staging follows this contract even when writing or flushing a partially created file fails.
Before attempting manual recovery, verify the journal owner and the original backup’s SHA-256 identity. A target that differs from both recorded identities requires an operator decision; do not overwrite it automatically. A host can use a fresh transaction with the current target and backup observations to restore approved bytes. Remove the previous transaction’s artifacts only after recovery is verified and only after confirming their ownership. A normal new edit never prunes older recovery evidence.
Existing destinations use File.Replace; new destinations use a non-overwriting File.Move. Both stages live beside the destination. Unix replacement copies the existing permission bits onto the candidate before replacement. New files retain the restrictive staging mode. Byte-identical candidates bypass staging and installation, preserving the target’s last-write timestamp.
Validation evidence
The focused executable TUnit suite is ConfigurationTransactionTests. Campaign logs live under /private/tmp/morphir-config-editing/transaction/; the campaign delivery journal records final integrated results.
Behavior
Failing evidence
Passing evidence
Replacement rollback
red-rollback.log
green-rollback.log
Changed source or absent alternate primary
red-recheck.log
green-recheck.log
Linked ancestor rejection
red-links.log, red-target-guard.log
green-links.log, green-target-guard.log
Directory evidence with owned staging
red-directory.log
green-directory.log
Overlapping writers
red-lock.log
green-lock.log, cross-process.log
Incomplete recovery journal
red-journal.log
green-journal.log
Cleanup failure
red-cleanup.log
green-cleanup.log
Recovery target and backup integrity
red-recovery-guard.log
green-recovery-guard.log
Partially created stage ownership
red-partial-stage-build.log
green-partial-stage.log
Proven post-rollback outcome
red-fault-matrix.log
green-fault-matrix.log
Existing Unix permissions
red-mode.log
green-mode.log
Target evidence ownership
red-plan-guard.log
green-plan-guard.log
Stage and backup integrity before installation
red-stage-integrity.log
green-stage-integrity.log
Unambiguous inventory identities
red-inventory.log
green-inventory.log
Partially created parent ownership
red-parent-ownership.log
green-parent-ownership.log
qualification.log verifies immutable input snapshots, a wholly in-memory host, byte-identical no-op timestamps, and observable per-file installation followed by multi-file rollback. cross-process.log runs a second executable TUnit process against the same native coordinator. It proves that the child cannot stage while the parent owns the lease and that the stale child conflicts after the parent installs its candidate. Windows-specific namespace and metadata behavior still require Windows CI; local qualification ran on macOS.
Hosts that create target directories can implement CreateParentDirectories(destination, transactionId) to attach the current owner to failures. The default overload preserves existing host implementations; those implementations must clean any partial directory creation themselves before throwing. The native implementation returns canonical / paths and either cleans created directories or reports typed retained ownership.
Clean T3-prepared checkout /Users/damian/.t3/worktrees/morphir-dotnet/t3-a74ab7cb, branch t3/add-config-inspection, based on current main 23d274d4c87b367fdc79bd21843a9fdf5d74b13d. Fetch and ancestry checks confirm campaign 1 landed at 3d5b41c0f839c7b2648403ad6aba5c5644f7dfb5 and campaign 2 at this base.
Only inspection is implemented here. Editing and migration remain active plans. Parent owns reviews, check monitoring, merge and subsequent owned cleanup. No watch, merge, bypass, force push, branch/worktree deletion, deployment or release is performed by this implementation agent.
Execution policy
Heavy .NET jobs run serially with DOTNET_PROCESSOR_COUNT=2, MSBuild -m:1 and bounded workers. Filesystem tests use physical TMPDIR, TEMP, TMP under /private/tmp/morphir-config-inspection. Reproducible logs and binaries live there. docs/superpowers/ is locally excluded and never staged.
The existing resolution result and constructor remain compatible. Additive detailed resolution retains canonical layers and applied values for queries without rereading sources. Microsoft projection consumes one resolved document.
Red checkpoints
Shared tracer compile failed because resolveDetailed and Inspection did not exist, then its runtime test failed against a minimal get stub: effective global value expected but missing. Logs core-compile-red.log, core-runtime-red.log under the owned temp root. The configured Expecto runner selected Inspection with --filter-test-list Inspection --sequenced.
Microsoft adapter compile failed for missing projection API, then executable TUnit/Reqnroll ran 13 cases against no-behavior stubs: 13 failed. Logs microsoft-compile-red.log, microsoft-runtime-red.log.
Shared query cases grew incrementally after the tracer: quoted-path compile red then 2 green; recursive secret/container redaction runtime red then 3 green. List/source-report/explain stubs then fail 3 of 7 cases, followed by embedded-host Reqnroll red 3/4. Logs keypath-*, redaction-*, queries-red*, shared-bdd-red*. These cover empty values, sorted quoted entries, source statuses, scoped ownership and member replacement history.
CLI configured subprocess runner executes all five read verbs against the actual unregistered CLI: 29/29 fail before production registration. Logs cli-red-build.log, cli-red-test-build.log, cli-red.log.
Shared query green checkpoint
Core 131/131 and IO/BDD 170/170 pass using executable configured runners, with physical temp paths for filesystem tests. Both builds have zero warnings/errors. Logs core-green-build.log, core-green.log, shared-bdd-green-build.log, shared-bdd-green.log. The shared API reference is docs/content/docs/configuration/inspection.md. Existing DocumentResolution and cache-only APIs remain intact; additive detailed resolution retains canonical and applied layers without extra reads.
Additional behavior checkpoints
Selected-personal query-scope regression failed 1/10 before preserving its discovered scope after promotion to the selected layer. Core then passes 134/134. Shape-blocking and composite-winner explanations and safe parser-diagnostic presentation also pass. Logs selection-red*, selection-green*.
CLI initially passes 34/35 BDD subprocess cases and 9 observer cases; the remaining deliberately red case proves unrelated malformed appsettings were loaded by the builder during help. The help-only builder path disables host defaults; ordinary execution defaults remain compatible. Log cli-host-help-red.log records that failure before the fix.
Microsoft adapter checkpoint
Adapter managed tests pass 22/22 after runtime RED13/13 and boundary RED5/22. Added tests prove earlier host providers cannot leak stale array indices or descendants under replacement values; unrelated host siblings remain. Empty .NET key segments are rejected alongside case/separator collisions. Builds are warning-free. Authored adapter coverage is 118/119 lines, 99.16%.
The non-CLI managed, trimmed and native hosts each pass 43 checks, including concrete source-generated/explicit binding, missing versus empty arrays, nested values, collision diagnostics, canonical access and bounded native-tree loading. See tests/Morphir.Configuration.Microsoft.Smoke/README.md for exact commands. Logs microsoft-publish-trimmed.log and microsoft-publish-native.log retain 44/47 pinned CsToml/FSharp.Core warnings respectively; no new adapter/binder/serialization diagnostics occur. Runtime qualification uses ILLinkTreatWarningsAsErrors=false; strict warning-free publishing remains unsupported by those pinned dependencies. Publish RID lockfile churn was restored from exact prepublish bytes.
CLI, numeric JSON and host-help checkpoint
Full configured runners now pass core 135/135, IO/BDD 171/171 and tooling 299/299. Tooling includes 38 subprocess BDD cases and 16 observer tests. Every JSON subprocess report validates docs/spec/schemas/config-inspection-result.schema.json. The actual CLI default registration is exercised, not a test-only command tree. Existing IR/cache/management behavior remains covered by the full tooling suite. Logs final-core.log, final-io.log, final-tooling.log.
Additional runtime RED checkpoints cover four empty selectors reaching discovery, invalid environment profile names reaching malformed source reads, unpaired Unicode escapes throwing instead of reporting usage, and a discovered NaN-bearing member rejected by F# structural equality. Empty selectors and profile preflight now fail before the host edge. Key-path parsing catches invalid surrogate decoding. Loading accepts the actual discovered record by identity before its compatibility structural-equality check. Public regression and both NaN CLI scenarios pass; no fixture was weakened. Logs cli-empty-controls-red.log, cli-environment-profiles-red.log, unicode-red.log, nan-member-red.log.
The user confirmed the typed JSON detail for NaN/infinities. Nonfinite numbers are tagged {"$number":"NaN"}, {"$number":"Infinity"} or {"$number":"-Infinity"}. A separate envelope valueTypes JSON Pointer discriminator identifies actual numbers. Ordinary tag-shaped objects carry no number metadata; no user key is reserved. Finite values retain JSON types, temporal kinds remain metadata, and shared redaction precedes encoding. serializer-red.log fails in Utf8JsonWriter before implementation. The actual CLI DTO source is linked into a small host with reflection serialization disabled, not duplicated. Managed, trimmed and native hosts each pass 21 checks, including all nonfinite cases, tag-shaped user objects, nested arrays, pointers, redaction and contribution/entry metadata. See tests/Morphir.Configuration.Inspection.Smoke/README.md for commands. Its trimmed/native logs retain 42/47 FSharp.Core warnings and no new serializer diagnostics. Exact prepublish lockfile bytes were restored.
Final local validation
The complete solution restore/build succeeds with zero errors and existing package/generated-code warnings, NU1608, NU1510 and CS0436. The initial full build reports 19 warnings; the incremental build after Unicode handling reports 9. This differs from the earlier baseline’s 20 due to which projects/generated sources compile, not a claim of warning-free dependencies. New core/IO/Microsoft and serializer-host builds are warning-free. Logs solution-build.log, final-solution-build.log. dotnet format Morphir.slnx --no-restore --verify-no-changes --verbosity quiet and Fantomas checks of every changed F# file pass. git diff --check passes.
Configured runner evidence is core 135, IO/BDD 171, Microsoft 22 and tooling 299, all passing. Eleven broader suites also pass: C# core 237, internal generation 25, models/roundtrips 791, pipeline 299, SDK 175, SDK conformance 27, pipeline plugins 141, F# backend 333, Ion 463, Myriad 4 and packaged Myriad integration 12. Logs broader-*.log and broader-results.json record each result. The packaged integration suite was requalified with one worker and a temporary dotnet wrapper adding -m:1 -p:BuildInParallel=false to nested build/pack operations, log packaged-consumer-serial.log. Earlier broad execution used two bounded TUnit workers, allowing internal integration builds to overlap before this corrected qualification. No unrelated process was stopped.
Current-source coverage union from core-coverage/*/coverage.cobertura.xml and io-coverage.cobertura.xml is core 3413/3565, 95.74%, and IO 639/662, 96.53%, above prior 95.38%/96.51%. The adapter’s authored source is 118/119, 99.16%. Do not combine older core dependency coverage from the Microsoft checkpoint with newer source-line mappings.
Representative reproducible commands, run serially with physical temp environment:
Published host commands and dependency diagnostics are recorded in both smoke READMEs. Managed/trimmed/native Microsoft hosts pass 43 checks each; managed/trimmed/native serializer hosts pass 21 checks each. All stdout receipts parse as JSON and stderr receipts are empty. Canonical typed metadata remains available separately from the safe string projection.
Main was fetched again after validation and remains 23d274d4c87b367fdc79bd21843a9fdf5d74b13d, so there is no interacting base advancement. Code checkpoint 5518fb9 contains the implementation, regression fixes and serializer. Later delivery commits integrate documentation, the configured runner and archive. Final PR/head/base identities are supplied in the parent handback and forge metadata.
Specifications and parent handback
Apply was refreshed at each fulfilled task boundary and finally reports all_done, 8/8 tasks complete, in apply-all-done.json. Both new capabilities were synchronized from the approved deltas, including the confirmed nonfinite JSON scenarios. The new main specs are openspec/specs/configuration-inspection/spec.md and openspec/specs/dotnet-configuration-integration/spec.md. Their purposes and requirement/scenario bodies were compared byte-for-byte with the deltas after canonical title/Requirements-header normalization. No delta-operation headers remain in main specs.
Only add-config-inspection is archived at openspec/changes/archive/2026-11-03-add-config-inspection/; original .openspec.yaml, design, proposal, deltas and all checked tasks remain reviewable. Prerequisite/document links and the active editing prerequisite link were repaired. Editing, classic migration and workspace migration remain active. The archive CLI reports completed tasks with one nonblocking proposal suggestion to split more than ten deltas; this approved cohesive campaign remains one PR.
mise run openspec:verify passes managed-file checks, html-design schema validation, all 22 active/spec items and both extension tests. Evidence is openspec-verify.log; spec-sync-validate.log and archive.log record sync/archive checks.
The configured Nuke runner now includes the Microsoft suite and the linked-source serialization smoke using existing compiled artifacts. No new CI workflow or release/deployment behavior is added. New adapter/binder dependencies are pinned at Microsoft.Extensions.Configuration/Configuration.Binder 10.0.14; intentional central-transitive lockfile updates are retained, while publish-only RID/ILCompiler changes are restored. NOTICE and README describe the additive contribution and consumption paths.
Main was fetched immediately before PR preparation and remains the validated base. The checkout is retained for parent review and is committed clean for handback. All reproducible test/publish logs, coverage reports, smoke binaries and exact prepublish lockfile backups belong to this campaign under /private/tmp/morphir-config-inspection/; no unique source edits reside there. Parent owns PR review/current-head CI, merge/landed verification and owned worktree/local-branch/remote-branch/temporary-artifact cleanup. The campaign remains incomplete until those gates are fulfilled. No watch, merge, auto-merge, admin bypass, force-push, branch/worktree deletion, release or deployment was performed.
Final published-host refresh
After the NaN selection and Unicode fixes, the adapter was rebuilt/published from final delivery checkpoint 569e7cf8fe1e7fc5ca8e2a9001e7cd3ac3895a72. Managed/trimmed/native receipts all pass 43 checks, and the final adapter suite passes 22/22. Logs final-microsoft-tests.log, final-microsoft-publish-trimmed.log, final-microsoft-publish-native.log; JSON/stderr receipts use final-microsoft-{managed,trimmed,native}. Warning counts remain 44/47, exclusively pinned dependencies, with no new adapter/binder/serializer diagnostic. Captured lockfiles were restored exactly and the checkout was clean. The subsequent commit changes this receipt only. Final head/base/PR identities are recorded in the linked tracking issue and parent handback.
Parent review regressions and qualification
Two current-head bot findings were reproduced before correction:
ca5b1ef: ordinary effective and adjacent-user queries returned success despite
discovery.invalid_default from automatic selection. Two subprocess scenarios
failed with exit 0 rather than 2. The native inspection host now retains
selection diagnostics for effective/project/user scopes. Four additional
scenarios verify workspace, global, system and file scopes bypass unrelated
automatic member selection. The full tooling runner passes 305/305.
082e66f: a file-scoped classic manifest query included the synthetic
checkpoint default because its default layer shares the manifest path.
A public query regression failed before matching excluded Defaults roles.
Get/list/show/path/explain now inspect the actual file layer; effective
compatibility defaults and explicitly authored values remain available.
The complete core runner passes 136/136.
The refreshed full solution build succeeds with zero errors and 20 existing
package/generated-code warnings. IO/BDD passes 171/171 and the Microsoft adapter
suite passes 22/22. The actual CLI DTO smoke adds three file-scope assertions;
managed, trimmed and native osx-arm64 hosts each pass all 24 checks with reflection
serialization disabled. New adapter/binder/serializer diagnostics remain absent;
the documented FSharp.Core warnings remain visible under explicit warning
qualification. Publish-generated lockfile churn was restored.
Fresh configured coverage reports under parent-review union to core 3417/3567,
95.79%; IO 639/662, 96.53%; Microsoft adapter 118/119, 99.16%. The summary is
parent-review/coverage-summary.json. Builds, subprocess tests and publishing
were bounded to two logical processors and serial heavy jobs. Both selection
and file-scope behavior are documented in the CLI and shared query references.
OpenSpec verification passes all 22 active/spec items, managed schema checks and
both extension tests. Changed-file formatting and whitespace checks pass.
All new evidence is owned under /private/tmp/morphir-config-inspection/parent-review.
Current-head CI and the independent query/provider reviews remain pending, along
with main landing and owned artifact cleanup. Blanket admin-bypass authorization
from the user remains in effect after checks and verified review fixes complete.
Parent provider review fixes
The independent provider review found two host-boundary defects at 45196ca.
Machine configuration candidates were all assigned the invocation volume, so
Windows invocations on D: could not read ordinary C: system/user locations or
redirected UNC roaming locations. MachineBoundaries now plans distinct roots
without observing them, and the native host explicitly authorizes those roots.
ProjectLoadOptions.MachineTrees routes candidates within the supplied hosts;
the existing single-tree API remains compatible. No project boundary is widened,
and missing authorization still yields a structured read error without a read.
Eight portable regressions cover cross-drive/UNC reads, relative MORPHIR_HOME,
Unix root planning, invalid relative locations, missing authorization and isolation.
The initial build failed on the missing multi-root contract; all eight now pass.
Two new CLI BDD cases reproduced process aborts, exit 134, when malformed host
appsettings were present. The builder retains supported initialization failures
for an opted-in configuration provider using a minimal fallback host. Commands
validate arguments and profile controls before rendering a generic config.load
failure, one JSON result and exit 2. Invalid arguments retain config.usage.
Help remains read-free and other command defaults retain their existing behavior.
Both initially failing subprocess cases now pass. Logs are host-red.log,
host-green.log, machine-red-build.log and machine-green.log in parent-review.
Final host-fix validation passes core 136/136, IO/BDD 179/179, Microsoft adapter
22/22 and tooling 307/307. The tooling suite includes the two new initialization
subprocess regressions. An initial broad tooling run used macOS’s symlinked
default temporary path and failed filesystem boundary checks; rerunning with
physical TMPDIR, TEMP and TMP passed all 307 cases. No product change was
made for that environment issue. Full solution build succeeds with zero errors
and 9 existing warnings on this incremental invocation. Current-source coverage
union is core 3420/3567, 95.88%, and IO 662/685, 96.64%; the unchanged Microsoft
adapter retains its 118/119, 99.16% qualification.
The IO smoke now exercises both cross-drive and UNC machine hosts in managed,
trimmed and native osx-arm64 binaries, plus all 228 JSON5 syntax cases and
26 pinned Morphir fixtures. Each receipt reports machine_roots: true, success
and empty stderr. Existing CsToml/FSharp.Core linker diagnostics remain visible
under the documented warning qualification; no authored IO/boundary warnings
were introduced. Publish-only lockfile changes were inspected and restored.
Logs and receipts are owned under parent-review, including host-final-build.log,
io-host-full.log, tooling-host-full.log, machine-*-publish.log and
machine-*-result.json. Changed-file formatting and whitespace checks pass.
OpenSpec verification was refreshed after the host fixes and passes all 22
active/spec items and both extension tests. Current-head CI and the independent
query review remain pending before the authorized landing and cleanup.
Windows CI follow-up
The failed Windows job in run 41624211494 used the superseded 45196ca head.
Twenty-one non-isolated subprocess cases failed with C:/ProgramData read errors
from the D: invocation-volume authorization bug, fixed in 740aeba. One isolated
explanation case passed execution but compared canonical ‘/’ source paths with
native Windows backslash paths. Both the explanation and origin assertions now
construct expected canonical paths through ProjectPath.join. This changes only
test expectations; public report paths retain the shared canonical contract.
The Ubuntu/macOS jobs were cancelled by the matrix’s default fail-fast behavior
after Windows failed. Current-head checks must qualify the replacement commit;
none of those older results are treated as current-head evidence. The downloaded
failure log is retained under parent-review/ci-windows-45196ca.log.
The affected explanation and origin subprocess cases each pass after this
test-only correction, and the tooling test build, changed-file formatter and
whitespace checks pass. Native Windows confirmation remains CI-owned.
Parent query review fix
The independent query review found that supported deep values failed inspection
presentation at 45196ca: readers accept 128 levels, while both the intermediate
JsonDocument and generated report serializer retained System.Text.Json’s default
64-level limit. A linked-source smoke regression first failed with a reader-depth
exception, depth-red.log. Raising only the value writer/parser limit then
failed at the report envelope’s generated serializer, depth-envelope-red.log.
The common 256-level limit now covers the writer, JsonDocument and generated
context, allowing the reader limit plus report nesting and typed numeric tags.
The smoke host adds 24 checks across 65- and 127-segment nested objects through
show, subtree get and explain. It checks successful JSON, deepest-leaf numeric
tags/type metadata and redaction before encoding. Managed execution passes all
48 checks. Two additional CLI BDD cases load real TOML at those same depths and
validate the published JSON schema, leaf values, exit code and redaction. Both
pass. The CLI reference documents an appropriate depth limit for consumers.
The disposable review probe directory is
/private/tmp/morphir-config-inspection-review-queries.
Depth qualification is complete: managed, trimmed and native osx-arm64 serializer
hosts each pass all 48 checks with reflection serialization disabled and empty
stderr. The full tooling suite passes 309/309, including 48 subprocess scenarios.
Full solution compilation and changed-file formatting pass. Only documented
FSharp.Core dependency linker diagnostics remain; publish-only lockfiles were
inspected and restored. Receipts are parent-review/depth-*-result.json.
Integration with updated main
Main advanced to 4df3c1ad425f782bfe3cc02e30f577d87dca0f53 with the canonical
F# SDK package migration, PR #469. The SDK runtime moves to a canonical project
while preserving its namespace and assembly identity. It does not change the
configuration libraries, readers, Microsoft adapter or serializer sources, so
their native qualification remains applicable. The solution/README auto-merged;
NOTICE had an append conflict, resolved by preserving the entire SDK notice
followed by the entire configuration notice. No history was rewritten.
The combined tree builds with zero errors and 20 existing warnings. All 16
configured runners pass sequentially with one TUnit worker, sequenced Expecto,
two logical processors and a dotnet wrapper serializing nested builds/packs.
Results: C# core 237, tooling 309, configuration core 136, IO/BDD 179, Microsoft
adapter 22, serializer 48 checks, internal generation 25, model/roundtrips 791,
pipeline 299, SDK 403, SDK conformance 27, pipeline plugins 141, F# backend 333,
Ion 463, Myriad 4 and packaged Myriad integration 12.
Two SDK package-consumer checks initially failed because the installed
PowerShell shim had no selected version. Process-local selection of PowerShell
7.5.3 allowed them to run; the final ownership check then found four stale SDK
DLLs under this checkout’s pre-migration ignored bin/obj outputs. Those two
ignored directories contained no tracked files and were removed. The unchanged
SDK suite then passed 403/403, including both package versions and all canonical,
legacy, combined, generated-source and precompiled-binary consumers. No SDK
product code or global tool configuration was changed for these environment
issues. Original failed receipts remain separate from the successful rerun.
parent-review/integrated-final-results.json indexes the final receipts, including
integrated-sdk-final.log. The first unselected-shim attempts named two disposable
paths outside the main evidence directory; neither contains product work:
/private/tmp/morphir-fsharp-sdk-packages-a13f59919fc0435dbd9ec893900a2f45 and
/private/tmp/morphir-fsharp-sdk-packages-f52a160b844543a4859e20842d67a7c9.
Other package evidence is under the owned parent-review/sdk-package-temp.
OpenSpec verification on the combined tree passes all 22 active/spec items and
both extension tests. Both independent reviews are complete and their reported
findings are fixed. Fresh current-head CI, landing and artifact cleanup remain.
Concurrent schema-validation harness fix
Current-head macOS run 41630213426, head 8118ff0, failed one tooling BDD
case, quoted literal-dot paths, while constructing the published inspection
schema. JsonSchema.Net reported RefResolutionException for a generated local
URI ending in #/$defs/entry. The CLI execution itself had succeeded. All other
suites passed; matrix fail-fast cancelled Ubuntu and Windows. The full failed
job log is parent-review/ci-macos-8118ff0.log.
Inspection scenarios had called JsonSchema.FromText without BuildOptions,
sharing the library’s global registry during concurrent schema construction.
The pinned JsonSchema.Net 8.0.5 source uses an unsynchronized Dictionary for
that registry. Both the pinned BuildOptions source
and registry source
confirm this shared mutable path; the author’s documentation
recommends separate registries for concurrent builds or conflicting registrations.
The test harness now supplies a fresh SchemaRegistry per schema, matching the
existing production SchemaLoader pattern. No CLI/product, schema, dependency,
workflow, coverage or scheduling policy changes are involved.
The race is intermittent: the unchanged local 48-case BDD run with four workers
passed, and a 512-build global-registry probe did not reproduce the CI failure.
The actual CI failure remains the red evidence. After isolation, all 309 tooling
tests pass with four workers, including all 48 configuration subprocess cases,
and an isolated 512-build probe passes. Test compilation, formatting and
whitespace checks pass. Successful receipts are
schema-registry-tooling-full.log and schema-registry-probe-isolated.log;
original baseline receipts remain separate. The earlier integrated full-suite
and native qualifications still apply because this fix only changes the test
schema-construction boundary. Fresh current-head CI remains required.
Integration with C# SDK main update
Main advanced again to 55f73bdaa93b7bc55a48b184bab8e46a5636fd9e, the immutable
C# SDK runtime from PR #470. The solution, README and configured test-runner
changes auto-merged. NOTICE had an append conflict; both complete notices are
retained, with main’s C# SDK notice at the end to keep its append point intact.
No configuration code, test registry fix, dependency pin or generated serializer
source was changed or discarded, and no history was rewritten.
The combined solution builds with zero errors and 20 existing warnings. All
17 configured runners pass sequentially with two logical processors, one TUnit
worker and sequenced Expecto. This includes the new C# SDK 20/20 suite, F# SDK
403/403 including package consumers, core configuration 136, IO/BDD 179,
Microsoft adapter 22, tooling 309, serializer 48 checks, C# core 237,
internal generation 25, model/roundtrips 791, pipeline 299, SDK conformance 27,
pipeline plugins 141, F# backend 333, Ion 463, Myriad 4 and packaged Myriad
integration 12. Process-local PowerShell selection and serial nested builds
were configured from the beginning; no environment workaround or retry was
needed in this run. The concurrent 309-test tooling qualification for the
registry fix remains separately recorded above.
Evidence is owned under parent-review/integrated-55f73bd/, with all 17 successful
exit codes in integrated-results.json; the full build and verification receipts
are integrated-55f73bd-build.log and integrated-55f73bd-openspec.log in
parent-review. OpenSpec passes all 22 active/spec items and both extension tests.
Whitespace checks pass. The SDK addition has no references from the configuration
libraries or their smoke hosts and changes none of their sources, dependencies,
target frameworks or publish options, so the earlier managed/trimmed/native
configuration qualification remains applicable. Current-head CI, landing and
owned cleanup remain pending.
6.11 -
Classic project migration delivery journal
Tracking issue: #476.
Change: add-classic-project-migration, campaign 5 of six.
Owned branch: t3/classic-project-migration, externally renamed from the prepared t3/5e544978 at the same baseline. Initial status was clean.
Required and verified baseline: 56d9de917f6c3035c8a2f994f49dfc96294619d8.
Discovery PR #467 landed at 23d274d4c87b367fdc79bd21843a9fdf5d74b13d, an ancestor of the baseline.
Editing PR #475 landed at the baseline. Its completion receipt confirms validated tree, checks, archive and cleanup.
OpenSpec html-design was ready, 0/8 implementation tasks. All returned context files, including the full design, were read before implementation.
Parent owns independent final review, CI watching, authorized landing and cleanup. This worker will not watch, merge, delete branches/checkouts or begin workspace migration. Campaign completion remains pending those parent gates.
Work and evidence ownership
Two Codex helpers own the pure F# planner/tests and CLI/provider/subprocess tests. The lead owns IO coordination, integration, documentation, qualification and delivery. Helpers preserve one another’s edits and do not run heavy builds independently.
All owned external artifacts are beneath /private/tmp/morphir-project-migration/. Physical tmp/ is used for TMPDIR/TEMP/TMP. Builds use DOTNET_PROCESSOR_COUNT=2, serial MSBuild and disabled parallel build/restore. Executable Expecto uses --sequenced; TUnit uses --maximum-parallel-tests 1. One heavy job runs at a time. Unresolved recovery evidence must be preserved.
Checkpoints
Setup verified clean checkout, branch ownership, prerequisite ancestry and authoritative editing receipt. Actual tracking issue #476 exists before coding. No runtime changes at this checkpoint.
Mapping RED: core-red-mapping.log exits 1 for the missing pure migration API before its implementation. IO BDD RED: io-red.log exits 1 for the missing preview service before its implementation.
CLI RED: the actual CLI output was rebuilt successfully, then cli-red-run.log runs 27 subprocess BDD cases, all failing for the missing project command. An earlier class-name filter selected zero tests and is not evidence; the corrected category filter is /*/*/*/*[Category=ProjectMigration].
Equivalence RED: after mapping compiled, core-red-verification-02.log fails for the missing ProjectMigration.verify before verification implementation. A preceding reserved-word syntax failure was fixed and is not counted as behavioral evidence.
Base workspace pipeline settings may override classic low-priority checkpoint defaults. planWithContext uses the base-only before snapshot to materialize the effective legacy defaults, preserving member behavior rather than forcing checkpoint over a declared workspace choice.
Core GREEN: core-green.log passes 170/170 Expecto cases; core-green-02.log passes 172/172 after explicit conflict-values and base-workspace evidence regressions. core-red-conflict.log first proved those APIs absent. Core builds report no warnings/errors.
IO io-green-03.log passes 296/296 TUnit/Reqnroll cases. Equal-value text/BOM checks preserve original spans; insertion can precede a table, so the test checks retained text rather than asserting an unchanged file prefix. Native cases cover adjacent and all supported primary layouts, source retention, repeat timestamps, source/target/workspace/alternate-primary drift and read-only/foreign-plan refusal.
CLI cli-green-02.log passes 34/34 focused command and actual subprocess cases after rebuilding src/Morphir/bin. The preceding run passed 32 and exposed absent conflict values plus a missing option value consuming --json; both regressions are green. Every subprocess JSON report is validated against a fresh schema registry, including initialization and parse failures.
A read-only host receives safe complete data through Presentation, while canonical plan data is explicitly separate. The planner has no CLI dependency. No existing cache-only API or owner/personal/machine-loading policy changed.
The full IO executable now passes 303/303 cases in validation/Morphir.Configuration.IO.Tests.log, including migration post-install rollback and explicit retained-recovery outcomes. Fault fixtures verify transaction ownership and backup bytes before manual recovery, then remove only resolved owned evidence. No unresolved recovery artifact remains from those checks.
Source/target/relevant workspace evidence is rechecked by the existing transaction service. Application rejects unverified, read-only and foreign-service plans. Preview never acquires writer coordination or stages bytes. The classic source is never a transaction destination.
Final local qualification
All 17 configured executable runners passed serially. validation/summary.json
records each exact command and exit status. Additional boundary tests then passed
in the final focused runners, increasing core from 172 to 175 and IO from 303 to
307 without changing production behavior. The adapter coverage invocation is a
coverage collector, not a substitute for the configured sequenced Expecto gate.
Runner
Passed
Morphir.CodeGeneration.FSharp.Tests
333
Morphir.Configuration.IO.Tests
307
Morphir.Configuration.Inspection.Smoke
71 checks
Morphir.Configuration.Microsoft.Tests
22
Morphir.Configuration.Tests
175
Morphir.Core.Tests
237
Morphir.IR.Pipeline.Plugins.Tests
141
Morphir.IR.Pipeline.Tests
299
Morphir.Internal.CodeGeneration.Tests
25
Morphir.Ion.Tests
463
Morphir.Models.Tests
791
Morphir.Myriad.Integration.Tests
12
Morphir.Myriad.Tests
4
Morphir.SDK.CSharp.Tests
20
Morphir.SDK.Conformance.Tests
27
Morphir.SDK.Tests
403
Morphir.Tooling.Tests
397
The full solution build succeeds. The first broad build reports 18 existing
package/generated-code warnings, and the final analyzer-enabled build reports
11 existing warnings with zero errors. Changed-library/test builds report zero
warnings/errors. C# formatting and full solution formatter verification pass;
Fantomas formats and checks the new F# source/tests. No parser, SDK or dependency
version changes are included.
coverage-final-summary.json unions the final current-source reports from
core-boundary-coverage/*/coverage.cobertura.xml and
io-boundary-coverage.cobertura.xml. Core is 4178/4335, 96.38%; IO is 1553/1599,
97.12%. Both improve on the prerequisite’s 96.01% and 96.94%. Added cases qualify
safe read-only presentation, equal typed floats/references, invalid Unicode,
invalid/missing source states, changing mounted targets and unstable storage.
The full Models runner includes 791 model/codec roundtrip checks. IO contracts,
JSON result-schema subprocess checks and pinned upstream fixtures also pass.
The scripts/format-all, scripts/test-all and scripts/check-contracts placeholders
listed in AGENTS.md are absent; the configured commands above supply their gates.
Non-CLI managed, trimmed and native hosts
The IO smoke host is extended with migration and linked-source generated report
serialization. All three osx-arm64 publishes execute successfully with reflection
serialization disabled. Each reports 24 migration checks, 44 existing editing
checks, 228 official JSON5 syntax cases, 26 pinned Morphir documents and the
existing discovery/machine-root/owner checks. Published stderr is empty.
file identifies the native output as Mach-O 64-bit arm64.
publish/summary.json retains exact argument arrays, exit codes and warning
counts. Managed publishing has zero warnings. Trimmed/native publishing retains
44/47 warning lines from pinned CsToml and FSharp.Core. Each explicitly sets
ILLinkTreatWarningsAsErrors=false; no diagnostic is suppressed and no strict
warning-free trimming claim is made. Authored migration source has no linker/AOT
diagnostic. Per-file atomic installation and machine-local writer coordination
remain the existing limits; hosts needing distributed coordination supply it.
publish-locks/manifest.json records prepublish lockfile SHA-256 values, and
restored.json confirms every captured file restored byte-for-byte. Native
publication introduces no lockfile/dependency change. All artifacts are local
qualification outputs; no release, deployment or external publication occurred.
Reproduction
Run one heavy job at a time from the repository root:
export DOTNET_PROCESSOR_COUNT=2 BuildInParallel=false
export TMPDIR=/private/tmp/morphir-project-migration/tmp
export TEMP="$TMPDIR" TMP="$TMPDIR"export PATH="/Users/damian/.local/share/mise/installs/powershell/7.5.3:$PATH"dotnet build Morphir.slnx -m:1 -p:BuildInParallel=false -p:RestoreDisableParallel=true
dotnet tests/Morphir.Configuration.Tests/bin/Debug/net10.0/Morphir.Configuration.Tests.dll --sequenced
dotnet tests/Morphir.Configuration.IO.Tests/bin/Debug/net10.0/Morphir.Configuration.IO.Tests.dll --maximum-parallel-tests 1dotnet tests/Morphir.Tooling.Tests/bin/Debug/net10.0/Morphir.Tooling.Tests.dll --maximum-parallel-tests 1# Repeat the configured arguments from validation/summary.json for the other runners.dotnet format Morphir.slnx --no-restore --verify-no-changes --verbosity quiet
dotnet fantomas --check src/Morphir.Configuration/Migration.fs tests/Morphir.Configuration.Tests/MigrationTests.fs
Coverage collectors and publish commands follow the preceding configuration
editing journal and the updated IO smoke README. The owned run-suites.py,
format.py and publish-host.py scripts retain the exact local execution.
PowerShell 7.5.3 is selected only through the process-local PATH for package tests.
No global tool configuration changed.
Scope and recovery audit
no-config-alias-receipt.json records that actual config migrate --json returns
structured exit 2. The implementation registers only project migrate. There is
no IR/source conversion, sibling batch, workspace adoption or membership edit.
Classic manifests remain byte-identical. Existing cache-only and public loading
APIs remain compatible; selected personal and machine ownership are unchanged.
Native recovery fault fixtures resolve their verified backups explicitly. No
unresolved recovery artifact remains from local qualification.
Specification sync and parent handoff
OpenSpec apply reports all_done, 8/8 implementation tasks. Only
add-classic-project-migration is synchronized and archived at
openspec/changes/archive/2026-11-03-add-classic-project-migration/.
The new main capability is openspec/specs/classic-project-migration/spec.md.
Its Purpose and all nine requirement bodies with 11 scenarios are byte-identical
to the approved delta, with canonical main-spec headings. The archived task
validator passes, the original .openspec.yaml remains present, and the design
has balanced HTML, inline CSS and valid local links. Archive-relative prerequisite
and PRD links are repaired. Workspace migration remains active at 0/9 tasks;
only its prerequisite link changed.
mise run openspec:verify passes before and after archive: the managed html-design
snapshot, all 22 active/spec items and both extension tests. Strict main-spec
validation passes 17/17; archived-task validation passes 10/10, including this
archive. The CLI rejects path separators in direct item names, so archived delta
content is qualified through its exact match to the strict-validated main spec,
the pre-archive strict validation and the dedicated archived-task gate. The
unsupported direct-path command receipt is preserved explicitly, without being
counted as a successful validation.
The final PR targets main, still at the required baseline
56d9de917f6c3035c8a2f994f49dfc96294619d8 when checked after qualification.
The PR body and parent handoff record the actual final head separately.
This journal is implementation delivery evidence, not CI/review approval or a
campaign-completion receipt. Parent owns independent review, CI watching,
authorized landing and cleanup. No watch, merge, branch/worktree deletion,
workspace migration, release or deployment was performed by this worker.
Owned artifact inventory
All external artifacts are owned beneath /private/tmp/morphir-project-migration/:
tmp/: physical temporary root used by every owned test/build subprocess.
validation/: 17 configured runner logs and exact command/result summary.
core-coverage/, core-boundary-coverage/ and IO Cobertura files: collector
evidence, with coverage-final-summary.json selecting the final source maps.
publish/: managed, trimmed and native hosts, build logs, JSON results, stderr
and exact argument/warning summary.
publish-locks/: original lockfile bytes, SHA-256 manifest and restoration proof.
Root-level red/green/build/format/OpenSpec receipts and reproduction scripts,
plus PR handoff text and the generated artifact-inventory.json.
Generated bin, obj and TestResults within the retained owned checkout are also
campaign artifacts. Shared package/tool caches and unrelated worktrees are not
cleanup targets. No unique source work is held in external artifacts; all source,
tests, documentation and spec changes are committed in this PR. Recovery fault
fixtures were resolved explicitly; the final inventory records no unresolved
native recovery files. Preserve any later unresolved evidence during parent
review. The checkout and branch are intentionally retained for parent landing.
Parent review follow-up
Independent core review of 5035f21 found two actionable P2 issues. Declared
profile controls disappeared from both disabled-activation effective trees,
allowing a missing or changed declaration to verify. Invalid Unicode ancestor
keys were skipped when raw extras were flattened into leaf ledger entries.
Both were reproduced before production changes. parent-core-red.log records
26 passing and two failing focused tests.
Verification now compares declared root profile controls using the existing raw
control merge rules, without activating profiles or requesting profile files.
Those controls are included in the redacted before/after snapshots and explicit
differences. The planner validates every key path segment before accepting a
source ledger entry. Missing/changed default, active, include and group controls,
and invalid top-level/ancestor/leaf keys have regression coverage.
parent-core-green.log passes all 177 core tests. The published migration host
also exercises unchanged/missing profile declarations and an invalid JSON5
ancestor key. The rebuilt solution passes with the same 11 existing warnings.
Current-head integration, formatting, coverage and runtime qualification results
are recorded below when complete. Parent review/CI/landing and cleanup remain
campaign gates; this follow-up is not a completion receipt.
All 17 configured executable runners passed again after the parent fixes, using
freshly rebuilt outputs and the same serial resource limits. Core now passes
177 cases, IO 307, tooling 397 and Microsoft 22; all other counts remain as in
the original qualification table. validation/summary.json contains the
refreshed command, exit-code and duration evidence. The full Models runner again
passes all 791 model/codec roundtrips.
Parent qualification after 98f1d39 passes full C# formatter verification,
Fantomas including the shared profile helper, OpenSpec managed/extension checks,
and fresh core/IO coverage collectors. parent-coverage-summary.json uses only
current-source reports: core 4186/4343, 96.38%; IO 1553/1599, 97.12%.
All three freshly published managed, trimmed and native osx-arm64 hosts pass
27 migration checks, 44 editing checks, 228 JSON5 cases and 26 Morphir fixtures.
Published stderr is empty. The trimmed/native dependency warning counts remain
44/47 with explicit normal-warning qualification; no diagnostic suppression was
introduced. Publish-only lockfiles were restored byte-for-byte. Exact commands
and exit codes are in parent-qualification-summary.json, publish/summary.json
and publish-locks/restored.json under the owned artifact root.
Directory ownership and explicit primary anchors
Independent IO/CLI review found that inventory selection could migrate an
unrelated sole sibling when a directory input named an unlisted project.
ownership-red.log reproduces five failing API cases, including a containing
root project. ownership-cli-red.log passes 34 existing CLI cases and fails all
four new unlisted apply/preview/current/nested subprocess cases before the fix.
Migration now requires a selected project to own the requested directory and
rejects any nearer inspected primary that belongs to an undeclared project.
Workspace-root unambiguous selection and declared-member subdirectories remain
supported. Initial green runs pass 314 IO cases and all 38 migration CLI cases.
A related parent probe found that explicit .morphir/morphir.json input used
.morphir as its project anchor. layout-anchor-red.log passes the adjacent and
dot-config layouts and fails the hidden layout’s project-location assertion.
Explicit primary inputs now use shared candidate policy to identify the owning
project directory before discovery. This preserves source-relative meaning and
workspace member identity for every supported primary layout. Native smoke
coverage includes unlisted selection and all explicit primary anchors.
After both ownership corrections, the rebuilt solution passes with nine existing
warnings and zero errors. All 17 configured runners pass again from those
outputs: core 177, IO 314, tooling 401 and Microsoft 22; all other runner counts
remain unchanged. The complete CLI run includes the four actual subprocess
refusal cases. ownership-io-final.log, ownership-final-build.log and the
refreshed validation/summary.json retain this evidence. These fixes keep the
shared discovery API unchanged and enforce migration’s narrower ownership
contract in the reusable IO service.
Final ownership qualification after 0d07db3 passes formatter/Fantomas,
OpenSpec/extension verification and refreshed coverage collectors. Current-source
coverage is core 4186/4343, 96.38%, and IO 1570/1616, 97.15%, recorded in
ownership-coverage-summary.json. Fresh managed, trimmed and native hosts each
pass 32 migration checks, 44 editing checks, 228 JSON5 cases and 26 Morphir
fixtures. Published stderr is empty. Trimmed/native dependency warnings remain
44/47 with the existing explicit warning-severity qualification. No diagnostic
is suppressed. Publish lockfiles were restored byte-for-byte and no unresolved
recovery remains. Exact argument arrays, exits and warning counts are retained
in the refreshed parent qualification and publication summaries.
Both independent reviews of the delivered baseline are complete. All three
reported findings and the related explicit-layout anchor defect have been
reproduced and corrected by the parent with regression evidence. Current-head
CI, authorized landing and audited cleanup remain outstanding campaign gates.
6.12 -
Project and workspace discovery delivery
Campaign 2 tracks issue #466.
Owned checkout: /Users/damian/.t3/worktrees/morphir-dotnet/t3-2ee0222b.
Branch: t3/add-project-workspace-discovery.
Prepared and current main baseline: 3d5b41c0f839c7b2648403ad6aba5c5644f7dfb5.
The initial checkout was clean. Its tree is
66609771da2eb88ac9e3cab3c21b6e8d201a6748, the verified squash tree of
prerequisite PR #461.
The parent completion receipt
records campaign 1 landing and cleanup, including its 33 reproducible temporary
artifacts. That tree is a tree object, not a commit ancestry identifier.
The parent owns PR review/check watching, merge and cleanup. This worker delivers
one reviewable PR, without watching, merging, deleting branches/worktrees,
force-pushing, publishing or deploying. Campaign completion remains pending until
parent landing and cleanup receipts exist. Future campaigns remain active.
Validation checkpoints
Initial BDD scenario describes a member primary below a workspace. The capped
adapter test build fails with CS0246 for the absent InMemoryProjectTree and
ProjectDiscoveryResult APIs. No discovery implementation exists at this red
checkpoint. Logs are in /private/tmp/morphir-discovery-tests/.
All builds use DOTNET_PROCESSOR_COUNT=2, single-node MSBuild, disabled
parallel restore/build, and one heavy job at a time. Executable TUnit/Reqnroll
uses one worker and physical macOS temporary paths. Core uses Expecto.
e849db3 records initial red; 7299331 records first passing API slice.
Root ambiguity was observed red with all 15 layout/extension cases green.
Boundary group then exposed outside-start host access and missing diagnostics
for a directory at a primary filename. Both regressions were made green.
An incomplete classic test fixture was corrected to a canonical project after
error propagation revealed its required exposedModules field was absent.
Membership group was observed red: 15/110 failed for globs/exclusions,
root/virtual identity, workspace.root, invalid/missing literals, duplicate/path
selection, defaults and bounds. After implementation adapter 110/110 passes,
zero build warnings/errors. Native adapter, scoped loading and qualification
remain pending. Evidence logs use red-members-* and green-members-*.
Machine planner first failed compilation for absent APIs, then Linux 1/1
passed. Expanded platform tests ran 14 cases with 4 pass, 7 fail, 3 error;
after implementation 14/14 passed. Overlay/ambiguity missing APIs were observed
red before implementation. Builds are serialized by the primary worker.
Adapter and loading checkpoints
bd325c2 is an external checkpoint of the then-current files, followed by owned
db17ca1. Both are preserved. The source-planner and documentation helpers
confirm they ran no staging or commit commands.
Native adapter parity/link tests first failed compilation for the missing
filesystem adapter; after implementation adapter 112/112 passed. Tests compare
complete immutable discovery and selection results across native and memory
hosts, then compare complete loading results as well.
Loading first failed compilation for the absent API and options. After
implementation adapter 121/121 passed. Pure core passed 124/124, including the
new platform/overlay planner’s 28 cases and a resolver ordering regression.
That regression failed at runtime with workspace personal TOML beating member
personal YAML. The separate member-personal stage now wins across formats.
The earlier substring-only Expecto filter selected zero tests; the recorded
red evidence reran the full Resolution list and ran 31 cases, 30 pass/1 fail.
Canonical schema failures, requesting below member links and member-personal
workspace output relocation produced 4 red failures, then 125/125 passed.
Isolation with supplied machine sources produced 1 red failure, then 127/127
passed. Directory enumeration failure lacked source evidence in a 1/128 red
run; after implementation adapter 128/128 passed. Focused builds have zero
warnings/errors. Native directory probes never open discovered links.
Implementation tasks 2.1 through 3.2 are fulfilled. Apply instructions were
refreshed after every checkbox update. Broader compatibility, runtime,
coverage, formatting and final archive qualification remain pending.
Broad verification and semantic audit
b6ff7c5 protects bounded native/mounted loading and its initial red/green
regressions. Full solution build succeeds with the same 20 existing package
and generated-code warnings and zero errors.
All 14 configured Nuke-target suites pass serially using compiled Debug outputs:
C# core 237, tooling 245, configuration core 124, adapter/BDD 128 at that
checkpoint, internal generation 25, models/roundtrips 791, pipeline 299, SDK
175, SDK conformance 27, pipeline plugins 141, F# backend 333, Ion 463,
Myriad 4, and Myriad integration 12. See suite-results.json and each suite’s
log under the owned temporary root. TUnit uses one worker, Expecto sequenced.
A read-only semantic audit then produced concrete regression tests. Adapter
run red-audit-run.log has 9 failures out of 137: explicit disabled profiles
inherited premature discovery errors, host warning suppression leaked discovery
warnings, sibling literal members with exclusions crashed, sibling globs were
missed, UNC authority was lost, build-named projects were implicitly pruned,
supplied default layers were falsely ambiguous, and two permitted owner-output
overlays left stale context. All nine are fixed; adapter 137/137 passes.
A follow-up invalid owner-output overlay failed from a member load, then passed
after retaining workspace validation errors in the owning context. Adapter
138/138 and core 124/124 pass. Discovery validates canonical declarations without
interpreting profile activation or precomputing suppressible format warnings.
Member inventories now honor within-boundary sibling literals/globs and declared
build-named directories. UNC paths retain their authority. Root personal/profile
output settings produce the same output context for root and member loads.
Fantomas formats owned F# files; C# whitespace formatting covers owned C# files.
Full dotnet format Morphir.slnx --no-restore --verify-no-changes --verbosity quiet
passes; unsupported F# projects are checked separately with Fantomas.
Final full-solution rebuild after these fixes succeeds with zero errors and the
same 20 existing warnings. Configured coverage runners pass core 124/124 and
adapter/BDD 153/153. The additional boundary cases cover selected-file misses,
unsupported formats, outside paths, personal access/link evidence, absent machine
authorization, relative Morphir home, invalid selection and native permission
failures. Their source-line union is core 3010/3172 = 94.89% and authored
adapter 624/647 = 96.45%, above campaign 1’s 94.13% and 94.23% rates.
Reproduce with scripts/configuration/summarize-coverage.py over
core-coverage/*/coverage.cobertura.xml and io-coverage.cobertura.xml.
Consumer audit confirms ManagementScenario and ConfigResolver still reference
the unchanged legacy WorkspaceDiscovery. No existing caller was migrated to
DiscoveryPolicy or ProjectSystem. Task 3.3 is fulfilled and apply reports 7/8.
Runtime and final delivery qualification
Validated implementation checkpoint: 230d1a4. The later tracked changes contain
only test whitespace, runtime README and final documentation/spec synchronization.
Both full-solution builds succeeded with zero errors and 20 existing warnings.
The final physical-temp tooling rerun passes 245/245. Full C# format verification,
Fantomas checks and whitespace checks pass. No CLI dependency or old-consumer
registration was introduced.
Runtime commands are in tests/Morphir.Configuration.IO.Smoke/README.md and the
exact argument arrays/results are retained in
/private/tmp/morphir-discovery-tests/runtime-results.json. All three publishes
use DOTNET_PROCESSOR_COUNT=2, -m:1, disabled parallel build/restore, Release
osx-arm64, and the same physical temporary root. They run serially.
Strict trimmed publishing exits 1 on pinned CsToml IL2055/IL2067 and FSharp.Core
reflection/resource diagnostics. publish-strict.log retains those errors.
Warning-qualified trimmed and native publishing both exit 0 with explicit
ILLinkTreatWarningsAsErrors=false; normal dependency diagnostics remain
visible in publish-trimmed.log and publish-native.log. No suppression or
strict warning-free qualification is claimed.
Both published binaries exit 0 and report success, formats=3, JSON5,
normalization, profile loading, host parity, discovery, selection and bounded
loading, plus syntax_cases=228 and morphir_cases=26. Native/mounted results
are compared structurally, active profiles remain in isolated loading, and
workspace output ownership is checked. file identifies the native executable
as Mach-O 64-bit arm64.
Publish-generated RID/ILCompiler changes in the three owned package lockfiles
were restored to their saved prepublish bytes, preserving the main dependency
pins CsToml 1.8.6 and YamlDotNet 16.3.0. No intentional dependency update was
reverted.
Coverage reports under the same root pass 124 core and 153 reader/BDD tests.
The source-line union is core 3010/3172, 94.89%, and authored IO 624/647, 96.45%.
This excludes generated obj/ code and exceeds the prior campaign’s recorded
rates. The coverage summary script, configured runners and arguments above
reproduce those results. Optional access failures, selected-file errors, links
and machine-host authorization are included in the adapter suite.
Specification and parent handback
OpenSpec apply returned all_done, 8/8 tracked tasks complete. All artifact/task
checks passed before sync/archive. The new main specification is
openspec/specs/morphir-project-system/spec.md; its Purpose was copied verbatim
and all 11 requirements and 19 scenarios were compared byte-for-byte with the
approved delta. No delta operation headers remain in the main spec.
Only this change is archived at
openspec/changes/archive/2026-11-03-add-project-workspace-discovery/. Its original
.openspec.yaml, proposal, design, delta and checked tasks are preserved.
Prerequisite links in the two dependent proposals were updated without checking
or archiving their tasks. Inspection, editing and both migration campaigns remain
active, along with unrelated active changes.
mise run openspec:verify passes managed schema/snapshot checks, all 21 strict
active/spec validations, and both extension tests. Main was fetched again and
remains 3d5b41c0f839c7b2648403ad6aba5c5644f7dfb5; there is no base advancement
to reconcile. The PR targets this current main. The final handback supplies the
actual PR URL, head SHA and base SHA; local evidence is distinguished from CI.
The checkout is retained for parent review. Reproducible evidence and published
binaries are owned beneath /private/tmp/morphir-discovery-tests/, with no unique
source edits held there. Parent owns review/CI watch, merge/landed verification
and subsequent checkout/local-branch/remote-branch/temporary-artifact cleanup.
No watch, merge, auto-merge, admin bypass, force-push, branch/worktree deletion,
release or deployment was performed. Campaign completion remains pending parent
landing and cleanup even though implementation, local validation and archive are
complete.
Parent review: selected personal ownership
A read-only adapter review reproduced an ownership bypass when an eligible
personal file was explicitly selected. The member file could relocate the
workspace output; a workspace personal file could supply a member’s project
source directory and exposed modules. Four public loading regressions, covering
ordinary and isolated loading for both owners, failed before the fix.
Loading now keeps the eligible personal source’s original role alongside its
selected contribution. Isolation reads only the explicitly selected personal
file, retaining that ownership metadata without enabling other personal reads.
Pure resolution uses the original personal roles when scoping selected values;
the owner-context pass excludes selected member-personal files. The ordinary
contribution still occurs only once at selected precedence.
Both projects build without warnings. The full configured core runner passes
124/124 and the adapter/BDD runner passes 157/157. The first parent adapter run
used macOS’s linked default temp path and failed three native-filesystem cases;
the rerun with TMPDIR/TEMP/TMP set to
/private/tmp/morphir-discovery-tests/parent-review passes all cases. Its log is
/private/tmp/morphir-discovery-tests/parent-review/adapters.log. Owned F# and C#
files were formatted and the working diff passes whitespace checks. Final native
qualification, current-head CI and the independent discovery-policy review
remain pending for these parent changes.
The parent subsequently qualified implementation 05f7555 with additional smoke
checks for explicitly selected workspace/member personal files, both with and
without isolation. The trimmed and native osx-arm64 hosts both pass structural
native/mounted parity, owner output and member-identity assertions, and all 228
JSON5 syntax checks plus 26 Morphir documents. Publish commands match the smoke
README with two logical processors, single-node builds and explicit warning
qualification; outputs and logs are under the same parent-review directory.
Pinned dependency warnings remain visible, and no strict warning-free claim is
made. Publish-generated lockfile churn was restored to the committed bytes.
Fresh configured coverage runners pass core 124/124 and adapters/BDD 157/157.
Their authored-source union is core 3030/3189, 95.01%, and adapters 636/659,
96.51%. Reports are under parent-review/core-coverage and
parent-review/adapter-coverage.cobertura.xml, summarized with the existing
coverage script. All eight host checks passed on the earlier 115a17d; the
ownership fix requires fresh CI. The separate discovery-policy review and
landing/cleanup remain outstanding.
Parent review: discovery policy conformance
The independent policy review confirmed two earlier bot findings remained
actionable through the public discovery API, and reproduced a reserved-directory
glob-seed bypass. The earlier topology-shape finding was already addressed:
invalid project/workspace mappings and malformed member lists return structured
validation errors and no accepted topology. Three additional existing-behavior
test arguments retain coverage of those verified shape cases.
36a07a8 assigns MemberPrimary to member inputs, embedded documents,
diagnostics and reports, including evidence collected during the initial
upward walk. A public API regression failed on the former RootPrimary role;
it now passes member sources directly into Resolver.resolve and retains
name, exposed modules and classic checkpoint defaults without adapter repair.
The same checkpoint adds glob-prefix reachability checks before inventory
requests. Two regressions failed with access errors from excluded or
impossible descendants. Both now pass, without observing those paths.
Fully excluded recursive branches are pruned while potentially matching
descendants retain the declared glob/exclusion semantics.
25f7088 checks reserved components between the workspace declaration and a
glob directory before observing it. Three red regressions for .morphir/*,
.config/* and a deeper literal prefix containing .config now pass without
admitting hidden projects or selecting them automatically.
The complete solution build succeeds with zero errors and 20 existing warnings.
Fresh configured runners pass core 124/124 and adapters/BDD 166/166. Their
authored-source coverage union is core 3100/3250, 95.38%, and adapters 636/659,
96.51%. The reports and build/test logs are under parent-review, using
policy-* names. Both affected libraries compile without warnings.
The updated trimmed and native osx-arm64 smoke hosts pass direct member-source
resolution with classic defaults, finite-glob traversal pruning, reserved glob
seeds, selected personal ownership, native/mounted parity and all 254 upstream
fixture checks. Publish logs and binaries are policy-publish-trimmed.log,
policy-publish-native.log, policy-trimmed/ and policy-native/ under the same
owned review directory. Builds are bounded and serial; pinned dependency linker
diagnostics remain visible with explicit warning qualification. Temporary RID
lockfile churn was restored after publishing.
mise run openspec:verify passes all 21 active/spec items, managed checks and both
extension tests. Changed-file F# and C# format checks and full-range whitespace
checks pass. Main remains 3d5b41c0f839c7b2648403ad6aba5c5644f7dfb5. Current-head
CI, developer sign-off, main landing and owned artifact cleanup remain pending.
6.13 -
Shared configuration delivery evidence
Campaign 1 tracks issue #458.
The owned checkout is /Users/damian/.t3/worktrees/morphir-dotnet/t3-722f8d5f,
branch t3/add-shared-configuration.
The prepared baseline was c6fcf0cbec80a25d135d0cfffe2c5f61d03514a4, including
all six planning snapshots. Main 1c8aa75f63d7ede19cb2ad75b73a6ee8690e4f6f was
merged without rewriting history at 26aa85b05df41b83b25f3fc97b19e5c97843babc.
The initial checkout was clean. Campaign 1 has no implementation prerequisites.
Checkpoint practice
Commit coherent, owned changes after contracts/tests, passing implementation
slices, and documentation/spec updates, and before handoffs or disruptive
workspace operations. Identify red checkpoints explicitly. Record validation and
remaining work here and in handbacks. Preserve unrelated staged/unstaged work;
never stage local docs/superpowers/ artifacts or add AI coauthor trailers.
The parent owns review, CI watching, landing, and campaign checkout/branch
cleanup. An open PR or checked task list does not complete this campaign.
Validation journal
Initial red: dotnet run --project tests/Morphir.Configuration.Tests -p:BuildInParallel=false -m:1 -- --filter 'Document merge' --sequenced
failed with FS0039 for the absent ConfigValue and ValueMerge APIs. No
production document behavior had been added. All implementation tasks remain.
bb51a21: initial red contract, FS0039 for the absent document APIs.
0fe2abb: additive contracts; first array replacement Expecto case passes.
The successful compilation used dotnet run, which forwarded -m:1 to
Expecto and failed runner argument parsing. Subsequent checks use
dotnet build <project> -m:1 -p:BuildInParallel=false, followed by the built
executable with --sequenced for Expecto.
a727a2a: 10 profile cases pass, including raw control nulls and inactive
cycles/depth. Ordinary-null overlay case was observed red, then both document
merge cases passed. The initial format-order resolver case passes. These are
focused results; full source/profile/reader qualification remains in progress.
92c7253: reader checkpoint is explicitly incomplete. Reader build has zero
warnings/errors; typed values and extended JSON5 tests pass. Classic
normalization was observed red before its implementation.
Source resolution red group: capped core build succeeds with zero warnings;
9 focused cases run, 4 pass and 5 fail for runtime overrides, selected-source
deduplication, member filtering/defaults, environment mapping, and required
selected misses. Member profile-control authority also fails as expected,
10 other profile tests pass. This checkpoint is not PR-ready.
287f1ec: pinned null/source contract checkpoint above. Subsequent capped core
build has zero warnings/errors; Resolution 9/9 and Profiles 11/11 pass. Pure
environment mapping, selected contribution deduplication, complete ownership
filters, default settings, and selected missing-file errors now pass their
previously failing cases. Validation, mixed-format warnings, remaining profile
bounds, reader qualification, coverage/AOT and final docs remain.
c48803f: passing supplied-source implementation checkpoint. Canonical schema
validation and mixed-format diagnostics were then observed red and made green,
Resolution 13/13. The profile worker’s f06fecb has 33/33 profile cases and the
then-current complete core suite 81/81 passing. A follow-up default-priority
regression was observed red, expected host IR default 3 but got builtin 4.
Its source-order fix and selected-classic fallback cases await the next core
run. Reader 36/36 includes official JSON5 syntax checks and pinned corpus
hashes. YAML Default profile expansion and full qualification remain underway.
542f129: accepted YAML Default policy, reader normalization and policy docs
checkpoint. 93305d9 finishes 39 profile cases. Fresh complete core run passes
88/88 with zero build warnings, including host/default priority and selected
classic checkpoint-default regressions that were observed red first.
dcedbb3: readers pass 63/63 with zero build warnings, including the two
negative-zero cases observed red, official JSON5 conformance, YAML Default,
raw legacy loss accounting and lazy profile callback protection.
DOTNET_PROCESSOR_COUNT=2 dotnet build Morphir.slnx -m:1 -p:BuildInParallel=false -p:RestoreDisableParallel=true
succeeds, zero errors and 20 warnings in unchanged package/generated-code
projects. Both configuration suites are wired into the existing Nuke test
target using their configured runners, with bounded workers and compiled output
reuse. The managed non-CLI smoke executable succeeds.
The first complete tooling run used macOS’s default /var/folders/... TMPDIR
and failed 78 generation/input-capture cases because those tests reject linked
ancestors. CI explicitly uses a physical temporary directory. A rerun with
/private/tmp/morphir-shared-config-tests is in progress; no production code was
changed for this environment adjustment.
OpenSpec progress is 7/10. Remaining: reader trimming/AOT qualification, legacy
tooling compatibility, final format/coverage/build evidence. Landing and owned
worktree/branch cleanup remain parent-coordinated after PR handback.
Runtime and coverage qualification checkpoint
99aa058 protects integration, seven completed tasks and the full-solution
build. The physical-temp tooling rerun passes 245/245. Task 4.1 is complete;
implementation progress is 8/10 before final qualification tracking.
Fantomas 5.2.4 formats owned F# files; dotnet format formats owned C# files.
C# formatting reports unsupported F# projects, so Fantomas is run separately.
After formatting, core build has zero warnings and Expecto passes 88/88.
dotnet test tests/Morphir.Configuration.Tests/Morphir.Configuration.Tests.fsproj --no-build --no-restore -m:1 --collect:'XPlat Code Coverage' --results-directory /tmp/morphir-configuration-core-coverage
also discovers and passes all 88 tests. The configured reader executable passes
63/63 with --coverage --coverage-output-format cobertura --coverage-output /tmp/morphir-configuration-reader-coverage.cobertura.xml.
The raw core-run package line rate is 86.82%; the reader-run adapter package
rate is 88.26%, including generated regex implementation. Unioning normalized
source-line hits from both configured runners gives core 2074/2208 = 93.93%
and authored adapter code 434/461 = 94.14%. Generated obj/ code is excluded
from that authored-source summary. Reproduce with
scripts/configuration/summarize-coverage.py <core-cobertura> <reader-cobertura>.
The strict trimmed linker-as-errors publish fails in the pinned CsToml and
FSharp.Core packages. Expanded diagnostics include CsToml generic formatter
fallback reflection and FSharp.Core structured formatting/reflection plus
IL2040 absent-resource removal entries. No warning suppression was added.
Actual trimmed and native osx-arm64 executables publish and run using normal
warning severity, explicitly -p:ILLinkTreatWarningsAsErrors=false. The native
artifact is confirmed as a Mach-O arm64 executable. Its expanded fixture run
succeeds with syntax_cases=228, morphir_cases=26, and all three formats,
normalization, profile loading and host parity checks. This is runtime evidence
with a documented dependency-warning limitation, not a warning-free strict
linker claim. See the smoke-host README for exact commands and diagnostics.
A final semantic review found a schema minimum check coercing very large exact
integers through double. Its focused test is observed red after a successful
zero-warning build. This checkpoint retains that incomplete regression before
fixing the comparison. Final tests, warning-aware runtime qualification and
OpenSpec archive/PR handback remain.
Final implementation validation
1029b94 protects the runtime qualification and observed red integer-bound
regression. Integer bounds now compare Int64/BigInteger exactly. Fresh full
core runner and VSTest coverage run pass 89/89; reader/BDD coverage run passes
63/63, both with zero build warnings/errors.
Final merged authored-source coverage is core 2076/2210 = 93.94% and readers
434/461 = 94.14%. The summaries normalize Cobertura source roots and union hits
from the Expecto/VSTest and executable MTP runners. Generated obj/ code is
excluded. The generated pure schema is checked for deterministic regeneration.
Final trimmed and native hosts both return success with 228 JSON5 syntax checks
and 26 pinned Morphir documents. They additionally exercise Default YAML
aliases/tags/nulls, all four TOML temporal types, and a 401-digit integer’s schema
minimum. The native binary is arm64 Mach-O. Commands explicitly retain normal
warning severity; upstream diagnostics and strict linker failure remain visible
in the qualification README. No warning suppression or reflection serializer
was introduced.
openspec validate add-shared-configuration --strict --json passes without
issues after splitting long new requirements into focused behavior contracts.
No requirement behavior was removed. Repository restore resets publish-only
RID/ILCompiler lockfile state, preserving the normal project dependency locks.
The typed-host error-parity audit found that pure normalization lacked the
text reader’s non-mapping-root diagnostic. Its new focused case was observed
red, then the same config.document_shape error was added without altering
valid documents. Complete suites now pass core 90/90 and reader 63/63, with
zero build warnings. Final runtime/coverage refresh follows this code checkpoint.
Delivery validation receipt
Validated implementation checkpoint: d5e4d2f. Complete core 90/90, reader/BDD
63/63 and tooling 245/245 pass. The full solution builds with zero errors and
the same 20 package/generated-code warnings in unchanged projects.
Full dotnet format Morphir.slnx --no-restore --verify-no-changes --verbosity quiet
exits zero. Fantomas checks all owned F# files successfully. The schema generator
reproduces its formatted output byte for byte. git diff --check passes.
Final configured coverage runs pass 90 and 63 tests. Their source-line union is
core 2079/2213 = 93.94% and authored readers 434/461 = 94.14%. Reports are
/tmp/morphir-configuration-core-coverage-delivery/9ad9e498-b5be-4d0a-a1e2-02ba9374276c/coverage.cobertura.xml
and /tmp/morphir-configuration-reader-coverage-delivery.cobertura.xml.
Both final published executables return
{"success":true,"formats":3,"json5":true,"normalization":true,"profile_loading":true,"host_parity":true,"syntax_cases":228,"morphir_cases":26}.
Publish logs are /tmp/morphir-config-trimmed-delivery.log and
/tmp/morphir-config-native-delivery.log; binaries are under
/tmp/morphir-config-trimmed and /tmp/morphir-config-native. Warning severity
is explicitly normal for runtime qualification. Strict linker-as-errors still
fails in pinned dependencies; no diagnostic suppression hides that limitation.
All 10 tracked implementation tasks are complete and OpenSpec apply reports
all_done. Strict change validation passes. This does not declare campaign
completion: PR review/checks, main landing and owned worktree/local/remote branch
cleanup remain parent responsibilities.
Specification handback
The completed implementation change is archived at
openspec/changes/archive/2026-11-02-add-shared-configuration/. Main specifications
are openspec/specs/configuration-documents/spec.md and
openspec/specs/configuration-resolution/spec.md. All 22 added requirements and
their scenarios were compared with the delta specs; new Purpose sections were
copied verbatim. Strict validation passes all 9 main specs and all 7 remaining
active changes, 16/16 items with no issues.
The other five campaign plans remain active with zero checked implementation
tasks. Only their shared-configuration prerequisite links were updated where
needed. The original six-plan snapshot remains in inherited commit c6fcf0c and
this PR’s history. Do not start dependent implementation until this PR lands.
Parent handback must record the created PR URL, actual head SHA and base SHA, then
own review/check watching, merge verification and separate worktree/local/remote
branch cleanup receipts. No PR watch, branch deletion, worktree removal, force
push, admin bypass, release or deployment was performed by this implementation
worker. Reproducible build/coverage logs and published smoke artifacts under
/tmp/morphir-config-* are retained for parent inspection and later cleanup.
Current-base reconciliation
Before PR creation, main advanced to 890aacb61df601f2876112a2cdd4d9d6f5757ca6
with documentation-only C# generation/SDK planning, PR #459. It was merged at
31598987b0edc4d5db27c3237e13df9caf4124eb. The merge changes no src, tests,
build, solution, dependency or SDK/toolchain inputs, so the recorded runtime
validation remains compatible. Strict OpenSpec validation on the reconciled base
passes 21/21 items: 12 active changes and 9 main specs. All unrelated plans are
preserved. Review/landing/cleanup remain outstanding at this handback checkpoint.
Parent review checkpoint
The full PR diff whitespace check identified literal CR/CRLF bytes in the pinned
JSON5 newline grammar fixtures. A narrow root attribute disables whitespace
checking for those raw newline fixtures; their original bytes and hashes remain
unchanged. An extra trailing blank line was removed from the shared reader BDD
feature. These review changes do not change production behavior or dependency
inputs. Full-range git diff --check passes with the fixture attribute applied.
Windows CI on the earlier head exposed checkout normalization of the three
hash-pinned configuration corpus/schema snapshots. Git’s core.autocrlf=true
checkout filter reproduced all three reported hash mismatches. The configuration
fixture tree now uses -text, matching the existing Ion-fixture policy; the same
checkout-filter check preserves every expected snapshot hash afterward. CI must
confirm this fix on Windows before landing.
Parent semantic review fixes
CI passed all checks on 51e9eca, including all three operating systems. Parent
review then addressed six distinct findings before landing:
0037d66: a failing resolver test confirmed that environment JSON secret
references retained stale lower object fields. Environment values now use the
shared path-aware secret normalization and retain their original raw tree.
A second red test showed logging.file being treated as a credential, losing
the file when a later layer added a logging level. The root and the schema’s
logging container keep ordinary map semantics.
6ccff70: three culture regressions failed for Thai calendar years, Finnish
time separators and an early date outside the Saudi calendar’s range.
Typed TOML temporal getters now use explicit invariant ISO formatting, keeping
local date-times without an offset and preserving explicit offsets. Tests
exercise the pinned parser’s supported microsecond precision.
c72bab7: red tests reproduced a missing validation error for a null-only
object replacing an integer, and an error attributed to a lower empty object
after a higher source populated it. Empty replacement objects now retain
provenance; populated maps discard obsolete empty-object leaf origins.
c795935: a red test demonstrated the missing pinned-schema string-pattern
rule. The generator now emits pattern rules and validation evaluates them with
culture-invariant, nonbacktracking regular expressions. Leading/trailing
whitespace and whitespace-only Elm extensions fail at the supplying source.
The complete core runner passes 95/95. The reader/BDD runner passes 66/66,
including the culture regressions. Both projects build without warnings. The
trimmed and native osx-arm64 smoke hosts reran 228 JSON5 syntax checks and 26
Morphir documents, with new culture and schema-pattern checks. Both passed.
Publish commands match the smoke README, with outputs under
/tmp/morphir-config-review-trimmed and /tmp/morphir-config-review-native;
the native log is /tmp/morphir-config-review-native.log. Existing pinned
dependency diagnostics remain visible under the previously documented warning
qualification. No dependency versions, fixture bytes or lockfiles changed.
Fresh core VSTest/Coverlet and executable reader coverage runs both pass. Their
union reports core 2134/2267 authored lines, 94.13%, and readers 441/468, 94.23%.
The reports are /tmp/morphir-config-review-core-coverage/ee02bb36-e337-4426-b669-537601fa7447/coverage.cobertura.xml
and /tmp/morphir-config-review-reader-coverage.cobertura.xml, processed by the
existing scripts/configuration/summarize-coverage.py tool. Changed-file
Fantomas checks and C# whitespace formatting pass; full-range and working-diff
whitespace checks pass. New-head CI, landing and owned checkout/branch cleanup
remain outstanding.
Current-main dependency requalification
All eight CI checks passed on 3684497; all inline review threads are resolved.
The user explicitly authorized merging with admin bypass. Before executing the
merge, a fresh main-ref check found 125bfcbbd97f343c39606d923ad17a6b3e2ecaa4,
ahead of the previously validated base. Its changes include SDK conformance
fixtures/tests and dependency patches, including CsToml 1.8.3 to 1.8.6.
bb4fb95 integrates current main without conflicts. Both the configuration
runners and the SDK conformance runner remain in the combined Nuke test target.
b210343 updates only the new configuration projects’ affected lockfiles and
reader version documentation to match main’s CsToml 1.8.6 and System.IO.Hashing
10.0.11. No dependency version from main is reverted.
Requalification on that integrated tree:
Full Morphir.slnx build passes, zero errors and the same 20 warnings in
existing package/generated-code projects. It uses two logical processors,
single-node MSBuild and disabled parallel restore/build.
Configured runners pass core 95/95, reader/BDD 66/66, SDK conformance 27/27,
and tooling 245/245. Tooling uses /private/tmp/morphir-shared-config-tests
for its physical temporary directory and one test worker.
mise run openspec:verify passes the managed schema/snapshot checks, strict
validation of all 21 active/spec items, and both extension tests.
Strict trimmed publishing still fails on pinned dependency diagnostics.
The warning-qualified trimmed and native hosts both pass 228 JSON5 syntax
checks, 26 Morphir documents, and the host’s culture, schema, normalization,
lazy-profile and in-memory parity checks with CsToml 1.8.6. The serializer
source at the NuGet repository commit retains its closed TomlDocument branch
before generic formatter resolution; the smoke README links that revision.
Reproducible logs are /tmp/morphir-config-main-refresh-build.log,
/tmp/morphir-config-main-refresh-tooling.log, /tmp/morphir-config-main-strict.log,
/tmp/morphir-config-main-trimmed.log, and /tmp/morphir-config-main-native.log.
Published hosts are /tmp/morphir-config-main-trimmed and
/tmp/morphir-config-main-native. Publish-generated RID/ILCompiler lock changes
were removed after qualification, retaining the committed dependency updates.
Current-head CI, the authorized admin merge, landed-commit verification and
owned artifact cleanup remain outstanding.
6.14 -
Workspace migration delivery journal
Tracking issue: #479.
Change: add-workspace-migration, campaign 6 of six.
Ownership and baseline
Owned checkout /Users/damian/.t3/worktrees/morphir-dotnet/t3-f370bf10, branch t3/workspace-migration, initially clean at exact required main baseline e3b9a053120a49e94c70c30cd4f62ef783672c64. GitHub main agrees. Prerequisite PR #477 is merged at that same SHA, and its receipt confirms review/checks and owned cleanup. The real open tracking issue was created and read before coding.
OpenSpec list/status/instructions apply returned schema html-design, ready, 0/9 tasks. Full returned proposal/design/spec/tasks and layered configuration PRD, project/config editing journals and shared APIs were read. Only this change will be synchronized/archived when all implementation tasks are genuinely complete. Independent active plans remain untouched.
Parent owns independent final review, CI watch, authorized landing and checkout/branch/artifact cleanup. This implementation worker does not watch, merge or delete checkout/branches. The campaign remains incomplete until parent gates finish.
Work and evidence ownership
Lead owns bounded inventory, aggregate composition/verification, integration and qualification. Two Codex helpers own shared transaction/recovery and CLI/report/schema/subprocess tests respectively. Helpers preserve one another’s changes. One heavy restore/build/test/publish at a time, DOTNET_PROCESSOR_COUNT=2, serial MSBuild/restore, sequenced Expecto and TUnit --maximum-parallel-tests 1.
All owned external artifacts are under /private/tmp/morphir-workspace-migration/, including physical tmp/, transactions/, cli/, build/runner/coverage/publication logs and manifests. Global caches/tools are not changed. Process-local PowerShell 7.5.3 is used for F# SDK tests. Unresolved recovery journals/backups are preserved and inventoried.
Checkpoints
Setup completed before runtime changes. Proposal now links actual issue #479. Task 1.1 was updated at returned line 8 and apply progress rechecked.
Inventory and planning checkpoints
inventory-red-build.log proves the aggregate API was absent before production.
Initial BDD and API cases preceded implementation. inventory-io-full-01.log
passes 323/323 IO/TUnit/Reqnroll cases, including three workspace BDD cases.
planning-red-run.log passes 10 and fails four of 14 focused cases, reproducing
repeated-inventory classification, non-adoption setting drift, glob reopening
skipped/nested directories and filtered-root identity. planning-green-run.log
passes all 14 after fixing those behaviors through shared discovery and mapping.
boundaries-red-run.log passes four and fails four boundary cases. These expose
retained classic root context, configured output skipping, invalid defaults and
paths containing glob syntax. recovery-preview-red-run.log separately fails
pending-journal preview before read-only recovery inspection is added.
boundaries-green-run.log passes all 23 focused planner/application cases with
clean compilation, including source/target/listing/topology drift and repeat
source-byte/target-byte/timestamp checks. No generated output is moved.
Early inventory build attempts while recovery production was incomplete and a
zero-test filter run are retained as unsuccessful attempts, not qualification.
A lightweight FSI probe had an FSharp.Core load mismatch; configured executables
provide correctness evidence instead.
Tasks 2.1 and 2.2 were checked at fresh CLI-returned locations and progress
confirmed after each update. Aggregate equivalence/adoption qualification and
application/recovery qualification remain active.
Coordinated application and recovery
transactions/batch-red-run.log fails both first-stage ordering cases before
production; later staging and recovery runs prove every candidate and backup
exists before the first replacement. Complete preflight blocks a bad member,
stale source/target/listing/alternate primary and overlapping writers.
transactions/recovery-red-build.log and inventory-build-01.log prove missing
explicit inspection/recovery APIs. transactions/boundary-red-run.log reproduces
read-only unrelated-directory staging and lost common-ancestor cleanup guards.
transactions/capability-red-run.log proves a legacy custom host could write
without durable enumeration. Application now returns a typed capability failure
before artifacts unless a host explicitly supplies durable support.
transactions/evidence-red-run.log reproduces null/overflow journal parser
exceptions. Recovery now reports invalid metadata without changing it. Stable
artifact names are tied to target, role and owner. A mounted serialized-state
host proves recovery is not process-memory-only; tampered backups/user changes
preserve evidence and block automatic restoration.
transactions/final-precondition-red-run-02.log reproduces source drift after
the last install. Final rechecking now detects it and attempts rollback.
transactions/parent-creation-red-run.log reproduces a process exit after mkdir
but before the host returned its ownership receipt. A durable initial journal
now precedes mkdir; uncertain directories remain explicit and require reviewed
retention, never inferred cleanup ownership.
transactions/last-windows-green-run-02.log passes 87 focused cases. Seven actual
process-interruption windows and separate-process pending-write refusal pass.
planner-final-build-02.log is clean, and planner-final-io-02.log passes the
complete current-source IO runner, 371/371, after the lead’s later fixes.
Success and proven rollback clean owned artifacts. Explicit recovery resolves
test-owned native faults. Retained malformed parser samples are synthetic;
a pre-fix mkdir-crash fixture retains generated empty directories and child
logs as review evidence, without a recoverable target or journal. Those samples
are preserved for parent cleanup. No real unresolved native journal/backup was
found in the helper’s final inventory.
Native coordination is machine-local, and file replacement is per-file atomic.
No cross-file crash-atomicity or distributed-lock guarantee is claimed.
Common-context verification and source policy
transactions/lead-declared-controls-red.log passes one and fails one declared
control test. transactions/lead-layout-red.log fails both mixed-layout cases.
The aggregate now compares declared controls with activation disabled through the
same shared control policy as single-project verification. It supplies an explicit
existing supported TOML target to the shared planner, preserving owner anchors
and all existing target/ambiguity guards. Both root and member layouts pass.
source-policy-red-run.log reproduces a normalized legacy JSON5 primary being
misreported as already migrated. Inventory now sends every normalized legacy
candidate to the project planner, which retains its established .json classic
source contract and returns migration.classic_required for .json5 primaries.
Full JSON5 syntax in supported morphir.json remains accepted; no reader policy
is changed or loosened. Canonical JSON5 projects remain valid canonical projects.
The first final planner build tried to call an internal F# helper from C# and
failed compilation. Its subsequently invoked stale-DLL tests are not a current
qualification gate. planner-final-build-02.log is the successful rebuilt source,
followed by planner-final-io-02.log, 371/371 current tests. Task 2.3 was marked
only after that qualification, at the refreshed source location.
CLI adapter and subprocess contracts
The actual baseline CLI and tooling test assembly were built before CLI runtime
implementation. cli/cli-red-run-02.log contains 27 intended missing-command
failures; two early alias-test assertions were corrected to the existing generic
usage contract and are not claimed behavioral evidence. The first integrated
29-case run passed 27 and exposed a missing-filter token being consumed as text
and an unstructured workspace host-initialization crash. Both were reproduced
and fixed. Its mutable log was later overwritten by a script; terminal evidence
and cli/parse-probe.log remain, so that overwritten file is not claimed as the
original failure receipt. Later ordinal checkpoint receipts are immutable.
cli/cli-green-02-run.log passes 29/29 after actual CLI rebuilding. An isolated
existing-DLL probe then reproduces a pending-journal dry-run incorrectly returning
applicable preview. cli/pending-cli-red.log and the associated JSON receipt
preserve that failure, followed by explicit shared rollback. The final adapter
surfaces pending recovery, uncertain directories and preserved directories through
safe JSON and human outcomes. cli/cli-green-03-run.log passes all 31 subprocess
BDD cases after rebuilding the actual CLI against final shared sources. Every
operation report validates against the checked-in schema using a fresh registry.
The cases include current/supplied bounded roots, repeated include/exclude,
root/virtual/existing workspaces, no adoption/no-op, loss blockers, raw nested
secret redaction, depth 120, parse/initialization failures, source preservation,
no config migrate alias, durable pending recovery and a real process interrupted
after mkdir. Explicit recovery resolves every real CLI fixture. The actual CLI
build retains two existing package warnings; tooling retains three existing
package/generated warnings. cli/format-03.log passes own C# formatter verification.
cli/final-receipt.json and cli/final-source-sha256.json record exact commands,
counts and source identity. Task 4.1 was checked at its refreshed returned location.
Live artifact ownership review
During final qualification, lead review identified two unverified live-application
ownership boundaries. Stage return paths were registered as owned without
checking their deterministic target/role identity, and live cleanup did not first
check whether a backup/journal had changed. Eight new regressions are written
before fixes. Tasks 3.2 and 3.3 were explicitly reopened at fresh returned
checkbox locations; earlier passing receipts are source checkpoints, not final
qualification of these guards. Broad runner evidence is retained as an initial
checkpoint while the new cases are reproduced and resolved.
The initial broad run completed all 17 configured executable runners successfully
before the live-ownership fixes. Its receipts are preserved in
validation-initial/; they are not substituted for final-source qualification.
Counts include core 177, IO 371, tooling 433 and Microsoft 22. The initial full
solution build has 11 existing dependency/generated warnings and no errors.
C# full formatter verification and changed F# Fantomas checks pass. The final
ownership regression set reproduces all ten failures in
transactions/live-ownership-red-run.log, with a clean preceding build.
Coverage-driven public API qualification
Fresh managed non-CLI qualification passes 28 workspace checks, 32 project
migration checks, 44 editing checks, 228 JSON5 grammar cases and 26 pinned Morphir
documents. The compiled host exercises batch preview/application, safe generated
report serialization, source retention, output retention, byte/timestamp repeats,
drift and explicit recovery. qualification-first-summary.json records exact
commands and exits; all six format/build/smoke/collector gates pass.
The first current-source coverage union is core 4188/4345, 96.39%, and IO
2367/2459, 96.26%. IO is below prerequisite 97.15%, so final qualification remains
open. Public API boundary tests were added for bounded invalid inputs, mounted
listing/read/drift failures, native staging/parent failures, explicit recovery
faults/capabilities/options, encodings and full JSON5 escaped values/opaque arrays.
That work also reproduced a real multi-format no-op defect: an existing declared
workspace without root TOML could stage an empty primary despite Changed=false.
format-noop-red-run.log fails all six YAML/YML/JSON/JSON5/supplemental/hidden
variants before the fix. The aggregate now overlays a root file only when it
has workspace edits or an actual root conversion. format-noop-green-run.log
passes all six with unchanged source bytes and no new primary. Task 2.2 was
explicitly reopened for this finding before the minimal production fix.
Final discovery and composition corrections
discovery-verification/actual-discovery-probe.json records the initial defect:
application could discover four members after a preview verified only one through
a sanitized inventory tree. The native discovery regression suite first fails
three of four cases, then passes all four. Verification now uses actual shared
discovery listings, retains filtered existing membership and rejects declared
globs that cross a hard dependency/output/nested-workspace boundary. It verifies
both retained-classic and source-excluded views. No generic discovery semantics
or existing member declarations are changed to make verification pass.
root-composition-red-run.log reproduces a root classic manifest’s original
membership being rejected against adoption’s own new members. Shared component
planning now maps against the original target, validates explicit proposed
membership against discovery, and composes only the reviewed membership edit.
A fabricated original target and undeclared membership are rejected. A separate
red case proves component plans must not independently apply hypothetical
workspace context; components are now read-only and aggregate application owns
all writes. Existing target membership conflicts remain blockers.
root-base-run.log passes all seven composition cases after actual rebuilding,
including custom output roots and workspace.root='sub' with a root source path.
The common model uses canonical ownership controls without rendering temporary
configuration or weakening raw unsupported-value accounting. Every member uses
the same base workspace; ordinary source paths/settings retain the shared
single-project verifier. root-composition-green-io.log passes the preceding
428-case full IO checkpoint; final qualification below supersedes it.
Live artifact ownership regressions now pass. Stage and directory receipts must
match predeclared deterministic ownership; cleanup validates every owned artifact
before removing any. Altered backups/journals and unverified foreign stage paths
retain evidence and durable overlap guards. Inspection exposes unresolved paths
after process-local result loss. Deliberately unresolved fault fixtures remain
under the owned external artifact root for parent inspection; they are not
silently cleaned or represented as successful recovery.
Final runtime qualification
Runtime checkpoint: de44fa5 (fix: verify aggregate context and artifact ownership),
based on exact main e3b9a053120a49e94c70c30cd4f62ef783672c64.
qualified-source-checkpoint.json records hashes of every changed file. Subsequent
delivery edits are documentation/specification only. All following commands run
from the owned checkout, one heavy operation at a time, with
DOTNET_PROCESSOR_COUNT=2, BuildInParallel=false, RestoreDisableParallel=true
and TMPDIR, TEMP, TMP set to /private/tmp/morphir-workspace-migration/tmp.
Final build/analyzers: dotnet build Morphir.slnx --no-restore -m:1 -p:BuildInParallel=false; zero errors, ten existing package/generated warnings. Actual CLI rebuilt before subprocess qualification.
Changed C# formatter: dotnet format Morphir.slnx --no-restore --include <all changed C# paths> --verbosity quiet; exact expanded argv is in qualification-first-summary.json. Full formatter verification uses dotnet format Morphir.slnx --no-restore --verify-no-changes --verbosity quiet.
The final configured executable sweep passes all 17 runners, 3,887 tests and
smoke checks. Each invocation is dotnet tests/<project>/bin/Debug/net10.0/<project>.dll
with the flag below. The process-local PATH adds campaign bin/dotnet for serial
nested builds and existing PowerShell 7.5.3 for F# SDK package tests;
DOTNET_HOST_PATH points to that campaign wrapper. Global tools/caches are untouched.
Project
Runner flags
Passed
Morphir.CodeGeneration.FSharp.Tests
--sequenced
333
Morphir.Configuration.IO.Tests
--maximum-parallel-tests 1
429
Morphir.Configuration.Inspection.Smoke
none
71
Morphir.Configuration.Microsoft.Tests
--maximum-parallel-tests 1
22
Morphir.Configuration.Tests
--sequenced
177
Morphir.Core.Tests
--maximum-parallel-tests 1
237
Morphir.IR.Pipeline.Plugins.Tests
--sequenced
141
Morphir.IR.Pipeline.Tests
--sequenced
299
Morphir.Internal.CodeGeneration.Tests
--sequenced
25
Morphir.Ion.Tests
--sequenced
463
Morphir.Models.Tests
--sequenced
791
Morphir.Myriad.Integration.Tests
--maximum-parallel-tests 1
12
Morphir.Myriad.Tests
--sequenced
4
Morphir.SDK.CSharp.Tests
--maximum-parallel-tests 1
20
Morphir.SDK.Conformance.Tests
--maximum-parallel-tests 1
27
Morphir.SDK.Tests
--sequenced
403
Morphir.Tooling.Tests
--maximum-parallel-tests 1
433
validation/final-receipt.json preserves expanded commands, durations and counts;
individual logs preserve actual runner discovery. IO includes shared/project/
workspace BDD, full aggregate fault/recovery/ownership and separate-process
interruption/overlap tests. Tooling includes 31 real workspace subprocess BDD
scenarios and fresh-registry JSON-schema validation. Models/SDK runners retain
codec/roundtrip contracts. Plain dotnet test is not substituted for these runners.
Final source coverage: core 4,188/4,345 (96.39%); IO 2,495/2,561 (97.42%).
Both exceed prerequisite source checkpoints. The core collector is supplementary;
177 sequenced Expecto tests establish actual test execution. No source exclusions
or warning suppressions were added to meet qualification.
Managed, trimmed and native non-CLI batch hosts each pass 38 workspace checks,
32 project migration checks, 44 editing checks (9 editor, 22 shared, 13 transaction),
228 official JSON5 syntax cases and 26 pinned Morphir documents. They exercise
read-only/native preview, aggregate application, no-op bytes/timestamps, source
and generated-output retention, drift, redacted generated serialization, explicit
journal recovery and uncertain-directory preservation. Native output is a Mach-O
64-bit arm64 executable. Exact publish argv and exits are in publish/summary.json:
The three modes run sequentially with the corresponding values above. Managed
publish has zero warning lines; trimmed retains 44 and native retains 47 pinned
CsToml/FSharp.Core analysis-warning lines. These remain visible upstream
limitations, not a strict warning-free trimming claim. No suppression or package
update was introduced. publish-locks/restored.json proves all 45 lockfiles were
restored byte-for-byte after publishing. Reports and stderr are retained separately.
Specification sync and handoff gates
Full formatter verification and final locked restore pass. OpenSpec apply returned
all_done, 9/9, before archive. The current specs-rule snapshot was read before
writing the new main spec. Only add-workspace-migration was synchronized and
archived at openspec/changes/archive/2026-11-03-add-workspace-migration/.
openspec/specs/workspace-migration/spec.md preserves the approved Purpose and
all 11 requirement bodies/14 scenarios byte-for-byte under canonical main-spec
headings. archive-verification.json verifies exact content, nine checked tasks,
retained .openspec.yaml, balanced HTML and valid local design/proposal links.
The archive’s prerequisite and PRD links are adjusted for archive depth.
MISE_TRUSTED_CONFIG_PATHS="$PWD" mise run openspec:verify passes before and
after archive: managed html-design snapshot/schema, all 22 current change/spec
items, and both extension tests. openspec validate --specs --strict --json
passes 18/18 and openspec validate --archived --strict --json passes 11/11.
No archived path is passed as a direct CLI item name. Independent active plans
are unchanged against the required baseline. NOTICE and contribution policy
remain satisfied; no AI coauthor trailers or local docs/superpowers/ artifacts
are staged.
The implementation is locally qualified and archived, but this sixth campaign
is incomplete. Parent owns independent final review, current-head CI watching,
authorized landing and verified owned checkout/local-branch/remote-branch/artifact
cleanup. This worker opens one focused PR with issue #479 and exact head/base,
then hands back without watching, merging, deleting sources/branches/checkouts,
releasing or deploying. PR head and forge state belong in the PR/issue handoff
receipt; this committed runtime checkpoint is not a claimed review/CI approval.
Owned external artifact and recovery inventory
All external artifacts remain beneath /private/tmp/morphir-workspace-migration/.
artifact-inventory.json lists every owned file and artifact-inventory-summary.json
lists retained recovery paths without configuration values. At final qualification
the inventory contains 2,739 files (320,872,941 bytes), excluding the inventory’s
own output files; final PR/receipt files added afterward are also owned beneath
that same root. Major groups are:
tmp/: physical test/subprocess temporary roots and deliberately retained fault
fixtures, including injected user-change and ownership evidence.
transactions/, cli/, discovery-verification/: immutable red/green/probe,
interruption and explicit-recovery receipts. Two deliberately malformed parser
samples have no real destination operation.
validation/: final 17-runner logs/expanded commands/counts;
validation-initial/ is explicitly an earlier checkpoint.
publish/: three published hosts, build logs, separate JSON results/stderr;
publish-locks/: 45 original lockfiles and byte-identical restoration proof.
Coverage XMLs/summary, format/build/restore/OpenSpec receipts, source hashes and
campaign-local orchestration scripts/wrapper. Checkout bin/obj/TestResults
are reproducible local build artifacts, not new external cleanup roots.
There are 114 retained .morphir-edit-* evidence files across 37 containing
directories: 112 from generated fault fixtures and two synthetic malformed parser
samples. These are intentionally unresolved/altered test evidence, not production
operations. The exact paths and transaction IDs are in the inventory. Earlier
helper receipts reporting no unresolved journals describe their earlier checkpoint;
the later ownership/cleanup regressions intentionally retain new evidence.
No file was removed or manufactured to improve the cleanup claim. Preserve these
journals/backups and their surrounding user-change fixtures until explicitly
inspected/recovered or dispositioned by the parent. Owned cleanup therefore
remains an explicit parent obligation. Global caches/tools and unrelated
campaign artifacts are excluded from ownership.
Current-main interaction at PR preparation
GitHub main advanced during qualification to
0542145a4bcc0edf9c9dd2fb3122df36c73e80d0 through independent C# generation
PRs #478, #480 and #482. The owned branch retains the explicitly required starting
baseline e3b9a053120a49e94c70c30cd4f62ef783672c64; PR #477 remains its merged
prerequisite. No unrelated generation work is copied or modified in this branch.
The intervening production changes add a separate generation backend/reference
and model package-release notes; they do not change configuration/project/workspace
services. README/troubleshooting edits are in different sections.
git merge-tree --write-tree origin/main HEAD succeeds without conflicts
(integration tree a866f8115332651717e14fe1b0a7ec4b8db3e460 at the documentation
checkpoint). This is merge compatibility evidence, not execution of a merged
checkout. The 17-runner/runtime receipts qualify this branch at its required
baseline; parent-owned current-base PR CI remains necessary for the new backend
and additional independent suites. The PR records the actual newer base separately.
Parent policy review follow-up
Independent review of ff5347f identified three concrete defects: existing
workspaces bypassed original-value checks for newly adopted projects, supplied
exclusions did not prevent root conversion, and new members were reported with
existing workspace ownership/output roots before adoption. All five new public
API cases fail in parent-review/policy-red-02.log. An earlier malformed filter
selected zero tests and is not red evidence. All three actual CLI regressions
fail against the original executable in parent-review/policy-cli-red.log.
The shared coordinator now checks each newly adopted project against its original
non-adoption settings in both new and existing workspaces. Root exclusions apply
to conversion selection while root identity and necessary workspace composition
remain. Adoption effects use actual prior membership to distinguish retained and
standalone contexts. The native smoke includes these paths.
The first full IO run passed 433 of 434 cases and exposed an older success
fixture relying on the newly rejected silent backend change. Its new project
now explicitly authors the matching backend, retaining a valid successful
preservation case. Its member-local profile activation declaration was also
removed so that fixture does not rely on control metadata changing authority
through adoption. The rebuilt CLI passes the three new cases. The refreshed
full IO runner passes 434 cases. Final full-suite, coverage, runtime, CI and
independent transaction-review results remain delivery gates.
All 17 configured executable runners pass again after the parent policy fixes.
The full IO runner now passes 434 cases and tooling passes 436, including all
three new real CLI regressions; all other runner counts remain as above.
validation/summary.json and the refreshed individual runner logs retain exact
commands, duration and exits for this current-source checkpoint. The full
solution build passes with nine existing warnings and zero errors, and changed
C# files passed formatter processing before that build.
Final policy qualification after 19504a8 passes full formatter verification,
OpenSpec/extension verification, fresh IO coverage and all three published host
modes. The unchanged F# source maps reuse their core collector with the fresh IO
report: core 4188/4345, 96.39%; IO 2493/2559, 97.42%, recorded in
parent-review/policy-coverage-summary.json. Managed, trimmed and native hosts
each pass 42 workspace checks, 32 project migration checks, 44 editing checks,
228 JSON5 cases and 26 Morphir fixtures. Published stderr is empty; trimmed and
native dependency warning counts remain 44/47 with the documented explicit
warning-severity qualification. Lockfiles are restored byte-for-byte. Exact
commands and exits are in parent-review/policy-qualification-summary.json and
the refreshed publish summary. Original retained recovery evidence is untouched;
new parent validation fault-fixture evidence also remains for final disposition.
Independent transaction/recovery review, current-head CI, landing and audited
cleanup remain outstanding campaign gates.
Ancestor recovery discovery race
Linux CI on ff5347f fails the valid empty-workspace no-op CLI scenario with
config.edit_io. Its generic renderer does not expose the original exception,
so the retained CI log alone cannot identify the exact failing filesystem call.
A focused concurrent probe then reproduces a relevant native recovery race:
FindRecoveryJournals fingerprints every ancestor directory through Observe,
and an unrelated sibling disappearing during that fingerprint throws
FileNotFoundException. parent-review/recovery-race-red.log records this
failure before production changes.
Journal discovery now checks directory kind and refuses linked ancestors without
fingerprinting unrelated contents. Source/target/listing observation and stale
plan guards retain their original strict behavior. The focused regression scans
while unrelated files churn; a companion test preserves linked-ancestor refusal.
Both pass in parent-review/recovery-race-green.log. The full refreshed IO runner
passes 436 cases. Current-head Linux CI still qualifies the original CI symptom.
All 17 runners pass again after the recovery scan correction: IO 436, tooling
436, core configuration 177 and Microsoft 22; the other counts are unchanged.
The full solution build and changed-file formatter pass. The refreshed full
runner logs and summary retain current-source execution evidence. This is a
verified native discovery race fix; current-head CI remains required before
claiming the Linux no-op failure resolved on the runner.
Final qualification after 56eb44a passes full formatter, OpenSpec/extension,
fresh IO coverage and all managed/trimmed/native runtime hosts. Core coverage
remains 4188/4345, 96.39%; IO is 2506/2573, 97.4%.
Each published mode passes 42 workspace, 32 project migration, 44 editing, 228
JSON5 and 26 Morphir checks with empty stderr. Dependency warning counts remain
44/47 for trimmed/native and zero for managed; lockfiles are restored exactly.
The latest full rebuild reports eleven existing warnings and zero errors.
parent-review/recovery-race-qualification-summary.json, coverage summary and
publish summary retain exact commands and results. Current-head Linux CI and
independent transaction/recovery review remain open gates.
Independent transaction review follow-up
Independent review of ff5347f reports three P2 failures with retained probes:
a durably created committed witness could be followed by rollback, a rejected
persisted journal could remain after a false complete-recovery result, and a
host observation failure inside error handling could escape without a typed
outcome. parent-review/receipt-red.log reproduces all six new cases before
production changes, including missing/persisted commit witnesses, rejected
journal/stage receipts and disconnection after stage/commit persistence.
Application now validates a possibly persisted committed witness before choosing
rollback. A valid witness keeps candidate bytes and backups for explicit
completion; an absent witness permits rollback. Explicit recovery preserves
rejected transaction-shaped artifacts and reports recovery required while they
remain. The failure-handler fallback returns known or possible evidence and
unresolved targets without further storage observations or blind rollback.
All six regressions pass in parent-review/receipt-green.log; the full IO suite
passes 442 cases. Published smoke coverage adds these commit/receipt cases.
The independent read-only audit classified the original 114 retained files
across 37 directories as generated test evidence: 28 target-drift, 28 backup-drift,
35 committed-cleanup, 14 partial-journal ownership, seven partial-journal cleanup
and two malformed-parser samples. No external/non-fixture references, links or
unique user data were found. The disposition inventory records paths, hashes,
provenance and inspection results. Original files remain untouched; parent-owned
fixture cleanup is authorized after the final review/landing gates. Additional
parent regression fixtures are retained separately under the same owned root.
All 17 configured runners pass after the receipt/recovery corrections: IO 442,
tooling 436, core 177 and Microsoft 22; other counts are unchanged. The rebuilt
solution passes with eleven existing warnings and zero errors. Changed source
files passed formatting before the rebuild. The original disposition inventory
was rechecked after parent validation: all 149 recorded artifact/adjacent-file
hashes still match, recorded in parent-review/original-evidence-hash-check.json.
Both independent review scopes are complete; their six findings are addressed.
Final coverage, published hosts and current-head CI remain qualification gates.
Final receipt/recovery qualification after ff495a7 passes full formatter,
OpenSpec/extension, fresh IO coverage and every published host mode. Core source
coverage is 4188/4345, 96.39%; IO is 2537/2606, 97.35%, still above the merged
prerequisite’s 97.15%. No exclusions were added. Managed, trimmed and native
hosts each pass 59 workspace/recovery checks, 32 project migration checks,
44 editing checks, 228 JSON5 cases and 26 Morphir fixtures. Published stderr is
empty. Managed has no warnings; trimmed/native retain the same 44/47 dependency
warnings under explicit normal-warning qualification. Lockfiles are restored
byte-for-byte. Exact commands and outcomes are in
parent-review/receipt-qualification-summary.json, its coverage summary and the
publish summary. Both independent reviews are complete; all six findings plus
the independently reproduced ancestor-enumeration race are addressed and tested.
Current-head CI, landing and audited owned cleanup remain campaign gates.
Windows fixture path correction
Development run 41747846560 on 9590b60 reports five Windows-only fixture
failures. The hidden-layout scenario moved the source successfully but failed
to remove its old dictionary entry because the original relative path contained
forward slashes and the removal used native separators. Four transaction tests
correctly retained tampered artifacts, then compared native enumerated paths
against the public API’s normalized paths. The captured failing log is
parent-review/ci-9590b60.clean.log.
The fixtures now normalize source dictionary keys and enumerated artifact paths
before comparing identities. Production behavior is unchanged. The full solution
rebuild passes with eleven existing warnings and zero errors. All 17 local
runners pass again with 3,903 tests/checks, including IO 442 and tooling 436.
Production source and published-host evidence remain unchanged; current-head
Windows CI remains the platform qualification gate.
Formatting and OpenSpec/extension verification also pass, recorded in
parent-review/windows-fixture-postchecks.json. The expanded read-only fixture
audit accounts for 326 retained recovery files after repeated validation, with
no references outside their individual fixtures, symlinks or unknown adjacent
file contents. The original 114-file audit remains intact. Explicit fixture
disposition and removal remain deferred until verified landing.
7 -
Issue #240: Create Elm to F# Guru Skill - Enhanced Edition
Enhancement of: Issue #240 Enhancement based on: Issue #253 - Unified Cross-Agent AI Skill Framework Architecture Related Issues: #254, #255, #241, #242
Summary
Create a specialized Elm-to-F# Guru skill that facilitates high-quality migration of Elm code to idiomatic F#, with proactive review capability built-in from day one. This guru combines domain expertise, automation, continuous improvement, and cross-project portability principles from the unified skill framework.
The Elm-to-F# Guru will be the first guru built with review capability from the start, establishing a pattern for future gurus and demonstrating the full power of the guru framework.
1. Proactive Review Capability ⭐ NEW
The Elm-to-F# Guru includes proactive review as a core competency, not an afterthought. This sets it apart from earlier gurus where review capabilities were added later.
What the Guru Reviews
The Elm-to-F# Guru actively monitors migration progress and quality, identifying:
1.1 Anti-Patterns
Elm idioms ported literally instead of idiomatically
Example: Elm’s Maybe translated directly to Option without considering F#’s ValueOption or nullable reference types where appropriate
Example: Elm’s union types with overly verbose F# discriminated unions when simpler patterns exist
1.2 Myriad Plugin Opportunities
Patterns appearing 3+ times that should be automated via code generation
Example: Repetitive JSON serialization patterns across multiple types
Example: Boilerplate for F# record validation that mirrors Elm’s structure
Example: Type conversions between Elm and F# representations
1.3 F# Idiom Violations
Code using non-idiomatic F# patterns
Example: Excessive use of mutable variables when immutable patterns are clearer
Example: Missing type annotations in public APIs
Example: Not using F# computation expressions where appropriate
Example: Type provider output is AOT-compatible (coordination with AOT Guru)
Review Triggers
The guru performs reviews at multiple cadences:
Session-Based Review (After Each Module Migration)
Trigger: Module migration marked complete
Action: Analyze migration for:
- Pattern frequency (track repetitions)
- Idiom compliance (F# best practices)
- Type safety preservation (Elm → F#)
- Test coverage (coordinate with QA Tester)
Output: Session summary with patterns discovered
Weekly Pattern Inventory Review
Trigger: Weekly scheduled scan (CI job or manual)
Action: Review all migrations from past week:
- Aggregate pattern occurrences
- Identify patterns appearing 3+ times
- Check for emerging anti-patterns
Output: Weekly pattern report
Quarterly Comprehensive Review
Trigger: End of quarter (Q1, Q2, Q3, Q4)
Action: Deep analysis across all migrations:
- Pattern frequency trends (increasing/decreasing)
- Myriad plugin opportunities (automation candidates)
- Migration quality metrics (idiom compliance, safety)
- Coordination effectiveness (AOT Guru, QA Tester)
Output: Quarterly review report with improvement recommendations
Review Output Format
Reviews produce structured output for consumption by other gurus and developers:
## Elm-to-F# Migration Review Report
**Date:** 2025-12-19
**Scope:** Modules migrated since last review
**Reviewer:** Elm-to-F# Guru
### Pattern Frequency Report
| Pattern | Count | Example Locations | Status |
|---------|-------|-------------------|--------|
| ValueType boxing in pattern matching | 7 | `Module.A:45`, `Module.B:23`, ... | ⚠️ Recommend Myriad plugin |
| Manual JSON serialization | 5 | `Module.C:12`, `Module.D:67`, ... | ⚠️ Consider automation |
| Recursive union type translation | 12 | `Module.E:89`, `Module.F:34`, ... | ✅ Pattern documented |
### Myriad Plugin Recommendations
1.**Auto-Serializer Plugin** (Priority: High)
- **Pattern:** Manual JSON serialization appears 5+ times
- **Impact:** Reduce boilerplate, improve consistency
- **Effort:** ~2-3 days to implement
- **Token Savings:** ~50 tokens per type × 20 types = ~1000 tokens
2.**ValueType Boxing Detector** (Priority: Medium)
- **Pattern:** Boxing detected 7 times
- **Impact:** Performance + AOT compatibility
- **Effort:** ~1 day to implement detection script
- **Token Savings:** ~30 tokens per detection × 10/quarter = ~300 tokens
### Automation Script Suggestions
1.**Create `detect-boxing-patterns.fsx`**- Scans F# code for ValueType boxing in pattern matches
- Integrates with AOT Guru's IL analysis
2.**Create `validate-type-mappings.fsx`**- Verifies Elm → F# type mappings are correct
- Checks for precision loss (e.g., Elm Int → F# int vs int64)
### Migration Quality Metrics
- **Modules Migrated:** 80
- **Idiom Violations:** 1,200 (decreasing from 1,500 last quarter)
- **Patterns Discovered:** 45 total (12 new this quarter)
- **Test Coverage:** 82% (target: 80%, ✅ on target)
- **AOT Compatibility:** 95% (5% needs Myriad plugins)
### Coordination Status
- **With AOT Guru:** 3 generated code reviews completed, 2 IL warnings resolved
- **With QA Tester:** Test coverage verified, 5 edge cases added
- **With Release Manager:** Migration progress tracked, on schedule for Q1 2026
### Next Quarter Focus
1. Implement auto-serializer Myriad plugin
2. Add boxing detection to quarterly scans
3. Document recursive union type pattern (12 occurrences suggest it's stable)
4. Coordinate with AOT Guru on plugin IL output
2. Automated Feedback & Continuous Improvement
The Elm-to-F# Guru implements a continuous learning loop inspired by the guru framework’s retrospective philosophy.
Session Capture
Every migration session includes a “Patterns Discovered” section:
## Migration Session: Module.BusinessLogic
**Status:** Complete
**Lines Migrated:** 450
**F# Output:** 380 lines
### Patterns Discovered
1.**Union Type with Private State**: Elm's opaque types → F# with private constructor pattern
2.**Computation Expression Candidate**: Repeated `Result` chaining → F# `result { }` CE
3.**Myriad Opportunity**: 3rd occurrence of manual JSON serialization for discriminated unions
### Idiom Improvements
- Changed: Mutable loop → `List.fold` (idiomatic F#)
- Fixed: Added explicit type annotations to public API
- Enhanced: Used `ValueOption` instead of `Option` for high-frequency code paths
### Questions for Next Review
- Should we create a Myriad plugin for opaque type translation?
- Is the `Result` computation expression approach consistent with project standards?
Quarterly Reviews
At the end of each quarter, the guru performs a comprehensive pattern review:
Process:
Collect: Gather all “Patterns Discovered” sections from the quarter
Analyze: Identify top 3-5 patterns by frequency
Decide: Determine which patterns warrant automation (Myriad plugin, script, or decision tree update)
Document: Update the guru’s pattern catalog and playbooks
Plan: Set improvement goals for next quarter
Example Quarterly Review Outcomes:
Q1 2025 Review:
- Discovered 15 new patterns (total: 45)
- Top pattern: JSON serialization (appeared 18 times)
- Decision: Create Myriad plugin for auto-serialization
- Playbook updated: Added decision tree for union type translation
Q2 2025 Review:
- Created 2 Myriad plugins (auto-serialization, validation)
- JSON serialization occurrences dropped from 18 → 2 (automation working!)
- New pattern emerged: Recursive tree structures (8 occurrences)
- Decision: Document pattern, not yet frequent enough for plugin
Q3 2025 Review:
- Updated migration decision tree based on Q1-Q2 learnings
- Pattern catalog now has 52 patterns (7 added, no removals)
- Token savings from automation: ~2,500 tokens per quarter
- Coordination with AOT Guru improved (generated code review process)
Playbook Evolution
The guru’s playbooks and decision trees evolve based on learnings:
Before: Generic “Translate Elm to F#” steps
After Q1: Specific guidance on union types, computation expressions, serialization
After Q2: Automation scripts integrated, Myriad plugin usage documented
After Q3: Common pitfalls section added, anti-pattern detection automated
Automation Loop
The feedback loop prioritizes automation:
Pattern appears 1-2 times → Document in catalog
Pattern appears 3-5 times → Create detection script + decision tree entry
Pattern appears 6+ times → Strong candidate for Myriad plugin or major automation
Pattern appears 10+ times → Critical to automate (prevent technical debt)
3. Token Efficiency Analysis
The Elm-to-F# Guru includes 3+ F# automation scripts designed to save significant agent tokens by replacing high-cost manual operations.
Script 1: extract-elm-tests.fsx
Purpose: Extract test structure from Elm test files to guide F# test creation
Reusability: ⭐ Highly portable - works for any Elm-to-X migration, not F#-specific
Savings: 845 tokens per review × 4 reviews/quarter = 3,380 tokens per quarter
Total Token Savings (All Scripts)
Script
Per-Use Savings
Frequency
Annual Savings
extract-elm-tests.fsx
420 tokens
80 modules
33,600 tokens
analyze-elm-module.fsx
555 tokens
80 modules
44,400 tokens
verify-migration.fsx
765 tokens
80 modules
61,200 tokens
detect-patterns.fsx
845 tokens
4/quarter × 4 quarters
13,520 tokens
Total Annual Savings
152,720 tokens
Note: These savings assume 80 modules to migrate over the project lifetime. Actual savings will scale with the number of modules.
4. Cross-Project Portability
The Elm-to-F# Guru is designed with portability in mind, making it easier to adapt to other Elm migration projects or even other functional language migrations.
Portable Components ✅
These components can be reused in other projects with minimal changes:
4.1 Pattern Detection Logic
What: Structural analysis of source code (identifying types, functions, dependencies)
Portable to: Elm-to-Haskell, Elm-to-OCaml, Elm-to-ReasonML, Elm-to-PureScript
Adaptation effort: Low (~1-2 hours to adjust output format)
4.2 Structural Analysis
What: Understanding Elm module structure, type definitions, function signatures
Portable to: Any Elm-to-X migration
Adaptation effort: Very low (~30 minutes, mostly path configuration)
4.3 Idiom Checkers (Framework)
What: Framework for detecting anti-patterns and idiom violations
Portable to: Any source-to-target language migration
Adaptation effort: Medium (~4-8 hours to define target language idioms)
AOT Guru: Updates review criteria to include Myriad plugin output
QA Tester: Updates test plan template to prioritize early test extraction
Release Manager: Automates migration progress tracking for release notes
6. Review Integration with Retrospectives
The Elm-to-F# Guru combines proactive review (finding issues before they cause problems) with reactive retrospectives (learning from problems that occurred).
How They Work Together
┌─────────────────────────────────────────────────────────────┐
│ CONTINUOUS IMPROVEMENT CYCLE │
└─────────────────────────────────────────────────────────────┘
Q1 REVIEWS (Proactive):
Findings:
- "ValueType boxing pattern found in 7 places"
- "Elm pattern 'Result.andThen chains' not idiomatic in F#"
- "3 modules using old F# style (mutable loops)"
- "Myriad plugin opportunity: JSON serialization (5 occurrences)"
↓ Feed into retrospectives
Q1 RETROSPECTIVES (Reactive):
Questions:
- "Why does ValueType boxing happen?"
→ Root cause: Developers unaware of ValueOption vs Option
- "Are we teaching F# idioms correctly?"
→ Root cause: Migration playbook lacks idiom guidance
- "Should we automate this pattern?"
→ Root cause: Repetitive manual work → errors
↓ Decisions & Actions
Q1 OUTCOMES:
Actions:
1. Create Myriad plugin for auto-serialization (eliminates repetitive manual work)
2. Update migration decision tree:
- Add "ValueOption vs Option" decision point
- Document Elm Result → F# Result CE pattern
3. Add pattern detection to verify.fsx (prevent old F# style from recurring)
4. Update playbooks:
- Add "F# Idioms" section with examples
- Include checklist: "Did you consider computation expressions?"
↓ Improvements deployed
Q2 REVIEWS (Next Cycle):
Findings:
- "ValueType boxing reduced from 7 → 2 occurrences" ✅ Improvement!
- "0 old F# style issues (automated detection working)" ✅ Improvement!
- "JSON serialization: 5 → 0 occurrences (Myriad plugin working)" ✅ Improvement!
- "New pattern discovered: Recursive tree structures (4 modules)"
↓ New questions, new cycle
Example Integration: ValueType Boxing Pattern
Quarter 1: Discovery
Review Findings (Proactive):
Pattern: ValueType boxing in pattern matching
Occurrences: 7
Locations: Module.A:45, Module.B:23, Module.C:67, ...
Severity: Warning
Impact: Performance degradation + AOT compatibility concerns
Recommendation: Use ValueOption instead of Option for value types
Retrospective Analysis (Reactive):
Question: "Why does ValueType boxing happen so frequently?"
Investigation:
- Reviewed 7 occurrences
- Pattern: All in code migrated from Elm's Maybe type
- Root cause: Migration playbook says "Elm Maybe → F# Option" (generic)
- Developers followed playbook literally without considering performance
Conclusion: Playbook lacks guidance on ValueOption vs Option choice
Q1 Outcomes:
Action 1: Update migration playbook
Before: "Elm Maybe → F# Option"
After: "Elm Maybe → F# Option (reference types) or ValueOption (value types)"
Added: Decision tree with examples
Action 2: Create detection script
Script: detect-boxing-patterns.fsx
Integration: Run as part of verify-migration.fsx
Output: Warning if Option used with value types
Action 3: Document pattern
Added to pattern catalog: "Pattern #23: ValueOption for Value Types"
Examples: 7 real cases from Q1 migrations
Guideline: "Use ValueOption<int>, ValueOption<DateTime> to avoid boxing"
Quarter 2: Validation
Review Findings (Proactive):
Pattern: ValueType boxing in pattern matching
Occurrences: 2 (down from 7) ✅
Locations: Module.X:89, Module.Y:12
Severity: Warning
Status: IMPROVING (71% reduction)
Note: 2 occurrences are in legacy code, not new migrations
Retrospective Analysis (Reactive):
Question: "Why do 2 occurrences still exist?"
Investigation:
- Both in legacy code (pre-Q1 improvements)
- Not flagged because verify-migration.fsx only runs on new migrations
- Opportunity: Run detection script on entire codebase, not just new code
Conclusion: Expand automated detection to full codebase
Q2 Outcomes:
Action 1: Expand detection scope
Before: verify-migration.fsx runs only on new migrations
After: detect-patterns.fsx runs on entire codebase weekly
Action 2: Fix legacy code
Created PRs to fix 2 legacy occurrences
Added to backlog: "Modernize legacy code patterns"
Action 3: Celebrate improvement
Shared success with team: "ValueType boxing reduced 71% via playbook updates"
Quarter 3: Stability
Review Findings (Proactive):
Pattern: ValueType boxing in pattern matching
Occurrences: 0 ✅
Severity: N/A (no longer occurring)
Status: RESOLVED
Note: Pattern detection active, no new occurrences in Q3
Retrospective Analysis (Reactive):
Question: "What made this improvement successful?"
Reflection:
- Proactive review discovered the pattern early (Q1)
- Retrospective identified root cause (playbook gap)
- Combined action: Updated playbook + automated detection
- Validation: Q2 review confirmed improvement, Q3 confirmed resolution
Conclusion: Review + Retrospective cycle works! Apply to other patterns.
Q3 Outcomes:
Action 1: Document success
Added case study to guru-creation-guide.md: "ValueType Boxing Pattern Resolution"
Template for future pattern improvements
Action 2: Apply learnings to new pattern
Q3 discovered: "Recursive tree structure pattern (8 occurrences)"
Following same process: Review → Retrospective → Action → Validate
Review vs Retrospective: Key Differences
Aspect
Proactive Review
Reactive Retrospective
Timing
Scheduled (weekly, quarterly) or continuous
After events (failures, releases)
Focus
Find issues before they cause problems
Understand why problems occurred
Input
Scans, metrics, automated analysis
Incidents, failures, team feedback
Output
Findings, recommendations, metrics
Root causes, lessons learned
Action
Preventive measures (detection scripts)
Corrective measures (process changes)
Example
“Found 7 boxing patterns”
“Why did boxing happen? Playbook gap.”
Mutual Benefits
Reviews inform retrospectives:
Review findings become retrospective discussion topics
Pattern frequency data helps prioritize retrospective focus
Metrics show whether improvements are working
Retrospectives improve reviews:
Root cause analysis refines what reviews should look for
Process insights suggest new review criteria
Team feedback identifies blind spots in automated reviews
Last Updated: 2025-12-19 Status: Enhanced Issue Specification Ready for Implementation Next Steps: Update GitHub Issue #240 with this content
8 -
Issue #240 Enhancement - Navigation Guide
This directory contains the enhanced specification for Issue #240: Create Elm to F# Guru Skill, incorporating guru framework principles from Issue #253.
Issue #240 was enhanced to transform the Elm-to-F# Guru from a basic migration tool into a comprehensive, learning-enabled guru with proactive review capability built-in from day one.
Key Enhancements
1. Proactive Review Capability ⭐ (NEW)
What it does:
Actively scans migrated code for anti-patterns, idiom violations, and automation opportunities
Runs after each module migration (session-based), weekly, and quarterly
Identifies patterns appearing 3+ times as Myriad plugin candidates
Why it matters:
First guru built with review capability from the start
Captures patterns discovered in every migration session
Performs quarterly reviews to identify top improvements
Updates playbooks and decision trees based on learnings
Why it matters:
Ensures the guru gets smarter over time
Prevents repeated mistakes across modules
Creates a feedback loop: patterns → automation → fewer patterns
Example:
Q1: Discovered 15 patterns, JSON serialization appeared 18 times
Q2: Created Myriad plugin for JSON serialization
Q3: JSON serialization occurrences dropped to 2 (89% reduction)
Adaptation effort: 12-20 hours for Elm-to-Haskell, 12-20 hours for Elm-to-OCaml
Why it matters:
Reduces cost of creating similar gurus for other languages
Establishes patterns that other migration projects can follow
Increases ROI of guru framework investment
5. Guru Coordination
What it does:
Defines how Elm-to-F# Guru coordinates with AOT Guru, QA Tester, and Release Manager
Establishes clear integration points and workflows
Coordination examples:
With AOT Guru:
Elm-to-F# generates code → AOT Guru reviews for IL warnings →
Feedback: "Found IL2026, use source generator" →
Elm-to-F# updates plugin → AOT Guru verifies: "✅ No warnings"
Release Manager: "What's migration status for v1.0.0?"
Elm-to-F# Guru: "80/100 modules complete, on track for Q1 2026"
Release Manager: "Noted, including in release notes"