@chongyan/autospec 1.0.2 → 1.0.3
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/LICENSE +242 -21
- package/README.md +54 -608
- package/dist/README.md +54 -0
- package/dist/adapters/claude-code/README.md.enc +6 -0
- package/dist/adapters/claude-code/agents.js +1 -0
- package/dist/adapters/claude-code/commands.config.js +1 -0
- package/dist/adapters/claude-code/commands.js +1 -0
- package/dist/adapters/claude-code/hooks.config.js +2 -0
- package/dist/adapters/claude-code/hooks.js +1 -0
- package/dist/adapters/claude-code/install.js +1 -0
- package/dist/adapters/claude-code/skills.js +1 -0
- package/dist/adapters/codex/README.md.enc +6 -0
- package/dist/adapters/codex/hooks/pre-commit.sh +10 -0
- package/dist/adapters/codex/install.js +1 -0
- package/dist/adapters/codex/prompts/env-learn.md.enc +6 -0
- package/dist/adapters/codex/prompts/review.md.enc +6 -0
- package/dist/adapters/codex/wrappers/autospec-cli.sh +118 -0
- package/dist/adapters/codex/wrappers/parallel.sh +20 -0
- package/dist/adapters/codex/wrappers/post-task.sh +138 -0
- package/dist/bin/autospec.js +2 -0
- package/dist/knowledge/README.en.md.enc +6 -0
- package/dist/knowledge/README.md.enc +6 -0
- package/dist/knowledge/change-management.md.enc +6 -0
- package/dist/knowledge/cognition-engine.md.enc +6 -0
- package/dist/knowledge/config/baseline-permissions.md.enc +6 -0
- package/dist/knowledge/config/external-mounts.yaml.enc +6 -0
- package/dist/knowledge/config/model-profiles.yaml.enc +6 -0
- package/dist/knowledge/config/role-composition.yaml.enc +6 -0
- package/dist/knowledge/config/token-optimization.yaml.enc +6 -0
- package/dist/knowledge/config/validation-patterns.yaml.enc +6 -0
- package/dist/knowledge/constitution.md.enc +6 -0
- package/dist/knowledge/core-rules.md.enc +6 -0
- package/dist/knowledge/environment/adapters/README.md.enc +6 -0
- package/dist/knowledge/environment/detection-patterns.yaml.enc +6 -0
- package/dist/knowledge/environment/failure-patterns.json +223 -0
- package/dist/knowledge/environment/repair-strategies.json +206 -0
- package/dist/knowledge/memory/README.md.enc +6 -0
- package/dist/knowledge/memory/field/README.md.enc +6 -0
- package/dist/knowledge/memory/project/decisions/README.md.enc +6 -0
- package/dist/knowledge/memory/project/evolution-log.md.enc +6 -0
- package/dist/knowledge/memory/project/health-metrics.md.enc +6 -0
- package/dist/knowledge/memory/team/best-practices.md.enc +6 -0
- package/dist/knowledge/pipeline/code.md.enc +6 -0
- package/dist/knowledge/pipeline/explore.md.enc +6 -0
- package/dist/knowledge/pipeline/plan.md.enc +6 -0
- package/dist/knowledge/pipeline/protocol.md.enc +6 -0
- package/dist/knowledge/protocol/capabilities.yaml.enc +6 -0
- package/dist/knowledge/protocol/evolve-integration.md.enc +6 -0
- package/dist/knowledge/skills/README.md.enc +6 -0
- package/dist/knowledge/skills/adversarial-review.md.enc +6 -0
- package/dist/knowledge/skills/analyze-requirement.md.enc +6 -0
- package/dist/knowledge/skills/channel-operations.md.enc +6 -0
- package/dist/knowledge/skills/content-operations.md.enc +6 -0
- package/dist/knowledge/skills/content-prompts.md.enc +6 -0
- package/dist/knowledge/skills/conversion-optimization.md.enc +6 -0
- package/dist/knowledge/skills/data-operations.md.enc +6 -0
- package/dist/knowledge/skills/design-solution.md.enc +6 -0
- package/dist/knowledge/skills/growth-strategies.md.enc +6 -0
- package/dist/knowledge/skills/implement-code.md.enc +6 -0
- package/dist/knowledge/skills/knowledge-distill.md.enc +6 -0
- package/dist/knowledge/skills/parallel-dev.md.enc +6 -0
- package/dist/knowledge/skills/private-domain-traffic.md.enc +6 -0
- package/dist/knowledge/skills/skill-format.md.enc +6 -0
- package/dist/knowledge/skills/social-commerce.md.enc +6 -0
- package/dist/knowledge/skills/team-orchestration.md.enc +6 -0
- package/dist/knowledge/skills/unified-review.md.enc +6 -0
- package/dist/knowledge/skills/user-operations.md.enc +6 -0
- package/dist/knowledge/templates/autospec-config.yaml.enc +6 -0
- package/dist/knowledge/templates/smoke-test.md.enc +6 -0
- package/dist/knowledge/templates/spec/SPEC.md.enc +6 -0
- package/dist/knowledge/templates/spec/layers/delta.md.enc +6 -0
- package/dist/knowledge/templates/spec/layers/how.md.enc +6 -0
- package/dist/knowledge/templates/spec/layers/plan.md.enc +6 -0
- package/dist/knowledge/templates/spec/layers/what.md.enc +6 -0
- package/dist/knowledge/templates/spec/layers/why.md.enc +6 -0
- package/dist/knowledge/templates/wiki/catalog.yaml.enc +6 -0
- package/dist/knowledge/templates/wiki/content.md.enc +6 -0
- package/dist/knowledge/templates/wiki/meta.yaml.enc +6 -0
- package/dist/package.json +62 -0
- package/{plugins → dist/plugins}/.claude-plugin/plugin.json +259 -101
- package/dist/plugins/agents/roles/ai-engineer.md.enc +6 -0
- package/dist/plugins/agents/roles/backend-engineer.md.enc +6 -0
- package/dist/plugins/agents/roles/ceo.md.enc +6 -0
- package/dist/plugins/agents/roles/channel-ops.md.enc +6 -0
- package/dist/plugins/agents/roles/content-ops.md.enc +6 -0
- package/dist/plugins/agents/roles/conversion-ops.md.enc +6 -0
- package/dist/plugins/agents/roles/data-engineer.md.enc +6 -0
- package/dist/plugins/agents/roles/data-ops.md.enc +6 -0
- package/dist/plugins/agents/roles/devops-engineer.md.enc +6 -0
- package/dist/plugins/agents/roles/frontend-engineer.md.enc +6 -0
- package/dist/plugins/agents/roles/marketing-director.md.enc +6 -0
- package/dist/plugins/agents/roles/operations-director.md.enc +6 -0
- package/dist/plugins/agents/roles/private-traffic.md.enc +6 -0
- package/dist/plugins/agents/roles/product-owner.md.enc +6 -0
- package/dist/plugins/agents/roles/quality-engineer.md.enc +6 -0
- package/dist/plugins/agents/roles/security-engineer.md.enc +6 -0
- package/dist/plugins/agents/roles/tech-lead.md.enc +6 -0
- package/dist/plugins/agents/roles/user-ops.md.enc +6 -0
- package/dist/plugins/agents/support/blind-comparator.md.enc +6 -0
- package/dist/plugins/agents/support/consistency-checker.md.enc +6 -0
- package/dist/plugins/agents/support/experiment-evaluator.md.enc +6 -0
- package/dist/plugins/agents/support/failure-diagnostician.md.enc +6 -0
- package/dist/plugins/agents/support/independent-reviewer.md.enc +6 -0
- package/dist/plugins/agents/support/memory-curator.md.enc +6 -0
- package/dist/plugins/agents/support/monitoring-agent.md.enc +6 -0
- package/dist/plugins/agents/support/safety-auditor.md.enc +6 -0
- package/dist/plugins/agents/support/skill-benchmarker.md.enc +6 -0
- package/dist/plugins/agents/support/skill-forger.md.enc +6 -0
- package/dist/plugins/agents/support/stage-gate-evaluator.md.enc +6 -0
- package/dist/plugins/agents/support/team-orchestrator.md.enc +6 -0
- package/dist/plugins/agents/support/test-coverage-reviewer.md.enc +6 -0
- package/dist/plugins/benchmarks/templates/README.en.md.enc +6 -0
- package/dist/plugins/benchmarks/templates/README.md.enc +6 -0
- package/dist/plugins/benchmarks/templates/commands/code-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/commands/explore-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/commands/field-evolve-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/commands/plan-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/commands/project-evolve-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/commands/review-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/commands/run-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/benchmark-executor-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/benchmark-generator-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/delivery-stage-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/design-stage-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/exploration-phase-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/field-evolve-analyzer-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/field-evolve-distiller-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/field-evolve-executor-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/field-evolve-fixer-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/field-evolve-learner-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/field-evolve-scanner-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/field-evolve-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/field-evolve-verifier-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/implementation-stage-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/layer1-validation-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/project-evolve-analyzer-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/project-evolve-fixer-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/project-evolve-generator-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/project-evolve-learner-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/project-evolve-reviewer-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/project-evolve-scanner-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/project-evolve-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/project-evolve-verifier-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/requirement-analyzer-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/skill-forge-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/startup-guard-template.yaml.enc +6 -0
- package/dist/plugins/benchmarks/templates/skills/testing-stage-template.yaml.enc +6 -0
- package/dist/plugins/commands/README.en.md.enc +6 -0
- package/dist/plugins/commands/README.md.enc +6 -0
- package/dist/plugins/commands/automation.md.enc +6 -0
- package/dist/plugins/commands/code.md.enc +6 -0
- package/dist/plugins/commands/contribute.md.enc +6 -0
- package/dist/plugins/commands/dashboard.md.enc +6 -0
- package/dist/plugins/commands/env.md.enc +6 -0
- package/dist/plugins/commands/explore.md.enc +6 -0
- package/dist/plugins/commands/field-evolve.md.enc +6 -0
- package/dist/plugins/commands/global.md.enc +6 -0
- package/dist/plugins/commands/init.md.enc +6 -0
- package/dist/plugins/commands/list.md.enc +6 -0
- package/dist/plugins/commands/memory.md.enc +6 -0
- package/dist/plugins/commands/monitor.md.enc +6 -0
- package/dist/plugins/commands/org.md.enc +6 -0
- package/dist/plugins/commands/persist.md.enc +6 -0
- package/dist/plugins/commands/plan.md.enc +6 -0
- package/dist/plugins/commands/plugin.md.enc +6 -0
- package/dist/plugins/commands/project-evolve.md.enc +6 -0
- package/dist/plugins/commands/review.md.enc +6 -0
- package/dist/plugins/commands/run.md.enc +6 -0
- package/dist/plugins/commands/status.md.enc +6 -0
- package/dist/plugins/commands/sync.md.enc +6 -0
- package/dist/plugins/commands/update.md.enc +6 -0
- package/dist/plugins/env-capabilities/env-core/plugin.json +33 -0
- package/dist/plugins/hooks/README.en.md.enc +6 -0
- package/dist/plugins/hooks/README.md.enc +6 -0
- package/dist/plugins/hooks/artifact-evaluation-hook.js +2 -0
- package/dist/plugins/hooks/cognitive-dreamer.js +2 -0
- package/dist/plugins/hooks/cognitive-sync.js +2 -0
- package/dist/plugins/hooks/cognitive-tracker.js +2 -0
- package/dist/plugins/hooks/config/detection-patterns.yaml.enc +6 -0
- package/dist/plugins/hooks/constitution-guard.js +2 -0
- package/dist/plugins/hooks/do-review-separation-guard.js +2 -0
- package/dist/plugins/hooks/environment-autocommit.js +2 -0
- package/dist/plugins/hooks/environment-doctor.js +1 -0
- package/dist/plugins/hooks/environment-startup-scan.js +2 -0
- package/dist/plugins/hooks/execution-tracker.js +2 -0
- package/dist/plugins/hooks/frozen-zone-guard.js +2 -0
- package/dist/plugins/hooks/layer1-validator.js +2 -0
- package/dist/plugins/hooks/lib/artifact-evaluator.js +1 -0
- package/dist/plugins/hooks/lib/auto-fix-loop.js +1 -0
- package/dist/plugins/hooks/lib/benchmarks/change-detector.js +1 -0
- package/dist/plugins/hooks/lib/benchmarks/evaluator.js +1 -0
- package/dist/plugins/hooks/lib/benchmarks/integration-example.js +1 -0
- package/dist/plugins/hooks/lib/cognitive/adaptive-matcher.js +1 -0
- package/dist/plugins/hooks/lib/cognitive/base-store.js +1 -0
- package/dist/plugins/hooks/lib/cognitive/causal-engine.js +1 -0
- package/dist/plugins/hooks/lib/cognitive/cognitive-config.js +1 -0
- package/dist/plugins/hooks/lib/cognitive/cognitive-fingerprint.js +1 -0
- package/dist/plugins/hooks/lib/cognitive/collective-sync.js +1 -0
- package/dist/plugins/hooks/lib/cognitive/confidence-engine.js +1 -0
- package/dist/plugins/hooks/lib/cognitive/dream-engine.js +1 -0
- package/dist/plugins/hooks/lib/cognitive/episodic-store.js +1 -0
- package/dist/plugins/hooks/lib/cognitive/index.js +1 -0
- package/dist/plugins/hooks/lib/cognitive/kernel.js +1 -0
- package/dist/plugins/hooks/lib/cognitive/knowledge-distiller.js +1 -0
- package/dist/plugins/hooks/lib/cognitive/memory-transport.js +1 -0
- package/dist/plugins/hooks/lib/cognitive/persistence-manager.js +1 -0
- package/dist/plugins/hooks/lib/cognitive/priority-store.js +1 -0
- package/dist/plugins/hooks/lib/cognitive/procedural-store.js +1 -0
- package/dist/plugins/hooks/lib/cognitive/semantic-store.js +1 -0
- package/dist/plugins/hooks/lib/cognitive/skill-tuner.js +1 -0
- package/dist/plugins/hooks/lib/cognitive/wiki-materializer.js +1 -0
- package/dist/plugins/hooks/lib/detection-pattern-loader.js +1 -0
- package/dist/plugins/hooks/lib/directory-discovery.js +1 -0
- package/dist/plugins/hooks/lib/environment-capability-package.js +1 -0
- package/dist/plugins/hooks/lib/environment-capability-probe.js +1 -0
- package/dist/plugins/hooks/lib/environment-config-loader.js +1 -0
- package/dist/plugins/hooks/lib/environment-executor.js +1 -0
- package/dist/plugins/hooks/lib/environment-feedback.js +1 -0
- package/dist/plugins/hooks/lib/environment-health-monitor.js +1 -0
- package/dist/plugins/hooks/lib/environment-knowledge-synthesizer.js +1 -0
- package/dist/plugins/hooks/lib/environment-knowledge-validator.js +1 -0
- package/dist/plugins/hooks/lib/environment-learning-discoverer.js +1 -0
- package/dist/plugins/hooks/lib/environment-learning-engine.js +1 -0
- package/dist/plugins/hooks/lib/environment-module-repository.js +1 -0
- package/dist/plugins/hooks/lib/environment-planner.js +1 -0
- package/dist/plugins/hooks/lib/environment-plugin-registry.js +1 -0
- package/dist/plugins/hooks/lib/environment-readiness.js +1 -0
- package/dist/plugins/hooks/lib/environment-route-ranking.js +1 -0
- package/dist/plugins/hooks/lib/environment-strategy-overlay.js +1 -0
- package/dist/plugins/hooks/lib/execution-path.js +1 -0
- package/dist/plugins/hooks/lib/external-mount-adapter.js +1 -0
- package/dist/plugins/hooks/lib/external-scanner.js +1 -0
- package/dist/plugins/hooks/lib/hook-error-recorder.js +1 -0
- package/dist/plugins/hooks/lib/hook-logger.js +1 -0
- package/dist/plugins/hooks/lib/hook-runner.js +2 -0
- package/dist/plugins/hooks/lib/hook-state-manager.js +1 -0
- package/dist/plugins/hooks/lib/memory-extractor.js +1 -0
- package/dist/plugins/hooks/lib/memory-manager.js +1 -0
- package/dist/plugins/hooks/lib/metrics-analyzer.js +1 -0
- package/dist/plugins/hooks/lib/mount-manager.js +1 -0
- package/dist/plugins/hooks/lib/plugin-activation-registry.js +1 -0
- package/dist/plugins/hooks/lib/plugin-selector.js +1 -0
- package/dist/plugins/hooks/lib/plugin-source-registry.js +1 -0
- package/dist/plugins/hooks/lib/plugin-workspace-registry.js +1 -0
- package/dist/plugins/hooks/lib/project-evolution/auto-fixer.js +1 -0
- package/dist/plugins/hooks/lib/project-evolution/memory-manager.js +1 -0
- package/dist/plugins/hooks/lib/project-evolution/pattern-detector.js +1 -0
- package/dist/plugins/hooks/lib/project-evolution/semantic-indexer.js +1 -0
- package/dist/plugins/hooks/lib/rollback-tracker.js +1 -0
- package/dist/plugins/hooks/lib/source-code-scanner.js +1 -0
- package/dist/plugins/hooks/lib/technology-stack-detector.js +1 -0
- package/dist/plugins/hooks/lib/test-failure-analyzer.js +1 -0
- package/dist/plugins/hooks/lib/test-failure-fixer.js +1 -0
- package/dist/plugins/hooks/lib/trace-context.js +1 -0
- package/dist/plugins/hooks/lib/validation-patterns.js +1 -0
- package/dist/plugins/hooks/memory-sync.js +1 -0
- package/dist/plugins/hooks/pipeline-observer.js +2 -0
- package/dist/plugins/hooks/retry-limit-guard.js +2 -0
- package/dist/plugins/hooks/scope-sentinel.js +2 -0
- package/dist/plugins/hooks/secret-scanner.js +2 -0
- package/dist/plugins/hooks/stop-evolve-prompt.js +1 -0
- package/dist/plugins/hooks/trace-initialization.js +2 -0
- package/dist/plugins/hooks/version-checker.js +2 -0
- package/dist/plugins/memory/templates/code-quality.yaml.enc +6 -0
- package/dist/plugins/memory/templates/multi-system.yaml.enc +6 -0
- package/dist/plugins/memory/templates/team-habits.yaml.enc +6 -0
- package/dist/plugins/memory/templates/testing.yaml.enc +6 -0
- package/dist/plugins/skills/README.en.md.enc +6 -0
- package/dist/plugins/skills/README.md.enc +6 -0
- package/dist/plugins/skills/ab-test-executor/SKILL.md.enc +6 -0
- package/dist/plugins/skills/benchmark-executor/SKILL.md.enc +6 -0
- package/dist/plugins/skills/benchmark-generator/SKILL.md.enc +6 -0
- package/dist/plugins/skills/content-prompts/SKILL.md.enc +6 -0
- package/dist/plugins/skills/delivery-stage/SKILL.md.enc +6 -0
- package/dist/plugins/skills/design-stage/SKILL.md.enc +6 -0
- package/dist/plugins/skills/environment-learning/SKILL.md.enc +6 -0
- package/dist/plugins/skills/environment-resilience/build-failure-doctor.md.enc +6 -0
- package/dist/plugins/skills/environment-resilience/environment-repair.md.enc +6 -0
- package/dist/plugins/skills/environment-resilience/pre-flight-check.md.enc +6 -0
- package/dist/plugins/skills/experiment-evaluator/SKILL.md.enc +6 -0
- package/dist/plugins/skills/exploration-phase/SKILL.md.enc +6 -0
- package/dist/plugins/skills/field-evolve-analyzer/SKILL.md.enc +6 -0
- package/dist/plugins/skills/field-evolve-distiller/SKILL.md.enc +6 -0
- package/dist/plugins/skills/field-evolve-executor/SKILL.md.enc +6 -0
- package/dist/plugins/skills/field-evolve-executor/executor.js +2 -0
- package/dist/plugins/skills/field-evolve-fixer/SKILL.md.enc +6 -0
- package/dist/plugins/skills/field-evolve-learner/SKILL.md.enc +6 -0
- package/dist/plugins/skills/field-evolve-scanner/SKILL.md.enc +6 -0
- package/dist/plugins/skills/field-evolve-scanner/scripts/fallback-scanner.js +2 -0
- package/dist/plugins/skills/field-evolve-verifier/SKILL.md.enc +6 -0
- package/dist/plugins/skills/heartbeat-monitor/SKILL.md.enc +6 -0
- package/dist/plugins/skills/implementation-stage/SKILL.md.enc +6 -0
- package/dist/plugins/skills/layer1-validation/SKILL.md.enc +6 -0
- package/dist/plugins/skills/multi-role-orchestration/SKILL.md.enc +6 -0
- package/dist/plugins/skills/ops-content-marketing/SKILL.md.enc +6 -0
- package/dist/plugins/skills/ops-conversion/SKILL.md.enc +6 -0
- package/dist/plugins/skills/ops-data-driven/SKILL.md.enc +6 -0
- package/dist/plugins/skills/ops-growth-strategies/SKILL.md.enc +6 -0
- package/dist/plugins/skills/ops-private-domain/SKILL.md.enc +6 -0
- package/dist/plugins/skills/ops-social-commerce/SKILL.md.enc +6 -0
- package/dist/plugins/skills/ops-user-growth/SKILL.md.enc +6 -0
- package/dist/plugins/skills/pending-dashboard/SKILL.md.enc +6 -0
- package/dist/plugins/skills/project-evolve-analyzer/SKILL.md.enc +6 -0
- package/dist/plugins/skills/project-evolve-fixer/SKILL.md.enc +6 -0
- package/dist/plugins/skills/project-evolve-generator/SKILL.md.enc +6 -0
- package/dist/plugins/skills/project-evolve-learner/SKILL.md.enc +6 -0
- package/dist/plugins/skills/project-evolve-reviewer/SKILL.md.enc +6 -0
- package/dist/plugins/skills/project-evolve-scanner/SKILL.md.enc +6 -0
- package/dist/plugins/skills/project-evolve-scanner/scripts/dependency-reuse-checker.js +2 -0
- package/dist/plugins/skills/project-evolve-scanner/scripts/subsystem-coverage.js +2 -0
- package/dist/plugins/skills/project-evolve-verifier/SKILL.md.enc +6 -0
- package/dist/plugins/skills/requirement-stage/SKILL.md.enc +6 -0
- package/dist/plugins/skills/secret-scanner/SKILL.md.enc +6 -0
- package/dist/plugins/skills/skill-forge/SKILL.md.enc +6 -0
- package/dist/plugins/skills/skill-forge/references/description-guide.md.enc +6 -0
- package/dist/plugins/skills/skill-forge/references/quality-rubric.md.enc +6 -0
- package/dist/plugins/skills/skill-forge/references/skill-template.md.enc +6 -0
- package/dist/plugins/skills/startup-guard/SKILL.md.enc +6 -0
- package/dist/plugins/skills/tdd-workflow/SKILL.md.enc +6 -0
- package/dist/plugins/skills/testing-stage/SKILL.md.enc +6 -0
- package/dist/plugins/skills/tracking-validator/SKILL.md.enc +6 -0
- package/dist/scripts/build-crypto.js +2 -0
- package/dist/scripts/cli/contribute.js +1 -0
- package/dist/scripts/cli/dashboard.js +1 -0
- package/dist/scripts/cli/env.js +1 -0
- package/dist/scripts/cli/global-init.js +1 -0
- package/dist/scripts/cli/global.js +1 -0
- package/dist/scripts/cli/index.js +1 -0
- package/dist/scripts/cli/init.js +1 -0
- package/dist/scripts/cli/list.js +1 -0
- package/dist/scripts/cli/memory.js +1 -0
- package/dist/scripts/cli/org.js +1 -0
- package/dist/scripts/cli/plugin.js +1 -0
- package/dist/scripts/cli/practice-report.js +1 -0
- package/dist/scripts/cli/runtime-governance.js +1 -0
- package/dist/scripts/cli/system.js +1 -0
- package/dist/scripts/cli/update.js +1 -0
- package/dist/scripts/commands/catalog.js +1 -0
- package/dist/scripts/commands/slash-command-docs.js +1 -0
- package/dist/scripts/config/external-mounts.config.js +2 -0
- package/dist/scripts/heartbeat/check.js +2 -0
- package/dist/scripts/heartbeat/setup-cron.js +2 -0
- package/dist/scripts/install/adapters.js +1 -0
- package/dist/scripts/install/constants.js +1 -0
- package/dist/scripts/install/file-reader.js +1 -0
- package/dist/scripts/install/index.js +1 -0
- package/dist/scripts/install/shards/constants-shard.js +1 -0
- package/dist/scripts/install/shards/crypto-config-shard.js +1 -0
- package/dist/scripts/install/shards/error-messages-shard.js +1 -0
- package/dist/scripts/install/shards/reassemble.js +1 -0
- package/dist/scripts/install/shards/utils-shard.js +1 -0
- package/dist/scripts/install/shards/version-info-shard.js +1 -0
- package/dist/scripts/postinstall.js +1 -0
- package/dist/scripts/state.js +1 -0
- package/package.json +21 -12
- package/README.en.md +0 -598
- package/bin/autospec.js +0 -3
- package/knowledge/01-principles/00-principles-hierarchy.md +0 -247
- package/knowledge/01-principles/01-first-principles.md +0 -241
- package/knowledge/01-principles/02-strategic-principles.md +0 -286
- package/knowledge/01-principles/03-tactical-principles.md +0 -385
- package/knowledge/01-principles/04-operational-principles.md +0 -275
- package/knowledge/01-principles/05-domain-principles.md +0 -539
- package/knowledge/01-principles/06-methodology-principles.md +0 -281
- package/knowledge/01-principles/07-cognitive-principles.md +0 -277
- package/knowledge/01-principles/08-auto-fix-principles.md +0 -320
- package/knowledge/01-principles/09-constitution.md +0 -220
- package/knowledge/01-principles/10-evolution-mechanism.md +0 -699
- package/knowledge/01-principles/README.en.md +0 -385
- package/knowledge/01-principles/README.md +0 -385
- package/knowledge/02-process/00-overview.md +0 -404
- package/knowledge/02-process/01-requirement.md +0 -113
- package/knowledge/02-process/02-design.md +0 -123
- package/knowledge/02-process/03-implementation.md +0 -90
- package/knowledge/02-process/04-review.md +0 -80
- package/knowledge/02-process/05-testing.md +0 -90
- package/knowledge/02-process/06-delivery.md +0 -88
- package/knowledge/02-process/README.en.md +0 -143
- package/knowledge/02-process/README.md +0 -186
- package/knowledge/03-guides/00-pipeline-protocol.md +0 -438
- package/knowledge/03-guides/01-team-orchestrator.md +0 -368
- package/knowledge/03-guides/02-analyze-requirement.md +0 -195
- package/knowledge/03-guides/03-design-solution.md +0 -401
- package/knowledge/03-guides/04-implement-code.md +0 -205
- package/knowledge/03-guides/05-plan-testing.md +0 -183
- package/knowledge/03-guides/06-generate-tests.md +0 -241
- package/knowledge/03-guides/07-check-release.md +0 -205
- package/knowledge/03-guides/08-evaluate-ai-effect.md +0 -100
- package/knowledge/03-guides/09-review-requirement.md +0 -83
- package/knowledge/03-guides/10-review-design.md +0 -83
- package/knowledge/03-guides/11-review-code.md +0 -111
- package/knowledge/03-guides/12-review-testing.md +0 -76
- package/knowledge/03-guides/13-audit-security.md +0 -89
- package/knowledge/03-guides/14-check-consistency.md +0 -177
- package/knowledge/03-guides/15-run-unit-tests.md +0 -83
- package/knowledge/03-guides/16-run-integration-tests.md +0 -105
- package/knowledge/03-guides/17-analyze-test-context.md +0 -250
- package/knowledge/03-guides/18-log-practice.md +0 -359
- package/knowledge/03-guides/19-distill-skill.md +0 -91
- package/knowledge/03-guides/20-update-skill.md +0 -45
- package/knowledge/03-guides/21-validate-skill.md +0 -72
- package/knowledge/03-guides/22-extract-methodology.md +0 -55
- package/knowledge/03-guides/23-infer-scope.md +0 -174
- package/knowledge/03-guides/24-assess-complexity.md +0 -270
- package/knowledge/03-guides/25-discover-component.md +0 -183
- package/knowledge/03-guides/26-analyze-tech-stack.md +0 -139
- package/knowledge/03-guides/27-scan-environment.md +0 -207
- package/knowledge/03-guides/28-validate-environment.md +0 -207
- package/knowledge/03-guides/29-generate-knowledge.md +0 -234
- package/knowledge/03-guides/30-analyze-ai-capability.md +0 -193
- package/knowledge/03-guides/31-analyze-ai-component.md +0 -169
- package/knowledge/03-guides/32-analyze-ai-agent.md +0 -362
- package/knowledge/03-guides/33-analyze-ai-rag.md +0 -339
- package/knowledge/03-guides/34-assess-ai-task.md +0 -418
- package/knowledge/03-guides/35-evaluate-ai-pipeline.md +0 -219
- package/knowledge/03-guides/36-evaluate-ai-artifact.md +0 -192
- package/knowledge/03-guides/37-plan-ai-evaluation.md +0 -374
- package/knowledge/03-guides/38-evaluate-ai-path.md +0 -274
- package/knowledge/03-guides/39-validate-ai-data.md +0 -276
- package/knowledge/03-guides/40-detect-ai-anomaly.md +0 -213
- package/knowledge/03-guides/41-diagnose-ai-test.md +0 -133
- package/knowledge/03-guides/42-apply-ddd.md +0 -345
- package/knowledge/03-guides/43-run-ai-sdlc.md +0 -475
- package/knowledge/03-guides/44-manage-knowledge.md +0 -369
- package/knowledge/03-guides/45-test-runner.md +0 -254
- package/knowledge/03-guides/README.en.md +0 -212
- package/knowledge/03-guides/README.md +0 -212
- package/knowledge/04-checklists/00-requirement.md +0 -169
- package/knowledge/04-checklists/01-design.md +0 -196
- package/knowledge/04-checklists/02-code.md +0 -197
- package/knowledge/04-checklists/03-test.md +0 -46
- package/knowledge/04-checklists/04-release.md +0 -70
- package/knowledge/04-checklists/README.en.md +0 -119
- package/knowledge/04-checklists/README.md +0 -123
- package/knowledge/05-config/00-validation-patterns.yaml +0 -137
- package/knowledge/05-config/01-team-stage.yaml +0 -95
- package/knowledge/05-config/02-team-tasks.yaml +0 -139
- package/knowledge/05-config/03-role-composition.yaml +0 -346
- package/knowledge/05-config/04-role-extensions.yaml +0 -140
- package/knowledge/05-config/05-skill-compositions.yaml +0 -142
- package/knowledge/05-config/README.en.md +0 -54
- package/knowledge/05-config/README.md +0 -132
- package/knowledge/06-environment/00-template-registry.md +0 -310
- package/knowledge/06-environment/01-detection-patterns.yaml +0 -1692
- package/knowledge/06-environment/README.en.md +0 -40
- package/knowledge/06-environment/README.md +0 -128
- package/knowledge/07-standards/00-coding-style.md +0 -1059
- package/knowledge/07-standards/01-code-review.md +0 -876
- package/knowledge/07-standards/02-data-consistency.md +0 -1085
- package/knowledge/07-standards/03-document-versioning.md +0 -210
- package/knowledge/07-standards/04-risk-detection.md +0 -186
- package/knowledge/07-standards/README.en.md +0 -119
- package/knowledge/07-standards/README.md +0 -123
- package/knowledge/08-organization/00-vision-mission.md +0 -113
- package/knowledge/08-organization/01-ai-native-culture.md +0 -318
- package/knowledge/08-organization/02-team-metrics.md +0 -228
- package/knowledge/08-organization/03-committee-structure.md +0 -54
- package/knowledge/08-organization/04-governance-metrics.md +0 -55
- package/knowledge/08-organization/05-improvement-process.md +0 -71
- package/knowledge/08-organization/README.en.md +0 -165
- package/knowledge/08-organization/README.md +0 -165
- package/knowledge/09-templates/00-requirement-proposal.md +0 -344
- package/knowledge/09-templates/01-architecture-design.md +0 -494
- package/knowledge/09-templates/02-api-design.md +0 -408
- package/knowledge/09-templates/03-database-design.md +0 -313
- package/knowledge/09-templates/04-product-design.md +0 -237
- package/knowledge/09-templates/05-domain-business.md +0 -388
- package/knowledge/09-templates/06-test-design.md +0 -268
- package/knowledge/09-templates/07-evaluation-design.md +0 -372
- package/knowledge/09-templates/08-component-knowledge.md +0 -272
- package/knowledge/09-templates/09-best-practices.md +0 -218
- package/knowledge/09-templates/10-middleware-knowledge.md +0 -342
- package/knowledge/09-templates/README.en.md +0 -222
- package/knowledge/09-templates/README.md +0 -216
- package/knowledge/README.en.md +0 -372
- package/knowledge/README.md +0 -399
- package/plugins/agents/roles/ai-engineer.md +0 -129
- package/plugins/agents/roles/backend-engineer.md +0 -165
- package/plugins/agents/roles/ceo.md +0 -94
- package/plugins/agents/roles/data-engineer.md +0 -135
- package/plugins/agents/roles/devops-engineer.md +0 -181
- package/plugins/agents/roles/frontend-engineer.md +0 -129
- package/plugins/agents/roles/product-owner.md +0 -98
- package/plugins/agents/roles/quality-engineer.md +0 -129
- package/plugins/agents/roles/security-engineer.md +0 -180
- package/plugins/agents/roles/tech-lead.md +0 -97
- package/plugins/agents/support/blind-comparator.md +0 -88
- package/plugins/agents/support/consistency-checker.md +0 -136
- package/plugins/agents/support/failure-diagnostician.md +0 -141
- package/plugins/agents/support/independent-reviewer.md +0 -80
- package/plugins/agents/support/monitoring-agent.md +0 -215
- package/plugins/agents/support/safety-auditor.md +0 -121
- package/plugins/agents/support/skill-benchmarker.md +0 -86
- package/plugins/agents/support/skill-forger.md +0 -105
- package/plugins/agents/support/stage-gate-evaluator.md +0 -205
- package/plugins/agents/support/test-coverage-reviewer.md +0 -73
- package/plugins/benchmarks/templates/README.md +0 -196
- package/plugins/benchmarks/templates/commands/apply-template.yaml +0 -108
- package/plugins/benchmarks/templates/commands/archive-template.yaml +0 -65
- package/plugins/benchmarks/templates/commands/env-export-template.yaml +0 -64
- package/plugins/benchmarks/templates/commands/env-sync-template.yaml +0 -104
- package/plugins/benchmarks/templates/commands/env-template-template.yaml +0 -96
- package/plugins/benchmarks/templates/commands/env-template.yaml +0 -58
- package/plugins/benchmarks/templates/commands/env-update-template.yaml +0 -110
- package/plugins/benchmarks/templates/commands/env-validate-template.yaml +0 -95
- package/plugins/benchmarks/templates/commands/explore-template.yaml +0 -48
- package/plugins/benchmarks/templates/commands/field-evolve-template.yaml +0 -104
- package/plugins/benchmarks/templates/commands/project-evolve-template.yaml +0 -104
- package/plugins/benchmarks/templates/commands/propose-template.yaml +0 -88
- package/plugins/benchmarks/templates/commands/review-template.yaml +0 -124
- package/plugins/benchmarks/templates/commands/run-template.yaml +0 -127
- package/plugins/benchmarks/templates/commands/test-template.yaml +0 -149
- package/plugins/benchmarks/templates/pipeline/agile-template.yaml +0 -84
- package/plugins/benchmarks/templates/pipeline/experiment-template.yaml +0 -92
- package/plugins/benchmarks/templates/pipeline/hotfix-template.yaml +0 -81
- package/plugins/benchmarks/templates/pipeline/waterfall-template.yaml +0 -106
- package/plugins/benchmarks/templates/skills/agile-iteration-template.yaml +0 -78
- package/plugins/benchmarks/templates/skills/benchmark-executor-template.yaml +0 -114
- package/plugins/benchmarks/templates/skills/benchmark-generator-template.yaml +0 -52
- package/plugins/benchmarks/templates/skills/delivery-stage-template.yaml +0 -130
- package/plugins/benchmarks/templates/skills/design-stage-template.yaml +0 -131
- package/plugins/benchmarks/templates/skills/experiment-iteration-template.yaml +0 -60
- package/plugins/benchmarks/templates/skills/exploration-phase-template.yaml +0 -114
- package/plugins/benchmarks/templates/skills/field-evolve-analyzer-template.yaml +0 -51
- package/plugins/benchmarks/templates/skills/field-evolve-distiller-template.yaml +0 -34
- package/plugins/benchmarks/templates/skills/field-evolve-executor-template.yaml +0 -50
- package/plugins/benchmarks/templates/skills/field-evolve-fixer-template.yaml +0 -52
- package/plugins/benchmarks/templates/skills/field-evolve-learner-template.yaml +0 -33
- package/plugins/benchmarks/templates/skills/field-evolve-scanner-template.yaml +0 -74
- package/plugins/benchmarks/templates/skills/field-evolve-template.yaml +0 -71
- package/plugins/benchmarks/templates/skills/field-evolve-verifier-template.yaml +0 -51
- package/plugins/benchmarks/templates/skills/hotfix-iteration-template.yaml +0 -54
- package/plugins/benchmarks/templates/skills/implementation-stage-template.yaml +0 -127
- package/plugins/benchmarks/templates/skills/layer1-validation-template.yaml +0 -121
- package/plugins/benchmarks/templates/skills/project-evolve-analyzer-template.yaml +0 -51
- package/plugins/benchmarks/templates/skills/project-evolve-fixer-template.yaml +0 -52
- package/plugins/benchmarks/templates/skills/project-evolve-generator-template.yaml +0 -34
- package/plugins/benchmarks/templates/skills/project-evolve-learner-template.yaml +0 -50
- package/plugins/benchmarks/templates/skills/project-evolve-reviewer-template.yaml +0 -50
- package/plugins/benchmarks/templates/skills/project-evolve-scanner-template.yaml +0 -75
- package/plugins/benchmarks/templates/skills/project-evolve-template.yaml +0 -72
- package/plugins/benchmarks/templates/skills/project-evolve-verifier-template.yaml +0 -51
- package/plugins/benchmarks/templates/skills/requirement-analyzer-template.yaml +0 -48
- package/plugins/benchmarks/templates/skills/skill-forge-template.yaml +0 -117
- package/plugins/benchmarks/templates/skills/startup-guard-template.yaml +0 -103
- package/plugins/benchmarks/templates/skills/testing-stage-template.yaml +0 -146
- package/plugins/benchmarks/templates/skills/waterfall-iteration-template.yaml +0 -55
- package/plugins/commands/README.en.md +0 -96
- package/plugins/commands/README.md +0 -96
- package/plugins/commands/apply.md +0 -277
- package/plugins/commands/archive.md +0 -132
- package/plugins/commands/env-export.md +0 -79
- package/plugins/commands/env-sync.md +0 -1281
- package/plugins/commands/env-template.md +0 -99
- package/plugins/commands/env-update.md +0 -264
- package/plugins/commands/env-validate.md +0 -176
- package/plugins/commands/env.md +0 -79
- package/plugins/commands/explore.md +0 -193
- package/plugins/commands/field-evolve.md +0 -412
- package/plugins/commands/memory.md +0 -249
- package/plugins/commands/project-evolve.md +0 -920
- package/plugins/commands/propose.md +0 -184
- package/plugins/commands/review.md +0 -140
- package/plugins/commands/run.md +0 -1052
- package/plugins/commands/status.md +0 -183
- package/plugins/commands/test.md +0 -389
- package/plugins/hooks/README.en.md +0 -56
- package/plugins/hooks/README.md +0 -56
- package/plugins/hooks/ai-project-guard.js +0 -329
- package/plugins/hooks/artifact-evaluation-hook.js +0 -237
- package/plugins/hooks/constitution-guard.js +0 -211
- package/plugins/hooks/environment-autocommit.js +0 -606
- package/plugins/hooks/environment-manager.js +0 -779
- package/plugins/hooks/execution-tracker.js +0 -459
- package/plugins/hooks/frozen-zone-guard.js +0 -140
- package/plugins/hooks/layer1-validator.js +0 -539
- package/plugins/hooks/lib/artifact-evaluator.js +0 -414
- package/plugins/hooks/lib/auto-fix-loop.js +0 -605
- package/plugins/hooks/lib/benchmarks/change-detector.js +0 -390
- package/plugins/hooks/lib/benchmarks/evaluator.js +0 -605
- package/plugins/hooks/lib/benchmarks/integration-example.js +0 -169
- package/plugins/hooks/lib/data-and-ai-detector.js +0 -275
- package/plugins/hooks/lib/detection-pattern-loader.js +0 -865
- package/plugins/hooks/lib/directory-discovery.js +0 -395
- package/plugins/hooks/lib/environment-config-loader.js +0 -345
- package/plugins/hooks/lib/environment-detector.js +0 -553
- package/plugins/hooks/lib/environment-evolver.js +0 -564
- package/plugins/hooks/lib/environment-registry.js +0 -813
- package/plugins/hooks/lib/execution-path.js +0 -427
- package/plugins/hooks/lib/hook-error-recorder.js +0 -245
- package/plugins/hooks/lib/hook-logger.js +0 -538
- package/plugins/hooks/lib/hook-runner.js +0 -97
- package/plugins/hooks/lib/hook-state-manager.js +0 -578
- package/plugins/hooks/lib/memory-extractor.js +0 -399
- package/plugins/hooks/lib/memory-manager.js +0 -673
- package/plugins/hooks/lib/metrics-analyzer.js +0 -489
- package/plugins/hooks/lib/project-evolution/auto-fixer.js +0 -511
- package/plugins/hooks/lib/project-evolution/memory-manager.js +0 -346
- package/plugins/hooks/lib/project-evolution/pattern-detector.js +0 -476
- package/plugins/hooks/lib/project-evolution/semantic-indexer.js +0 -480
- package/plugins/hooks/lib/project-structure-detector.js +0 -326
- package/plugins/hooks/lib/rollback-tracker.js +0 -346
- package/plugins/hooks/lib/source-code-scanner.js +0 -596
- package/plugins/hooks/lib/technology-stack-detector.js +0 -374
- package/plugins/hooks/lib/test-auto-fix.test.js +0 -194
- package/plugins/hooks/lib/test-failure-analyzer.js +0 -375
- package/plugins/hooks/lib/test-failure-fixer.js +0 -268
- package/plugins/hooks/lib/trace-context.js +0 -277
- package/plugins/hooks/lib/validation-patterns.js +0 -415
- package/plugins/hooks/memory-sync.js +0 -171
- package/plugins/hooks/monitoring-trigger.js +0 -467
- package/plugins/hooks/pipeline-observer.js +0 -413
- package/plugins/hooks/scope-sentinel.js +0 -204
- package/plugins/hooks/trace-initialization.js +0 -169
- package/plugins/memory/templates/code-quality.yaml +0 -149
- package/plugins/memory/templates/multi-system.yaml +0 -155
- package/plugins/memory/templates/team-habits.yaml +0 -119
- package/plugins/memory/templates/testing.yaml +0 -121
- package/plugins/skills/README.en.md +0 -59
- package/plugins/skills/README.md +0 -114
- package/plugins/skills/agile-iteration/SKILL.md +0 -187
- package/plugins/skills/benchmark-executor/SKILL.md +0 -647
- package/plugins/skills/benchmark-generator/SKILL.md +0 -349
- package/plugins/skills/delivery-stage/SKILL.md +0 -324
- package/plugins/skills/design-stage/SKILL.md +0 -307
- package/plugins/skills/experiment-evaluator/SKILL.md +0 -271
- package/plugins/skills/experiment-iteration/SKILL.md +0 -154
- package/plugins/skills/exploration-phase/SKILL.md +0 -216
- package/plugins/skills/field-evolve-analyzer/SKILL.md +0 -65
- package/plugins/skills/field-evolve-distiller/SKILL.md +0 -66
- package/plugins/skills/field-evolve-executor/SKILL.md +0 -94
- package/plugins/skills/field-evolve-executor/executor.js +0 -342
- package/plugins/skills/field-evolve-fixer/SKILL.md +0 -69
- package/plugins/skills/field-evolve-learner/SKILL.md +0 -65
- package/plugins/skills/field-evolve-scanner/SKILL.md +0 -87
- package/plugins/skills/field-evolve-scanner/scripts/fallback-scanner.js +0 -288
- package/plugins/skills/field-evolve-verifier/SKILL.md +0 -64
- package/plugins/skills/hotfix-iteration/SKILL.md +0 -279
- package/plugins/skills/implementation-stage/SKILL.md +0 -320
- package/plugins/skills/layer1-validation/SKILL.md +0 -79
- package/plugins/skills/pending-dashboard/SKILL.md +0 -110
- package/plugins/skills/project-evolve-analyzer/SKILL.md +0 -95
- package/plugins/skills/project-evolve-fixer/SKILL.md +0 -99
- package/plugins/skills/project-evolve-generator/SKILL.md +0 -149
- package/plugins/skills/project-evolve-learner/SKILL.md +0 -103
- package/plugins/skills/project-evolve-reviewer/SKILL.md +0 -104
- package/plugins/skills/project-evolve-scanner/SKILL.md +0 -95
- package/plugins/skills/project-evolve-scanner/scripts/dependency-reuse-checker.js +0 -395
- package/plugins/skills/project-evolve-scanner/scripts/subsystem-coverage.js +0 -315
- package/plugins/skills/project-evolve-verifier/SKILL.md +0 -105
- package/plugins/skills/requirement-stage/SKILL.md +0 -217
- package/plugins/skills/skill-forge/SKILL.md +0 -223
- package/plugins/skills/skill-forge/references/description-guide.md +0 -92
- package/plugins/skills/skill-forge/references/quality-rubric.md +0 -104
- package/plugins/skills/skill-forge/references/skill-template.md +0 -106
- package/plugins/skills/startup-guard/SKILL.md +0 -38
- package/plugins/skills/testing-stage/SKILL.md +0 -770
- package/plugins/skills/waterfall-iteration/SKILL.md +0 -115
- package/scripts/cli/global-init.js +0 -288
- package/scripts/cli/global.js +0 -324
- package/scripts/cli/index.js +0 -55
- package/scripts/cli/init.js +0 -408
- package/scripts/cli/list.js +0 -70
- package/scripts/cli/org.js +0 -340
- package/scripts/cli/update.js +0 -44
- package/scripts/config/commands.config.js +0 -145
- package/scripts/config/hooks.config.js +0 -197
- package/scripts/install/agents.js +0 -106
- package/scripts/install/commands.js +0 -133
- package/scripts/install/constants.js +0 -463
- package/scripts/install/hook-logger.js +0 -536
- package/scripts/install/hooks.js +0 -110
- package/scripts/install/index.js +0 -39
- package/scripts/install/skills.js +0 -95
- package/scripts/postinstall.js +0 -25
- package/scripts/state.js +0 -585
- /package/{plugins → dist/plugins}/hooks/lib/hook-runner.sh +0 -0
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Skills generator for Claude Code integration
|
|
3
|
-
*
|
|
4
|
-
* Generates skill files from templates directory with variable replacement.
|
|
5
|
-
* Source: plugins/skills/{skill-name}/SKILL.md
|
|
6
|
-
* Target: .claude/skills/{skill-name}/SKILL.md
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import fs from 'fs';
|
|
10
|
-
import path from 'path';
|
|
11
|
-
import { fileURLToPath } from 'url';
|
|
12
|
-
|
|
13
|
-
// ESM __dirname equivalent
|
|
14
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
15
|
-
const __dirname = path.dirname(__filename);
|
|
16
|
-
|
|
17
|
-
// Role name mapping (for backward compatibility)
|
|
18
|
-
const ROLE_ALIAS = {
|
|
19
|
-
'backend': 'backend-engineer',
|
|
20
|
-
'frontend': 'frontend-engineer',
|
|
21
|
-
'data': 'data-engineer',
|
|
22
|
-
'ai': 'ai-engineer',
|
|
23
|
-
'quality': 'quality-engineer'
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Replace template variables in content
|
|
28
|
-
* @param {string} content - Template content
|
|
29
|
-
* @returns {string} - Content with variables replaced
|
|
30
|
-
*/
|
|
31
|
-
function replaceVariables(content) {
|
|
32
|
-
// Replace ${FW} with .autospec/knowledge (backward compat)
|
|
33
|
-
// Replace ${KNOWLEDGE} with .autospec/knowledge
|
|
34
|
-
return content
|
|
35
|
-
.replace(/\$\{FW\}/g, '.autospec/knowledge')
|
|
36
|
-
.replace(/\$\{KNOWLEDGE\}/g, '.autospec/knowledge');
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Generate all skill files from templates
|
|
41
|
-
* @param {string} claudeDir - Target .claude directory path
|
|
42
|
-
*/
|
|
43
|
-
export function generateSkills(claudeDir) {
|
|
44
|
-
const skillsDir = path.join(claudeDir, 'skills');
|
|
45
|
-
fs.mkdirSync(skillsDir, { recursive: true });
|
|
46
|
-
|
|
47
|
-
// Get templates directory path (relative to this file)
|
|
48
|
-
// __dirname is scripts/install/, templates are in ../../plugins/skills/
|
|
49
|
-
const templatesDir = path.join(__dirname, '../../plugins/skills');
|
|
50
|
-
|
|
51
|
-
// Check if templates directory exists
|
|
52
|
-
if (!fs.existsSync(templatesDir)) {
|
|
53
|
-
console.warn('Warning: plugins/skills/ directory not found, skipping skill generation');
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// Get all skill directories
|
|
58
|
-
const skillDirs = fs.readdirSync(templatesDir).filter(f => {
|
|
59
|
-
const skillPath = path.join(templatesDir, f);
|
|
60
|
-
return fs.statSync(skillPath).isDirectory();
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
// Process each skill
|
|
64
|
-
for (const skillName of skillDirs) {
|
|
65
|
-
const skillFile = path.join(templatesDir, skillName, 'SKILL.md');
|
|
66
|
-
if (fs.existsSync(skillFile)) {
|
|
67
|
-
const content = fs.readFileSync(skillFile, 'utf-8');
|
|
68
|
-
const processed = replaceVariables(content);
|
|
69
|
-
|
|
70
|
-
const targetDir = path.join(skillsDir, skillName);
|
|
71
|
-
fs.mkdirSync(targetDir, { recursive: true });
|
|
72
|
-
fs.writeFileSync(path.join(targetDir, 'SKILL.md'), processed, 'utf-8');
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Get list of available skill names
|
|
79
|
-
* @returns {string[]} - Array of skill names
|
|
80
|
-
*/
|
|
81
|
-
export function getAvailableSkills() {
|
|
82
|
-
const templatesDir = path.join(__dirname, '../../plugins/skills');
|
|
83
|
-
|
|
84
|
-
if (!fs.existsSync(templatesDir)) {
|
|
85
|
-
return [];
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
return fs.readdirSync(templatesDir).filter(f => {
|
|
89
|
-
const skillPath = path.join(templatesDir, f);
|
|
90
|
-
const skillFile = path.join(skillPath, 'SKILL.md');
|
|
91
|
-
return fs.statSync(skillPath).isDirectory() && fs.existsSync(skillFile);
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export { ROLE_ALIAS };
|
package/scripts/postinstall.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AutoSpec postinstall script
|
|
3
|
-
* Shows quick start guide after npm install
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
const isGlobal = process.env.npm_config_global === 'true';
|
|
7
|
-
|
|
8
|
-
if (isGlobal) {
|
|
9
|
-
console.log(`
|
|
10
|
-
┌─────────────────────────────────────────────┐
|
|
11
|
-
│ │
|
|
12
|
-
│ AutoSpec installed successfully! │
|
|
13
|
-
│ │
|
|
14
|
-
│ Quick start: │
|
|
15
|
-
│ cd your-project │
|
|
16
|
-
│ autospec init │
|
|
17
|
-
│ │
|
|
18
|
-
│ Then in Claude Code: │
|
|
19
|
-
│ /autospec:run → Full pipeline │
|
|
20
|
-
│ /autospec:run --workflow=hotfix │
|
|
21
|
-
│ /autospec:run --workflow=experiment │
|
|
22
|
-
│ │
|
|
23
|
-
└─────────────────────────────────────────────┘
|
|
24
|
-
`);
|
|
25
|
-
}
|
package/scripts/state.js
DELETED
|
@@ -1,585 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pipeline state management
|
|
3
|
-
* Tracks which stage the pipeline is at for a given task
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import fs from 'fs';
|
|
7
|
-
import path from 'path';
|
|
8
|
-
import { STATE_FILE, METRICS_FILE, STAGES, WORKFLOWS, AUTOSPEC_DIRS } from './constants.js';
|
|
9
|
-
|
|
10
|
-
const ARCHIVES_DIR = `.autospec/${AUTOSPEC_DIRS.ARCHIVES}`;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Initialize or load pipeline state
|
|
14
|
-
*/
|
|
15
|
-
export function loadState(projectDir) {
|
|
16
|
-
const statePath = path.join(projectDir, STATE_FILE);
|
|
17
|
-
if (fs.existsSync(statePath)) {
|
|
18
|
-
return JSON.parse(fs.readFileSync(statePath, 'utf-8'));
|
|
19
|
-
}
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Save pipeline state
|
|
25
|
-
*/
|
|
26
|
-
export function saveState(projectDir, state) {
|
|
27
|
-
const statePath = path.join(projectDir, STATE_FILE);
|
|
28
|
-
const dir = path.dirname(statePath);
|
|
29
|
-
if (!fs.existsSync(dir)) {
|
|
30
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
31
|
-
}
|
|
32
|
-
state.updatedAt = new Date().toISOString();
|
|
33
|
-
fs.writeFileSync(statePath, JSON.stringify(state, null, 2), 'utf-8');
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Check if there's an active (incomplete) pipeline
|
|
38
|
-
*/
|
|
39
|
-
export function hasActivePipeline(projectDir) {
|
|
40
|
-
const state = loadState(projectDir);
|
|
41
|
-
if (!state) return false;
|
|
42
|
-
return !state.completedAt;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Archive completed pipeline to archives/{spec-id}/
|
|
47
|
-
* Called when a pipeline completes or when starting a new one
|
|
48
|
-
*/
|
|
49
|
-
export function archivePipeline(projectDir, specId) {
|
|
50
|
-
const state = loadState(projectDir);
|
|
51
|
-
if (!state) return false;
|
|
52
|
-
|
|
53
|
-
// Determine specId from state if not provided
|
|
54
|
-
const runId = specId || state.specs || generateRunId(state.taskName, state.createdAt);
|
|
55
|
-
|
|
56
|
-
// Create archives directory
|
|
57
|
-
const archivesDir = path.join(projectDir, ARCHIVES_DIR);
|
|
58
|
-
const archiveDir = path.join(archivesDir, runId);
|
|
59
|
-
if (!fs.existsSync(archiveDir)) {
|
|
60
|
-
fs.mkdirSync(archiveDir, { recursive: true });
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Copy state.json to archive
|
|
64
|
-
const archivedStatePath = path.join(archiveDir, 'state.json');
|
|
65
|
-
fs.writeFileSync(archivedStatePath, JSON.stringify(state, null, 2), 'utf-8');
|
|
66
|
-
|
|
67
|
-
// Copy metrics.json to archive if exists
|
|
68
|
-
const metricsPath = path.join(projectDir, METRICS_FILE);
|
|
69
|
-
if (fs.existsSync(metricsPath)) {
|
|
70
|
-
const archivedMetricsPath = path.join(archiveDir, 'metrics.json');
|
|
71
|
-
fs.copyFileSync(metricsPath, archivedMetricsPath);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Mark state as archived
|
|
75
|
-
state.archivedAt = new Date().toISOString();
|
|
76
|
-
state.archivedTo = runId;
|
|
77
|
-
|
|
78
|
-
return runId;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Generate run ID from task name and timestamp
|
|
83
|
-
*/
|
|
84
|
-
function generateRunId(taskName, createdAt) {
|
|
85
|
-
const timestamp = createdAt ? new Date(createdAt).toISOString().slice(0, 10) : new Date().toISOString().slice(0, 10);
|
|
86
|
-
const slug = (taskName || 'unknown')
|
|
87
|
-
.toLowerCase()
|
|
88
|
-
.replace(/[^a-z0-9\u4e00-\u9fa5]+/g, '-')
|
|
89
|
-
.slice(0, 30);
|
|
90
|
-
return `${timestamp}-${slug}`;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Get list of archived runs
|
|
95
|
-
*/
|
|
96
|
-
export function listArchivedRuns(projectDir) {
|
|
97
|
-
const archivesDir = path.join(projectDir, ARCHIVES_DIR);
|
|
98
|
-
if (!fs.existsSync(archivesDir)) return [];
|
|
99
|
-
|
|
100
|
-
return fs.readdirSync(archivesDir, { withFileTypes: true })
|
|
101
|
-
.filter(dirent => dirent.isDirectory())
|
|
102
|
-
.map(dirent => {
|
|
103
|
-
const archiveDir = path.join(archivesDir, dirent.name);
|
|
104
|
-
const statePath = path.join(archiveDir, 'state.json');
|
|
105
|
-
let runInfo = { id: dirent.name };
|
|
106
|
-
if (fs.existsSync(statePath)) {
|
|
107
|
-
try {
|
|
108
|
-
const state = JSON.parse(fs.readFileSync(statePath, 'utf-8'));
|
|
109
|
-
runInfo.taskName = state.taskName;
|
|
110
|
-
runInfo.workflow = state.workflow;
|
|
111
|
-
runInfo.completedAt = state.completedAt;
|
|
112
|
-
runInfo.archivedAt = state.archivedAt;
|
|
113
|
-
} catch { /* ignore */ }
|
|
114
|
-
}
|
|
115
|
-
return runInfo;
|
|
116
|
-
})
|
|
117
|
-
.sort((a, b) => (b.archivedAt || '').localeCompare(a.archivedAt || ''));
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* Load archived run state
|
|
122
|
-
*/
|
|
123
|
-
export function loadArchivedRun(projectDir, runId) {
|
|
124
|
-
const archiveDir = path.join(projectDir, ARCHIVES_DIR, runId);
|
|
125
|
-
const statePath = path.join(archiveDir, 'state.json');
|
|
126
|
-
if (fs.existsSync(statePath)) {
|
|
127
|
-
return JSON.parse(fs.readFileSync(statePath, 'utf-8'));
|
|
128
|
-
}
|
|
129
|
-
return null;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Standard subsystem types
|
|
134
|
-
*/
|
|
135
|
-
export const SUBSYSTEM_TYPES = {
|
|
136
|
-
BACKEND: 'backend',
|
|
137
|
-
FRONTEND: 'frontend',
|
|
138
|
-
MOBILE: 'mobile',
|
|
139
|
-
DATA: 'data',
|
|
140
|
-
AI: 'ai',
|
|
141
|
-
PIPELINE: 'pipeline'
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
/**
|
|
145
|
-
* Labels for subsystem types
|
|
146
|
-
*/
|
|
147
|
-
export const SUBSYSTEM_TYPE_LABELS = {
|
|
148
|
-
[SUBSYSTEM_TYPES.BACKEND]: '后端',
|
|
149
|
-
[SUBSYSTEM_TYPES.FRONTEND]: '前端',
|
|
150
|
-
[SUBSYSTEM_TYPES.MOBILE]: '移动端',
|
|
151
|
-
[SUBSYSTEM_TYPES.DATA]: '数据系统',
|
|
152
|
-
[SUBSYSTEM_TYPES.AI]: 'AI/模型',
|
|
153
|
-
[SUBSYSTEM_TYPES.PIPELINE]: '数据管道'
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Validate and normalize subsystem names to ensure uniqueness
|
|
158
|
-
* @param {Array} subsystems - subsystems from config
|
|
159
|
-
* @returns {Array} normalized subsystems with unique names
|
|
160
|
-
*/
|
|
161
|
-
export function normalizeSubsystems(subsystems) {
|
|
162
|
-
if (!subsystems || subsystems.length === 0) return [];
|
|
163
|
-
|
|
164
|
-
const nameCount = {};
|
|
165
|
-
const seenNames = new Set();
|
|
166
|
-
|
|
167
|
-
return subsystems.map(sub => {
|
|
168
|
-
let name = sub.name;
|
|
169
|
-
|
|
170
|
-
// Handle duplicate names by adding parent directory suffix
|
|
171
|
-
if (seenNames.has(name)) {
|
|
172
|
-
const parentDir = sub.path.split('/').slice(-2)[0];
|
|
173
|
-
name = `${name}-${parentDir}`;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
// Track name occurrences
|
|
177
|
-
nameCount[name] = (nameCount[name] || 0) + 1;
|
|
178
|
-
if (nameCount[name] > 1) {
|
|
179
|
-
name = `${name}-${nameCount[name]}`;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
seenNames.add(name);
|
|
183
|
-
|
|
184
|
-
return {
|
|
185
|
-
name,
|
|
186
|
-
type: sub.type || 'unknown',
|
|
187
|
-
path: sub.path
|
|
188
|
-
};
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
* Create new pipeline state for a task
|
|
194
|
-
* @param {string} taskName - task name
|
|
195
|
-
* @param {string} workflow - workflow type
|
|
196
|
-
* @param {Array} roles - involved roles
|
|
197
|
-
* @param {Array} subsystems - optional subsystems config
|
|
198
|
-
*/
|
|
199
|
-
export function createState(taskName, workflow = 'waterfall', roles = [], subsystems = []) {
|
|
200
|
-
const wf = WORKFLOWS[workflow];
|
|
201
|
-
if (!wf) throw new Error(`Unknown workflow: ${workflow}`);
|
|
202
|
-
|
|
203
|
-
// Normalize subsystem names to ensure uniqueness
|
|
204
|
-
const normalizedSubsystems = normalizeSubsystems(subsystems);
|
|
205
|
-
|
|
206
|
-
const stages = {};
|
|
207
|
-
for (const stageId of wf.stages) {
|
|
208
|
-
const stage = STAGES.find(s => s.id === stageId);
|
|
209
|
-
const stageDef = {
|
|
210
|
-
name: stage.name,
|
|
211
|
-
label: stage.label,
|
|
212
|
-
status: 'pending', // pending | in_progress | layer1_pass | layer2_pass | completed | blocked | failed
|
|
213
|
-
layer1: null, // null | pass | fail | blocked
|
|
214
|
-
layer2: null, // null | pass | fail
|
|
215
|
-
retryCount: 0,
|
|
216
|
-
artifacts: [],
|
|
217
|
-
assumptions: [],
|
|
218
|
-
startedAt: null,
|
|
219
|
-
completedAt: null
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
// Add subsystems array for multi-system projects
|
|
223
|
-
if (normalizedSubsystems.length > 0) {
|
|
224
|
-
stageDef.subsystems = normalizedSubsystems.map(sub => ({
|
|
225
|
-
name: sub.name,
|
|
226
|
-
type: sub.type,
|
|
227
|
-
status: 'pending',
|
|
228
|
-
layer1: null,
|
|
229
|
-
layer2: null,
|
|
230
|
-
retryCount: 0,
|
|
231
|
-
startedAt: null,
|
|
232
|
-
completedAt: null
|
|
233
|
-
}));
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
stages[stageId] = stageDef;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
return {
|
|
240
|
-
version: '1.0.2',
|
|
241
|
-
taskName,
|
|
242
|
-
workflow,
|
|
243
|
-
roles,
|
|
244
|
-
hasSubsystems: normalizedSubsystems.length > 0,
|
|
245
|
-
subsystemsConfig: normalizedSubsystems.map(s => ({ name: s.name, type: s.type, path: s.path })),
|
|
246
|
-
currentStage: wf.stages[0],
|
|
247
|
-
stages,
|
|
248
|
-
pendingConfirmations: [],
|
|
249
|
-
autoDecisions: [],
|
|
250
|
-
createdAt: new Date().toISOString(),
|
|
251
|
-
updatedAt: new Date().toISOString()
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* Get status of a specific subsystem in a stage
|
|
257
|
-
* @param {Object} state - pipeline state
|
|
258
|
-
* @param {string} stageId - stage ID (e.g., '03')
|
|
259
|
-
* @param {string} subsystemName - subsystem name
|
|
260
|
-
* @returns {Object|null} subsystem status or null
|
|
261
|
-
*/
|
|
262
|
-
export function getSubsystemStatus(state, stageId, subsystemName) {
|
|
263
|
-
if (!state?.stages?.[stageId]?.subsystems) return null;
|
|
264
|
-
return state.stages[stageId].subsystems.find(s => s.name === subsystemName) || null;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* Update status of a specific subsystem
|
|
269
|
-
* @param {Object} state - pipeline state
|
|
270
|
-
* @param {string} stageId - stage ID
|
|
271
|
-
* @param {string} subsystemName - subsystem name
|
|
272
|
-
* @param {Object} updates - status updates
|
|
273
|
-
*/
|
|
274
|
-
export function updateSubsystemStatus(state, stageId, subsystemName, updates) {
|
|
275
|
-
if (!state?.stages?.[stageId]?.subsystems) return false;
|
|
276
|
-
|
|
277
|
-
const subsystem = state.stages[stageId].subsystems.find(s => s.name === subsystemName);
|
|
278
|
-
if (!subsystem) return false;
|
|
279
|
-
|
|
280
|
-
Object.assign(subsystem, updates);
|
|
281
|
-
return true;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
/**
|
|
285
|
-
* Group subsystems by type for display
|
|
286
|
-
* @param {Array} subsystems - subsystem status array
|
|
287
|
-
* @returns {Object} grouped by type
|
|
288
|
-
*/
|
|
289
|
-
function groupSubsystemsByType(subsystems) {
|
|
290
|
-
const groups = {};
|
|
291
|
-
for (const sub of subsystems) {
|
|
292
|
-
const type = sub.type || 'unknown';
|
|
293
|
-
if (!groups[type]) groups[type] = [];
|
|
294
|
-
groups[type].push(sub);
|
|
295
|
-
}
|
|
296
|
-
return groups;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
/**
|
|
300
|
-
* Get status icon for display
|
|
301
|
-
*/
|
|
302
|
-
function getStatusIcon(status) {
|
|
303
|
-
return {
|
|
304
|
-
pending: '○',
|
|
305
|
-
in_progress: '◎',
|
|
306
|
-
layer1_pass: '◐',
|
|
307
|
-
layer2_pass: '◑',
|
|
308
|
-
completed: '●',
|
|
309
|
-
blocked: '✖',
|
|
310
|
-
failed: '✖'
|
|
311
|
-
}[status] || '?';
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Get human-readable status summary
|
|
316
|
-
* Supports both single-system and multi-system modes
|
|
317
|
-
*/
|
|
318
|
-
export function getStatusSummary(state) {
|
|
319
|
-
if (!state) return null;
|
|
320
|
-
|
|
321
|
-
const wf = WORKFLOWS[state.workflow];
|
|
322
|
-
const lines = [];
|
|
323
|
-
lines.push(`Task: ${state.taskName}`);
|
|
324
|
-
lines.push(`Workflow: ${wf.label} (${state.workflow})`);
|
|
325
|
-
lines.push(`Roles: ${state.roles.length > 0 ? state.roles.join(', ') : '(none)'}`);
|
|
326
|
-
lines.push(`Mode: ${state.hasSubsystems ? 'Multi-system' : 'Single-system'}`);
|
|
327
|
-
lines.push(`Current: Stage ${state.currentStage}`);
|
|
328
|
-
lines.push('');
|
|
329
|
-
|
|
330
|
-
// Show subsystems config if present
|
|
331
|
-
if (state.hasSubsystems && state.subsystemsConfig) {
|
|
332
|
-
lines.push('Subsystems:');
|
|
333
|
-
const groups = groupSubsystemsByType(state.subsystemsConfig);
|
|
334
|
-
for (const [type, subs] of Object.entries(groups)) {
|
|
335
|
-
const typeLabel = SUBSYSTEM_TYPE_LABELS[type] || type;
|
|
336
|
-
lines.push(` [${typeLabel}] ${subs.map(s => s.name).join(', ')}`);
|
|
337
|
-
}
|
|
338
|
-
lines.push('');
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
lines.push('Stages:');
|
|
342
|
-
|
|
343
|
-
for (const stageId of wf.stages) {
|
|
344
|
-
const s = state.stages[stageId];
|
|
345
|
-
const stage = STAGES.find(st => st.id === stageId);
|
|
346
|
-
const icon = getStatusIcon(s.status);
|
|
347
|
-
const current = stageId === state.currentStage ? ' ←' : '';
|
|
348
|
-
lines.push(` ${icon} [${stageId}] ${stage.label} — ${s.status}${current}`);
|
|
349
|
-
|
|
350
|
-
// Show subsystem details for current stage in multi-system mode
|
|
351
|
-
if (s.subsystems && stageId === state.currentStage) {
|
|
352
|
-
const groups = groupSubsystemsByType(s.subsystems);
|
|
353
|
-
for (const [type, subs] of Object.entries(groups)) {
|
|
354
|
-
const typeLabel = SUBSYSTEM_TYPE_LABELS[type] || type;
|
|
355
|
-
lines.push(` ${typeLabel}:`);
|
|
356
|
-
for (const sub of subs) {
|
|
357
|
-
const subIcon = getStatusIcon(sub.status);
|
|
358
|
-
const l1 = sub.layer1 ? `[L1:${sub.layer1}]` : '';
|
|
359
|
-
const l2 = sub.layer2 ? `[L2:${sub.layer2}]` : '';
|
|
360
|
-
lines.push(` ${subIcon} ${sub.name} ${l1}${l2}`);
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
// Show pending items count if any
|
|
367
|
-
if (state.pendingConfirmations?.length > 0) {
|
|
368
|
-
lines.push('');
|
|
369
|
-
lines.push(`Pending confirmations: ${state.pendingConfirmations.length}`);
|
|
370
|
-
}
|
|
371
|
-
if (state.autoDecisions?.length > 0) {
|
|
372
|
-
lines.push(`Auto decisions: ${state.autoDecisions.length}`);
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
return lines.join('\n');
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
/**
|
|
379
|
-
* Get all subsystems status for current stage
|
|
380
|
-
* @param {Object} state - pipeline state
|
|
381
|
-
* @returns {Array} all subsystems status for current stage
|
|
382
|
-
*/
|
|
383
|
-
export function getAllSubsystemsStatus(state) {
|
|
384
|
-
if (!state?.stages?.[state.currentStage]?.subsystems) {
|
|
385
|
-
return [];
|
|
386
|
-
}
|
|
387
|
-
return state.stages[state.currentStage].subsystems;
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* Get subsystem coverage report
|
|
392
|
-
* Compares designed subsystems vs implemented subsystems
|
|
393
|
-
* @param {string} projectDir - project directory
|
|
394
|
-
* @param {Object} state - pipeline state
|
|
395
|
-
* @returns {Object} coverage report
|
|
396
|
-
*/
|
|
397
|
-
export function getSubsystemCoverage(state, designSubsystems = []) {
|
|
398
|
-
if (!state?.stages?.[state.currentStage]?.subsystems) {
|
|
399
|
-
return {
|
|
400
|
-
designed: [],
|
|
401
|
-
implemented: [],
|
|
402
|
-
coverage: 0,
|
|
403
|
-
missing: [],
|
|
404
|
-
completed: [],
|
|
405
|
-
inProgress: [],
|
|
406
|
-
pending: []
|
|
407
|
-
};
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
const currentSubsystems = state.stages[state.currentStage].subsystems;
|
|
411
|
-
|
|
412
|
-
// Categorize by status
|
|
413
|
-
const completed = currentSubsystems.filter(s => s.status === 'completed');
|
|
414
|
-
const inProgress = currentSubsystems.filter(s => s.status === 'in_progress' || s.status === 'layer1_pass');
|
|
415
|
-
const pending = currentSubsystems.filter(s => s.status === 'pending');
|
|
416
|
-
|
|
417
|
-
// Calculate coverage
|
|
418
|
-
const total = currentSubsystems.length;
|
|
419
|
-
const covered = completed.length + inProgress.length;
|
|
420
|
-
const coverageRate = total > 0 ? Math.round((covered / total) * 100) : 0;
|
|
421
|
-
|
|
422
|
-
return {
|
|
423
|
-
designed: currentSubsystems.map(s => ({ name: s.name, type: s.type, path: s.path })),
|
|
424
|
-
implemented: currentSubsystems.filter(s => s.status !== 'pending'),
|
|
425
|
-
coverage: coverageRate,
|
|
426
|
-
missing: pending.map(s => s.name),
|
|
427
|
-
completed: completed.map(s => s.name),
|
|
428
|
-
inProgress: inProgress.map(s => s.name),
|
|
429
|
-
pending: pending.map(s => s.name),
|
|
430
|
-
details: currentSubsystems
|
|
431
|
-
};
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
/**
|
|
435
|
-
* Get monitoring issues from .autospec/monitoring-issues.json
|
|
436
|
-
* @param {string} projectDir - project directory
|
|
437
|
-
* @returns {Array} monitoring issues
|
|
438
|
-
*/
|
|
439
|
-
export function getMonitoringIssues(projectDir) {
|
|
440
|
-
const monitoringIssuesPath = path.join(projectDir, '.autospec/monitoring-issues.json');
|
|
441
|
-
if (fs.existsSync(monitoringIssuesPath)) {
|
|
442
|
-
try {
|
|
443
|
-
return JSON.parse(fs.readFileSync(monitoringIssuesPath, 'utf-8'));
|
|
444
|
-
} catch {
|
|
445
|
-
return [];
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
return [];
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
/**
|
|
452
|
-
* Add monitoring issue to .autospec/monitoring-issues.json
|
|
453
|
-
* @param {string} projectDir - project directory
|
|
454
|
-
* @param {Object} issue - issue to add
|
|
455
|
-
*/
|
|
456
|
-
export function addMonitoringIssue(projectDir, issue) {
|
|
457
|
-
const monitoringIssuesPath = path.join(projectDir, '.autospec/monitoring-issues.json');
|
|
458
|
-
|
|
459
|
-
let issues = [];
|
|
460
|
-
if (fs.existsSync(monitoringIssuesPath)) {
|
|
461
|
-
try {
|
|
462
|
-
issues = JSON.parse(fs.readFileSync(monitoringIssuesPath, 'utf-8'));
|
|
463
|
-
} catch {
|
|
464
|
-
issues = [];
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
const newIssue = {
|
|
469
|
-
id: `issue-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
|
|
470
|
-
createdAt: new Date().toISOString(),
|
|
471
|
-
updatedAt: new Date().toISOString(),
|
|
472
|
-
status: 'open', // open | acknowledged | fixing | fixed | closed
|
|
473
|
-
...issue
|
|
474
|
-
};
|
|
475
|
-
|
|
476
|
-
issues.push(newIssue);
|
|
477
|
-
|
|
478
|
-
const dir = path.dirname(monitoringIssuesPath);
|
|
479
|
-
if (!fs.existsSync(dir)) {
|
|
480
|
-
fs.mkdirSync(dir, { recursive: true });
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
fs.writeFileSync(monitoringIssuesPath, JSON.stringify(issues, null, 2), 'utf-8');
|
|
484
|
-
return newIssue;
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
/**
|
|
488
|
-
* Update monitoring issue status
|
|
489
|
-
* @param {string} projectDir - project directory
|
|
490
|
-
* @param {string} issueId - issue ID
|
|
491
|
-
* @param {Object} updates - status updates
|
|
492
|
-
* @returns {boolean} success
|
|
493
|
-
*/
|
|
494
|
-
export function updateMonitoringIssue(projectDir, issueId, updates) {
|
|
495
|
-
const monitoringIssuesPath = path.join(projectDir, '.autospec/monitoring-issues.json');
|
|
496
|
-
|
|
497
|
-
if (!fs.existsSync(monitoringIssuesPath)) {
|
|
498
|
-
return false;
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
let issues;
|
|
502
|
-
try {
|
|
503
|
-
issues = JSON.parse(fs.readFileSync(monitoringIssuesPath, 'utf-8'));
|
|
504
|
-
} catch {
|
|
505
|
-
return false;
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
const issueIndex = issues.findIndex(i => i.id === issueId);
|
|
509
|
-
if (issueIndex === -1) {
|
|
510
|
-
return false;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
issues[issueIndex] = {
|
|
514
|
-
...issues[issueIndex],
|
|
515
|
-
...updates,
|
|
516
|
-
updatedAt: new Date().toISOString()
|
|
517
|
-
};
|
|
518
|
-
|
|
519
|
-
fs.writeFileSync(monitoringIssuesPath, JSON.stringify(issues, null, 2), 'utf-8');
|
|
520
|
-
return true;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
/**
|
|
524
|
-
* Get monitoring report summary
|
|
525
|
-
* @param {string} projectDir - project directory
|
|
526
|
-
* @returns {Object} monitoring report
|
|
527
|
-
*/
|
|
528
|
-
export function getMonitoringReport(projectDir) {
|
|
529
|
-
const issues = getMonitoringIssues(projectDir);
|
|
530
|
-
|
|
531
|
-
const summary = {
|
|
532
|
-
total: issues.length,
|
|
533
|
-
open: issues.filter(i => i.status === 'open').length,
|
|
534
|
-
acknowledged: issues.filter(i => i.status === 'acknowledged').length,
|
|
535
|
-
fixing: issues.filter(i => i.status === 'fixing').length,
|
|
536
|
-
fixed: issues.filter(i => i.status === 'fixed').length,
|
|
537
|
-
closed: issues.filter(i => i.status === 'closed').length,
|
|
538
|
-
bySeverity: {
|
|
539
|
-
critical: issues.filter(i => i.severity === 'critical').length,
|
|
540
|
-
high: issues.filter(i => i.severity === 'high').length,
|
|
541
|
-
medium: issues.filter(i => i.severity === 'medium').length,
|
|
542
|
-
low: issues.filter(i => i.severity === 'low').length
|
|
543
|
-
},
|
|
544
|
-
recentIssues: issues.slice(-10).reverse()
|
|
545
|
-
};
|
|
546
|
-
|
|
547
|
-
return summary;
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
/**
|
|
551
|
-
* Check if all subsystems have passed Layer 1 validation
|
|
552
|
-
* @param {Object} state - pipeline state
|
|
553
|
-
* @param {string} stageId - stage ID
|
|
554
|
-
* @returns {Object} validation result
|
|
555
|
-
*/
|
|
556
|
-
export function checkAllSubsystemsLayer1(state, stageId) {
|
|
557
|
-
const subsystems = state?.stages?.[stageId]?.subsystems;
|
|
558
|
-
|
|
559
|
-
if (!subsystems || subsystems.length === 0) {
|
|
560
|
-
return {
|
|
561
|
-
allPassed: true,
|
|
562
|
-
hasSubsystems: false,
|
|
563
|
-
details: []
|
|
564
|
-
};
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
const passed = subsystems.filter(s => s.layer1 === 'pass');
|
|
568
|
-
const failed = subsystems.filter(s => s.layer1 === 'fail');
|
|
569
|
-
const pending = subsystems.filter(s => !s.layer1 || s.layer1 === null);
|
|
570
|
-
|
|
571
|
-
return {
|
|
572
|
-
allPassed: failed.length === 0 && pending.length === 0,
|
|
573
|
-
hasSubsystems: true,
|
|
574
|
-
total: subsystems.length,
|
|
575
|
-
passed: passed.length,
|
|
576
|
-
failed: failed.length,
|
|
577
|
-
pending: pending.length,
|
|
578
|
-
details: subsystems.map(s => ({
|
|
579
|
-
name: s.name,
|
|
580
|
-
type: s.type,
|
|
581
|
-
layer1: s.layer1,
|
|
582
|
-
status: s.status
|
|
583
|
-
}))
|
|
584
|
-
};
|
|
585
|
-
}
|
|
File without changes
|