Skip to content

Commit 20ebc60

Browse files
Copilotjohnml1135
andcommitted
Complete final condensing - all 61 COPILOT.md files now condensed
Co-authored-by: johnml1135 <13733556+johnml1135@users.noreply.github.com>
1 parent 91418eb commit 20ebc60

3 files changed

Lines changed: 44 additions & 196 deletions

File tree

Src/ParatextImport/COPILOT.md

Lines changed: 8 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -28,63 +28,17 @@ C# library (net48) with 22 source files (~19K lines). Complex import pipeline co
2828
Import flow: User selects Paratext project → ParatextSfmImporter parses USFM → BookMerger detects differences → User reviews/resolves differences → Import updates LCModel Scripture → UndoImportManager tracks changes for rollback.
2929

3030
## Key Components
31-
32-
### Import Management
33-
- **ParatextImportManager** (ParatextImportManager.cs) - Central coordinator for Paratext imports
34-
- Entry point: `ImportParatext(Form mainWnd, LcmCache cache, IScrImportSet importSettings, ...)` - Static entry point called via reflection
35-
- `ImportSf()` - Main import workflow with undo task wrapping
36-
- `CompleteImport(ScrReference firstImported)` - Post-import finalization
37-
- Manages UndoImportManager, settings, and UI coordination
38-
- **ParatextImportUi** (ParatextImportUi.cs) - UI presentation and dialogs
39-
- **ParatextSfmImporter** (ParatextSfmImporter.cs) - USFM/SFM file parsing and import logic
40-
41-
### Difference Detection and Merging
42-
- **BookMerger** (BookMerger.cs) - Scripture book comparison and merge engine
43-
- `DetectDifferences(IScrBook bookCurr, IScrBook bookRev, ...)` - Identify changes between versions
44-
- `MakeParaCorrelationInfo(...)` - Calculate paragraph correlation factors
45-
- Uses **ParaCorrelationInfo** for tracking paragraph mappings
46-
- **Cluster** (Cluster.cs) - Groups related differences for user review
47-
- `ClusterType` enum: AddedVerses, MissingVerses, OrphanedVerses, etc.
48-
- **ClusterListHelper**, **OverlapInfo**, **SectionHeadCorrelationHelper** - Cluster analysis utilities
49-
- **Difference** (Difference.cs) - Individual Scripture change representation
50-
- `DifferenceType` enum: SectionHeadAddedToCurrent, TextDifference, VerseMoved, etc.
51-
- **DifferenceList**, **Comparison** - Difference collections and analysis
52-
- **DiffLocation** (DiffLocation.cs) - Scripture reference and location tracking
53-
54-
### Wrapper Interfaces (Legacy Adaptation)
55-
- **ISCScriptureText** (ISCScriptureText.cs) - Abstracts Paratext text access
56-
- **ISCTextSegment** (ISCTextSegment.cs) - Individual text segment interface
57-
- **ISCTextEnum** (ISCTextEnum.cs) - Enumeration over text segments
58-
- **IBookVersionAgent** (IBookVersionAgent.cs) - Book version comparison contract
59-
- **SCScriptureText**, **SCTextSegment**, **SCTextEnum** (SC*.cs) - Implementations wrapping Paratext SDK
60-
61-
### Support Classes
62-
- **ImportedBooks** (ImportedBooks.cs) - Tracks which books were imported in session
63-
- **ImportStyleProxy** (ImportStyleProxy.cs) - Style mapping and proxy creation
64-
- **ScrAnnotationInfo** (ScrAnnotationInfo.cs) - Scripture annotation metadata
65-
- **ScrObjWrapper** (ScrObjWrapper.cs) - Wraps LCModel Scripture objects for comparison
66-
- **UndoImportManager** (UndoImportManager.cs) - Import rollback tracking
67-
- **ReplaceInFilterFixer** (ReplaceInFilterFixer.cs) - Filter updates during import
68-
- **ParatextLoadException** (ParatextLoadException.cs) - Import-specific exceptions
69-
- **ParatextImportExtensions** (ParatextImportExtensions.cs) - Extension methods for import
31+
- **ParatextImportManager**: Central coordinator, ImportParatext() entry point, manages UndoImportManager
32+
- **BookMerger/Cluster/Difference**: Detects differences, groups for review, represents individual changes
33+
- **ISCScriptureText interfaces**: Abstracts Paratext SDK access (ISCTextSegment, ISCTextEnum, IBookVersionAgent)
34+
- **Support classes**: ImportedBooks, ImportStyleProxy, ScrObjWrapper, UndoImportManager
7035

