Skip to content

Commit e492673

Browse files
CopilotMrHinsh
andcommitted
Add documentation synchronization requirements to Copilot instructions
Co-authored-by: MrHinsh <[email protected]>
1 parent 9d1b10d commit e492673

File tree

1 file changed

+56
-1
lines changed

1 file changed

+56
-1
lines changed

.github/copilot-instructions.md

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,4 +225,59 @@ Available templates for `init` command:
225225
- `PipelineProcessor` - Pipeline migration setup
226226
- `Reference` - Complete feature set with all options
227227

228-
**Copilot Agent Notes:** When suggesting code modifications, consider whether TFS Object Model or REST API patterns are more appropriate. REST API patterns are preferred for new development and cross-platform scenarios, while TFS Object Model may be necessary for specific legacy TFS compatibility requirements.
228+
**Copilot Agent Notes:** When suggesting code modifications, consider whether TFS Object Model or REST API patterns are more appropriate. REST API patterns are preferred for new development and cross-platform scenarios, while TFS Object Model may be necessary for specific legacy TFS compatibility requirements.
229+
230+
## Documentation Synchronization Requirements
231+
232+
### Critical: Keep Documentation in Sync with Code Changes
233+
234+
When modifying any option classes or configuration-related classes, the documentation must be updated to reflect the current code state:
235+
236+
**Classes Requiring Documentation Updates:**
237+
- `IProcessorOptions` implementations (processors configuration)
238+
- `IToolOptions` implementations (tools configuration)
239+
- `IFieldMapOptions` implementations (field mapping configuration)
240+
- `IProcessorEnricherOptions` implementations (processor enrichers configuration)
241+
- `IEndpointOptions` implementations (endpoint configuration)
242+
- `IEndpointEnricherOptions` implementations (endpoint enrichers configuration)
243+
244+
**Required Steps When Editing These Classes:**
245+
246+
1. **Update XML Documentation Comments:** Ensure all public properties have accurate `<summary>` and `<default>` XML documentation comments that reflect current behavior and default values.
247+
248+
2. **Regenerate Documentation:** Run the `MigrationTools.ConsoleDataGenerator` to regenerate YAML data files and Markdown documentation:
249+
```bash
250+
cd src/MigrationTools.ConsoleDataGenerator
251+
dotnet run
252+
```
253+
254+
3. **Verify Configuration Samples:** Check that generated YAML files in `/docs/_data/` contain configuration samples that match the actual class properties:
255+
- Property names must match exactly
256+
- Default values must be current
257+
- All required properties must be present
258+
- Deprecated properties should be removed
259+
260+
4. **Validate Documentation Pages:** Ensure that any code samples in `/docs/Reference/` markdown files reflect the current class structure and property names.
261+
262+
5. **Cross-Reference Class Data:** Verify that the documentation accurately represents what is actually in the code by comparing:
263+
- Property types and names in the class vs. documentation
264+
- Default values in code vs. samples
265+
- Required vs. optional properties
266+
- XML comments vs. generated descriptions
267+
268+
**Documentation Generation Process:**
269+
The `ConsoleDataGenerator` uses reflection to discover types and generates:
270+
- YAML data files in `/docs/_data/` (e.g., `reference.processors.*.yaml`)
271+
- Markdown documentation in `/docs/Reference/Generated/`
272+
- Configuration samples that include all properties with their current default values
273+
274+
**Validation Checklist:**
275+
- [ ] XML documentation comments updated for all modified properties
276+
- [ ] ConsoleDataGenerator executed successfully
277+
- [ ] Generated YAML samples match actual class properties
278+
- [ ] Property types and default values are accurate in documentation
279+
- [ ] No orphaned or outdated property references in samples
280+
- [ ] Markdown documentation reflects current class capabilities
281+
282+
**Why This Matters:**
283+
Users rely on the generated documentation and configuration samples to understand how to configure the migration tools. Outdated documentation leads to configuration errors and user frustration. The reflection-based documentation generation ensures accuracy, but only when the source code contains current and complete XML documentation comments.

0 commit comments

Comments
 (0)