javi-forge 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitignore.template +105 -0
- package/.releaserc +44 -0
- package/README.md +45 -0
- package/ai-config/.skillignore +15 -0
- package/ai-config/AUTO_INVOKE.md +300 -0
- package/ai-config/agents/_TEMPLATE.md +93 -0
- package/ai-config/agents/business/api-designer.md +1657 -0
- package/ai-config/agents/business/business-analyst.md +1331 -0
- package/ai-config/agents/business/product-strategist.md +206 -0
- package/ai-config/agents/business/project-manager.md +178 -0
- package/ai-config/agents/business/requirements-analyst.md +1277 -0
- package/ai-config/agents/business/technical-writer.md +1679 -0
- package/ai-config/agents/creative/ux-designer.md +205 -0
- package/ai-config/agents/data-ai/ai-engineer.md +487 -0
- package/ai-config/agents/data-ai/analytics-engineer.md +953 -0
- package/ai-config/agents/data-ai/data-engineer.md +173 -0
- package/ai-config/agents/data-ai/data-scientist.md +672 -0
- package/ai-config/agents/data-ai/mlops-engineer.md +814 -0
- package/ai-config/agents/data-ai/prompt-engineer.md +772 -0
- package/ai-config/agents/development/angular-expert.md +620 -0
- package/ai-config/agents/development/backend-architect.md +795 -0
- package/ai-config/agents/development/database-specialist.md +212 -0
- package/ai-config/agents/development/frontend-specialist.md +686 -0
- package/ai-config/agents/development/fullstack-engineer.md +668 -0
- package/ai-config/agents/development/golang-pro.md +338 -0
- package/ai-config/agents/development/java-enterprise.md +400 -0
- package/ai-config/agents/development/javascript-pro.md +422 -0
- package/ai-config/agents/development/nextjs-pro.md +474 -0
- package/ai-config/agents/development/python-pro.md +570 -0
- package/ai-config/agents/development/react-pro.md +487 -0
- package/ai-config/agents/development/rust-pro.md +246 -0
- package/ai-config/agents/development/spring-boot-4-expert.md +326 -0
- package/ai-config/agents/development/typescript-pro.md +336 -0
- package/ai-config/agents/development/vue-specialist.md +605 -0
- package/ai-config/agents/infrastructure/cloud-architect.md +472 -0
- package/ai-config/agents/infrastructure/deployment-manager.md +358 -0
- package/ai-config/agents/infrastructure/devops-engineer.md +455 -0
- package/ai-config/agents/infrastructure/incident-responder.md +519 -0
- package/ai-config/agents/infrastructure/kubernetes-expert.md +705 -0
- package/ai-config/agents/infrastructure/monitoring-specialist.md +674 -0
- package/ai-config/agents/infrastructure/performance-engineer.md +658 -0
- package/ai-config/agents/orchestrator.md +241 -0
- package/ai-config/agents/quality/accessibility-auditor.md +1204 -0
- package/ai-config/agents/quality/code-reviewer-compact.md +123 -0
- package/ai-config/agents/quality/code-reviewer.md +363 -0
- package/ai-config/agents/quality/dependency-manager.md +743 -0
- package/ai-config/agents/quality/e2e-test-specialist.md +1005 -0
- package/ai-config/agents/quality/performance-tester.md +1086 -0
- package/ai-config/agents/quality/security-auditor.md +133 -0
- package/ai-config/agents/quality/test-engineer.md +453 -0
- package/ai-config/agents/specialists/api-designer.md +87 -0
- package/ai-config/agents/specialists/backend-architect.md +73 -0
- package/ai-config/agents/specialists/code-reviewer.md +77 -0
- package/ai-config/agents/specialists/db-optimizer.md +75 -0
- package/ai-config/agents/specialists/devops-engineer.md +83 -0
- package/ai-config/agents/specialists/documentation-writer.md +78 -0
- package/ai-config/agents/specialists/frontend-developer.md +75 -0
- package/ai-config/agents/specialists/performance-analyst.md +82 -0
- package/ai-config/agents/specialists/refactor-specialist.md +74 -0
- package/ai-config/agents/specialists/security-auditor.md +74 -0
- package/ai-config/agents/specialists/test-engineer.md +81 -0
- package/ai-config/agents/specialists/ux-consultant.md +76 -0
- package/ai-config/agents/specialized/agent-generator.md +1190 -0
- package/ai-config/agents/specialized/blockchain-developer.md +149 -0
- package/ai-config/agents/specialized/code-migrator.md +892 -0
- package/ai-config/agents/specialized/context-manager.md +978 -0
- package/ai-config/agents/specialized/documentation-writer.md +1078 -0
- package/ai-config/agents/specialized/ecommerce-expert.md +1756 -0
- package/ai-config/agents/specialized/embedded-engineer.md +1714 -0
- package/ai-config/agents/specialized/error-detective.md +1034 -0
- package/ai-config/agents/specialized/fintech-specialist.md +1659 -0
- package/ai-config/agents/specialized/freelance-project-planner-v2.md +1988 -0
- package/ai-config/agents/specialized/freelance-project-planner-v3.md +2136 -0
- package/ai-config/agents/specialized/freelance-project-planner-v4.md +4503 -0
- package/ai-config/agents/specialized/freelance-project-planner.md +722 -0
- package/ai-config/agents/specialized/game-developer.md +1963 -0
- package/ai-config/agents/specialized/healthcare-dev.md +1620 -0
- package/ai-config/agents/specialized/mobile-developer.md +188 -0
- package/ai-config/agents/specialized/parallel-plan-executor.md +506 -0
- package/ai-config/agents/specialized/plan-executor.md +485 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/00-INDEX.md +485 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/01-CORE.md +3493 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/02-SELF-CORRECTION.md +778 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/03-PROGRESSIVE-SETUP.md +918 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/04-DEPLOYMENT.md +1537 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/05-TESTING.md +2633 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/06-OPERATIONS.md +5610 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/INSTALL.md +335 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/QUICK-REFERENCE.txt +215 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/README.md +260 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/START-HERE.md +379 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/WORKFLOW-DIAGRAM.md +355 -0
- package/ai-config/agents/specialized/solo-dev-planner-modular/solo-dev-planner.md +279 -0
- package/ai-config/agents/specialized/template-writer.md +347 -0
- package/ai-config/agents/specialized/test-runner.md +99 -0
- package/ai-config/agents/specialized/vibekanban-smart-worker.md +244 -0
- package/ai-config/agents/specialized/wave-executor.md +138 -0
- package/ai-config/agents/specialized/workflow-optimizer.md +1114 -0
- package/ai-config/commands/git/changelog.md +32 -0
- package/ai-config/commands/git/ci-local.md +70 -0
- package/ai-config/commands/git/commit.md +35 -0
- package/ai-config/commands/git/fix-issue.md +23 -0
- package/ai-config/commands/git/pr-create.md +42 -0
- package/ai-config/commands/git/pr-review.md +50 -0
- package/ai-config/commands/git/worktree.md +39 -0
- package/ai-config/commands/refactoring/cleanup.md +24 -0
- package/ai-config/commands/refactoring/dead-code.md +40 -0
- package/ai-config/commands/refactoring/extract.md +31 -0
- package/ai-config/commands/testing/e2e.md +30 -0
- package/ai-config/commands/testing/tdd.md +36 -0
- package/ai-config/commands/testing/test-coverage.md +30 -0
- package/ai-config/commands/testing/test-fix.md +24 -0
- package/ai-config/commands/workflow/generate-agents-md.md +85 -0
- package/ai-config/commands/workflow/planning.md +47 -0
- package/ai-config/commands/workflows/compound.md +89 -0
- package/ai-config/commands/workflows/plan.md +77 -0
- package/ai-config/commands/workflows/review.md +78 -0
- package/ai-config/commands/workflows/work.md +75 -0
- package/ai-config/config.yaml +18 -0
- package/ai-config/hooks/_TEMPLATE.md +96 -0
- package/ai-config/hooks/block-dangerous-commands.md +75 -0
- package/ai-config/hooks/commit-guard.md +90 -0
- package/ai-config/hooks/context-loader.md +73 -0
- package/ai-config/hooks/improve-prompt.md +91 -0
- package/ai-config/hooks/learning-log.md +72 -0
- package/ai-config/hooks/model-router.md +86 -0
- package/ai-config/hooks/secret-scanner.md +64 -0
- package/ai-config/hooks/skill-validator.md +102 -0
- package/ai-config/hooks/task-artifact.md +114 -0
- package/ai-config/hooks/validate-workflow.md +100 -0
- package/ai-config/prompts/base.md +71 -0
- package/ai-config/prompts/modes/debug.md +34 -0
- package/ai-config/prompts/modes/deploy.md +40 -0
- package/ai-config/prompts/modes/research.md +32 -0
- package/ai-config/prompts/modes/review.md +33 -0
- package/ai-config/prompts/review-policy.md +79 -0
- package/ai-config/skills/_TEMPLATE.md +157 -0
- package/ai-config/skills/backend/api-gateway/SKILL.md +254 -0
- package/ai-config/skills/backend/bff-concepts/SKILL.md +239 -0
- package/ai-config/skills/backend/bff-spring/SKILL.md +364 -0
- package/ai-config/skills/backend/chi-router/SKILL.md +396 -0
- package/ai-config/skills/backend/error-handling/SKILL.md +255 -0
- package/ai-config/skills/backend/exceptions-spring/SKILL.md +323 -0
- package/ai-config/skills/backend/fastapi/SKILL.md +302 -0
- package/ai-config/skills/backend/gateway-spring/SKILL.md +390 -0
- package/ai-config/skills/backend/go-backend/SKILL.md +457 -0
- package/ai-config/skills/backend/gradle-multimodule/SKILL.md +274 -0
- package/ai-config/skills/backend/graphql-concepts/SKILL.md +352 -0
- package/ai-config/skills/backend/graphql-spring/SKILL.md +398 -0
- package/ai-config/skills/backend/grpc-concepts/SKILL.md +283 -0
- package/ai-config/skills/backend/grpc-spring/SKILL.md +445 -0
- package/ai-config/skills/backend/jwt-auth/SKILL.md +412 -0
- package/ai-config/skills/backend/notifications-concepts/SKILL.md +259 -0
- package/ai-config/skills/backend/recommendations-concepts/SKILL.md +261 -0
- package/ai-config/skills/backend/search-concepts/SKILL.md +263 -0
- package/ai-config/skills/backend/search-spring/SKILL.md +375 -0
- package/ai-config/skills/backend/spring-boot-4/SKILL.md +172 -0
- package/ai-config/skills/backend/websockets/SKILL.md +532 -0
- package/ai-config/skills/data-ai/ai-ml/SKILL.md +423 -0
- package/ai-config/skills/data-ai/analytics-concepts/SKILL.md +195 -0
- package/ai-config/skills/data-ai/analytics-spring/SKILL.md +340 -0
- package/ai-config/skills/data-ai/duckdb-analytics/SKILL.md +440 -0
- package/ai-config/skills/data-ai/langchain/SKILL.md +238 -0
- package/ai-config/skills/data-ai/mlflow/SKILL.md +302 -0
- package/ai-config/skills/data-ai/onnx-inference/SKILL.md +290 -0
- package/ai-config/skills/data-ai/powerbi/SKILL.md +352 -0
- package/ai-config/skills/data-ai/pytorch/SKILL.md +274 -0
- package/ai-config/skills/data-ai/scikit-learn/SKILL.md +321 -0
- package/ai-config/skills/data-ai/vector-db/SKILL.md +301 -0
- package/ai-config/skills/database/graph-databases/SKILL.md +218 -0
- package/ai-config/skills/database/graph-spring/SKILL.md +361 -0
- package/ai-config/skills/database/pgx-postgres/SKILL.md +512 -0
- package/ai-config/skills/database/redis-cache/SKILL.md +343 -0
- package/ai-config/skills/database/sqlite-embedded/SKILL.md +388 -0
- package/ai-config/skills/database/timescaledb/SKILL.md +320 -0
- package/ai-config/skills/docs/api-documentation/SKILL.md +293 -0
- package/ai-config/skills/docs/docs-spring/SKILL.md +377 -0
- package/ai-config/skills/docs/mustache-templates/SKILL.md +190 -0
- package/ai-config/skills/docs/technical-docs/SKILL.md +447 -0
- package/ai-config/skills/frontend/astro-ssr/SKILL.md +441 -0
- package/ai-config/skills/frontend/frontend-design/SKILL.md +54 -0
- package/ai-config/skills/frontend/frontend-web/SKILL.md +368 -0
- package/ai-config/skills/frontend/mantine-ui/SKILL.md +396 -0
- package/ai-config/skills/frontend/tanstack-query/SKILL.md +439 -0
- package/ai-config/skills/frontend/zod-validation/SKILL.md +417 -0
- package/ai-config/skills/frontend/zustand-state/SKILL.md +350 -0
- package/ai-config/skills/infrastructure/chaos-engineering/SKILL.md +244 -0
- package/ai-config/skills/infrastructure/chaos-spring/SKILL.md +378 -0
- package/ai-config/skills/infrastructure/devops-infra/SKILL.md +435 -0
- package/ai-config/skills/infrastructure/docker-containers/SKILL.md +420 -0
- package/ai-config/skills/infrastructure/kubernetes/SKILL.md +456 -0
- package/ai-config/skills/infrastructure/opentelemetry/SKILL.md +546 -0
- package/ai-config/skills/infrastructure/traefik-proxy/SKILL.md +474 -0
- package/ai-config/skills/infrastructure/woodpecker-ci/SKILL.md +315 -0
- package/ai-config/skills/mobile/ionic-capacitor/SKILL.md +504 -0
- package/ai-config/skills/mobile/mobile-ionic/SKILL.md +448 -0
- package/ai-config/skills/prompt-improver/SKILL.md +125 -0
- package/ai-config/skills/quality/ghagga-review/SKILL.md +216 -0
- package/ai-config/skills/references/hooks-patterns/SKILL.md +238 -0
- package/ai-config/skills/references/mcp-servers/SKILL.md +275 -0
- package/ai-config/skills/references/plugins-reference/SKILL.md +110 -0
- package/ai-config/skills/references/skills-reference/SKILL.md +420 -0
- package/ai-config/skills/references/subagent-templates/SKILL.md +193 -0
- package/ai-config/skills/systems-iot/modbus-protocol/SKILL.md +410 -0
- package/ai-config/skills/systems-iot/mqtt-rumqttc/SKILL.md +408 -0
- package/ai-config/skills/systems-iot/rust-systems/SKILL.md +386 -0
- package/ai-config/skills/systems-iot/tokio-async/SKILL.md +324 -0
- package/ai-config/skills/testing/playwright-e2e/SKILL.md +289 -0
- package/ai-config/skills/testing/testcontainers/SKILL.md +299 -0
- package/ai-config/skills/testing/vitest-testing/SKILL.md +381 -0
- package/ai-config/skills/workflow/ci-local-guide/SKILL.md +118 -0
- package/ai-config/skills/workflow/claude-automation-recommender/SKILL.md +299 -0
- package/ai-config/skills/workflow/claude-md-improver/SKILL.md +158 -0
- package/ai-config/skills/workflow/finishing-a-development-branch/SKILL.md +117 -0
- package/ai-config/skills/workflow/git-github/SKILL.md +334 -0
- package/ai-config/skills/workflow/git-github/references/examples.md +160 -0
- package/ai-config/skills/workflow/git-workflow/SKILL.md +214 -0
- package/ai-config/skills/workflow/ide-plugins/SKILL.md +277 -0
- package/ai-config/skills/workflow/ide-plugins-intellij/SKILL.md +401 -0
- package/ai-config/skills/workflow/obsidian-brain-workflow/SKILL.md +199 -0
- package/ai-config/skills/workflow/using-git-worktrees/SKILL.md +100 -0
- package/ai-config/skills/workflow/verification-before-completion/SKILL.md +73 -0
- package/ai-config/skills/workflow/wave-workflow/SKILL.md +178 -0
- package/ci-local/README.md +170 -0
- package/ci-local/ci-local.sh +297 -0
- package/ci-local/hooks/commit-msg +74 -0
- package/ci-local/hooks/pre-commit +162 -0
- package/ci-local/hooks/pre-push +41 -0
- package/ci-local/install.sh +49 -0
- package/ci-local/semgrep.yml +214 -0
- package/dist/commands/analyze.d.ts +9 -0
- package/dist/commands/analyze.d.ts.map +1 -0
- package/dist/commands/analyze.js +55 -0
- package/dist/commands/analyze.js.map +1 -0
- package/dist/commands/analyze.test.d.ts +2 -0
- package/dist/commands/analyze.test.d.ts.map +1 -0
- package/dist/commands/analyze.test.js +145 -0
- package/dist/commands/analyze.test.js.map +1 -0
- package/dist/commands/doctor.d.ts +7 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +158 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/doctor.test.d.ts +2 -0
- package/dist/commands/doctor.test.d.ts.map +1 -0
- package/dist/commands/doctor.test.js +200 -0
- package/dist/commands/doctor.test.js.map +1 -0
- package/dist/commands/init.d.ts +9 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +283 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/init.test.d.ts +2 -0
- package/dist/commands/init.test.d.ts.map +1 -0
- package/dist/commands/init.test.js +271 -0
- package/dist/commands/init.test.js.map +1 -0
- package/dist/commands/sync.d.ts +8 -0
- package/dist/commands/sync.d.ts.map +1 -0
- package/dist/commands/sync.js +201 -0
- package/dist/commands/sync.js.map +1 -0
- package/dist/constants.d.ts +21 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +57 -0
- package/dist/constants.js.map +1 -0
- package/dist/e2e/aggressive.e2e.test.d.ts +2 -0
- package/dist/e2e/aggressive.e2e.test.d.ts.map +1 -0
- package/dist/e2e/aggressive.e2e.test.js +350 -0
- package/dist/e2e/aggressive.e2e.test.js.map +1 -0
- package/dist/e2e/commands.e2e.test.d.ts +2 -0
- package/dist/e2e/commands.e2e.test.d.ts.map +1 -0
- package/dist/e2e/commands.e2e.test.js +213 -0
- package/dist/e2e/commands.e2e.test.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +82 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/common.d.ts +17 -0
- package/dist/lib/common.d.ts.map +1 -0
- package/dist/lib/common.js +111 -0
- package/dist/lib/common.js.map +1 -0
- package/dist/lib/common.test.d.ts +2 -0
- package/dist/lib/common.test.d.ts.map +1 -0
- package/dist/lib/common.test.js +316 -0
- package/dist/lib/common.test.js.map +1 -0
- package/dist/lib/frontmatter.d.ts +18 -0
- package/dist/lib/frontmatter.d.ts.map +1 -0
- package/dist/lib/frontmatter.js +61 -0
- package/dist/lib/frontmatter.js.map +1 -0
- package/dist/lib/frontmatter.test.d.ts +2 -0
- package/dist/lib/frontmatter.test.d.ts.map +1 -0
- package/dist/lib/frontmatter.test.js +257 -0
- package/dist/lib/frontmatter.test.js.map +1 -0
- package/dist/lib/template.d.ts +24 -0
- package/dist/lib/template.d.ts.map +1 -0
- package/dist/lib/template.js +78 -0
- package/dist/lib/template.js.map +1 -0
- package/dist/lib/template.test.d.ts +2 -0
- package/dist/lib/template.test.d.ts.map +1 -0
- package/dist/lib/template.test.js +201 -0
- package/dist/lib/template.test.js.map +1 -0
- package/dist/types/index.d.ts +48 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -0
- package/dist/ui/AnalyzeUI.d.ts +7 -0
- package/dist/ui/AnalyzeUI.d.ts.map +1 -0
- package/dist/ui/AnalyzeUI.js +100 -0
- package/dist/ui/AnalyzeUI.js.map +1 -0
- package/dist/ui/App.d.ts +13 -0
- package/dist/ui/App.d.ts.map +1 -0
- package/dist/ui/App.js +100 -0
- package/dist/ui/App.js.map +1 -0
- package/dist/ui/CIContext.d.ts +9 -0
- package/dist/ui/CIContext.d.ts.map +1 -0
- package/dist/ui/CIContext.js +9 -0
- package/dist/ui/CIContext.js.map +1 -0
- package/dist/ui/CISelector.d.ts +8 -0
- package/dist/ui/CISelector.d.ts.map +1 -0
- package/dist/ui/CISelector.js +45 -0
- package/dist/ui/CISelector.js.map +1 -0
- package/dist/ui/Doctor.d.ts +3 -0
- package/dist/ui/Doctor.d.ts.map +1 -0
- package/dist/ui/Doctor.js +89 -0
- package/dist/ui/Doctor.js.map +1 -0
- package/dist/ui/Header.d.ts +8 -0
- package/dist/ui/Header.d.ts.map +1 -0
- package/dist/ui/Header.js +30 -0
- package/dist/ui/Header.js.map +1 -0
- package/dist/ui/MemorySelector.d.ts +8 -0
- package/dist/ui/MemorySelector.d.ts.map +1 -0
- package/dist/ui/MemorySelector.js +46 -0
- package/dist/ui/MemorySelector.js.map +1 -0
- package/dist/ui/NameInput.d.ts +8 -0
- package/dist/ui/NameInput.d.ts.map +1 -0
- package/dist/ui/NameInput.js +69 -0
- package/dist/ui/NameInput.js.map +1 -0
- package/dist/ui/OptionSelector.d.ts +12 -0
- package/dist/ui/OptionSelector.d.ts.map +1 -0
- package/dist/ui/OptionSelector.js +69 -0
- package/dist/ui/OptionSelector.js.map +1 -0
- package/dist/ui/Progress.d.ts +11 -0
- package/dist/ui/Progress.d.ts.map +1 -0
- package/dist/ui/Progress.js +58 -0
- package/dist/ui/Progress.js.map +1 -0
- package/dist/ui/StackSelector.d.ts +9 -0
- package/dist/ui/StackSelector.d.ts.map +1 -0
- package/dist/ui/StackSelector.js +65 -0
- package/dist/ui/StackSelector.js.map +1 -0
- package/dist/ui/Summary.d.ts +12 -0
- package/dist/ui/Summary.d.ts.map +1 -0
- package/dist/ui/Summary.js +114 -0
- package/dist/ui/Summary.js.map +1 -0
- package/dist/ui/SyncUI.d.ts +10 -0
- package/dist/ui/SyncUI.d.ts.map +1 -0
- package/dist/ui/SyncUI.js +64 -0
- package/dist/ui/SyncUI.js.map +1 -0
- package/dist/ui/Welcome.d.ts +7 -0
- package/dist/ui/Welcome.d.ts.map +1 -0
- package/dist/ui/Welcome.js +45 -0
- package/dist/ui/Welcome.js.map +1 -0
- package/dist/ui/theme.d.ts +10 -0
- package/dist/ui/theme.d.ts.map +1 -0
- package/dist/ui/theme.js +9 -0
- package/dist/ui/theme.js.map +1 -0
- package/modules/engram/.gitignore-snippet.txt +6 -0
- package/modules/engram/.mcp-config-snippet.json +11 -0
- package/modules/engram/README.md +146 -0
- package/modules/engram/install-engram.sh +216 -0
- package/modules/ghagga/.env.example +43 -0
- package/modules/ghagga/README.md +153 -0
- package/modules/ghagga/docker-compose.yml +80 -0
- package/modules/ghagga/setup-ghagga.sh +139 -0
- package/modules/memory-simple/.project/NOTES.md +22 -0
- package/modules/memory-simple/README.md +23 -0
- package/modules/obsidian-brain/.obsidian/app.json +23 -0
- package/modules/obsidian-brain/.obsidian/appearance.json +5 -0
- package/modules/obsidian-brain/.obsidian/bookmarks.json +34 -0
- package/modules/obsidian-brain/.obsidian/community-plugins.json +1 -0
- package/modules/obsidian-brain/.obsidian/core-plugins-migration.json +21 -0
- package/modules/obsidian-brain/.obsidian/core-plugins.json +18 -0
- package/modules/obsidian-brain/.obsidian/daily-notes.json +5 -0
- package/modules/obsidian-brain/.obsidian/graph.json +37 -0
- package/modules/obsidian-brain/.obsidian/hotkeys.json +14 -0
- package/modules/obsidian-brain/.obsidian/plugins/dataview/data.json +25 -0
- package/modules/obsidian-brain/.obsidian/plugins/obsidian-kanban/data.json +29 -0
- package/modules/obsidian-brain/.obsidian/plugins/templater-obsidian/data.json +18 -0
- package/modules/obsidian-brain/.obsidian/snippets/project-memory.css +71 -0
- package/modules/obsidian-brain/.obsidian-gitignore-snippet.txt +8 -0
- package/modules/obsidian-brain/.project/Attachments/.gitkeep +0 -0
- package/modules/obsidian-brain/.project/Memory/BLOCKERS.md +78 -0
- package/modules/obsidian-brain/.project/Memory/CONTEXT.md +102 -0
- package/modules/obsidian-brain/.project/Memory/DASHBOARD.md +73 -0
- package/modules/obsidian-brain/.project/Memory/DECISIONS.md +87 -0
- package/modules/obsidian-brain/.project/Memory/KANBAN.md +15 -0
- package/modules/obsidian-brain/.project/Memory/README.md +61 -0
- package/modules/obsidian-brain/.project/Memory/WAVES.md +78 -0
- package/modules/obsidian-brain/.project/Sessions/TEMPLATE.md +99 -0
- package/modules/obsidian-brain/.project/Templates/ADR.md +33 -0
- package/modules/obsidian-brain/.project/Templates/Blocker.md +21 -0
- package/modules/obsidian-brain/.project/Templates/Session.md +88 -0
- package/modules/obsidian-brain/README.md +268 -0
- package/modules/obsidian-brain/new-wave.sh +182 -0
- package/package.json +51 -0
- package/schemas/agent.schema.json +34 -0
- package/schemas/ai-config.schema.json +28 -0
- package/schemas/skill.schema.json +44 -0
- package/src/commands/analyze.test.ts +145 -0
- package/src/commands/analyze.ts +69 -0
- package/src/commands/doctor.test.ts +208 -0
- package/src/commands/doctor.ts +163 -0
- package/src/commands/init.test.ts +298 -0
- package/src/commands/init.ts +285 -0
- package/src/constants.ts +69 -0
- package/src/e2e/aggressive.e2e.test.ts +557 -0
- package/src/e2e/commands.e2e.test.ts +298 -0
- package/src/index.tsx +106 -0
- package/src/lib/common.test.ts +318 -0
- package/src/lib/common.ts +127 -0
- package/src/lib/frontmatter.test.ts +291 -0
- package/src/lib/frontmatter.ts +77 -0
- package/src/lib/template.test.ts +226 -0
- package/src/lib/template.ts +99 -0
- package/src/types/index.ts +53 -0
- package/src/ui/AnalyzeUI.tsx +133 -0
- package/src/ui/App.tsx +175 -0
- package/src/ui/CIContext.tsx +25 -0
- package/src/ui/CISelector.tsx +72 -0
- package/src/ui/Doctor.tsx +122 -0
- package/src/ui/Header.tsx +48 -0
- package/src/ui/MemorySelector.tsx +73 -0
- package/src/ui/NameInput.tsx +82 -0
- package/src/ui/OptionSelector.tsx +100 -0
- package/src/ui/Progress.tsx +88 -0
- package/src/ui/StackSelector.tsx +101 -0
- package/src/ui/Summary.tsx +134 -0
- package/src/ui/Welcome.tsx +54 -0
- package/src/ui/theme.ts +10 -0
- package/stryker.config.json +19 -0
- package/tasks/_TEMPLATE/files-edited.md +3 -0
- package/tasks/_TEMPLATE/plan.md +3 -0
- package/tasks/_TEMPLATE/research.md +3 -0
- package/tasks/_TEMPLATE/verification.md +5 -0
- package/templates/common/dependabot/cargo.yml +11 -0
- package/templates/common/dependabot/github-actions.yml +16 -0
- package/templates/common/dependabot/gomod.yml +15 -0
- package/templates/common/dependabot/gradle.yml +15 -0
- package/templates/common/dependabot/header.yml +3 -0
- package/templates/common/dependabot/maven.yml +15 -0
- package/templates/common/dependabot/npm.yml +20 -0
- package/templates/common/dependabot/pip.yml +11 -0
- package/templates/dependabot.yml +162 -0
- package/templates/github/ci-go.yml +41 -0
- package/templates/github/ci-java.yml +45 -0
- package/templates/github/ci-monorepo.yml +150 -0
- package/templates/github/ci-node.yml +42 -0
- package/templates/github/ci-python.yml +42 -0
- package/templates/github/ci-rust.yml +42 -0
- package/templates/github/dependabot-automerge.yml +40 -0
- package/templates/gitlab/gitlab-ci-go.yml +88 -0
- package/templates/gitlab/gitlab-ci-java.yml +79 -0
- package/templates/gitlab/gitlab-ci-monorepo.yml +126 -0
- package/templates/gitlab/gitlab-ci-node.yml +63 -0
- package/templates/gitlab/gitlab-ci-python.yml +147 -0
- package/templates/gitlab/gitlab-ci-rust.yml +67 -0
- package/templates/global/claude-settings.json +98 -0
- package/templates/global/codex-config.toml +8 -0
- package/templates/global/copilot-instructions/base-rules.instructions.md +13 -0
- package/templates/global/copilot-instructions/sdd-orchestrator.instructions.md +37 -0
- package/templates/global/gemini-commands/cleanup.toml +20 -0
- package/templates/global/gemini-commands/commit.toml +15 -0
- package/templates/global/gemini-commands/dead-code.toml +22 -0
- package/templates/global/gemini-commands/plan.toml +30 -0
- package/templates/global/gemini-commands/review.toml +17 -0
- package/templates/global/gemini-commands/sdd-apply.toml +22 -0
- package/templates/global/gemini-commands/sdd-ff.toml +14 -0
- package/templates/global/gemini-commands/sdd-new.toml +21 -0
- package/templates/global/gemini-commands/sdd-verify.toml +21 -0
- package/templates/global/gemini-commands/tdd.toml +26 -0
- package/templates/global/gemini-settings.json +8 -0
- package/templates/global/opencode-config.json +44 -0
- package/templates/global/sdd-instructions.md +47 -0
- package/templates/global/sdd-orchestrator-claude.md +46 -0
- package/templates/global/sdd-orchestrator-copilot.md +34 -0
- package/templates/renovate.json +69 -0
- package/templates/woodpecker/monorepo/backend.yml +34 -0
- package/templates/woodpecker/monorepo/frontend.yml +34 -0
- package/templates/woodpecker/monorepo/summary.yml +25 -0
- package/templates/woodpecker/woodpecker-go.yml +51 -0
- package/templates/woodpecker/woodpecker-java.yml +67 -0
- package/templates/woodpecker/woodpecker-node.yml +47 -0
- package/templates/woodpecker/woodpecker-python.yml +108 -0
- package/templates/woodpecker/woodpecker-rust.yml +57 -0
- package/tsconfig.json +19 -0
- package/vitest.config.ts +16 -0
- package/workflows/reusable-build-go.yml +111 -0
- package/workflows/reusable-build-java.yml +120 -0
- package/workflows/reusable-build-node.yml +145 -0
- package/workflows/reusable-build-python.yml +159 -0
- package/workflows/reusable-build-rust.yml +135 -0
- package/workflows/reusable-docker.yml +120 -0
- package/workflows/reusable-ghagga-review.yml +165 -0
- package/workflows/reusable-release.yml +91 -0
|
@@ -0,0 +1,1679 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: technical-writer
|
|
3
|
+
description: Technical writing expert specializing in documentation, user guides, tutorials, and comprehensive technical content
|
|
4
|
+
trigger: >
|
|
5
|
+
technical documentation, user guide, tutorial, api documentation, readme,
|
|
6
|
+
release notes, changelog, how-to guide, knowledge base, style guide,
|
|
7
|
+
developer documentation, getting started, troubleshooting guide, faq
|
|
8
|
+
category: business
|
|
9
|
+
color: green
|
|
10
|
+
tools: Write, Read, MultiEdit, Grep, Glob
|
|
11
|
+
model: sonnet
|
|
12
|
+
metadata:
|
|
13
|
+
version: "2.0"
|
|
14
|
+
updated: "2026-02"
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
You are a technical writer specialist with expertise in creating clear, comprehensive documentation, user guides, API documentation, and technical tutorials.
|
|
18
|
+
|
|
19
|
+
## Core Expertise
|
|
20
|
+
- Technical documentation and writing
|
|
21
|
+
- User manuals and guides
|
|
22
|
+
- API and developer documentation
|
|
23
|
+
- Tutorial and how-to content
|
|
24
|
+
- Release notes and changelogs
|
|
25
|
+
- Knowledge base articles
|
|
26
|
+
- Style guide development
|
|
27
|
+
- Documentation strategy and governance
|
|
28
|
+
|
|
29
|
+
## Technical Stack
|
|
30
|
+
- **Documentation Tools**: Markdown, AsciiDoc, reStructuredText, LaTeX
|
|
31
|
+
- **Static Generators**: Docusaurus, MkDocs, Sphinx, Hugo, Jekyll
|
|
32
|
+
- **API Documentation**: OpenAPI/Swagger, Postman, Redoc, Slate
|
|
33
|
+
- **Collaboration**: Git, GitHub/GitLab, Confluence, SharePoint
|
|
34
|
+
- **Diagrams**: Mermaid, PlantUML, Draw.io, Lucidchart
|
|
35
|
+
- **Publishing**: Read the Docs, GitHub Pages, GitBook, Netlify
|
|
36
|
+
- **Style Checkers**: Vale, write-good, alex, textlint
|
|
37
|
+
|
|
38
|
+
## Technical Documentation Framework
|
|
39
|
+
```typescript
|
|
40
|
+
// technical-writer.ts
|
|
41
|
+
import * as fs from 'fs/promises';
|
|
42
|
+
import * as path from 'path';
|
|
43
|
+
import { marked } from 'marked';
|
|
44
|
+
import * as yaml from 'js-yaml';
|
|
45
|
+
|
|
46
|
+
interface Documentation {
|
|
47
|
+
id: string;
|
|
48
|
+
title: string;
|
|
49
|
+
type: DocumentationType;
|
|
50
|
+
audience: Audience;
|
|
51
|
+
purpose: string;
|
|
52
|
+
scope: string;
|
|
53
|
+
structure: DocumentStructure;
|
|
54
|
+
content: ContentSection[];
|
|
55
|
+
metadata: DocumentMetadata;
|
|
56
|
+
version: string;
|
|
57
|
+
status: DocumentStatus;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
interface ContentSection {
|
|
61
|
+
id: string;
|
|
62
|
+
title: string;
|
|
63
|
+
level: number;
|
|
64
|
+
content: string;
|
|
65
|
+
type: ContentType;
|
|
66
|
+
examples?: Example[];
|
|
67
|
+
diagrams?: Diagram[];
|
|
68
|
+
code?: CodeSnippet[];
|
|
69
|
+
warnings?: Warning[];
|
|
70
|
+
notes?: Note[];
|
|
71
|
+
references?: Reference[];
|
|
72
|
+
subsections?: ContentSection[];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
interface DocumentStructure {
|
|
76
|
+
template: string;
|
|
77
|
+
sections: SectionDefinition[];
|
|
78
|
+
navigation: NavigationStructure;
|
|
79
|
+
crossReferences: CrossReference[];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
class TechnicalDocumentationWriter {
|
|
83
|
+
private templates: Map<string, DocumentTemplate> = new Map();
|
|
84
|
+
private styleGuide: StyleGuide;
|
|
85
|
+
private glossary: Map<string, GlossaryTerm> = new Map();
|
|
86
|
+
private analyzer: ContentAnalyzer;
|
|
87
|
+
private validator: DocumentValidator;
|
|
88
|
+
|
|
89
|
+
constructor() {
|
|
90
|
+
this.styleGuide = new StyleGuide();
|
|
91
|
+
this.analyzer = new ContentAnalyzer();
|
|
92
|
+
this.validator = new DocumentValidator();
|
|
93
|
+
this.loadTemplates();
|
|
94
|
+
this.loadGlossary();
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
async createDocumentation(
|
|
98
|
+
subject: DocumentationSubject,
|
|
99
|
+
requirements: DocumentationRequirements
|
|
100
|
+
): Promise<Documentation> {
|
|
101
|
+
// Analyze subject matter
|
|
102
|
+
const analysis = await this.analyzer.analyzeSubject(subject);
|
|
103
|
+
|
|
104
|
+
// Determine documentation type
|
|
105
|
+
const docType = this.determineDocumentationType(analysis, requirements);
|
|
106
|
+
|
|
107
|
+
// Select appropriate template
|
|
108
|
+
const template = this.selectTemplate(docType, requirements);
|
|
109
|
+
|
|
110
|
+
// Generate document structure
|
|
111
|
+
const structure = this.generateStructure(template, analysis, requirements);
|
|
112
|
+
|
|
113
|
+
// Create content sections
|
|
114
|
+
const content = await this.createContent(structure, analysis, requirements);
|
|
115
|
+
|
|
116
|
+
// Add examples and code snippets
|
|
117
|
+
const enrichedContent = await this.enrichContent(content, subject);
|
|
118
|
+
|
|
119
|
+
// Apply style guide
|
|
120
|
+
const styledContent = this.applyStyleGuide(enrichedContent);
|
|
121
|
+
|
|
122
|
+
// Add diagrams and visuals
|
|
123
|
+
const visualContent = await this.addVisuals(styledContent, analysis);
|
|
124
|
+
|
|
125
|
+
// Generate metadata
|
|
126
|
+
const metadata = this.generateMetadata(subject, requirements);
|
|
127
|
+
|
|
128
|
+
// Validate documentation
|
|
129
|
+
await this.validator.validate(visualContent);
|
|
130
|
+
|
|
131
|
+
return {
|
|
132
|
+
id: this.generateId('DOC'),
|
|
133
|
+
title: requirements.title || this.generateTitle(subject),
|
|
134
|
+
type: docType,
|
|
135
|
+
audience: requirements.audience,
|
|
136
|
+
purpose: requirements.purpose,
|
|
137
|
+
scope: requirements.scope,
|
|
138
|
+
structure,
|
|
139
|
+
content: visualContent,
|
|
140
|
+
metadata,
|
|
141
|
+
version: '1.0.0',
|
|
142
|
+
status: DocumentStatus.DRAFT,
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
async createUserGuide(product: Product): Promise<UserGuide> {
|
|
147
|
+
const guide: UserGuide = {
|
|
148
|
+
id: this.generateId('UG'),
|
|
149
|
+
title: `${product.name} User Guide`,
|
|
150
|
+
product: product.name,
|
|
151
|
+
version: product.version,
|
|
152
|
+
audience: Audience.END_USER,
|
|
153
|
+
sections: [],
|
|
154
|
+
quickStart: null,
|
|
155
|
+
troubleshooting: null,
|
|
156
|
+
faq: null,
|
|
157
|
+
glossary: [],
|
|
158
|
+
index: [],
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
// Introduction section
|
|
162
|
+
guide.sections.push(this.createIntroduction(product));
|
|
163
|
+
|
|
164
|
+
// Getting Started
|
|
165
|
+
guide.quickStart = this.createQuickStart(product);
|
|
166
|
+
guide.sections.push(guide.quickStart);
|
|
167
|
+
|
|
168
|
+
// Features and functionality
|
|
169
|
+
for (const feature of product.features) {
|
|
170
|
+
guide.sections.push(this.documentFeature(feature));
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// Configuration and settings
|
|
174
|
+
if (product.configuration) {
|
|
175
|
+
guide.sections.push(this.documentConfiguration(product.configuration));
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// Troubleshooting
|
|
179
|
+
guide.troubleshooting = this.createTroubleshooting(product);
|
|
180
|
+
guide.sections.push(guide.troubleshooting);
|
|
181
|
+
|
|
182
|
+
// FAQ
|
|
183
|
+
guide.faq = this.createFAQ(product);
|
|
184
|
+
guide.sections.push(guide.faq);
|
|
185
|
+
|
|
186
|
+
// Glossary
|
|
187
|
+
guide.glossary = this.createGlossary(product);
|
|
188
|
+
|
|
189
|
+
// Index
|
|
190
|
+
guide.index = this.createIndex(guide);
|
|
191
|
+
|
|
192
|
+
return guide;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
private createIntroduction(product: Product): ContentSection {
|
|
196
|
+
return {
|
|
197
|
+
id: 'introduction',
|
|
198
|
+
title: 'Introduction',
|
|
199
|
+
level: 1,
|
|
200
|
+
type: ContentType.CONCEPTUAL,
|
|
201
|
+
content: `
|
|
202
|
+
# Introduction
|
|
203
|
+
|
|
204
|
+
Welcome to ${product.name} version ${product.version}. This guide provides comprehensive information about using ${product.name} effectively.
|
|
205
|
+
|
|
206
|
+
## About ${product.name}
|
|
207
|
+
|
|
208
|
+
${product.description}
|
|
209
|
+
|
|
210
|
+
## Who Should Read This Guide
|
|
211
|
+
|
|
212
|
+
This guide is intended for:
|
|
213
|
+
${this.formatAudience(product.targetAudience)}
|
|
214
|
+
|
|
215
|
+
## What's in This Guide
|
|
216
|
+
|
|
217
|
+
This guide covers:
|
|
218
|
+
${this.formatTopics(product.features.map(f => f.name))}
|
|
219
|
+
|
|
220
|
+
## Document Conventions
|
|
221
|
+
|
|
222
|
+
This guide uses the following conventions:
|
|
223
|
+
|
|
224
|
+
| Convention | Meaning |
|
|
225
|
+
|------------|---------|
|
|
226
|
+
| **Bold** | User interface elements |
|
|
227
|
+
| \`Code\` | Code, commands, or file names |
|
|
228
|
+
| _Italic_ | Emphasis or new terms |
|
|
229
|
+
| 📝 Note | Additional information |
|
|
230
|
+
| ⚠️ Warning | Important caution |
|
|
231
|
+
| 💡 Tip | Helpful suggestion |
|
|
232
|
+
|
|
233
|
+
## Prerequisites
|
|
234
|
+
|
|
235
|
+
Before using ${product.name}, ensure you have:
|
|
236
|
+
${this.formatPrerequisites(product.prerequisites)}
|
|
237
|
+
`,
|
|
238
|
+
notes: [
|
|
239
|
+
{
|
|
240
|
+
type: NoteType.INFO,
|
|
241
|
+
content: 'This guide assumes basic familiarity with ' + product.domain,
|
|
242
|
+
},
|
|
243
|
+
],
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
private createQuickStart(product: Product): ContentSection {
|
|
248
|
+
return {
|
|
249
|
+
id: 'quick-start',
|
|
250
|
+
title: 'Quick Start Guide',
|
|
251
|
+
level: 1,
|
|
252
|
+
type: ContentType.TUTORIAL,
|
|
253
|
+
content: `
|
|
254
|
+
# Quick Start Guide
|
|
255
|
+
|
|
256
|
+
Get up and running with ${product.name} in minutes.
|
|
257
|
+
|
|
258
|
+
## Step 1: Installation
|
|
259
|
+
|
|
260
|
+
${this.generateInstallationSteps(product)}
|
|
261
|
+
|
|
262
|
+
## Step 2: Initial Setup
|
|
263
|
+
|
|
264
|
+
${this.generateSetupSteps(product)}
|
|
265
|
+
|
|
266
|
+
## Step 3: First Use
|
|
267
|
+
|
|
268
|
+
${this.generateFirstUseSteps(product)}
|
|
269
|
+
|
|
270
|
+
## Step 4: Verify Installation
|
|
271
|
+
|
|
272
|
+
${this.generateVerificationSteps(product)}
|
|
273
|
+
|
|
274
|
+
## What's Next?
|
|
275
|
+
|
|
276
|
+
Now that you have ${product.name} running:
|
|
277
|
+
- Explore the [Features](#features) section
|
|
278
|
+
- Review [Configuration](#configuration) options
|
|
279
|
+
- Check out [Advanced Topics](#advanced)
|
|
280
|
+
`,
|
|
281
|
+
examples: [
|
|
282
|
+
{
|
|
283
|
+
title: 'Basic Example',
|
|
284
|
+
description: 'A simple example to get started',
|
|
285
|
+
code: this.generateBasicExample(product),
|
|
286
|
+
},
|
|
287
|
+
],
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
async createAPIDocumentation(api: APISpecification): Promise<APIDocumentation> {
|
|
292
|
+
const doc: APIDocumentation = {
|
|
293
|
+
id: this.generateId('API'),
|
|
294
|
+
title: `${api.name} API Documentation`,
|
|
295
|
+
version: api.version,
|
|
296
|
+
baseUrl: api.baseUrl,
|
|
297
|
+
authentication: this.documentAuthentication(api.authentication),
|
|
298
|
+
endpoints: [],
|
|
299
|
+
schemas: [],
|
|
300
|
+
examples: [],
|
|
301
|
+
errors: this.documentErrorCodes(api.errors),
|
|
302
|
+
rateLimiting: this.documentRateLimiting(api.rateLimiting),
|
|
303
|
+
changelog: [],
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
// Document each endpoint
|
|
307
|
+
for (const endpoint of api.endpoints) {
|
|
308
|
+
doc.endpoints.push(await this.documentEndpoint(endpoint));
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// Document schemas
|
|
312
|
+
for (const schema of api.schemas) {
|
|
313
|
+
doc.schemas.push(this.documentSchema(schema));
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// Generate examples
|
|
317
|
+
doc.examples = this.generateAPIExamples(api);
|
|
318
|
+
|
|
319
|
+
// Add changelog
|
|
320
|
+
doc.changelog = await this.generateChangelog(api);
|
|
321
|
+
|
|
322
|
+
return doc;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
private async documentEndpoint(endpoint: APIEndpoint): Promise<EndpointDocumentation> {
|
|
326
|
+
return {
|
|
327
|
+
id: endpoint.id,
|
|
328
|
+
method: endpoint.method,
|
|
329
|
+
path: endpoint.path,
|
|
330
|
+
summary: endpoint.summary,
|
|
331
|
+
description: this.expandDescription(endpoint.description),
|
|
332
|
+
parameters: this.documentParameters(endpoint.parameters),
|
|
333
|
+
requestBody: endpoint.requestBody ? this.documentRequestBody(endpoint.requestBody) : null,
|
|
334
|
+
responses: this.documentResponses(endpoint.responses),
|
|
335
|
+
examples: this.generateEndpointExamples(endpoint),
|
|
336
|
+
security: endpoint.security,
|
|
337
|
+
deprecated: endpoint.deprecated || false,
|
|
338
|
+
tags: endpoint.tags || [],
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
private documentParameters(parameters: Parameter[]): ParameterDocumentation[] {
|
|
343
|
+
return parameters.map(param => ({
|
|
344
|
+
name: param.name,
|
|
345
|
+
in: param.in,
|
|
346
|
+
description: this.expandDescription(param.description),
|
|
347
|
+
required: param.required,
|
|
348
|
+
type: param.type,
|
|
349
|
+
format: param.format,
|
|
350
|
+
default: param.default,
|
|
351
|
+
enum: param.enum,
|
|
352
|
+
example: param.example || this.generateParameterExample(param),
|
|
353
|
+
constraints: this.documentConstraints(param),
|
|
354
|
+
}));
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
private generateEndpointExamples(endpoint: APIEndpoint): EndpointExample[] {
|
|
358
|
+
const examples: EndpointExample[] = [];
|
|
359
|
+
|
|
360
|
+
// cURL example
|
|
361
|
+
examples.push({
|
|
362
|
+
title: 'cURL',
|
|
363
|
+
language: 'bash',
|
|
364
|
+
code: this.generateCurlExample(endpoint),
|
|
365
|
+
});
|
|
366
|
+
|
|
367
|
+
// JavaScript example
|
|
368
|
+
examples.push({
|
|
369
|
+
title: 'JavaScript',
|
|
370
|
+
language: 'javascript',
|
|
371
|
+
code: this.generateJavaScriptExample(endpoint),
|
|
372
|
+
});
|
|
373
|
+
|
|
374
|
+
// Python example
|
|
375
|
+
examples.push({
|
|
376
|
+
title: 'Python',
|
|
377
|
+
language: 'python',
|
|
378
|
+
code: this.generatePythonExample(endpoint),
|
|
379
|
+
});
|
|
380
|
+
|
|
381
|
+
return examples;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
private generateCurlExample(endpoint: APIEndpoint): string {
|
|
385
|
+
let curl = `curl -X ${endpoint.method} \\\n`;
|
|
386
|
+
curl += ` '${endpoint.baseUrl || 'https://api.example.com'}${endpoint.path}' \\\n`;
|
|
387
|
+
|
|
388
|
+
if (endpoint.headers) {
|
|
389
|
+
for (const [key, value] of Object.entries(endpoint.headers)) {
|
|
390
|
+
curl += ` -H '${key}: ${value}' \\\n`;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
if (endpoint.requestBody) {
|
|
395
|
+
curl += ` -d '${JSON.stringify(endpoint.requestBody.example, null, 2)}'`;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
return curl;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
async createTutorial(topic: TutorialTopic): Promise<Tutorial> {
|
|
402
|
+
const tutorial: Tutorial = {
|
|
403
|
+
id: this.generateId('TUT'),
|
|
404
|
+
title: topic.title,
|
|
405
|
+
difficulty: topic.difficulty,
|
|
406
|
+
duration: topic.estimatedDuration,
|
|
407
|
+
objectives: topic.objectives,
|
|
408
|
+
prerequisites: topic.prerequisites,
|
|
409
|
+
sections: [],
|
|
410
|
+
exercises: [],
|
|
411
|
+
solutions: [],
|
|
412
|
+
resources: [],
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
// Introduction
|
|
416
|
+
tutorial.sections.push(this.createTutorialIntroduction(topic));
|
|
417
|
+
|
|
418
|
+
// Learning objectives
|
|
419
|
+
tutorial.sections.push(this.createLearningObjectives(topic));
|
|
420
|
+
|
|
421
|
+
// Main content sections
|
|
422
|
+
for (const section of topic.sections) {
|
|
423
|
+
tutorial.sections.push(await this.createTutorialSection(section));
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
// Exercises
|
|
427
|
+
tutorial.exercises = this.createExercises(topic);
|
|
428
|
+
|
|
429
|
+
// Solutions
|
|
430
|
+
tutorial.solutions = this.createSolutions(tutorial.exercises);
|
|
431
|
+
|
|
432
|
+
// Additional resources
|
|
433
|
+
tutorial.resources = this.compileResources(topic);
|
|
434
|
+
|
|
435
|
+
// Summary
|
|
436
|
+
tutorial.sections.push(this.createTutorialSummary(topic));
|
|
437
|
+
|
|
438
|
+
return tutorial;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
private async createTutorialSection(section: TutorialSection): Promise<ContentSection> {
|
|
442
|
+
const content: ContentSection = {
|
|
443
|
+
id: section.id,
|
|
444
|
+
title: section.title,
|
|
445
|
+
level: 2,
|
|
446
|
+
type: ContentType.TUTORIAL,
|
|
447
|
+
content: '',
|
|
448
|
+
examples: [],
|
|
449
|
+
code: [],
|
|
450
|
+
notes: [],
|
|
451
|
+
warnings: [],
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
// Generate section content
|
|
455
|
+
content.content = await this.generateSectionContent(section);
|
|
456
|
+
|
|
457
|
+
// Add step-by-step instructions
|
|
458
|
+
if (section.steps) {
|
|
459
|
+
content.content += this.formatSteps(section.steps);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
// Add code examples
|
|
463
|
+
if (section.code) {
|
|
464
|
+
content.code = section.code.map(c => this.formatCodeSnippet(c));
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
// Add explanations
|
|
468
|
+
if (section.explanations) {
|
|
469
|
+
for (const explanation of section.explanations) {
|
|
470
|
+
content.notes?.push({
|
|
471
|
+
type: NoteType.EXPLANATION,
|
|
472
|
+
content: explanation,
|
|
473
|
+
});
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
// Add tips
|
|
478
|
+
if (section.tips) {
|
|
479
|
+
for (const tip of section.tips) {
|
|
480
|
+
content.notes?.push({
|
|
481
|
+
type: NoteType.TIP,
|
|
482
|
+
content: tip,
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
// Add warnings
|
|
488
|
+
if (section.warnings) {
|
|
489
|
+
for (const warning of section.warnings) {
|
|
490
|
+
content.warnings?.push({
|
|
491
|
+
type: WarningType.CAUTION,
|
|
492
|
+
content: warning,
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
return content;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
async createReleaseNotes(release: Release): Promise<ReleaseNotes> {
|
|
501
|
+
const notes: ReleaseNotes = {
|
|
502
|
+
id: this.generateId('RN'),
|
|
503
|
+
version: release.version,
|
|
504
|
+
date: release.date,
|
|
505
|
+
title: `Release Notes - Version ${release.version}`,
|
|
506
|
+
summary: release.summary,
|
|
507
|
+
highlights: release.highlights,
|
|
508
|
+
newFeatures: [],
|
|
509
|
+
improvements: [],
|
|
510
|
+
bugFixes: [],
|
|
511
|
+
breakingChanges: [],
|
|
512
|
+
deprecations: [],
|
|
513
|
+
knownIssues: [],
|
|
514
|
+
upgradeGuide: null,
|
|
515
|
+
};
|
|
516
|
+
|
|
517
|
+
// Categorize changes
|
|
518
|
+
for (const change of release.changes) {
|
|
519
|
+
switch (change.type) {
|
|
520
|
+
case ChangeType.FEATURE:
|
|
521
|
+
notes.newFeatures.push(this.documentFeatureChange(change));
|
|
522
|
+
break;
|
|
523
|
+
case ChangeType.IMPROVEMENT:
|
|
524
|
+
notes.improvements.push(this.documentImprovement(change));
|
|
525
|
+
break;
|
|
526
|
+
case ChangeType.BUG_FIX:
|
|
527
|
+
notes.bugFixes.push(this.documentBugFix(change));
|
|
528
|
+
break;
|
|
529
|
+
case ChangeType.BREAKING:
|
|
530
|
+
notes.breakingChanges.push(this.documentBreakingChange(change));
|
|
531
|
+
break;
|
|
532
|
+
case ChangeType.DEPRECATION:
|
|
533
|
+
notes.deprecations.push(this.documentDeprecation(change));
|
|
534
|
+
break;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// Known issues
|
|
539
|
+
notes.knownIssues = release.knownIssues.map(issue =>
|
|
540
|
+
this.documentKnownIssue(issue)
|
|
541
|
+
);
|
|
542
|
+
|
|
543
|
+
// Upgrade guide
|
|
544
|
+
if (notes.breakingChanges.length > 0 || notes.deprecations.length > 0) {
|
|
545
|
+
notes.upgradeGuide = this.createUpgradeGuide(release, notes);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
return notes;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
private documentFeatureChange(change: Change): FeatureDocumentation {
|
|
552
|
+
return {
|
|
553
|
+
id: change.id,
|
|
554
|
+
title: change.title,
|
|
555
|
+
description: this.expandDescription(change.description),
|
|
556
|
+
category: change.category,
|
|
557
|
+
impact: change.impact,
|
|
558
|
+
examples: change.examples ? change.examples.map(e => this.formatExample(e)) : [],
|
|
559
|
+
documentation: change.documentationUrl,
|
|
560
|
+
relatedIssues: change.relatedIssues,
|
|
561
|
+
};
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
async applyStyleGuide(content: string): Promise<string> {
|
|
565
|
+
let styled = content;
|
|
566
|
+
|
|
567
|
+
// Apply terminology consistency
|
|
568
|
+
styled = this.applyTerminology(styled);
|
|
569
|
+
|
|
570
|
+
// Apply tone and voice
|
|
571
|
+
styled = this.applyToneAndVoice(styled);
|
|
572
|
+
|
|
573
|
+
// Apply formatting rules
|
|
574
|
+
styled = this.applyFormatting(styled);
|
|
575
|
+
|
|
576
|
+
// Check grammar and spelling
|
|
577
|
+
styled = await this.checkGrammar(styled);
|
|
578
|
+
|
|
579
|
+
// Apply readability improvements
|
|
580
|
+
styled = this.improveReadability(styled);
|
|
581
|
+
|
|
582
|
+
return styled;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
private applyTerminology(content: string): string {
|
|
586
|
+
// Replace inconsistent terms with preferred terms
|
|
587
|
+
const terminology = this.styleGuide.getTerminology();
|
|
588
|
+
|
|
589
|
+
let updated = content;
|
|
590
|
+
for (const [incorrect, correct] of terminology) {
|
|
591
|
+
const regex = new RegExp(`\\b${incorrect}\\b`, 'gi');
|
|
592
|
+
updated = updated.replace(regex, correct);
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
return updated;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
private applyToneAndVoice(content: string): string {
|
|
599
|
+
// Convert passive voice to active voice
|
|
600
|
+
content = this.convertToActiveVoice(content);
|
|
601
|
+
|
|
602
|
+
// Use second person for instructions
|
|
603
|
+
content = this.useSecondPerson(content);
|
|
604
|
+
|
|
605
|
+
// Remove unnecessary jargon
|
|
606
|
+
content = this.simplifyJargon(content);
|
|
607
|
+
|
|
608
|
+
return content;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
private improveReadability(content: string): string {
|
|
612
|
+
// Break long sentences
|
|
613
|
+
content = this.breakLongSentences(content);
|
|
614
|
+
|
|
615
|
+
// Add transition words
|
|
616
|
+
content = this.addTransitions(content);
|
|
617
|
+
|
|
618
|
+
// Use bullet points for lists
|
|
619
|
+
content = this.formatLists(content);
|
|
620
|
+
|
|
621
|
+
// Add headings for scannability
|
|
622
|
+
content = this.improveHeadings(content);
|
|
623
|
+
|
|
624
|
+
return content;
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
async generateDiagrams(content: Documentation): Promise<Diagram[]> {
|
|
628
|
+
const diagrams: Diagram[] = [];
|
|
629
|
+
|
|
630
|
+
// Analyze content for diagram opportunities
|
|
631
|
+
const opportunities = this.identifyDiagramOpportunities(content);
|
|
632
|
+
|
|
633
|
+
for (const opportunity of opportunities) {
|
|
634
|
+
switch (opportunity.type) {
|
|
635
|
+
case DiagramType.FLOWCHART:
|
|
636
|
+
diagrams.push(this.createFlowchart(opportunity));
|
|
637
|
+
break;
|
|
638
|
+
case DiagramType.SEQUENCE:
|
|
639
|
+
diagrams.push(this.createSequenceDiagram(opportunity));
|
|
640
|
+
break;
|
|
641
|
+
case DiagramType.ARCHITECTURE:
|
|
642
|
+
diagrams.push(this.createArchitectureDiagram(opportunity));
|
|
643
|
+
break;
|
|
644
|
+
case DiagramType.CLASS:
|
|
645
|
+
diagrams.push(this.createClassDiagram(opportunity));
|
|
646
|
+
break;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
return diagrams;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
private createFlowchart(opportunity: DiagramOpportunity): Diagram {
|
|
654
|
+
const mermaid = `
|
|
655
|
+
graph TD
|
|
656
|
+
A[Start] --> B{Decision}
|
|
657
|
+
B -->|Yes| C[Process 1]
|
|
658
|
+
B -->|No| D[Process 2]
|
|
659
|
+
C --> E[End]
|
|
660
|
+
D --> E
|
|
661
|
+
`;
|
|
662
|
+
|
|
663
|
+
return {
|
|
664
|
+
id: this.generateId('DG'),
|
|
665
|
+
type: DiagramType.FLOWCHART,
|
|
666
|
+
title: opportunity.title,
|
|
667
|
+
description: opportunity.description,
|
|
668
|
+
format: 'mermaid',
|
|
669
|
+
content: mermaid,
|
|
670
|
+
caption: opportunity.caption,
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
private createSequenceDiagram(opportunity: DiagramOpportunity): Diagram {
|
|
675
|
+
const mermaid = `
|
|
676
|
+
sequenceDiagram
|
|
677
|
+
participant User
|
|
678
|
+
participant System
|
|
679
|
+
participant Database
|
|
680
|
+
|
|
681
|
+
User->>System: Request
|
|
682
|
+
System->>Database: Query
|
|
683
|
+
Database-->>System: Result
|
|
684
|
+
System-->>User: Response
|
|
685
|
+
`;
|
|
686
|
+
|
|
687
|
+
return {
|
|
688
|
+
id: this.generateId('DG'),
|
|
689
|
+
type: DiagramType.SEQUENCE,
|
|
690
|
+
title: opportunity.title,
|
|
691
|
+
description: opportunity.description,
|
|
692
|
+
format: 'mermaid',
|
|
693
|
+
content: mermaid,
|
|
694
|
+
caption: opportunity.caption,
|
|
695
|
+
};
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
private generateId(prefix: string): string {
|
|
699
|
+
return `${prefix}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
private loadTemplates(): void {
|
|
703
|
+
// Load document templates
|
|
704
|
+
this.templates.set('user-guide', new UserGuideTemplate());
|
|
705
|
+
this.templates.set('api-doc', new APIDocTemplate());
|
|
706
|
+
this.templates.set('tutorial', new TutorialTemplate());
|
|
707
|
+
this.templates.set('reference', new ReferenceTemplate());
|
|
708
|
+
this.templates.set('how-to', new HowToTemplate());
|
|
709
|
+
this.templates.set('troubleshooting', new TroubleshootingTemplate());
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
private loadGlossary(): void {
|
|
713
|
+
// Load technical terms
|
|
714
|
+
const terms = [
|
|
715
|
+
{ term: 'API', definition: 'Application Programming Interface' },
|
|
716
|
+
{ term: 'SDK', definition: 'Software Development Kit' },
|
|
717
|
+
{ term: 'REST', definition: 'Representational State Transfer' },
|
|
718
|
+
{ term: 'JSON', definition: 'JavaScript Object Notation' },
|
|
719
|
+
{ term: 'URL', definition: 'Uniform Resource Locator' },
|
|
720
|
+
];
|
|
721
|
+
|
|
722
|
+
for (const { term, definition } of terms) {
|
|
723
|
+
this.glossary.set(term, { term, definition, aliases: [] });
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
// Supporting classes
|
|
729
|
+
class StyleGuide {
|
|
730
|
+
private rules: Map<string, StyleRule> = new Map();
|
|
731
|
+
private terminology: Map<string, string> = new Map();
|
|
732
|
+
|
|
733
|
+
constructor() {
|
|
734
|
+
this.initializeRules();
|
|
735
|
+
this.initializeTerminology();
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
private initializeRules(): void {
|
|
739
|
+
this.rules.set('sentence-length', {
|
|
740
|
+
id: 'sentence-length',
|
|
741
|
+
description: 'Keep sentences under 25 words',
|
|
742
|
+
check: (text: string) => {
|
|
743
|
+
const sentences = text.split(/[.!?]+/);
|
|
744
|
+
return sentences.every(s => s.split(/\s+/).length <= 25);
|
|
745
|
+
},
|
|
746
|
+
});
|
|
747
|
+
|
|
748
|
+
this.rules.set('active-voice', {
|
|
749
|
+
id: 'active-voice',
|
|
750
|
+
description: 'Use active voice',
|
|
751
|
+
check: (text: string) => {
|
|
752
|
+
const passiveIndicators = ['was', 'were', 'been', 'being', 'be'];
|
|
753
|
+
const words = text.toLowerCase().split(/\s+/);
|
|
754
|
+
const passiveCount = words.filter(w => passiveIndicators.includes(w)).length;
|
|
755
|
+
return passiveCount / words.length < 0.05;
|
|
756
|
+
},
|
|
757
|
+
});
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
private initializeTerminology(): void {
|
|
761
|
+
this.terminology.set('click on', 'click');
|
|
762
|
+
this.terminology.set('fill in', 'enter');
|
|
763
|
+
this.terminology.set('fill out', 'complete');
|
|
764
|
+
}
|
|
765
|
+
|
|
766
|
+
getTerminology(): Map<string, string> {
|
|
767
|
+
return this.terminology;
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
class ContentAnalyzer {
|
|
772
|
+
async analyzeSubject(subject: DocumentationSubject): Promise<SubjectAnalysis> {
|
|
773
|
+
return {
|
|
774
|
+
complexity: this.assessComplexity(subject),
|
|
775
|
+
audienceLevel: this.determineAudienceLevel(subject),
|
|
776
|
+
requiredSections: this.identifyRequiredSections(subject),
|
|
777
|
+
keywords: this.extractKeywords(subject),
|
|
778
|
+
concepts: this.identifyConcepts(subject),
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
private assessComplexity(subject: DocumentationSubject): ComplexityLevel {
|
|
783
|
+
// Assess subject complexity
|
|
784
|
+
if (subject.technical && subject.specialized) {
|
|
785
|
+
return ComplexityLevel.ADVANCED;
|
|
786
|
+
}
|
|
787
|
+
if (subject.technical || subject.specialized) {
|
|
788
|
+
return ComplexityLevel.INTERMEDIATE;
|
|
789
|
+
}
|
|
790
|
+
return ComplexityLevel.BEGINNER;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
private determineAudienceLevel(subject: DocumentationSubject): Audience {
|
|
794
|
+
if (subject.audience) return subject.audience;
|
|
795
|
+
|
|
796
|
+
if (subject.technical) {
|
|
797
|
+
return Audience.DEVELOPER;
|
|
798
|
+
}
|
|
799
|
+
return Audience.END_USER;
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
private identifyRequiredSections(subject: DocumentationSubject): string[] {
|
|
803
|
+
const sections: string[] = ['introduction', 'overview'];
|
|
804
|
+
|
|
805
|
+
if (subject.hasAPI) {
|
|
806
|
+
sections.push('api-reference', 'authentication', 'endpoints');
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
if (subject.hasUI) {
|
|
810
|
+
sections.push('user-interface', 'navigation', 'features');
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
sections.push('troubleshooting', 'faq', 'support');
|
|
814
|
+
|
|
815
|
+
return sections;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
private extractKeywords(subject: DocumentationSubject): string[] {
|
|
819
|
+
// Extract important keywords
|
|
820
|
+
return [];
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
private identifyConcepts(subject: DocumentationSubject): Concept[] {
|
|
824
|
+
// Identify key concepts to explain
|
|
825
|
+
return [];
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
class DocumentValidator {
|
|
830
|
+
async validate(content: ContentSection[]): Promise<ValidationResult> {
|
|
831
|
+
const issues: ValidationIssue[] = [];
|
|
832
|
+
|
|
833
|
+
// Check for completeness
|
|
834
|
+
issues.push(...this.checkCompleteness(content));
|
|
835
|
+
|
|
836
|
+
// Check for consistency
|
|
837
|
+
issues.push(...this.checkConsistency(content));
|
|
838
|
+
|
|
839
|
+
// Check for accuracy
|
|
840
|
+
issues.push(...await this.checkAccuracy(content));
|
|
841
|
+
|
|
842
|
+
// Check for readability
|
|
843
|
+
issues.push(...this.checkReadability(content));
|
|
844
|
+
|
|
845
|
+
return {
|
|
846
|
+
valid: issues.filter(i => i.severity === 'error').length === 0,
|
|
847
|
+
issues,
|
|
848
|
+
score: this.calculateScore(issues),
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
private checkCompleteness(content: ContentSection[]): ValidationIssue[] {
|
|
853
|
+
const issues: ValidationIssue[] = [];
|
|
854
|
+
|
|
855
|
+
// Check for missing sections
|
|
856
|
+
const requiredSections = ['introduction', 'overview', 'conclusion'];
|
|
857
|
+
const sectionTitles = content.map(s => s.title.toLowerCase());
|
|
858
|
+
|
|
859
|
+
for (const required of requiredSections) {
|
|
860
|
+
if (!sectionTitles.some(title => title.includes(required))) {
|
|
861
|
+
issues.push({
|
|
862
|
+
type: 'missing-section',
|
|
863
|
+
severity: 'warning',
|
|
864
|
+
message: `Missing ${required} section`,
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
return issues;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
private checkConsistency(content: ContentSection[]): ValidationIssue[] {
|
|
873
|
+
// Check for consistent terminology, formatting, etc.
|
|
874
|
+
return [];
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
private async checkAccuracy(content: ContentSection[]): Promise<ValidationIssue[]> {
|
|
878
|
+
// Check for technical accuracy
|
|
879
|
+
return [];
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
private checkReadability(content: ContentSection[]): ValidationIssue[] {
|
|
883
|
+
// Check readability metrics
|
|
884
|
+
return [];
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
private calculateScore(issues: ValidationIssue[]): number {
|
|
888
|
+
const errorCount = issues.filter(i => i.severity === 'error').length;
|
|
889
|
+
const warningCount = issues.filter(i => i.severity === 'warning').length;
|
|
890
|
+
|
|
891
|
+
return Math.max(0, 100 - (errorCount * 10) - (warningCount * 5));
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
// Template classes
|
|
896
|
+
abstract class DocumentTemplate {
|
|
897
|
+
abstract generate(data: any): DocumentStructure;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
class UserGuideTemplate extends DocumentTemplate {
|
|
901
|
+
generate(data: any): DocumentStructure {
|
|
902
|
+
return {
|
|
903
|
+
template: 'user-guide',
|
|
904
|
+
sections: [
|
|
905
|
+
{ id: 'intro', title: 'Introduction', required: true },
|
|
906
|
+
{ id: 'getting-started', title: 'Getting Started', required: true },
|
|
907
|
+
{ id: 'features', title: 'Features', required: true },
|
|
908
|
+
{ id: 'configuration', title: 'Configuration', required: false },
|
|
909
|
+
{ id: 'troubleshooting', title: 'Troubleshooting', required: true },
|
|
910
|
+
{ id: 'faq', title: 'FAQ', required: true },
|
|
911
|
+
],
|
|
912
|
+
navigation: {
|
|
913
|
+
type: 'hierarchical',
|
|
914
|
+
depth: 3,
|
|
915
|
+
},
|
|
916
|
+
crossReferences: [],
|
|
917
|
+
};
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
class APIDocTemplate extends DocumentTemplate {
|
|
922
|
+
generate(data: any): DocumentStructure {
|
|
923
|
+
return {
|
|
924
|
+
template: 'api-doc',
|
|
925
|
+
sections: [
|
|
926
|
+
{ id: 'overview', title: 'API Overview', required: true },
|
|
927
|
+
{ id: 'authentication', title: 'Authentication', required: true },
|
|
928
|
+
{ id: 'endpoints', title: 'Endpoints', required: true },
|
|
929
|
+
{ id: 'schemas', title: 'Schemas', required: true },
|
|
930
|
+
{ id: 'errors', title: 'Error Codes', required: true },
|
|
931
|
+
{ id: 'examples', title: 'Examples', required: true },
|
|
932
|
+
],
|
|
933
|
+
navigation: {
|
|
934
|
+
type: 'sidebar',
|
|
935
|
+
depth: 2,
|
|
936
|
+
},
|
|
937
|
+
crossReferences: [],
|
|
938
|
+
};
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
class TutorialTemplate extends DocumentTemplate {
|
|
943
|
+
generate(data: any): DocumentStructure {
|
|
944
|
+
return {
|
|
945
|
+
template: 'tutorial',
|
|
946
|
+
sections: [
|
|
947
|
+
{ id: 'objectives', title: 'Learning Objectives', required: true },
|
|
948
|
+
{ id: 'prerequisites', title: 'Prerequisites', required: true },
|
|
949
|
+
{ id: 'steps', title: 'Step-by-Step Guide', required: true },
|
|
950
|
+
{ id: 'exercises', title: 'Exercises', required: false },
|
|
951
|
+
{ id: 'solutions', title: 'Solutions', required: false },
|
|
952
|
+
{ id: 'summary', title: 'Summary', required: true },
|
|
953
|
+
],
|
|
954
|
+
navigation: {
|
|
955
|
+
type: 'linear',
|
|
956
|
+
depth: 2,
|
|
957
|
+
},
|
|
958
|
+
crossReferences: [],
|
|
959
|
+
};
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
class ReferenceTemplate extends DocumentTemplate {
|
|
964
|
+
generate(data: any): DocumentStructure {
|
|
965
|
+
return {
|
|
966
|
+
template: 'reference',
|
|
967
|
+
sections: [],
|
|
968
|
+
navigation: {
|
|
969
|
+
type: 'alphabetical',
|
|
970
|
+
depth: 1,
|
|
971
|
+
},
|
|
972
|
+
crossReferences: [],
|
|
973
|
+
};
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
class HowToTemplate extends DocumentTemplate {
|
|
978
|
+
generate(data: any): DocumentStructure {
|
|
979
|
+
return {
|
|
980
|
+
template: 'how-to',
|
|
981
|
+
sections: [],
|
|
982
|
+
navigation: {
|
|
983
|
+
type: 'task-based',
|
|
984
|
+
depth: 2,
|
|
985
|
+
},
|
|
986
|
+
crossReferences: [],
|
|
987
|
+
};
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
class TroubleshootingTemplate extends DocumentTemplate {
|
|
992
|
+
generate(data: any): DocumentStructure {
|
|
993
|
+
return {
|
|
994
|
+
template: 'troubleshooting',
|
|
995
|
+
sections: [],
|
|
996
|
+
navigation: {
|
|
997
|
+
type: 'problem-solution',
|
|
998
|
+
depth: 2,
|
|
999
|
+
},
|
|
1000
|
+
crossReferences: [],
|
|
1001
|
+
};
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
// Type definitions
|
|
1006
|
+
enum DocumentationType {
|
|
1007
|
+
USER_GUIDE = 'user_guide',
|
|
1008
|
+
API_DOCUMENTATION = 'api_documentation',
|
|
1009
|
+
TUTORIAL = 'tutorial',
|
|
1010
|
+
REFERENCE = 'reference',
|
|
1011
|
+
HOW_TO = 'how_to',
|
|
1012
|
+
RELEASE_NOTES = 'release_notes',
|
|
1013
|
+
TECHNICAL_SPEC = 'technical_spec',
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
enum Audience {
|
|
1017
|
+
END_USER = 'end_user',
|
|
1018
|
+
DEVELOPER = 'developer',
|
|
1019
|
+
ADMIN = 'admin',
|
|
1020
|
+
BUSINESS = 'business',
|
|
1021
|
+
TECHNICAL = 'technical',
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
enum ContentType {
|
|
1025
|
+
CONCEPTUAL = 'conceptual',
|
|
1026
|
+
PROCEDURAL = 'procedural',
|
|
1027
|
+
REFERENCE = 'reference',
|
|
1028
|
+
TUTORIAL = 'tutorial',
|
|
1029
|
+
TROUBLESHOOTING = 'troubleshooting',
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
enum DocumentStatus {
|
|
1033
|
+
DRAFT = 'draft',
|
|
1034
|
+
REVIEW = 'review',
|
|
1035
|
+
APPROVED = 'approved',
|
|
1036
|
+
PUBLISHED = 'published',
|
|
1037
|
+
ARCHIVED = 'archived',
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
enum NoteType {
|
|
1041
|
+
INFO = 'info',
|
|
1042
|
+
TIP = 'tip',
|
|
1043
|
+
IMPORTANT = 'important',
|
|
1044
|
+
EXPLANATION = 'explanation',
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
enum WarningType {
|
|
1048
|
+
CAUTION = 'caution',
|
|
1049
|
+
WARNING = 'warning',
|
|
1050
|
+
DANGER = 'danger',
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
enum DiagramType {
|
|
1054
|
+
FLOWCHART = 'flowchart',
|
|
1055
|
+
SEQUENCE = 'sequence',
|
|
1056
|
+
ARCHITECTURE = 'architecture',
|
|
1057
|
+
CLASS = 'class',
|
|
1058
|
+
ERD = 'erd',
|
|
1059
|
+
NETWORK = 'network',
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
enum ComplexityLevel {
|
|
1063
|
+
BEGINNER = 'beginner',
|
|
1064
|
+
INTERMEDIATE = 'intermediate',
|
|
1065
|
+
ADVANCED = 'advanced',
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
enum ChangeType {
|
|
1069
|
+
FEATURE = 'feature',
|
|
1070
|
+
IMPROVEMENT = 'improvement',
|
|
1071
|
+
BUG_FIX = 'bug_fix',
|
|
1072
|
+
BREAKING = 'breaking',
|
|
1073
|
+
DEPRECATION = 'deprecation',
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
// Interface definitions
|
|
1077
|
+
interface DocumentationSubject {
|
|
1078
|
+
name: string;
|
|
1079
|
+
type: string;
|
|
1080
|
+
description: string;
|
|
1081
|
+
technical: boolean;
|
|
1082
|
+
specialized: boolean;
|
|
1083
|
+
hasAPI: boolean;
|
|
1084
|
+
hasUI: boolean;
|
|
1085
|
+
audience?: Audience;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
interface DocumentationRequirements {
|
|
1089
|
+
title?: string;
|
|
1090
|
+
audience: Audience;
|
|
1091
|
+
purpose: string;
|
|
1092
|
+
scope: string;
|
|
1093
|
+
format?: string;
|
|
1094
|
+
style?: string;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
interface DocumentMetadata {
|
|
1098
|
+
author: string;
|
|
1099
|
+
created: Date;
|
|
1100
|
+
modified: Date;
|
|
1101
|
+
reviewers: string[];
|
|
1102
|
+
approvers: string[];
|
|
1103
|
+
tags: string[];
|
|
1104
|
+
keywords: string[];
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
interface SectionDefinition {
|
|
1108
|
+
id: string;
|
|
1109
|
+
title: string;
|
|
1110
|
+
required: boolean;
|
|
1111
|
+
template?: string;
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
interface NavigationStructure {
|
|
1115
|
+
type: string;
|
|
1116
|
+
depth: number;
|
|
1117
|
+
items?: NavigationItem[];
|
|
1118
|
+
}
|
|
1119
|
+
|
|
1120
|
+
interface NavigationItem {
|
|
1121
|
+
title: string;
|
|
1122
|
+
href: string;
|
|
1123
|
+
children?: NavigationItem[];
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
interface CrossReference {
|
|
1127
|
+
from: string;
|
|
1128
|
+
to: string;
|
|
1129
|
+
type: string;
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
interface Example {
|
|
1133
|
+
title: string;
|
|
1134
|
+
description: string;
|
|
1135
|
+
code: string;
|
|
1136
|
+
language?: string;
|
|
1137
|
+
output?: string;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
interface Diagram {
|
|
1141
|
+
id: string;
|
|
1142
|
+
type: DiagramType;
|
|
1143
|
+
title: string;
|
|
1144
|
+
description: string;
|
|
1145
|
+
format: string;
|
|
1146
|
+
content: string;
|
|
1147
|
+
caption?: string;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
interface CodeSnippet {
|
|
1151
|
+
id: string;
|
|
1152
|
+
language: string;
|
|
1153
|
+
code: string;
|
|
1154
|
+
title?: string;
|
|
1155
|
+
description?: string;
|
|
1156
|
+
lineNumbers?: boolean;
|
|
1157
|
+
highlight?: number[];
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
interface Warning {
|
|
1161
|
+
type: WarningType;
|
|
1162
|
+
content: string;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
interface Note {
|
|
1166
|
+
type: NoteType;
|
|
1167
|
+
content: string;
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
interface Reference {
|
|
1171
|
+
id: string;
|
|
1172
|
+
title: string;
|
|
1173
|
+
url?: string;
|
|
1174
|
+
page?: string;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
interface GlossaryTerm {
|
|
1178
|
+
term: string;
|
|
1179
|
+
definition: string;
|
|
1180
|
+
aliases: string[];
|
|
1181
|
+
seeAlso?: string[];
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
interface UserGuide extends Documentation {
|
|
1185
|
+
product: string;
|
|
1186
|
+
quickStart: ContentSection | null;
|
|
1187
|
+
troubleshooting: ContentSection | null;
|
|
1188
|
+
faq: ContentSection | null;
|
|
1189
|
+
glossary: GlossaryTerm[];
|
|
1190
|
+
index: IndexEntry[];
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
interface IndexEntry {
|
|
1194
|
+
term: string;
|
|
1195
|
+
pages: string[];
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
interface Product {
|
|
1199
|
+
name: string;
|
|
1200
|
+
version: string;
|
|
1201
|
+
description: string;
|
|
1202
|
+
features: Feature[];
|
|
1203
|
+
configuration?: Configuration;
|
|
1204
|
+
prerequisites: string[];
|
|
1205
|
+
targetAudience: string[];
|
|
1206
|
+
domain: string;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
interface Feature {
|
|
1210
|
+
id: string;
|
|
1211
|
+
name: string;
|
|
1212
|
+
description: string;
|
|
1213
|
+
category: string;
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
interface Configuration {
|
|
1217
|
+
settings: Setting[];
|
|
1218
|
+
files: ConfigFile[];
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
interface Setting {
|
|
1222
|
+
name: string;
|
|
1223
|
+
type: string;
|
|
1224
|
+
default: any;
|
|
1225
|
+
description: string;
|
|
1226
|
+
required: boolean;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
interface ConfigFile {
|
|
1230
|
+
path: string;
|
|
1231
|
+
format: string;
|
|
1232
|
+
example: string;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
interface APISpecification {
|
|
1236
|
+
name: string;
|
|
1237
|
+
version: string;
|
|
1238
|
+
baseUrl: string;
|
|
1239
|
+
authentication: Authentication;
|
|
1240
|
+
endpoints: APIEndpoint[];
|
|
1241
|
+
schemas: Schema[];
|
|
1242
|
+
errors: ErrorCode[];
|
|
1243
|
+
rateLimiting?: RateLimiting;
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
interface APIDocumentation extends Documentation {
|
|
1247
|
+
baseUrl: string;
|
|
1248
|
+
authentication: AuthenticationDoc;
|
|
1249
|
+
endpoints: EndpointDocumentation[];
|
|
1250
|
+
schemas: SchemaDocumentation[];
|
|
1251
|
+
examples: APIExample[];
|
|
1252
|
+
errors: ErrorDocumentation[];
|
|
1253
|
+
rateLimiting: RateLimitingDoc;
|
|
1254
|
+
changelog: ChangelogEntry[];
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
interface APIEndpoint {
|
|
1258
|
+
id: string;
|
|
1259
|
+
method: string;
|
|
1260
|
+
path: string;
|
|
1261
|
+
summary: string;
|
|
1262
|
+
description: string;
|
|
1263
|
+
parameters: Parameter[];
|
|
1264
|
+
requestBody?: RequestBody;
|
|
1265
|
+
responses: Response[];
|
|
1266
|
+
security?: Security[];
|
|
1267
|
+
deprecated?: boolean;
|
|
1268
|
+
tags?: string[];
|
|
1269
|
+
baseUrl?: string;
|
|
1270
|
+
headers?: Record<string, string>;
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
interface EndpointDocumentation {
|
|
1274
|
+
id: string;
|
|
1275
|
+
method: string;
|
|
1276
|
+
path: string;
|
|
1277
|
+
summary: string;
|
|
1278
|
+
description: string;
|
|
1279
|
+
parameters: ParameterDocumentation[];
|
|
1280
|
+
requestBody: RequestBodyDoc | null;
|
|
1281
|
+
responses: ResponseDoc[];
|
|
1282
|
+
examples: EndpointExample[];
|
|
1283
|
+
security: Security[];
|
|
1284
|
+
deprecated: boolean;
|
|
1285
|
+
tags: string[];
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
interface Parameter {
|
|
1289
|
+
name: string;
|
|
1290
|
+
in: string;
|
|
1291
|
+
description: string;
|
|
1292
|
+
required: boolean;
|
|
1293
|
+
type: string;
|
|
1294
|
+
format?: string;
|
|
1295
|
+
default?: any;
|
|
1296
|
+
enum?: any[];
|
|
1297
|
+
example?: any;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
interface ParameterDocumentation {
|
|
1301
|
+
name: string;
|
|
1302
|
+
in: string;
|
|
1303
|
+
description: string;
|
|
1304
|
+
required: boolean;
|
|
1305
|
+
type: string;
|
|
1306
|
+
format?: string;
|
|
1307
|
+
default?: any;
|
|
1308
|
+
enum?: any[];
|
|
1309
|
+
example: any;
|
|
1310
|
+
constraints: string[];
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
interface RequestBody {
|
|
1314
|
+
description: string;
|
|
1315
|
+
required: boolean;
|
|
1316
|
+
content: any;
|
|
1317
|
+
example?: any;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
interface RequestBodyDoc {
|
|
1321
|
+
description: string;
|
|
1322
|
+
required: boolean;
|
|
1323
|
+
schema: any;
|
|
1324
|
+
examples: any[];
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
interface Response {
|
|
1328
|
+
status: number;
|
|
1329
|
+
description: string;
|
|
1330
|
+
content?: any;
|
|
1331
|
+
headers?: any;
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
interface ResponseDoc {
|
|
1335
|
+
status: number;
|
|
1336
|
+
description: string;
|
|
1337
|
+
schema: any;
|
|
1338
|
+
examples: any[];
|
|
1339
|
+
headers: any;
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
interface EndpointExample {
|
|
1343
|
+
title: string;
|
|
1344
|
+
language: string;
|
|
1345
|
+
code: string;
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
interface Authentication {
|
|
1349
|
+
type: string;
|
|
1350
|
+
description: string;
|
|
1351
|
+
details: any;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1354
|
+
interface AuthenticationDoc {
|
|
1355
|
+
type: string;
|
|
1356
|
+
description: string;
|
|
1357
|
+
setup: string;
|
|
1358
|
+
examples: any[];
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
interface Schema {
|
|
1362
|
+
name: string;
|
|
1363
|
+
type: string;
|
|
1364
|
+
properties: any;
|
|
1365
|
+
required?: string[];
|
|
1366
|
+
example?: any;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
interface SchemaDocumentation {
|
|
1370
|
+
name: string;
|
|
1371
|
+
description: string;
|
|
1372
|
+
properties: PropertyDoc[];
|
|
1373
|
+
example: any;
|
|
1374
|
+
validation: any;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
interface PropertyDoc {
|
|
1378
|
+
name: string;
|
|
1379
|
+
type: string;
|
|
1380
|
+
description: string;
|
|
1381
|
+
required: boolean;
|
|
1382
|
+
constraints: string[];
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
interface ErrorCode {
|
|
1386
|
+
code: string;
|
|
1387
|
+
message: string;
|
|
1388
|
+
description: string;
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
interface ErrorDocumentation {
|
|
1392
|
+
code: string;
|
|
1393
|
+
message: string;
|
|
1394
|
+
description: string;
|
|
1395
|
+
resolution: string;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
interface RateLimiting {
|
|
1399
|
+
requests: number;
|
|
1400
|
+
window: string;
|
|
1401
|
+
description: string;
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
interface RateLimitingDoc {
|
|
1405
|
+
limits: any[];
|
|
1406
|
+
headers: string[];
|
|
1407
|
+
handling: string;
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
interface APIExample {
|
|
1411
|
+
title: string;
|
|
1412
|
+
description: string;
|
|
1413
|
+
request: any;
|
|
1414
|
+
response: any;
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
interface Security {
|
|
1418
|
+
type: string;
|
|
1419
|
+
scopes?: string[];
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
interface ChangelogEntry {
|
|
1423
|
+
version: string;
|
|
1424
|
+
date: Date;
|
|
1425
|
+
changes: string[];
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
interface TutorialTopic {
|
|
1429
|
+
title: string;
|
|
1430
|
+
difficulty: string;
|
|
1431
|
+
estimatedDuration: string;
|
|
1432
|
+
objectives: string[];
|
|
1433
|
+
prerequisites: string[];
|
|
1434
|
+
sections: TutorialSection[];
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
interface Tutorial extends Documentation {
|
|
1438
|
+
difficulty: string;
|
|
1439
|
+
duration: string;
|
|
1440
|
+
objectives: string[];
|
|
1441
|
+
prerequisites: string[];
|
|
1442
|
+
exercises: Exercise[];
|
|
1443
|
+
solutions: Solution[];
|
|
1444
|
+
resources: Resource[];
|
|
1445
|
+
}
|
|
1446
|
+
|
|
1447
|
+
interface TutorialSection {
|
|
1448
|
+
id: string;
|
|
1449
|
+
title: string;
|
|
1450
|
+
content?: string;
|
|
1451
|
+
steps?: Step[];
|
|
1452
|
+
code?: CodeExample[];
|
|
1453
|
+
explanations?: string[];
|
|
1454
|
+
tips?: string[];
|
|
1455
|
+
warnings?: string[];
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
interface Step {
|
|
1459
|
+
number: number;
|
|
1460
|
+
instruction: string;
|
|
1461
|
+
explanation?: string;
|
|
1462
|
+
code?: string;
|
|
1463
|
+
expected?: string;
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
interface CodeExample {
|
|
1467
|
+
title: string;
|
|
1468
|
+
language: string;
|
|
1469
|
+
code: string;
|
|
1470
|
+
explanation?: string;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
interface Exercise {
|
|
1474
|
+
id: string;
|
|
1475
|
+
title: string;
|
|
1476
|
+
description: string;
|
|
1477
|
+
difficulty: string;
|
|
1478
|
+
hints?: string[];
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
interface Solution {
|
|
1482
|
+
exerciseId: string;
|
|
1483
|
+
solution: string;
|
|
1484
|
+
explanation: string;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
interface Resource {
|
|
1488
|
+
title: string;
|
|
1489
|
+
url: string;
|
|
1490
|
+
type: string;
|
|
1491
|
+
description: string;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
interface Release {
|
|
1495
|
+
version: string;
|
|
1496
|
+
date: Date;
|
|
1497
|
+
summary: string;
|
|
1498
|
+
highlights: string[];
|
|
1499
|
+
changes: Change[];
|
|
1500
|
+
knownIssues: Issue[];
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
interface ReleaseNotes extends Documentation {
|
|
1504
|
+
date: Date;
|
|
1505
|
+
summary: string;
|
|
1506
|
+
highlights: string[];
|
|
1507
|
+
newFeatures: FeatureDocumentation[];
|
|
1508
|
+
improvements: ImprovementDoc[];
|
|
1509
|
+
bugFixes: BugFixDoc[];
|
|
1510
|
+
breakingChanges: BreakingChangeDoc[];
|
|
1511
|
+
deprecations: DeprecationDoc[];
|
|
1512
|
+
knownIssues: KnownIssueDoc[];
|
|
1513
|
+
upgradeGuide: UpgradeGuide | null;
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
interface Change {
|
|
1517
|
+
id: string;
|
|
1518
|
+
type: ChangeType;
|
|
1519
|
+
title: string;
|
|
1520
|
+
description: string;
|
|
1521
|
+
category: string;
|
|
1522
|
+
impact: string;
|
|
1523
|
+
examples?: any[];
|
|
1524
|
+
documentationUrl?: string;
|
|
1525
|
+
relatedIssues?: string[];
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1528
|
+
interface FeatureDocumentation {
|
|
1529
|
+
id: string;
|
|
1530
|
+
title: string;
|
|
1531
|
+
description: string;
|
|
1532
|
+
category: string;
|
|
1533
|
+
impact: string;
|
|
1534
|
+
examples: Example[];
|
|
1535
|
+
documentation?: string;
|
|
1536
|
+
relatedIssues?: string[];
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
interface ImprovementDoc {
|
|
1540
|
+
title: string;
|
|
1541
|
+
description: string;
|
|
1542
|
+
impact: string;
|
|
1543
|
+
before?: string;
|
|
1544
|
+
after?: string;
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
interface BugFixDoc {
|
|
1548
|
+
id: string;
|
|
1549
|
+
title: string;
|
|
1550
|
+
description: string;
|
|
1551
|
+
severity: string;
|
|
1552
|
+
affectedVersions: string[];
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
interface BreakingChangeDoc {
|
|
1556
|
+
title: string;
|
|
1557
|
+
description: string;
|
|
1558
|
+
migration: string;
|
|
1559
|
+
alternatives: string[];
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
interface DeprecationDoc {
|
|
1563
|
+
feature: string;
|
|
1564
|
+
description: string;
|
|
1565
|
+
alternative: string;
|
|
1566
|
+
removalVersion: string;
|
|
1567
|
+
}
|
|
1568
|
+
|
|
1569
|
+
interface Issue {
|
|
1570
|
+
id: string;
|
|
1571
|
+
title: string;
|
|
1572
|
+
description: string;
|
|
1573
|
+
workaround?: string;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
interface KnownIssueDoc {
|
|
1577
|
+
id: string;
|
|
1578
|
+
title: string;
|
|
1579
|
+
description: string;
|
|
1580
|
+
workaround: string;
|
|
1581
|
+
affectedVersions: string[];
|
|
1582
|
+
fixVersion?: string;
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
interface UpgradeGuide {
|
|
1586
|
+
fromVersion: string;
|
|
1587
|
+
toVersion: string;
|
|
1588
|
+
steps: Step[];
|
|
1589
|
+
breakingChanges: string[];
|
|
1590
|
+
migrations: Migration[];
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
interface Migration {
|
|
1594
|
+
component: string;
|
|
1595
|
+
description: string;
|
|
1596
|
+
before: string;
|
|
1597
|
+
after: string;
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
interface SubjectAnalysis {
|
|
1601
|
+
complexity: ComplexityLevel;
|
|
1602
|
+
audienceLevel: Audience;
|
|
1603
|
+
requiredSections: string[];
|
|
1604
|
+
keywords: string[];
|
|
1605
|
+
concepts: Concept[];
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
interface Concept {
|
|
1609
|
+
name: string;
|
|
1610
|
+
definition: string;
|
|
1611
|
+
related: string[];
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
interface DiagramOpportunity {
|
|
1615
|
+
type: DiagramType;
|
|
1616
|
+
title: string;
|
|
1617
|
+
description: string;
|
|
1618
|
+
caption: string;
|
|
1619
|
+
data: any;
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
interface StyleRule {
|
|
1623
|
+
id: string;
|
|
1624
|
+
description: string;
|
|
1625
|
+
check: (text: string) => boolean;
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
interface ValidationResult {
|
|
1629
|
+
valid: boolean;
|
|
1630
|
+
issues: ValidationIssue[];
|
|
1631
|
+
score: number;
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
interface ValidationIssue {
|
|
1635
|
+
type: string;
|
|
1636
|
+
severity: string;
|
|
1637
|
+
message: string;
|
|
1638
|
+
line?: number;
|
|
1639
|
+
column?: number;
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
// Export the writer
|
|
1643
|
+
export { TechnicalDocumentationWriter, Documentation };
|
|
1644
|
+
```
|
|
1645
|
+
|
|
1646
|
+
## Best Practices
|
|
1647
|
+
1. **Know Your Audience**: Write for your specific audience level
|
|
1648
|
+
2. **Be Clear and Concise**: Use simple, direct language
|
|
1649
|
+
3. **Use Examples**: Include practical, working examples
|
|
1650
|
+
4. **Visual Aids**: Use diagrams and screenshots effectively
|
|
1651
|
+
5. **Consistency**: Maintain consistent style and terminology
|
|
1652
|
+
6. **Organization**: Use logical structure and navigation
|
|
1653
|
+
7. **Testing**: Test all code examples and procedures
|
|
1654
|
+
|
|
1655
|
+
## Documentation Strategies
|
|
1656
|
+
- Start with user goals and tasks
|
|
1657
|
+
- Use progressive disclosure for complex topics
|
|
1658
|
+
- Provide multiple learning paths
|
|
1659
|
+
- Include troubleshooting and FAQs
|
|
1660
|
+
- Keep documentation updated with code
|
|
1661
|
+
- Use version control for documentation
|
|
1662
|
+
- Gather and incorporate user feedback
|
|
1663
|
+
|
|
1664
|
+
## Approach
|
|
1665
|
+
- Understand the subject matter thoroughly
|
|
1666
|
+
- Identify target audience and their needs
|
|
1667
|
+
- Plan documentation structure
|
|
1668
|
+
- Write clear, concise content
|
|
1669
|
+
- Add examples and visuals
|
|
1670
|
+
- Review and edit for clarity
|
|
1671
|
+
- Test all procedures and examples
|
|
1672
|
+
|
|
1673
|
+
## Output Format
|
|
1674
|
+
- Provide complete documentation frameworks
|
|
1675
|
+
- Include various document templates
|
|
1676
|
+
- Add style guide implementation
|
|
1677
|
+
- Include examples and code snippets
|
|
1678
|
+
- Provide validation tools
|
|
1679
|
+
- Generate multiple output formats
|