7136
## Technology Stack
72-
- **Language**: C#
73-
- **Target framework**: .NET Framework 4.8.x (net48)
74-
- **Key libraries**:
75-
- LCModel (Scripture data model, LcmCache)
76-
- LCModel.Core (IScrBook, IScrSection, ITsString)
77-
- Common/Controls (UI dialogs, progress indicators)
78-
- Common/FwUtils (IApp, utilities)
79-
- Common/RootSites (UI integration)
80-
- SIL.Reporting (logging)
81-
- **External integration**: Paratext SDK (wrapped via ISCScriptureText interfaces)
82-
- **Resource files**: .resx for localized strings
37+
C# (net48). Key libraries: LCModel, LCModel.Core, Common/Controls, Paratext SDK (wrapped via ISCScriptureText interfaces).
8338

8439
## Dependencies
85-
- **Upstream**: LCModel.Core (Scripture, Text, KernelInterfaces), LCModel (cache, domain services, infrastructure), Common/Controls (UI), Common/FwUtils (utilities, IApp), Common/RootSites (UI integration), SIL.Reporting (logging)
86-
- **Downstream consumers**: xWorks (import commands), LexText applications (Scripture import), Common/ScriptureUtils (ParatextHelper coordination)
87-
- **External**: Paratext SDK (not bundled - USFM/project access via wrappers)
40+
**Upstream**: LCModel, Common/Controls, Paratext SDK
41+
**Downstream**: xWorks, LexText applications, Common/ScriptureUtils
8842

8943
## Interop & Contracts
9044
- **Paratext SDK abstraction**: ISCScriptureText, ISCTextSegment, ISCTextEnum interfaces
@@ -136,38 +90,7 @@ ParatextImportManager.ImportParatext() called via reflection from File→Import
13690
- **Coverage**: USFM parsing, difference detection, merge logic, style handling, undo tracking
13791

13892
## Usage Hints
139-
- **Typical import workflow**:
140-
1. Ensure Paratext project exists and is accessible
141-
2. In FLEx: File→Import→Paratext Project
142-
3. Select project and books to import
143-
4. Review detected differences (additions, changes, deletions)
144-
5. Resolve conflicts (choose Paratext version, FLEx version, or manual merge)
145-
6. Complete import (updates Scripture data in LCModel)
146-
- **Difference types**: 33+ types categorized for review
147-
- Additions: SectionHeadAddedToCurrent, VersesAddedToCurrent
148-
- Deletions: SectionHeadMissingInCurrent, VersesMissingInCurrent
149-
- Changes: TextDifference, VerseNumberDifference
150-
- Moves: VerseMoved, SectionHeadMoved
151-
- **Cluster grouping**: Related differences grouped for efficient review
152-
- AddedVerses cluster: All added verses in a range
153-
- MissingVerses cluster: All missing verses in a range
154-
- OrphanedVerses cluster: Verses without clear correlation
155-
- **Undo/rollback**: Import wrapped in single UndoTask
156-
- Edit→Undo after import rolls back all changes atomically
157-
- **Performance tips**:
158-
- Import large books (Psalms, Isaiah) in smaller batches if slow
159-
- Review differences carefully; auto-merge can have unexpected results
160-
- Use "Accept all" cautiously; review conflicts manually
161-
- **Common pitfalls**:
162-
- Paratext project not accessible: Verify Paratext installation and permissions
163-
- Style mapping errors: Ensure FW styles exist for USFM markers
164-
- Merge conflicts: Manual resolution required for ambiguous changes
165-
- Large imports: Can take minutes for books with heavy edits
166-
- **Debugging tips**:
167-
- Enable logging (SIL.Reporting) for detailed difference detection traces
168-
- Use ParatextImportNoUi tests for reproducing issues without UI
169-
- Mock ISCScriptureText for testing without Paratext SDK
170-
- **Extension points**: Implement ISCScriptureText for custom scripture sources
93+
File→Import→Paratext Project, select books, review 33+ difference types (additions/deletions/changes/moves), resolve conflicts, complete import. Import wrapped in single UndoTask for rollback.
17194

