Commit 2807543
committed
0bd9547 docs: [#339] add draft issue for AI dataset freshness verification (Jose Celano)
fa12000 refactor: [#339] improve validation test module with ProcessRunner and helper functions (Jose Celano)
0938563 fix: [#339] complete dataset/ directory path updates (Jose Celano)
f3a41a1 test: [#339] add render validation test for AI training examples (Jose Celano)
313e265 refactor: [#339] organize AI training materials under dataset/ directory (Jose Celano)
991d697 refactor: [#339] rename directories for better clarity (Jose Celano)
e25a82c feat: [#339] add AI training outputs with complete input/output dataset (Jose Celano)
bbbd642 docs: [#339] mark task 11.3 as completed in roadmap (Jose Celano)
e8df992 docs: [#339] update progress - all phases complete (Jose Celano)
c4a91c0 feat: [#339] add integration test for AI training examples (Jose Celano)
cb77e8f feat: [#339] add comprehensive AI training documentation (Jose Celano)
fecfcbf feat: [#339] add 15 example environment configurations (Jose Celano)
60734cd feat: [#339] add environment configuration questionnaire for AI agents (Jose Celano)
2e22521 feat: [#339] add optional description field to EnvironmentSection (Jose Celano)
c4ad07d docs: mark task 10.3 (DNS resolution check) as completed in roadmap (Jose Celano)
Pull request description:
## Overview
This PR implements Issue #339, providing structured resources to help AI agents guide users through environment configuration creation.
## Implementation Summary
All 6 phases completed:
### Phase 1: Schema Extension ✅
- Added optional `description` field to environment configuration schema
- Updated JSON schema (`schemas/environment-config.json`)
- Updated Rust DTO (`src/application/command_handlers/create/config/environment_config.rs`)
- Maintained backward compatibility (configs without description still work)
### Phase 2: Questionnaire Template ✅
- Created comprehensive questionnaire at `docs/ai-training/questionnaire.md` (494 lines)
- Full decision tree covering all configuration requirements
- Includes validation rules and conditional logic
### Phase 3-4: Example Configurations ✅
- Created all 15 example scenarios covering common deployment patterns
- All examples validated with `cargo run -- validate --env-file`
- Each example includes descriptive explanation (2-3 sentences)
- Examples use fixture keys only (no sensitive data)
### Phase 5: Documentation ✅
- Created comprehensive README at `docs/ai-training/README.md` (469 lines)
- Includes scenarios table, usage instructions, customization guide
- Documents common decision points and best practices
### Phase 6: Integration Test ✅
- Created integration test at `tests/validate_ai_training_examples.rs`
- 4 test functions validating all aspects:
- Configuration validation (all 15 examples)
- File count verification (exactly 15 examples)
- Naming convention enforcement (NN-descriptive-name.json pattern)
- Description field presence validation
- Added regex dependency for pattern matching
- All linters passing
## Example Scenarios Coverage
| ID | Scenario | Provider | Database | Trackers | HTTPS | Monitoring | Backup |
| --- | ----------------------- | -------- | -------- | -------- | ----- | ---------- | ------ |
| 01 | Minimal development | LXD | SQLite | UDP+HTTP | No | No | No |
| 02 | Full-stack LXD | LXD | MySQL | 2U+2H | Yes | Yes | Yes |
| 03 | Minimal Hetzner | Hetzner | SQLite | UDP+HTTP | No | No | No |
| 04 | Full-stack Hetzner | Hetzner | MySQL | 2U+2H | Yes | Yes | Yes |
| ... | (11 more scenarios) | ... | ... | ... | ... | ... | ... |
## Benefits
**For AI Agents:**
- Structured guidance through questionnaire
- Few-shot learning from validated examples
- Reduced hallucination with real configs as reference
- Faster iteration with less trial-and-error
**For Users:**
- Examples serve as documentation and starting points
- Clear mapping from requirements to configuration values
- Understanding of common deployment patterns
**For Training/RAG:**
- Curated dataset with high-quality examples
- Coverage of common and edge cases
- Machine-readable JSON format
- Versioned with deployer releases
## Testing
- ✅ All linters pass: `cargo run --bin linter all`
- ✅ All examples validated: `cargo run -- validate --env-file`
- ✅ Integration tests pass: `cargo test --test validate_ai_training_examples`
- ✅ Pre-commit checks pass: `./scripts/pre-commit.sh`
## Files Changed
- `schemas/environment-config.json` - Added description field
- `src/application/command_handlers/create/config/environment_config.rs` - EnvironmentSection with description
- `docs/ai-training/questionnaire.md` - Decision tree questionnaire (494 lines)
- `docs/ai-training/examples/*.json` - 15 validated example configurations
- `docs/ai-training/README.md` - Comprehensive documentation (469 lines)
- `tests/validate_ai_training_examples.rs` - Integration test suite
- `Cargo.toml` - Added regex dev-dependency
- `docs/issues/339-provide-config-examples-and-questionnaire-for-ai-agents.md` - Updated progress
- `docs/roadmap.md` - Marked task 11.3 as completed
## Acceptance Criteria
All criteria met:
- [x] Optional description field added and validated
- [x] Backward compatibility maintained
- [x] Questionnaire template created
- [x] All 15 examples created with descriptions
- [x] Each example validated
- [x] README with scenarios table and guidance
- [x] Integration test created and passing
- [x] All linters passing
- [x] Examples use fixture keys only
Closes #339
ACKs for top commit:
josecelano:
ACK 0bd9547
Tree-SHA512: d006c8c6afe77350593103520ca0f22b506ad563e2d55fb987fbacbc0fd2d5ce2de7a7e15a63650c7a669d43dcaaa86dde13b2b1026deb9eb52a61b96503ad51
528 files changed
Lines changed: 78699 additions & 78 deletions
File tree
- docs
- ai-training
- dataset
- environment-configs
- rendered-templates
- 01-minimal-lxd
- ansible
- docker-compose
- grafana/provisioning
- dashboards
- torrust
- datasources
- prometheus
- tofu/lxd
- tracker
- 02-full-stack-lxd
- ansible
- docker-compose
- grafana/provisioning
- dashboards
- torrust
- datasources
- prometheus
- tofu/lxd
- tracker
- 03-minimal-hetzner
- ansible
- docker-compose
- grafana/provisioning
- dashboards
- torrust
- datasources
- prometheus
- tofu/hetzner
- tracker
- 04-full-stack-hetzner
- ansible
- docker-compose
- grafana/provisioning
- dashboards
- torrust
- datasources
- prometheus
- tofu/hetzner
- tracker
- 05-mysql-development
- ansible
- docker-compose
- grafana/provisioning
- dashboards
- torrust
- datasources
- prometheus
- tofu/lxd
- tracker
- 06-production-https
- ansible
- docker-compose
- grafana/provisioning
- dashboards
- torrust
- datasources
- prometheus
- tofu/lxd
- tracker
- 07-udp-only
- ansible
- docker-compose
- grafana/provisioning
- dashboards
- torrust
- datasources
- prometheus
- tofu/lxd
- tracker
- 08-http-only-https
- ansible
- docker-compose
- grafana/provisioning
- dashboards
- torrust
- datasources
- prometheus
- tofu/lxd
- tracker
- 09-monitoring-stack
- ansible
- docker-compose
- grafana/provisioning
- dashboards
- torrust
- datasources
- prometheus
- tofu/lxd
- tracker
- 10-multi-domain
- ansible
- docker-compose
- grafana/provisioning
- dashboards
- torrust
- datasources
- prometheus
- tofu/lxd
- tracker
- 11-private-tracker
- ansible
- docker-compose
- grafana/provisioning
- dashboards
- torrust
- datasources
- prometheus
- tofu/lxd
- tracker
- 12-high-availability
- ansible
- docker-compose
- grafana/provisioning
- dashboards
- torrust
- datasources
- prometheus
- tofu/hetzner
- tracker
- 13-backup-focused
- ansible
- docker-compose
- grafana/provisioning
- dashboards
- torrust
- datasources
- prometheus
- tofu/lxd
- tracker
- 14-lightweight-production
- ansible
- docker-compose
- grafana/provisioning
- dashboards
- torrust
- datasources
- prometheus
- tofu/hetzner
- tracker
- 15-sqlite-monitoring
- ansible
- docker-compose
- grafana/provisioning
- dashboards
- torrust
- datasources
- prometheus
- tofu/lxd
- tracker
- issues
- drafts
- schemas
- scripts
- src
- application/command_handlers/create
- config
- tests
- testing/e2e/tasks
- tests
- support
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
0 commit comments