Skip to content

Commit 4447c5f

Browse files
committed
📝 docs: add copilot instructions and update config wizard readme
- Create `copilot-instructions.md` for Hugo site documentation. - Update `CONFIG_WIZARD_README.md` with detailed design constraints and user/technical features. - Improve documentation with structured content and detailed examples. 🔧 chore: restructure and clean documentation files - Move `CONFIG_WIZARD_README.md` to `_site-docs` folder. - Delete `class-options.html` shortcode file from partials directory. - Create empty `copilot-instructions.md` and `.vscode/copilot-instructions.md` files.
1 parent 918aa75 commit 4447c5f

File tree

4 files changed

+232
-104
lines changed

4 files changed

+232
-104
lines changed

.vscode/copilot-instructions.md

Whitespace-only changes.

docs/CONFIG_WIZARD_README.md renamed to docs/_site-docs/CONFIG_WIZARD_README.md

Lines changed: 106 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,48 @@
11
# Interactive Configuration Tool Implementation
22

3+
## Design Constraints
4+
5+
### 🎯 **Migration Type Architecture**
6+
7+
The wizard is built around three primary migration types with specific endpoint and processor constraints:
8+
9+
#### **1. WorkItems Migration**
10+
11+
- **Required Endpoint**: `TfsWorkItemEndpoint`
12+
- **Required Processor**: `TfsWorkItemMigrationProcessor`
13+
- **Behavior**: Endpoint and processor are locked/pre-selected. Only processor options are configurable.
14+
- **Use Case**: Standard work item migration between Azure DevOps organizations or TFS instances.
15+
16+
#### **2. Pipelines Migration**
17+
18+
- **Required Endpoint**: `AzureDevOpsEndpoint`
19+
- **Required Processor**: `AzureDevOpsPipelineProcessor`
20+
- **Behavior**: Endpoint and processor are locked/pre-selected. Only processor options are configurable.
21+
- **Use Case**: Migration of build and release pipelines between Azure DevOps organizations.
22+
23+
#### **3. Custom Migration**
24+
25+
- **Endpoints**: User can add multiple named endpoints of any valid type
26+
- **Processors**: User can select any number of processors with full configuration flexibility
27+
- **Behavior**: Complete freedom to configure complex migration scenarios
28+
- **Constraints**: Type validation ensures only compatible named endpoints are available for each processor type
29+
- **Use Case**: Advanced scenarios requiring multiple processors, custom field mapping, or specialized migration patterns.
30+
31+
### 🔧 **Processor Configuration Behavior**
32+
33+
#### **Constrained Modes (WorkItems & Pipelines)**
34+
35+
- Processor selection is **locked** based on migration type
36+
- Only processor-specific **options** are editable (e.g., WIQL queries, field mappings, performance settings)
37+
- Simplified UI focuses on configuration rather than selection
38+
39+
#### **Custom Mode**
40+
41+
- **Full processor selection**: Choose from all available processors
42+
- **Multiple processor support**: Add/remove processors as needed
43+
- **Named endpoint association**: Each processor can reference named endpoints by name
44+
- **Type validation**: Only compatible endpoints appear in dropdown for each processor
45+
346
## Overview
447

548
This implementation provides a **comprehensive interactive configuration wizard** for the Azure DevOps Migration Tools. The wizard guides users through a step-by-step process to build their migration configuration without requiring deep knowledge of the underlying JSON structure.
@@ -17,22 +60,24 @@ This implementation provides a **comprehensive interactive configuration wizard*
1760
### 🚀 **Key Features Implemented**
1861