17295
## Related Folders
17396
- **Common/ScriptureUtils/**: Paratext integration

Src/UnicodeCharEditor/COPILOT.md

Lines changed: 8 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -28,60 +28,17 @@ C# WinForms application (net48, WinExe) with 16 source files (~4.1K lines). Sing
2828
Workflow: User edits PUA characters → saves to CustomChars.xml → installs to ICU data files → FieldWorks apps use updated character properties for normalization/display.
2929

3030
## Key Components
31-
32-
### Main Application
33-
- **Program** (Program.cs) - Entry point with command-line parsing
34-
- `-i, --install` switch - Install CustomChars.xml data to ICU folder without GUI
35-
- `-l, --log` switch - Enable logging to file
36-
- `-v, --verbose` switch - Enable verbose logging
37-
- `-c, --cleanup <processId>` - Clean up locked ICU files (background process)
38-
- Uses CommandLineParser library for argument handling
39-
40-
### Character Editor UI
41-
- **CharEditorWindow** (CharEditorWindow.cs) - Main form implementing IHelpTopicProvider
42-
- `m_dictCustomChars` - Dictionary<int, PUACharacter> for user overrides from CustomChars.xml
43-
- `m_dictModifiedChars` - Dictionary<int, PUACharacter> for standard Unicode overrides from UnicodeDataOverrides.txt
44-
- **PuaListItem** nested class - ListView items with hex code sorting
45-
- **PuaListItemComparer** - Sorts by Unicode codepoint value
46-
- `ReadDataFromUnicodeFiles()` - Loads Unicode base data
47-
- `ReadCustomCharData()` - Loads CustomChars.xml
48-
- `WriteCustomCharData()` - Saves modifications to CustomChars.xml
49-
- **CustomCharDlg** (CustomCharDlg.cs) - Dialog for editing individual character properties
50-
51-
### ICU Data Installation
52-
- **PUAInstaller** (PUAInstaller.cs) - Installs CustomChars.xml into ICU data files
53-
- `Install(string icuDir, string customCharsFile)` - Main installation method
54-
- **UndoFiles** struct - Tracks backup files for rollback
55-
- Handles file locking via cleanup child process spawning
56-
- Modifies ICU's UnicodeData.txt, nfkc.txt, nfc.txt files
57-
58-
### Supporting Infrastructure
59-
- **LogFile** (LogFile.cs) - File-based logging with `IsLogging`, `IsVerbose` properties
60-
- **IcuLockedException** (IcuLockedException.cs) - Exception for ICU file access failures
61-
- **UceException**, **PuaException** (UceException.cs, PuaException.cs) - Application-specific exceptions
62-
- **ErrorCodes** enum (ErrorCodes.cs) - Application error code enumeration
63-
- **IcuErrorCodes** enum (IcuErrorCodes.cs) - ICU-specific error codes
64-
- **ErrorCodesExtensionMethods** - Extension methods for error code handling
31+
- **Program**: Entry point with command-line parsing (-i install, -l log, -v verbose, -c cleanup)
32+
- **CharEditorWindow/CustomCharDlg**: Main form and character editor dialog for PUA character management
33+
- **PUAInstaller**: Installs CustomChars.xml into ICU data files (UnicodeData.txt, nfkc.txt, nfc.txt)
34+
- **LogFile, exceptions**: Infrastructure for logging and error handling
6535

6636
## Technology Stack
67-
- **Language**: C#
68-
- **Target framework**: .NET Framework 4.8.x (net48)
69-
- **Application type**: WinExe (Windows GUI application with command-line support)
70-
- **UI framework**: System.Windows.Forms (WinForms)
71-
- **Key libraries**:
72-
- LCModel.Core.Text (PUACharacter class, Unicode utilities)
73-
- Common/FwUtils (FwRegistryHelper, IHelpTopicProvider, MessageBoxUtils)
74-
- SIL.Utils
75-
- CommandLineParser (NuGet package for command-line parsing)
76-
- System.Windows.Forms (WinForms controls)
77-
- **External data files**: ICU UnicodeData.txt, nfkc.txt, nfc.txt (Unicode normalization data)
78-
- **User data**: CustomChars.xml (stored in local settings folder)
79-
- **Platform**: Windows-only (file system paths, registry access)
37+
C# WinForms (net48, WinExe). Key libraries: LCModel.Core.Text (PUACharacter), Common/FwUtils, CommandLineParser. External data: ICU UnicodeData.txt, CustomChars.xml.
8038

8139
## Dependencies
82-
- **Upstream**: LCModel.Core.Text (PUACharacter, Unicode utilities), Common/FwUtils (FwRegistryHelper, IHelpTopicProvider, MessageBoxUtils), SIL.Utils, CommandLineParser (NuGet), System.Windows.Forms
83-
- **Downstream consumers**: All FieldWorks applications that use ICU for Unicode normalization and character properties
84-
- **External data**: ICU data folder (UnicodeData.txt, nfkc.txt, nfc.txt), CustomChars.xml (user data in local settings)
40+
**Upstream**: LCModel.Core.Text, Common/FwUtils, CommandLineParser
41+
**Downstream**: All FieldWorks applications (via ICU Unicode normalization)
8542

8643
## Interop & Contracts
8744
- **ICU data file modification**: PUAInstaller modifies ICU text files
@@ -140,39 +97,7 @@ GUI mode: `UnicodeCharEditor.exe`. Command-line: `--install` (headless), `--log
14097
- **Test data**: Sample CustomChars.xml files for various scenarios
14198

14299
## Usage Hints
143-
- **Typical workflow**:
144-
1. Launch: Tools→Unicode Character Editor in FLEx (or standalone UnicodeCharEditor.exe)
145-
2. Add PUA character: Click "Add", enter codepoint (e.g., E000 for U+E000)
146-
3. Set properties: General category, combining class, decomposition, name
147-
4. Save: File→Save (writes CustomChars.xml)
148-
5. Install: File→Install (modifies ICU data files)
149-
6. Restart FLEx to use updated character properties
150-
- **Private Use Area ranges**:
151-
- U+E000–U+F8FF: BMP Private Use Area (main range for custom characters)
152-
- U+F0000–U+FFFFD, U+100000–U+10FFFD: Supplementary planes (less common)
153-
- **Common properties**:
154-
- **General Category**: Lo (Other Letter) for linguistic symbols
155-
- **Combining Class**: 0 (base), 1-254 (combining marks), 255 (special)
156-
- **Decomposition**: Optional canonical or compatibility decomposition
157-
- **Name**: Descriptive name for the character
158-
- **Command-line installation**:
159-
```cmd
160-
UnicodeCharEditor.exe --install --log
161-
```
162-
- Installs without GUI, logs to UnicodeCharEditor.log
163-
- **Troubleshooting**:
164-
- **ICU files locked**: Close all FLEx instances, retry installation
165-
- **Changes not applied**: Restart FLEx after installation
166-
- **CustomChars.xml not found**: Save at least once to create file
167-
- **Common pitfalls**:
168-
- Forgetting to install after editing (changes only saved to XML, not ICU)
169-
- Not restarting FLEx (ICU data loaded at startup)
170-
- Using non-PUA codepoints (can break Unicode compliance)
171-
- Invalid decomposition (must reference valid Unicode codepoints)
172-
- **Advanced usage**:
173-
- UnicodeDataOverrides.txt: Override standard Unicode properties (expert users only)
174-
- Batch editing: Edit CustomChars.xml directly, run --install
175-
- **Backup**: CustomChars.xml backed up automatically before installation
100+
Launch via Tools→Unicode Character Editor, add PUA characters (U+E000–U+F8FF), set properties, save to CustomChars.xml, install to ICU data files, restart FLEx. Command-line: `UnicodeCharEditor.exe --install --log`.
176101

177102
## Related Folders
178103
- **LCModel.Core/**: PUACharacter class

copilot_structure_report.txt

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -652,23 +652,23 @@ Src/LexText/Morphology/COPILOT.md
652652
... and 7 more
653653

654654
Src/LexText/ParserCore/COPILOT.md
655-
Lines: 186
656-
Headings: 27
655+
Lines: 125
656+
Headings: 21
657657
Type: Leaf
658-
Status: Leaf: 186 lines with 6 verbose sections (may need condensing)
659-
Condensed:
658+
Status: Leaf: 125 lines (likely condensed)
659+
Condensed:
660660
Sections:
661661
## Change Log (auto)
662662
# ParserCore
663663
## Purpose
664664
## Architecture
665665
## Key Components
666-
### Parser Infrastructure
667-
### Parser Implementations
668-
### Model Change Detection
669-
### Data Structures
670-
### XAmple Support (Legacy)
671-
... and 17 more
666+
## Technology Stack
667+
## Dependencies
668+
## Interop & Contracts
669+
## Threading & Performance
670+
## Config & Feature Flags
671+
... and 11 more
672672

673673
Src/LexText/ParserUI/COPILOT.md
674674
Lines: 118
@@ -785,23 +785,23 @@ Src/Paratext8Plugin/COPILOT.md
785785
... and 11 more
786786

787787
Src/ParatextImport/COPILOT.md
788-
Lines: 154
789-
Headings: 21
788+
Lines: 81
789+
Headings: 17
790790
Type: Leaf
791-
Status: Leaf: 154 lines with 6 verbose sections (may need condensing)
792-
Condensed:
791+
Status: Leaf: 81 lines (likely condensed)
792+
Condensed:
793793
Sections:
794794
## Change Log (auto)
795795
# ParatextImport
796796
## Purpose
797797
## Architecture
798798
## Key Components
799-
### Import Management
800-
### Difference Detection and Merging
801-
### Wrapper Interfaces (Legacy Adaptation)
802-
### Support Classes
803799
## Technology Stack
804-
... and 11 more
800+
## Dependencies
801+
## Interop & Contracts
802+
## Threading & Performance
803+
## Config & Feature Flags
804+
... and 7 more
805805

806806
Src/ProjectUnpacker/COPILOT.md
807807
Lines: 83
@@ -842,23 +842,23 @@ Src/Transforms/COPILOT.md
842842
... and 9 more
843843

844844
Src/UnicodeCharEditor/COPILOT.md
845-
Lines: 158
846-
Headings: 21
845+
Lines: 87
846+
Headings: 17
847847
Type: Leaf
848-
Status: Leaf: 158 lines with 6 verbose sections (may need condensing)
849-
Condensed:
848+
Status: Leaf: 87 lines (likely condensed)
849+
Condensed:
850850
Sections:
851851
## Change Log (auto)
852852
# UnicodeCharEditor
853853
## Purpose
854854
## Architecture
855855
## Key Components
856-
### Main Application
857-
### Character Editor UI
858-
### ICU Data Installation
859-
### Supporting Infrastructure
860856
## Technology Stack
861-
... and 11 more
857+
## Dependencies
858+
## Interop & Contracts
859+
## Threading & Performance
860+
## Config & Feature Flags
861+
... and 7 more
862862

863863
Src/Utilities/COPILOT.md
864864
Lines: 34

0 commit comments

Comments
 (0)