1962
#### **Multi-Step Wizard Flow**
20-
```
63+
64+
```text
2165
Step 1: Migration Type Selection
22-
├── Work Items Only
23-
├── Work Items + Test Plans
24-
├── Work Items + Pipelines
25-
└── Full Migration
66+
├── WorkItems (TfsWorkItemEndpoint + TfsWorkItemMigrationProcessor)
67+
├── Pipelines (AzureDevOpsEndpoint + AzureDevOpsPipelineProcessor)
68+
└── Custom (User-defined endpoints and processors)
2669
27-
Step 2: Source & Target Endpoints
28-
├── Organization URLs
70+
Step 2: Endpoint Configuration
71+
├── Pre-configured endpoints (WorkItems/Pipelines modes)
72+
├── Named endpoint creation (Custom mode)
2973
├── Authentication (PAT tokens)
30-
└── Project names
74+
└── Connection validation
3175
32-
Step 3: Processor Selection
33-
├── Required processors (auto-selected)
34-
├── Optional processors (user choice)
35-
└── Processor-specific configuration
76+
Step 3: Processor Configuration
77+
├── Locked processor options (WorkItems/Pipelines modes)
78+
├── Processor selection and addition (Custom mode)
79+
├── Processor-specific configuration
80+
└── Named endpoint assignment per processor
3681
3782
Step 4: Field Mapping Strategy
3883
├── Automatic mapping
@@ -51,6 +96,7 @@ Step 6: Review & Export
5196
```
5297

5398
#### **User Experience Features**
99+
54100
- **Visual Progress Indicator**: Shows completion percentage and current step
55101
- **Step Navigation**: Previous/Next buttons with validation
56102
- **Smart Selections**: Migration type determines available processors
@@ -60,6 +106,7 @@ Step 6: Review & Export
60106
- **Dark/Light Theme Support**: Integrates with existing theme system
61107

62108
#### **Technical Features**
109+
63110
- **Hugo Integration**: Leverages existing YAML data files
64111
- **Client-side Processing**: No server-side dependencies
65112
- **Security Conscious**: Credentials only used for config generation
@@ -69,6 +116,7 @@ Step 6: Review & Export
69116
## Implementation Details
70117

71118
### **File Structure**
119+
72120
```
73121
docs/
74122
├── content/docs/config-wizard.md # Wizard page content
@@ -78,13 +126,16 @@ docs/
78126
```
79127

80128
### **Data Integration**
129+
81130
The wizard dynamically loads configuration data from the existing YAML files:
131+
82132
- `reference.processors.*.yaml` - Processor configurations
83-
- `reference.endpoints.*.yaml` - Endpoint options
133+
- `reference.endpoints.*.yaml` - Endpoint options
84134
- `reference.fieldmaps.*.yaml` - Field mapping options
85135
- `reference.tools.*.yaml` - Tool configurations
86136

87137
### **Technology Stack**
138+
88139
- **Frontend**: Vanilla JavaScript (ES6+), HTML5, CSS3
89140
- **Styling**: Bootstrap 5.3.6, Custom CSS with CSS Variables
90141
- **Icons**: Font Awesome 6
@@ -94,31 +145,36 @@ The wizard dynamically loads configuration data from the existing YAML files:
94145
## Usage Examples
95146

96147
### **For Beginners**
148+
97149
1. Visit `/docs/config-wizard/`
98-
2. Select "Work Items Only" migration type
99-
3. Enter source and target organization URLs
100-
4. Accept default processor selections
150+
2. Select "WorkItems" migration type
151+
3. Configure TfsWorkItemEndpoint with source and target organization URLs
152+
4. Accept default TfsWorkItemMigrationProcessor settings
101153
5. Choose "Automatic Mapping" for field mapping
102154
6. Use default advanced settings
103155
7. Download generated `configuration.json`
104156

105-
### **For Advanced Users**
106-
1. Select "Full Migration" for comprehensive setup
107-
2. Configure multiple processors with custom settings
108-
3. Define manual field mapping strategies
109-
4. Tune performance and error handling parameters
110-
5. Generate complex configurations with custom WIQL queries
157+
### **For Advanced Users**
158+
159+
1. Select "Custom" migration type for comprehensive setup
160+
2. Add multiple named endpoints (TfsWorkItemEndpoint, AzureDevOpsEndpoint, etc.)
161+
3. Configure multiple processors with custom settings
162+
4. Define manual field mapping strategies
163+
5. Tune performance and error handling parameters
164+
6. Generate complex configurations with custom WIQL queries and processor combinations
111165

112166
## Benefits
113167

114168
### **User Benefits**
169+
115170
- **Reduced Learning Curve**: No need to understand complex JSON structure
116171
- **Faster Setup**: 5-10 minutes vs hours of manual configuration
117172
- **Error Prevention**: Validation prevents common configuration mistakes
118173
- **Educational**: Learn about available options through guided explanations
119174
- **Confidence Building**: Visual progress and validation provide reassurance
120175

121176
### **Project Benefits**
177+
122178
- **Lower Support Burden**: Fewer configuration-related support requests
123179
- **Better Adoption**: Easier onboarding leads to higher tool adoption
124180
- **Documentation Synergy**: Leverages existing documentation infrastructure
@@ -127,13 +183,15 @@ The wizard dynamically loads configuration data from the existing YAML files:
127183
## Future Enhancements
128184

129185
### **Phase 2 Features**
186+
130187
- **Configuration Templates**: Save and reuse common configurations
131188
- **Validation Engine**: Real-time connection testing
132189
- **WIQL Query Builder**: Visual query construction interface
133190
- **Batch Operations**: Configure multiple migration jobs
134191
- **Import/Export**: Load existing configurations for modification
135192

136193
### **Advanced Features**
194+
137195
- **Migration Scenarios**: Pre-built configurations for common patterns
138196
- **Performance Estimator**: Predict migration time based on data size
139197
- **Dependency Checker**: Validate prerequisites and permissions
@@ -146,41 +204,58 @@ The wizard dynamically loads configuration data from the existing YAML files:
146204
Based on this implementation, here's the recommended approach for similar tools:
147205

148206
#### **1. Data Architecture**
207+
149208
```javascript
150209
// Leverage existing structured data
151210
const configData = {
152211
processors: loadFromYAML(),
153-
endpoints: loadFromYAML(),
212+
endpoints: loadFromYAML(),
154213
fieldMaps: loadFromYAML(),
155-
templates: loadFromYAML()
214+
templates: loadFromYAML(),
156215
};
157216
```
158217

159218
#### **2. Progressive UI Design**
219+
160220
```javascript
161221
class ConfigWizard {
162222
constructor() {
163223
this.steps = [
164-
{ id: 'type', title: 'Choose Type', validator: this.validateType },
165-
{ id: 'endpoints', title: 'Configure Endpoints', validator: this.validateEndpoints },
224+
{ id: "type", title: "Choose Type", validator: this.validateType },
225+
{ id: "endpoints", title: "Configure Endpoints", validator: this.validateEndpoints },
166226
// ... more steps
167227
];
168228
}
169229
}
170230
```
171231

172232
#### **3. Smart Defaults System**
233+
173234
```javascript
174235
getProcessorsForType(migrationType) {
175236
const mapping = {
176-
'work-items-only': ['WorkItemMigration'],
177-
'full-migration': ['WorkItemMigration', 'TestPlans', 'Pipelines']
237+
'workitems': {
238+
processors: ['TfsWorkItemMigrationProcessor'],
239+
endpoints: ['TfsWorkItemEndpoint'],
240+
locked: true
241+
},
242+
'pipelines': {
243+
processors: ['AzureDevOpsPipelineProcessor'],
244+
endpoints: ['AzureDevOpsEndpoint'],
245+
locked: true
246+
},
247+
'custom': {
248+
processors: [], // User selectable
249+
endpoints: [], // User configurable
250+
locked: false
251+
}
178252
};
179-
return mapping[migrationType] || [];
253+
return mapping[migrationType] || { processors: [], endpoints: [], locked: false };
180254
}
181255
```
182256

183257
#### **4. Real-time Validation**
258+
184259
```javascript
185260
validateStep(stepData) {
186261
const validators = {
@@ -192,6 +267,7 @@ validateStep(stepData) {
192267
```
193268

194269
#### **5. Configuration Generation**
270+
195271
```javascript
196272
generateConfig() {
197273
return {
@@ -210,7 +286,7 @@ generateConfig() {
210286
The wizard integrates seamlessly with the existing documentation:
211287

212288
- **Navigation**: Linked from main docs page and getting started guide
213-
- **Styling**: Uses existing Bootstrap theme and color schemes
289+
- **Styling**: Uses existing Bootstrap theme and color schemes
214290
- **Data**: Leverages auto-generated YAML configuration data
215291
- **Comments**: Supports Giscus comments for user feedback
216292
- **Editing**: "Edit this page" links to GitHub for improvements

docs/copilot-instructions.md

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# Copilot Instructions for `docs` (Hugo Site for Azure DevOps Migration Tools)
2+
3+
## Purpose
4+
5+
This `docs` folder contains the Hugo static site for Azure DevOps Migration Tools documentation. The site is deployed to Azure Static Web Apps and relies on YAML/Markdown data generated by `src/MigrationTools.ConsoleDataGenerator`.
6+
7+
## Features
8+
9+
### Config wizard
10+
11+
This site includes a configuration wizard that guides users through setting up their migration configurations interactively.
12+
The wizard is designed to simplify the process of creating complex migration configurations by providing step-by-step instructions and examples.
13+
Its documentation is in [config-wizard.md](_site-docs/CONFIG_WIZARD_README.md).
14+
15+
- **Key Features**:
16+
- Interactive step-by-step configuration setup
17+
- Example configurations for common scenarios
18+
- Validation of user inputs against the schema
19+
20+
## Docs & Reference
21+
22+
The `docs\content\docs` directory contains the main documentation sections, including:
23+
24+
- **Getting Started**: Guides for new users to set up and use the migration tools.
25+
- **How-To Guides**: Step-by-step tutorials for common tasks.
26+
- **Reference Documentation**: Detailed information on configuration options, processors. Each page loads its data from YAML files in `docs/data/reference/`, and should be validated against the schema in `docs\static\schema`.
27+
- **Setup Guides**: Instructions for installing and configuring the tools.
28+
29+
## Key Patterns & Requirements
30+
31+
### 1. Hugo Site Structure
32+
33+
- Use [Hugo](https://gohugo.io/) v0.146+ conventions for content, layouts, and data.
34+
- **IMPORTANT**: This site uses Hugo's [new template system](https://gohugo.io/templates/new-templatesystem-overview/) (v0.146+) - ensure all template code follows the new patterns and syntax.
35+
- Content lives in `content/`, layouts in `layouts/`, static assets in `static/`, and data in `data/`.
36+
- All documentation pages should use Markdown with YAML front matter.
37+
- Use shortcodes and partials for reusable content blocks.
38+
- Follow the new template system's improved performance and syntax when creating layouts.
39+
40+
#### Folder Structure
41+
42+
```
43+
docs/
44+
├── _site-docs # Contains additional documentation about features in the site itself
45+
├── content/ # Documentation content (Markdown with YAML front matter)
46+
│ ├── docs/ # Main documentation sections
47+
│ │ ├── get-started/ # Getting started guides
48+
│ │ ├── how-to/ # How-to guides and tutorials
49+
│ │ ├── reference/ # Reference documentation
50+
│ │ ├── setup/ # Setup and installation guides
51+
│ │ ├── config-wizard.md # Configuration wizard page
52+
│ │ └── _index.md # Documentation section index
53+
│ ├── download/ # Download pages and resources
54+
│ ├── support/ # Support and community pages
55+
│ ├── schema/ # JSON schema documentation
56+
│ ├── 404.md # Custom 404 error page
57+
│ └── _index.md # Site homepage
58+
├── layouts/ # Hugo templates (HTML with Go templating - v0.146+ new system)
59+
│ ├── docs/ # Section-specific layouts for docs
60+
│ ├── _partials/ # Reusable template components (v0.146+ naming)
61+
│ │ ├── components/ # UI component partials
62+
│ │ ├── docs/ # Documentation-specific partials
63+
│ │ ├── functions/ # Template functions and utilities, they return HTML or data
64+
│ │ ├── JSON-LD/ # Structured data partials
65+
│ ├── _shortcodes/ # Custom Hugo shortcodes (v0.146+ naming)
66+
│ ├── _markup/ # Custom markup renderers
67+
│ ├── baseof.html # Base template for all pages
68+
│ ├── index.html # Homepage template
69+
│ ├── single.html # Single page template
70+
│ ├── list.html # List page template
71+
│ └── *.html # Other page-specific templates
72+
├── static/ # Static assets (images, CSS, JS, PDFs)
73+
│ ├── images/ # Documentation images and diagrams
74+
│ ├── css/ # Custom stylesheets
75+
│ └── js/ # JavaScript files
76+
├── data/ # Generated YAML/JSON data files
77+
│ ├── reference/ # Auto-generated reference docs
78+
│ └── samples/ # Configuration samples
79+
├── hugo.yaml # Main Hugo configuration
80+
├── hugo.local.yaml # Local development config
81+
├── hugo.preview.yaml # Preview environment config
82+
├── hugo.production.yaml # Production environment config
83+
├── hugo.canary.yaml # Canary deployment config
84+
└── .hugo_build.lock # Hugo build lock file
85+
```
86+
87+
### 2. Data-Driven Documentation
88+
89+
- Reference YAML data files in `/docs/_data/` generated by `MigrationTools.ConsoleDataGenerator` for configuration samples, processor options, and reference docs.
90+
- Do not manually edit files in `/docs/_data/`; always regenerate using the ConsoleDataGenerator after code changes.
91+
- Use Hugo's `data` templates to render configuration samples and reference tables from YAML.
92+
93+
### 3. Documentation Generation Workflow
94+
95+
- When processor/option classes change, run the ConsoleDataGenerator to update YAML and Markdown docs.
96+
- Validate that generated docs match the current codebase (see root copilot-instructions for checklist).
97+
- Use the `GenerateDocs.ps1` script at the repo root for consistent doc generation.
98+
99+
### 4. Azure Static Web Apps Deployment
100+
101+
- The Hugo site is deployed to Azure Static Web Apps.
102+
- Ensure all output is static and compatible with Azure SWA (no server-side code).
103+
- Use the `staticwebapp.config.json` for SWA routing and configuration.
104+
- Follow [Azure SWA best practices](https://learn.microsoft.com/azure/static-web-apps/) for performance and security.
105+
106+
### 5. Content & Style Guidelines
107+
108+
- Use clear, concise language and consistent formatting.
109+
- Prefer code samples and configuration snippets sourced from generated YAML.
110+
- Test all configuration samples against the schema documentation to ensure accuracy.
111+
- Keep navigation and sidebar structure in sync with generated reference docs.
112+
113+
### 6. Maintenance
114+
115+
- Regenerate docs after any code or configuration option changes.
116+
- Review generated Markdown and YAML for accuracy and completeness.
117+
- Keep this instruction file up to date with any changes to the documentation workflow or deployment process.
118+
119+
---
120+
121+
## References
122+
123+
- [Hugo Documentation](https://gohugo.io/documentation/)
124+
- [Azure Static Web Apps Docs](https://learn.microsoft.com/azure/static-web-apps/)
125+
- [MigrationTools.ConsoleDataGenerator](../../src/MigrationTools.ConsoleDataGenerator/)
126+
- [GenerateDocs.ps1](../../GenerateDocs.ps1)

0 commit comments

Comments
 (0)