@rsaglobaltech/specgate 0.8.1
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/CHANGELOG.md +1016 -0
- package/README.md +148 -0
- package/bin/specgate.js +2 -0
- package/bin/specgate.ts +383 -0
- package/dist/bin/specgate.js +342 -0
- package/dist/bin/specgate.js.map +1 -0
- package/dist/packages/core/src/application/AddRequirementUseCase.js +24 -0
- package/dist/packages/core/src/application/AddRequirementUseCase.js.map +1 -0
- package/dist/packages/core/src/application/ArchiveChangeUseCase.js +185 -0
- package/dist/packages/core/src/application/ArchiveChangeUseCase.js.map +1 -0
- package/dist/packages/core/src/application/CheckAgainstLockUseCase.js +134 -0
- package/dist/packages/core/src/application/CheckAgainstLockUseCase.js.map +1 -0
- package/dist/packages/core/src/application/GenerateAgentPromptUseCase.js +25 -0
- package/dist/packages/core/src/application/GenerateAgentPromptUseCase.js.map +1 -0
- package/dist/packages/core/src/application/GeneratePlanUseCase.js +135 -0
- package/dist/packages/core/src/application/GeneratePlanUseCase.js.map +1 -0
- package/dist/packages/core/src/application/LinkRequirementUseCase.js +25 -0
- package/dist/packages/core/src/application/LinkRequirementUseCase.js.map +1 -0
- package/dist/packages/core/src/application/RemovePackUseCase.js +28 -0
- package/dist/packages/core/src/application/RemovePackUseCase.js.map +1 -0
- package/dist/packages/core/src/application/UpdateRequirementStatusUseCase.js +37 -0
- package/dist/packages/core/src/application/UpdateRequirementStatusUseCase.js.map +1 -0
- package/dist/packages/core/src/application/ValidateChangeUseCase.js +86 -0
- package/dist/packages/core/src/application/ValidateChangeUseCase.js.map +1 -0
- package/dist/packages/core/src/application/ValidateProjectUseCase.js +101 -0
- package/dist/packages/core/src/application/ValidateProjectUseCase.js.map +1 -0
- package/dist/packages/core/src/application/ports/IDomainPackRepository.js +3 -0
- package/dist/packages/core/src/application/ports/IDomainPackRepository.js.map +1 -0
- package/dist/packages/core/src/application/ports/IHarnessConfigRepository.js +3 -0
- package/dist/packages/core/src/application/ports/IHarnessConfigRepository.js.map +1 -0
- package/dist/packages/core/src/application/ports/ILockfileRepository.js +3 -0
- package/dist/packages/core/src/application/ports/ILockfileRepository.js.map +1 -0
- package/dist/packages/core/src/application/ports/IManifestRepository.js +3 -0
- package/dist/packages/core/src/application/ports/IManifestRepository.js.map +1 -0
- package/dist/packages/core/src/application/ports/IProjectRepository.js +3 -0
- package/dist/packages/core/src/application/ports/IProjectRepository.js.map +1 -0
- package/dist/packages/core/src/application/ports/IRequirementGraphRepository.js +3 -0
- package/dist/packages/core/src/application/ports/IRequirementGraphRepository.js.map +1 -0
- package/dist/packages/core/src/application/ports/ITraceabilityRepository.js +3 -0
- package/dist/packages/core/src/application/ports/ITraceabilityRepository.js.map +1 -0
- package/dist/packages/core/src/domain/AgentPrompt.js +79 -0
- package/dist/packages/core/src/domain/AgentPrompt.js.map +1 -0
- package/dist/packages/core/src/domain/ArchivePlan.js +26 -0
- package/dist/packages/core/src/domain/ArchivePlan.js.map +1 -0
- package/dist/packages/core/src/domain/AuthoringScope.js +48 -0
- package/dist/packages/core/src/domain/AuthoringScope.js.map +1 -0
- package/dist/packages/core/src/domain/ChangeTemplates.js +133 -0
- package/dist/packages/core/src/domain/ChangeTemplates.js.map +1 -0
- package/dist/packages/core/src/domain/CucumberMessages.js +256 -0
- package/dist/packages/core/src/domain/CucumberMessages.js.map +1 -0
- package/dist/packages/core/src/domain/DeclaredArtifacts.js +117 -0
- package/dist/packages/core/src/domain/DeclaredArtifacts.js.map +1 -0
- package/dist/packages/core/src/domain/DeltaSpec.js +219 -0
- package/dist/packages/core/src/domain/DeltaSpec.js.map +1 -0
- package/dist/packages/core/src/domain/Diagnostic.js +75 -0
- package/dist/packages/core/src/domain/Diagnostic.js.map +1 -0
- package/dist/packages/core/src/domain/DomainPack.js +62 -0
- package/dist/packages/core/src/domain/DomainPack.js.map +1 -0
- package/dist/packages/core/src/domain/EmptyAttempt.js +60 -0
- package/dist/packages/core/src/domain/EmptyAttempt.js.map +1 -0
- package/dist/packages/core/src/domain/FileChangeSet.js +37 -0
- package/dist/packages/core/src/domain/FileChangeSet.js.map +1 -0
- package/dist/packages/core/src/domain/Gherkin.js +272 -0
- package/dist/packages/core/src/domain/Gherkin.js.map +1 -0
- package/dist/packages/core/src/domain/GherkinDialects.js +97 -0
- package/dist/packages/core/src/domain/GherkinDialects.js.map +1 -0
- package/dist/packages/core/src/domain/GherkinQuality.js +160 -0
- package/dist/packages/core/src/domain/GherkinQuality.js.map +1 -0
- package/dist/packages/core/src/domain/GherkinTags.js +119 -0
- package/dist/packages/core/src/domain/GherkinTags.js.map +1 -0
- package/dist/packages/core/src/domain/GitSafety.js +77 -0
- package/dist/packages/core/src/domain/GitSafety.js.map +1 -0
- package/dist/packages/core/src/domain/HarnessConfig.js +58 -0
- package/dist/packages/core/src/domain/HarnessConfig.js.map +1 -0
- package/dist/packages/core/src/domain/HarnessReport.js +162 -0
- package/dist/packages/core/src/domain/HarnessReport.js.map +1 -0
- package/dist/packages/core/src/domain/HarnessRun.js +154 -0
- package/dist/packages/core/src/domain/HarnessRun.js.map +1 -0
- package/dist/packages/core/src/domain/InboundChange.js +127 -0
- package/dist/packages/core/src/domain/InboundChange.js.map +1 -0
- package/dist/packages/core/src/domain/Language.js +112 -0
- package/dist/packages/core/src/domain/Language.js.map +1 -0
- package/dist/packages/core/src/domain/Lockfile.js +64 -0
- package/dist/packages/core/src/domain/Lockfile.js.map +1 -0
- package/dist/packages/core/src/domain/PackContribution.js +106 -0
- package/dist/packages/core/src/domain/PackContribution.js.map +1 -0
- package/dist/packages/core/src/domain/PackDelta.js +298 -0
- package/dist/packages/core/src/domain/PackDelta.js.map +1 -0
- package/dist/packages/core/src/domain/PackSpec.js +481 -0
- package/dist/packages/core/src/domain/PackSpec.js.map +1 -0
- package/dist/packages/core/src/domain/ProfileMatch.js +87 -0
- package/dist/packages/core/src/domain/ProfileMatch.js.map +1 -0
- package/dist/packages/core/src/domain/Reconciliation.js +72 -0
- package/dist/packages/core/src/domain/Reconciliation.js.map +1 -0
- package/dist/packages/core/src/domain/RequirementGraph.js +197 -0
- package/dist/packages/core/src/domain/RequirementGraph.js.map +1 -0
- package/dist/packages/core/src/domain/RequirementPlan.js +85 -0
- package/dist/packages/core/src/domain/RequirementPlan.js.map +1 -0
- package/dist/packages/core/src/domain/RequirementReadiness.js +115 -0
- package/dist/packages/core/src/domain/RequirementReadiness.js.map +1 -0
- package/dist/packages/core/src/domain/RequirementSyntax.js +91 -0
- package/dist/packages/core/src/domain/RequirementSyntax.js.map +1 -0
- package/dist/packages/core/src/domain/ResumeState.js +115 -0
- package/dist/packages/core/src/domain/ResumeState.js.map +1 -0
- package/dist/packages/core/src/domain/RunBudget.js +103 -0
- package/dist/packages/core/src/domain/RunBudget.js.map +1 -0
- package/dist/packages/core/src/domain/SpecDiff.js +48 -0
- package/dist/packages/core/src/domain/SpecDiff.js.map +1 -0
- package/dist/packages/core/src/domain/SpecParser.js +406 -0
- package/dist/packages/core/src/domain/SpecParser.js.map +1 -0
- package/dist/packages/core/src/domain/SpecopsManifest.js +90 -0
- package/dist/packages/core/src/domain/SpecopsManifest.js.map +1 -0
- package/dist/packages/core/src/domain/TraceabilityFormat.js +317 -0
- package/dist/packages/core/src/domain/TraceabilityFormat.js.map +1 -0
- package/dist/packages/core/src/domain/TraceabilityMatrix.js +200 -0
- package/dist/packages/core/src/domain/TraceabilityMatrix.js.map +1 -0
- package/dist/packages/core/src/domain/TraceabilityMerge.js +180 -0
- package/dist/packages/core/src/domain/TraceabilityMerge.js.map +1 -0
- package/dist/packages/core/src/domain/ValidationReport.js +53 -0
- package/dist/packages/core/src/domain/ValidationReport.js.map +1 -0
- package/dist/packages/core/src/domain/ValueAnnotations.js +138 -0
- package/dist/packages/core/src/domain/ValueAnnotations.js.map +1 -0
- package/dist/packages/core/src/domain/WriteScope.js +155 -0
- package/dist/packages/core/src/domain/WriteScope.js.map +1 -0
- package/dist/packages/core/src/domain/YamlLite.js +226 -0
- package/dist/packages/core/src/domain/YamlLite.js.map +1 -0
- package/dist/packages/core/src/index.js +120 -0
- package/dist/packages/core/src/index.js.map +1 -0
- package/dist/packages/core/src/infrastructure/ChangeWorkspace.js +276 -0
- package/dist/packages/core/src/infrastructure/ChangeWorkspace.js.map +1 -0
- package/dist/packages/core/src/infrastructure/ConsoleReporter.js +19 -0
- package/dist/packages/core/src/infrastructure/ConsoleReporter.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DirectorySnapshot.js +106 -0
- package/dist/packages/core/src/infrastructure/DirectorySnapshot.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskDomainPackRepository.js +57 -0
- package/dist/packages/core/src/infrastructure/DiskDomainPackRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskHarnessConfigRepository.js +58 -0
- package/dist/packages/core/src/infrastructure/DiskHarnessConfigRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskLanguageRepository.js +69 -0
- package/dist/packages/core/src/infrastructure/DiskLanguageRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskLockfileRepository.js +64 -0
- package/dist/packages/core/src/infrastructure/DiskLockfileRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskManifestRepository.js +88 -0
- package/dist/packages/core/src/infrastructure/DiskManifestRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskPackDeltaRepository.js +138 -0
- package/dist/packages/core/src/infrastructure/DiskPackDeltaRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskPackRepository.js +130 -0
- package/dist/packages/core/src/infrastructure/DiskPackRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskProjectRepository.js +127 -0
- package/dist/packages/core/src/infrastructure/DiskProjectRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskRequirementGraphRepository.js +124 -0
- package/dist/packages/core/src/infrastructure/DiskRequirementGraphRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/DiskTraceabilityRepository.js +53 -0
- package/dist/packages/core/src/infrastructure/DiskTraceabilityRepository.js.map +1 -0
- package/dist/packages/core/src/infrastructure/GitContributionStager.js +99 -0
- package/dist/packages/core/src/infrastructure/GitContributionStager.js.map +1 -0
- package/dist/packages/core/src/infrastructure/GitMergeDriver.js +103 -0
- package/dist/packages/core/src/infrastructure/GitMergeDriver.js.map +1 -0
- package/dist/packages/core/src/infrastructure/HarnessConfigFile.js +348 -0
- package/dist/packages/core/src/infrastructure/HarnessConfigFile.js.map +1 -0
- package/dist/packages/core/src/infrastructure/PackChangeDeposit.js +106 -0
- package/dist/packages/core/src/infrastructure/PackChangeDeposit.js.map +1 -0
- package/dist/packages/core/src/infrastructure/RemotePackResolver.js +181 -0
- package/dist/packages/core/src/infrastructure/RemotePackResolver.js.map +1 -0
- package/dist/packages/core/src/infrastructure/SpecopsConfigFile.js +94 -0
- package/dist/packages/core/src/infrastructure/SpecopsConfigFile.js.map +1 -0
- package/dist/packages/core/test/unit/authoring-scope.test.js +102 -0
- package/dist/packages/core/test/unit/authoring-scope.test.js.map +1 -0
- package/dist/packages/core/test/unit/change-templates.test.js +96 -0
- package/dist/packages/core/test/unit/change-templates.test.js.map +1 -0
- package/dist/packages/core/test/unit/cucumber-messages.test.js +232 -0
- package/dist/packages/core/test/unit/cucumber-messages.test.js.map +1 -0
- package/dist/packages/core/test/unit/declared-artifacts.test.js +124 -0
- package/dist/packages/core/test/unit/declared-artifacts.test.js.map +1 -0
- package/dist/packages/core/test/unit/empty-attempt.test.js +79 -0
- package/dist/packages/core/test/unit/empty-attempt.test.js.map +1 -0
- package/dist/packages/core/test/unit/gherkin-dialects.test.js +115 -0
- package/dist/packages/core/test/unit/gherkin-dialects.test.js.map +1 -0
- package/dist/packages/core/test/unit/gherkin-keyword-case.test.js +110 -0
- package/dist/packages/core/test/unit/gherkin-keyword-case.test.js.map +1 -0
- package/dist/packages/core/test/unit/gherkin-quality.test.js +151 -0
- package/dist/packages/core/test/unit/gherkin-quality.test.js.map +1 -0
- package/dist/packages/core/test/unit/gherkin-tags.test.js +127 -0
- package/dist/packages/core/test/unit/gherkin-tags.test.js.map +1 -0
- package/dist/packages/core/test/unit/git-safety.test.js +104 -0
- package/dist/packages/core/test/unit/git-safety.test.js.map +1 -0
- package/dist/packages/core/test/unit/harness-report.test.js +192 -0
- package/dist/packages/core/test/unit/harness-report.test.js.map +1 -0
- package/dist/packages/core/test/unit/harness-roles.test.js +86 -0
- package/dist/packages/core/test/unit/harness-roles.test.js.map +1 -0
- package/dist/packages/core/test/unit/inbound-change.test.js +145 -0
- package/dist/packages/core/test/unit/inbound-change.test.js.map +1 -0
- package/dist/packages/core/test/unit/matrix-dependencies.test.js +100 -0
- package/dist/packages/core/test/unit/matrix-dependencies.test.js.map +1 -0
- package/dist/packages/core/test/unit/profile-match.test.js +115 -0
- package/dist/packages/core/test/unit/profile-match.test.js.map +1 -0
- package/dist/packages/core/test/unit/reconciliation.test.js +112 -0
- package/dist/packages/core/test/unit/reconciliation.test.js.map +1 -0
- package/dist/packages/core/test/unit/requirement-readiness.test.js +161 -0
- package/dist/packages/core/test/unit/requirement-readiness.test.js.map +1 -0
- package/dist/packages/core/test/unit/resume-state.test.js +124 -0
- package/dist/packages/core/test/unit/resume-state.test.js.map +1 -0
- package/dist/packages/core/test/unit/run-budget.test.js +113 -0
- package/dist/packages/core/test/unit/run-budget.test.js.map +1 -0
- package/dist/packages/core/test/unit/traceability-merge.test.js +159 -0
- package/dist/packages/core/test/unit/traceability-merge.test.js.map +1 -0
- package/dist/packages/core/test/unit/validate-project.test.js +156 -0
- package/dist/packages/core/test/unit/validate-project.test.js.map +1 -0
- package/dist/packages/core/test/unit/value-annotations.test.js +149 -0
- package/dist/packages/core/test/unit/value-annotations.test.js.map +1 -0
- package/dist/packages/core/test/unit/write-scope.test.js +165 -0
- package/dist/packages/core/test/unit/write-scope.test.js.map +1 -0
- package/dist/packages/core/test/unit/yaml-lite.test.js +78 -0
- package/dist/packages/core/test/unit/yaml-lite.test.js.map +1 -0
- package/dist/scripts/adopt_project.js +11 -0
- package/dist/scripts/adopt_project.js.map +1 -0
- package/dist/scripts/agents/commands.js +100 -0
- package/dist/scripts/agents/commands.js.map +1 -0
- package/dist/scripts/agents/init.js +482 -0
- package/dist/scripts/agents/init.js.map +1 -0
- package/dist/scripts/alm/cli.js +154 -0
- package/dist/scripts/alm/cli.js.map +1 -0
- package/dist/scripts/alm/clients.js +30 -0
- package/dist/scripts/alm/clients.js.map +1 -0
- package/dist/scripts/alm/core.js +258 -0
- package/dist/scripts/alm/core.js.map +1 -0
- package/dist/scripts/alm/port.js +116 -0
- package/dist/scripts/alm/port.js.map +1 -0
- package/dist/scripts/alm/providers/azure.js +79 -0
- package/dist/scripts/alm/providers/azure.js.map +1 -0
- package/dist/scripts/alm/providers/github.js +124 -0
- package/dist/scripts/alm/providers/github.js.map +1 -0
- package/dist/scripts/alm/providers/http-client.js +47 -0
- package/dist/scripts/alm/providers/http-client.js.map +1 -0
- package/dist/scripts/alm/providers/index.js +107 -0
- package/dist/scripts/alm/providers/index.js.map +1 -0
- package/dist/scripts/alm/providers/jira.js +129 -0
- package/dist/scripts/alm/providers/jira.js.map +1 -0
- package/dist/scripts/bundle_pack.js +10 -0
- package/dist/scripts/bundle_pack.js.map +1 -0
- package/dist/scripts/change/archive.js +68 -0
- package/dist/scripts/change/archive.js.map +1 -0
- package/dist/scripts/change/artifacts.js +143 -0
- package/dist/scripts/change/artifacts.js.map +1 -0
- package/dist/scripts/change/cli.js +39 -0
- package/dist/scripts/change/cli.js.map +1 -0
- package/dist/scripts/change/delta.js +20 -0
- package/dist/scripts/change/delta.js.map +1 -0
- package/dist/scripts/change/instructions.js +339 -0
- package/dist/scripts/change/instructions.js.map +1 -0
- package/dist/scripts/ci_init.js +12 -0
- package/dist/scripts/ci_init.js.map +1 -0
- package/dist/scripts/cli/commands/alm/PullCommand.js +238 -0
- package/dist/scripts/cli/commands/alm/PullCommand.js.map +1 -0
- package/dist/scripts/cli/commands/change/ChangeCommand.js +867 -0
- package/dist/scripts/cli/commands/change/ChangeCommand.js.map +1 -0
- package/dist/scripts/cli/commands/config/CiInitCommand.js +144 -0
- package/dist/scripts/cli/commands/config/CiInitCommand.js.map +1 -0
- package/dist/scripts/cli/commands/config/CompletionCommand.js +160 -0
- package/dist/scripts/cli/commands/config/CompletionCommand.js.map +1 -0
- package/dist/scripts/cli/commands/config/ConfigInitCommand.js +108 -0
- package/dist/scripts/cli/commands/config/ConfigInitCommand.js.map +1 -0
- package/dist/scripts/cli/commands/config/ConfigSetCommand.js +166 -0
- package/dist/scripts/cli/commands/config/ConfigSetCommand.js.map +1 -0
- package/dist/scripts/cli/commands/config/GenAgentContractCommand.js +212 -0
- package/dist/scripts/cli/commands/config/GenAgentContractCommand.js.map +1 -0
- package/dist/scripts/cli/commands/harness/RunCommand.js +1922 -0
- package/dist/scripts/cli/commands/harness/RunCommand.js.map +1 -0
- package/dist/scripts/cli/commands/mcp/McpInstallCommand.js +114 -0
- package/dist/scripts/cli/commands/mcp/McpInstallCommand.js.map +1 -0
- package/dist/scripts/cli/commands/mcp/index.js +29 -0
- package/dist/scripts/cli/commands/mcp/index.js.map +1 -0
- package/dist/scripts/cli/commands/pack/BundlePackCommand.js +59 -0
- package/dist/scripts/cli/commands/pack/BundlePackCommand.js.map +1 -0
- package/dist/scripts/cli/commands/pack/ExpandDomainPackCommand.js +559 -0
- package/dist/scripts/cli/commands/pack/ExpandDomainPackCommand.js.map +1 -0
- package/dist/scripts/cli/commands/pack/InferPackCommand.js +304 -0
- package/dist/scripts/cli/commands/pack/InferPackCommand.js.map +1 -0
- package/dist/scripts/cli/commands/pack/InitPackCommand.js +368 -0
- package/dist/scripts/cli/commands/pack/InitPackCommand.js.map +1 -0
- package/dist/scripts/cli/commands/pack/LintPackCommand.js +631 -0
- package/dist/scripts/cli/commands/pack/LintPackCommand.js.map +1 -0
- package/dist/scripts/cli/commands/pack/pack-args.js +83 -0
- package/dist/scripts/cli/commands/pack/pack-args.js.map +1 -0
- package/dist/scripts/cli/commands/project/AdoptCommand.js +414 -0
- package/dist/scripts/cli/commands/project/AdoptCommand.js.map +1 -0
- package/dist/scripts/cli/commands/project/InitFromPackCommand.js +188 -0
- package/dist/scripts/cli/commands/project/InitFromPackCommand.js.map +1 -0
- package/dist/scripts/cli/commands/project/InitProjectCommand.js +791 -0
- package/dist/scripts/cli/commands/project/InitProjectCommand.js.map +1 -0
- package/dist/scripts/cli/commands/project/OnboardCommand.js +655 -0
- package/dist/scripts/cli/commands/project/OnboardCommand.js.map +1 -0
- package/dist/scripts/cli/commands/project/UpdateCommand.js +206 -0
- package/dist/scripts/cli/commands/project/UpdateCommand.js.map +1 -0
- package/dist/scripts/cli/commands/project/WizardCommand.js +166 -0
- package/dist/scripts/cli/commands/project/WizardCommand.js.map +1 -0
- package/dist/scripts/cli/commands/quality/DoctorCommand.js +553 -0
- package/dist/scripts/cli/commands/quality/DoctorCommand.js.map +1 -0
- package/dist/scripts/cli/commands/quality/FixCommand.js +201 -0
- package/dist/scripts/cli/commands/quality/FixCommand.js.map +1 -0
- package/dist/scripts/cli/commands/quality/LicenseCheckCommand.js +187 -0
- package/dist/scripts/cli/commands/quality/LicenseCheckCommand.js.map +1 -0
- package/dist/scripts/cli/commands/quality/ReportCommand.js +557 -0
- package/dist/scripts/cli/commands/quality/ReportCommand.js.map +1 -0
- package/dist/scripts/cli/commands/quality/ValidateSpecsCommand.js +764 -0
- package/dist/scripts/cli/commands/quality/ValidateSpecsCommand.js.map +1 -0
- package/dist/scripts/cli/commands/spec/DoneCommand.js +116 -0
- package/dist/scripts/cli/commands/spec/DoneCommand.js.map +1 -0
- package/dist/scripts/cli/commands/spec/PlanCommand.js +397 -0
- package/dist/scripts/cli/commands/spec/PlanCommand.js.map +1 -0
- package/dist/scripts/cli/commands/spec/ReqCommand.js +303 -0
- package/dist/scripts/cli/commands/spec/ReqCommand.js.map +1 -0
- package/dist/scripts/cli/commands/spec/StatusCommand.js +206 -0
- package/dist/scripts/cli/commands/spec/StatusCommand.js.map +1 -0
- package/dist/scripts/cli/commands/spec/StudioCommand.js +241 -0
- package/dist/scripts/cli/commands/spec/StudioCommand.js.map +1 -0
- package/dist/scripts/cli/commands/specops/ContributeCommand.js +313 -0
- package/dist/scripts/cli/commands/specops/ContributeCommand.js.map +1 -0
- package/dist/scripts/cli/commands/specops/DiffCommand.js +394 -0
- package/dist/scripts/cli/commands/specops/DiffCommand.js.map +1 -0
- package/dist/scripts/cli/commands/specops/SyncCommand.js +380 -0
- package/dist/scripts/cli/commands/specops/SyncCommand.js.map +1 -0
- package/dist/scripts/completion.js +24 -0
- package/dist/scripts/completion.js.map +1 -0
- package/dist/scripts/config_init.js +12 -0
- package/dist/scripts/config_init.js.map +1 -0
- package/dist/scripts/config_set.js +20 -0
- package/dist/scripts/config_set.js.map +1 -0
- package/dist/scripts/docs/blocks.js +137 -0
- package/dist/scripts/docs/blocks.js.map +1 -0
- package/dist/scripts/docs/build-site.js +425 -0
- package/dist/scripts/docs/build-site.js.map +1 -0
- package/dist/scripts/docs/nav.js +198 -0
- package/dist/scripts/docs/nav.js.map +1 -0
- package/dist/scripts/docs/record-terminal.js +477 -0
- package/dist/scripts/docs/record-terminal.js.map +1 -0
- package/dist/scripts/docs/terminal-storyboard.js +121 -0
- package/dist/scripts/docs/terminal-storyboard.js.map +1 -0
- package/dist/scripts/doctor.js +14 -0
- package/dist/scripts/doctor.js.map +1 -0
- package/dist/scripts/done.js +17 -0
- package/dist/scripts/done.js.map +1 -0
- package/dist/scripts/expand_domain_pack.js +18 -0
- package/dist/scripts/expand_domain_pack.js.map +1 -0
- package/dist/scripts/fix.js +12 -0
- package/dist/scripts/fix.js.map +1 -0
- package/dist/scripts/gen_agent_contract.js +14 -0
- package/dist/scripts/gen_agent_contract.js.map +1 -0
- package/dist/scripts/gen_mcp_tools.js +264 -0
- package/dist/scripts/gen_mcp_tools.js.map +1 -0
- package/dist/scripts/harness/init.js +358 -0
- package/dist/scripts/harness/init.js.map +1 -0
- package/dist/scripts/harness/prompt.js +18 -0
- package/dist/scripts/harness/prompt.js.map +1 -0
- package/dist/scripts/harness/report.js +323 -0
- package/dist/scripts/harness/report.js.map +1 -0
- package/dist/scripts/harness/run.js +33 -0
- package/dist/scripts/harness/run.js.map +1 -0
- package/dist/scripts/infer_pack.js +17 -0
- package/dist/scripts/infer_pack.js.map +1 -0
- package/dist/scripts/init_from_pack.js +16 -0
- package/dist/scripts/init_from_pack.js.map +1 -0
- package/dist/scripts/init_pack.js +16 -0
- package/dist/scripts/init_pack.js.map +1 -0
- package/dist/scripts/init_project.js +17 -0
- package/dist/scripts/init_project.js.map +1 -0
- package/dist/scripts/lib/agent.js +99 -0
- package/dist/scripts/lib/agent.js.map +1 -0
- package/dist/scripts/lib/capability-specs.js +80 -0
- package/dist/scripts/lib/capability-specs.js.map +1 -0
- package/dist/scripts/lib/command.js +17 -0
- package/dist/scripts/lib/command.js.map +1 -0
- package/dist/scripts/lib/diagnostics.js +62 -0
- package/dist/scripts/lib/diagnostics.js.map +1 -0
- package/dist/scripts/lib/monorepo-fanout.js +118 -0
- package/dist/scripts/lib/monorepo-fanout.js.map +1 -0
- package/dist/scripts/lib/placeholders.js +190 -0
- package/dist/scripts/lib/placeholders.js.map +1 -0
- package/dist/scripts/lib/project-root.js +124 -0
- package/dist/scripts/lib/project-root.js.map +1 -0
- package/dist/scripts/lib/requirement-graph.js +31 -0
- package/dist/scripts/lib/requirement-graph.js.map +1 -0
- package/dist/scripts/lib/surface.js +609 -0
- package/dist/scripts/lib/surface.js.map +1 -0
- package/dist/scripts/license_check.js +15 -0
- package/dist/scripts/license_check.js.map +1 -0
- package/dist/scripts/lint_pack.js +18 -0
- package/dist/scripts/lint_pack.js.map +1 -0
- package/dist/scripts/merge-traceability.js +106 -0
- package/dist/scripts/merge-traceability.js.map +1 -0
- package/dist/scripts/onboard.js +22 -0
- package/dist/scripts/onboard.js.map +1 -0
- package/dist/scripts/plan.js +17 -0
- package/dist/scripts/plan.js.map +1 -0
- package/dist/scripts/plugin/gate-hook.js +171 -0
- package/dist/scripts/plugin/gate-hook.js.map +1 -0
- package/dist/scripts/report.js +17 -0
- package/dist/scripts/report.js.map +1 -0
- package/dist/scripts/req.js +22 -0
- package/dist/scripts/req.js.map +1 -0
- package/dist/scripts/schema/cli.js +215 -0
- package/dist/scripts/schema/cli.js.map +1 -0
- package/dist/scripts/schema/registry.js +264 -0
- package/dist/scripts/schema/registry.js.map +1 -0
- package/dist/scripts/specops/add.js +180 -0
- package/dist/scripts/specops/add.js.map +1 -0
- package/dist/scripts/specops/against_lock.js +100 -0
- package/dist/scripts/specops/against_lock.js.map +1 -0
- package/dist/scripts/specops/as_change.js +49 -0
- package/dist/scripts/specops/as_change.js.map +1 -0
- package/dist/scripts/specops/contribute.js +24 -0
- package/dist/scripts/specops/contribute.js.map +1 -0
- package/dist/scripts/specops/diff.js +32 -0
- package/dist/scripts/specops/diff.js.map +1 -0
- package/dist/scripts/specops/lock.js +39 -0
- package/dist/scripts/specops/lock.js.map +1 -0
- package/dist/scripts/specops/manifest.js +90 -0
- package/dist/scripts/specops/manifest.js.map +1 -0
- package/dist/scripts/specops/remove.js +102 -0
- package/dist/scripts/specops/remove.js.map +1 -0
- package/dist/scripts/specops/sync.js +27 -0
- package/dist/scripts/specops/sync.js.map +1 -0
- package/dist/scripts/specops/verify.js +149 -0
- package/dist/scripts/specops/verify.js.map +1 -0
- package/dist/scripts/status.js +17 -0
- package/dist/scripts/status.js.map +1 -0
- package/dist/scripts/studio.js +14 -0
- package/dist/scripts/studio.js.map +1 -0
- package/dist/scripts/update.js +17 -0
- package/dist/scripts/update.js.map +1 -0
- package/dist/scripts/validate_specs.js +10 -0
- package/dist/scripts/validate_specs.js.map +1 -0
- package/examples/project.config.example +19 -0
- package/examples/project.yaml.example +17 -0
- package/package.json +105 -0
- package/templates/adopt/AI_RULES.md.tpl +27 -0
- package/templates/adopt/adr-readme.md.tpl +5 -0
- package/templates/adopt/baseline.feature.tpl +9 -0
- package/templates/adopt/spec.md.tpl +25 -0
- package/templates/adopt/traceability.md.tpl +11 -0
- package/templates/backend/AI_RULES.md.tpl +35 -0
- package/templates/backend/features/core/health.feature.tpl +7 -0
- package/templates/base/.devcontainer/devcontainer.json.tpl +18 -0
- package/templates/base/.dockerignore.tpl +11 -0
- package/templates/base/.env.dev.app.tpl +13 -0
- package/templates/base/.env.dev.infra.tpl +6 -0
- package/templates/base/.env.dev.tpl +16 -0
- package/templates/base/.env.example.tpl +17 -0
- package/templates/base/.env.feature.app.tpl +11 -0
- package/templates/base/.env.feature.infra.tpl +4 -0
- package/templates/base/.env.feature.tpl +16 -0
- package/templates/base/.env.prod.app.tpl +13 -0
- package/templates/base/.env.prod.infra.tpl +6 -0
- package/templates/base/.env.prod.tpl +16 -0
- package/templates/base/.github/workflows/specs.yml.tpl +26 -0
- package/templates/base/.gitignore.tpl +9 -0
- package/templates/base/.pre-commit-config.yaml.tpl +10 -0
- package/templates/base/AGENTS.md.tpl +32 -0
- package/templates/base/README.md.tpl +32 -0
- package/templates/base/docker-compose.yml.tpl +13 -0
- package/templates/base/docs/specs/adr/README.md.tpl +10 -0
- package/templates/base/docs/specs/aggregates.md.tpl +5 -0
- package/templates/base/docs/specs/commands.md.tpl +13 -0
- package/templates/base/docs/specs/domain-model.md.tpl +30 -0
- package/templates/base/docs/specs/events.md.tpl +5 -0
- package/templates/base/docs/specs/review-checklist.md.tpl +18 -0
- package/templates/base/docs/specs/runtime-environments.md.tpl +26 -0
- package/templates/base/docs/specs/status-model.md.tpl +16 -0
- package/templates/base/docs/specs/traceability.md.tpl +7 -0
- package/templates/base/docs/specs/use-cases.md.tpl +5 -0
- package/templates/base/spec.md.tpl +63 -0
- package/templates/ci/azure.yml.tpl +40 -0
- package/templates/ci/github.yml.tpl +40 -0
- package/templates/ci/gitlab.yml.tpl +21 -0
- package/templates/ci/jenkins.tpl +35 -0
- package/templates/contracts/AI_RULES.md.tpl +55 -0
- package/templates/contracts/asyncapi-stub.yaml.tpl +24 -0
- package/templates/contracts/contract-traceability.md.tpl +10 -0
- package/templates/contracts/openapi-stub.yaml.tpl +29 -0
- package/templates/contracts/pacts-gitkeep.tpl +0 -0
- package/templates/contracts/test-strategy.md.tpl +94 -0
- package/templates/frontend/AI_RULES.md.tpl +34 -0
- package/templates/frontend/features/core/health.feature.tpl +6 -0
- package/templates/harness/harness.config.yaml.tpl +74 -0
- package/templates/harness/prompt-prefix.md.tpl +60 -0
- package/templates/mobile/AI_RULES.md.tpl +56 -0
- package/templates/mobile/features/core/health.feature.tpl +7 -0
- package/templates/modules/auth/backend/registration_and_login.feature.tpl +10 -0
- package/templates/modules/auth/frontend/login.feature.tpl +5 -0
- package/templates/modules/billing/backend/billing_settlement.feature.tpl +5 -0
- package/templates/modules/billing/frontend/billing_summary.feature.tpl +5 -0
- package/templates/modules/dashboard/backend/dashboard_kpi.feature.tpl +5 -0
- package/templates/modules/dashboard/frontend/dashboard.feature.tpl +5 -0
- package/vendor/mermaid.min.js +3636 -0
package/package.json
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rsaglobaltech/specgate",
|
|
3
|
+
"version": "0.8.1",
|
|
4
|
+
"description": "Specs as executable contracts — requirements, scenarios and traceability that CI enforces.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "commonjs",
|
|
7
|
+
"bin": {
|
|
8
|
+
"specgate": "bin/specgate.js",
|
|
9
|
+
"csda": "bin/specgate.js",
|
|
10
|
+
"create-spec-driven-app": "bin/specgate.js"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"bin/",
|
|
14
|
+
"dist/bin/",
|
|
15
|
+
"dist/scripts/",
|
|
16
|
+
"dist/packages/core/",
|
|
17
|
+
"templates/",
|
|
18
|
+
"examples/",
|
|
19
|
+
"vendor/",
|
|
20
|
+
"README.md",
|
|
21
|
+
"CHANGELOG.md"
|
|
22
|
+
],
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=22"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/rsaglobaltech/specgate.git"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"spec-driven-development",
|
|
32
|
+
"sdd",
|
|
33
|
+
"gherkin",
|
|
34
|
+
"traceability",
|
|
35
|
+
"ci-gate",
|
|
36
|
+
"ai-agents",
|
|
37
|
+
"cli"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsc",
|
|
41
|
+
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
42
|
+
"prebuild": "npm run clean",
|
|
43
|
+
"prepack": "npm run build",
|
|
44
|
+
"pretest": "npm run build",
|
|
45
|
+
"test": "node --test dist/tests/cli.test.js",
|
|
46
|
+
"test:unit": "node scripts/run-tests.cjs dist/tests/unit",
|
|
47
|
+
"test:core-unit": "node scripts/run-tests.cjs dist/packages/core/test/unit",
|
|
48
|
+
"test:vscode-unit": "node scripts/run-tests.cjs dist/packages/vscode-spec-driven/test/unit",
|
|
49
|
+
"test:mcp-unit": "node scripts/run-tests.cjs dist/packages/mcp-spec-driven/test/unit",
|
|
50
|
+
"test:registry-unit": "node scripts/run-tests.cjs dist/packages/pack-registry/test/unit",
|
|
51
|
+
"test:lsp-unit": "node scripts/run-tests.cjs dist/packages/lsp-spec-driven/test/unit",
|
|
52
|
+
"registry:build": "node dist/packages/pack-registry/src/build.js",
|
|
53
|
+
"test:snapshot": "node scripts/run-tests.cjs dist/tests/snapshot",
|
|
54
|
+
"mutation:pilot": "npm run build && node scripts/check-mutation-targets.mjs && stryker run stryker.config.mjs",
|
|
55
|
+
"test:coverage": "c8 --config .c8rc.json node scripts/run-tests.cjs dist/tests/unit dist/packages/core/test/unit",
|
|
56
|
+
"test:bdd": "cucumber-js",
|
|
57
|
+
"test:all": "npm test && npm run test:coverage && npm run test:bdd && npm run test:core-unit && npm run test:vscode-unit && npm run test:mcp-unit && npm run test:registry-unit && npm run test:lsp-unit && npm run test:snapshot && npm run registry:build",
|
|
58
|
+
"pack:dry-run": "npm pack --dry-run",
|
|
59
|
+
"pack": "npm pack",
|
|
60
|
+
"demo:video": "bash scripts/demo/build-video.sh",
|
|
61
|
+
"demo:video:de": "bash scripts/demo/de/build-video.sh --real-agent",
|
|
62
|
+
"smoke:help": "node bin/specgate.js --help",
|
|
63
|
+
"smoke:init": "node bin/specgate.js init --config examples/project.config.example --out .smoke-tmp --no-git --force",
|
|
64
|
+
"smoke:validate": "node bin/specgate.js validate .smoke-tmp/acme-energy-hub",
|
|
65
|
+
"smoke:report": "node bin/specgate.js report --project-dir .smoke-tmp/acme-energy-hub --stdout",
|
|
66
|
+
"smoke:expand": "node bin/specgate.js expand --pack-root tests/fixtures/domain-packs --pack parking-management/backend --project-dir /private/tmp/acme-energy-hub --var PROJECT_NAME='Acme Energy Hub' --var PROJECT_SLUG=acme-energy-hub --var DOMAIN='community energy' --dry-run",
|
|
67
|
+
"typecheck": "tsc --noEmit",
|
|
68
|
+
"lint": "eslint \"bin/**/*.{ts,js}\" \"scripts/**/*.ts\" \"tests/**/*.ts\" \"packages/**/*.ts\" \"features/**/*.ts\"",
|
|
69
|
+
"lint:fix": "eslint --fix \"bin/**/*.{ts,js}\" \"scripts/**/*.ts\" \"tests/**/*.ts\" \"packages/**/*.ts\" \"features/**/*.ts\"",
|
|
70
|
+
"format": "prettier --write \"bin/**/*.{ts,js}\" \"scripts/**/*.ts\" \"tests/**/*.ts\" \"packages/**/*.ts\" \"features/**/*.ts\"",
|
|
71
|
+
"format:check": "prettier --check \"bin/**/*.{ts,js}\" \"scripts/**/*.ts\" \"tests/**/*.ts\" \"packages/**/*.ts\" \"features/**/*.ts\"",
|
|
72
|
+
"verify": "npm run typecheck && npm run lint && npm test && npm run pack:dry-run && npm run selfcheck",
|
|
73
|
+
"selfcheck": "node bin/specgate.js validate .",
|
|
74
|
+
"docs:agent-contract": "node dist/scripts/gen_agent_contract.js",
|
|
75
|
+
"docs:agent-contract:check": "node dist/scripts/gen_agent_contract.js --check",
|
|
76
|
+
"docs:terminal": "node dist/scripts/docs/record-terminal.js",
|
|
77
|
+
"docs:terminal:check": "node dist/scripts/docs/record-terminal.js --check",
|
|
78
|
+
"sbom": "npm sbom --sbom-format cyclonedx > sbom.cyclonedx.json",
|
|
79
|
+
"licenses": "npm run sbom && node dist/scripts/license_check.js --sbom sbom.cyclonedx.json"
|
|
80
|
+
},
|
|
81
|
+
"publishConfig": {
|
|
82
|
+
"access": "public",
|
|
83
|
+
"provenance": true
|
|
84
|
+
},
|
|
85
|
+
"devDependencies": {
|
|
86
|
+
"@cucumber/cucumber": "^13.2.1",
|
|
87
|
+
"@cucumber/gherkin": "^42.0.0",
|
|
88
|
+
"@eslint/js": "^9.39.4",
|
|
89
|
+
"@stryker-mutator/core": "^10.0.0",
|
|
90
|
+
"@types/cucumber": "^7.0.3",
|
|
91
|
+
"@types/node": "^26.2.0",
|
|
92
|
+
"@types/vscode": "^1.134.0",
|
|
93
|
+
"@typescript-eslint/eslint-plugin": "^8.59.3",
|
|
94
|
+
"@typescript-eslint/parser": "^8.59.3",
|
|
95
|
+
"ajv": "^8.20.0",
|
|
96
|
+
"c8": "^12.0.0",
|
|
97
|
+
"eslint": "^10.8.1",
|
|
98
|
+
"fast-check": "^4.8.0",
|
|
99
|
+
"js-yaml": "^5.2.3",
|
|
100
|
+
"marked": "^18.0.10",
|
|
101
|
+
"prettier": "^3.8.3",
|
|
102
|
+
"typescript": "^6.0.3",
|
|
103
|
+
"typescript-eslint": "^8.59.3"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# AI Rules — {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
Rules for any AI coding agent (and any human) working on this repository.
|
|
4
|
+
|
|
5
|
+
## Project facts
|
|
6
|
+
|
|
7
|
+
- Domain: {{DOMAIN}}
|
|
8
|
+
- Stack: {{STACK}}
|
|
9
|
+
- Testing: {{TESTING}}
|
|
10
|
+
- Test command: `{{TEST_CMD}}`
|
|
11
|
+
|
|
12
|
+
## Boundaries
|
|
13
|
+
|
|
14
|
+
- `spec.md`, `features/**/*.feature` and `docs/specs/traceability.md` are the
|
|
15
|
+
source of truth. Do not edit them to make a failing gate pass.
|
|
16
|
+
- Never delete or weaken an existing test to get to green.
|
|
17
|
+
- Implement one requirement (REQ-NNN) at a time; write or extend the test
|
|
18
|
+
first, then the production code.
|
|
19
|
+
- Keep changes inside this repository; do not modify generated or vendored
|
|
20
|
+
code unless the requirement says so.
|
|
21
|
+
|
|
22
|
+
## Definition of done
|
|
23
|
+
|
|
24
|
+
1. The scenario(s) for the requirement pass.
|
|
25
|
+
2. `{{TEST_CMD}}` passes.
|
|
26
|
+
3. `specgate validate . --strict-tdd` passes.
|
|
27
|
+
4. The traceability row is updated via `specgate done REQ-NNN`.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Feature: Existing behaviour is preserved
|
|
2
|
+
The project was adopted into spec-driven development with code already
|
|
3
|
+
written. This baseline scenario pins the adoption invariant: nothing
|
|
4
|
+
that worked before adoption may silently break after it.
|
|
5
|
+
|
|
6
|
+
Scenario: Existing test suite stays green
|
|
7
|
+
Given the project is built from a clean checkout
|
|
8
|
+
When the full test suite runs
|
|
9
|
+
Then every existing test passes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} — Specification
|
|
2
|
+
|
|
3
|
+
> Adopted into Spec-Driven Development on an existing codebase (brownfield).
|
|
4
|
+
> `specgate req add "<title>"` reserves the next `REQ-NNN` and adds its row to
|
|
5
|
+
> `docs/specs/traceability.md` — it does not write a section here or a
|
|
6
|
+
> `.feature`. Add a `## REQ-NNN — <title>` section below and a Gherkin
|
|
7
|
+
> scenario under `features/`, then `specgate req link REQ-NNN --feature … --test …`
|
|
8
|
+
> to point the row at both. Existing behaviour is retro-filled requirement by
|
|
9
|
+
> requirement — start with the ones your team is actively changing.
|
|
10
|
+
|
|
11
|
+
## Context
|
|
12
|
+
|
|
13
|
+
- Domain: {{DOMAIN}}
|
|
14
|
+
- Stack: {{STACK}}
|
|
15
|
+
- API style: {{API_STYLE}}
|
|
16
|
+
- Testing: {{TESTING}}
|
|
17
|
+
|
|
18
|
+
## Requirements
|
|
19
|
+
|
|
20
|
+
## REQ-001 — Existing behaviour is preserved
|
|
21
|
+
|
|
22
|
+
The adopted codebase keeps working: the full test suite passes on every
|
|
23
|
+
change. This requirement anchors the traceability matrix until real
|
|
24
|
+
requirements are retro-filled from the existing code and tests.
|
|
25
|
+
{{PROPOSED_REQUIREMENTS}}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Traceability Matrix — {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
Every requirement in `spec.md` maps to a scenario, its feature file, and the
|
|
4
|
+
artifacts that implement and verify it. `specgate plan` lists
|
|
5
|
+
what is still missing; `specgate done REQ-NNN` flips a row to
|
|
6
|
+
Implemented.
|
|
7
|
+
|
|
8
|
+
| Requirement | Scenario ID | Feature file | Use Case | Command/Query | Aggregate | Event | Technical artifact | Test artifact | Status |
|
|
9
|
+
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
|
10
|
+
| REQ-001 | SCN-001 | `features/adoption/baseline.feature` | UC-001 Preserve existing behaviour | - | - | - | existing codebase | `{{TEST_CMD}}` | Draft |
|
|
11
|
+
{{PROPOSED_ROWS}}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# AI Rules - Backend ({{PROJECT_NAME}})
|
|
2
|
+
|
|
3
|
+
## Role
|
|
4
|
+
You are the Lead Backend Engineer. Implement strictly from `spec.md` and `features/`.
|
|
5
|
+
|
|
6
|
+
## Project Initialization & Stack
|
|
7
|
+
- Project: {{PROJECT_NAME}} ({{PROJECT_SLUG}})
|
|
8
|
+
- Domain: {{DOMAIN}}
|
|
9
|
+
- Stack: {{STACK}}
|
|
10
|
+
- Architecture: {{ARCHITECTURE}}
|
|
11
|
+
- API style: {{API_STYLE}}
|
|
12
|
+
- Testing: {{TESTING}}
|
|
13
|
+
|
|
14
|
+
## Stack Rules
|
|
15
|
+
- Do not infer or replace the stack from preference or prior projects.
|
|
16
|
+
- If any stack field is `TBD`, stop implementation and update `AI_RULES.md` or `spec.md` with the Product Owner first.
|
|
17
|
+
- Respect layered architecture and domain boundaries within the declared stack.
|
|
18
|
+
|
|
19
|
+
## Non-Negotiables
|
|
20
|
+
- Domain logic isolated from framework details.
|
|
21
|
+
- Tests aligned to acceptance criteria in Gherkin.
|
|
22
|
+
- No implementation without a traceability entry.
|
|
23
|
+
|
|
24
|
+
## Domain Modeling Rules
|
|
25
|
+
{{ARCHITECTURE_MODELING_RULES}}
|
|
26
|
+
|
|
27
|
+
## Pre-Implementation Gates
|
|
28
|
+
{{ARCHITECTURE_GATES}}
|
|
29
|
+
|
|
30
|
+
## Workflow
|
|
31
|
+
1. Read `spec.md`.
|
|
32
|
+
{{ARCHITECTURE_READS}}
|
|
33
|
+
3. Read scenarios in `features/`.
|
|
34
|
+
4. Update `docs/specs/traceability.md`.
|
|
35
|
+
5. Implement and validate acceptance criteria.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Feature: Platform health baseline
|
|
2
|
+
@REQ-000 @SCN-000
|
|
3
|
+
Scenario: API reports service as healthy
|
|
4
|
+
Given the backend service is running
|
|
5
|
+
When I request the "/health" endpoint
|
|
6
|
+
Then the response status should be 200
|
|
7
|
+
And the payload should include "status" with value "UP"
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{PROJECT_NAME}}",
|
|
3
|
+
"dockerComposeFile": "../docker-compose.yml",
|
|
4
|
+
"service": "workspace",
|
|
5
|
+
"workspaceFolder": "/workspace",
|
|
6
|
+
"shutdownAction": "stopCompose",
|
|
7
|
+
"remoteEnv": {
|
|
8
|
+
"APP_ENV": "{{DEFAULT_ENV}}"
|
|
9
|
+
},
|
|
10
|
+
"customizations": {
|
|
11
|
+
"vscode": {
|
|
12
|
+
"extensions": [
|
|
13
|
+
"ms-azuretools.vscode-docker",
|
|
14
|
+
"redhat.vscode-yaml"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Application variables for the dev environment.
|
|
2
|
+
# Consumed by the application process (not Docker Compose infrastructure).
|
|
3
|
+
# Safe to commit to version control; never put real secrets here.
|
|
4
|
+
APP_ENV=dev
|
|
5
|
+
PROJECT_SLUG={{PROJECT_SLUG}}
|
|
6
|
+
|
|
7
|
+
DATABASE_ENGINE={{DATABASE_ENGINE}}
|
|
8
|
+
DATABASE_HOST={{DATABASE_HOST}}
|
|
9
|
+
DATABASE_PORT={{DATABASE_PORT_DEV}}
|
|
10
|
+
DATABASE_NAME={{DATABASE_NAME_DEV}}
|
|
11
|
+
DATABASE_USER={{DATABASE_USER}}
|
|
12
|
+
DATABASE_PASSWORD={{DATABASE_PASSWORD}}
|
|
13
|
+
DATABASE_URL={{DATABASE_URL_DEV}}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
APP_ENV=dev
|
|
2
|
+
PROJECT_SLUG={{PROJECT_SLUG}}
|
|
3
|
+
|
|
4
|
+
DATABASE_ENGINE={{DATABASE_ENGINE}}
|
|
5
|
+
DATABASE_IMAGE={{DATABASE_IMAGE}}
|
|
6
|
+
DATABASE_HOST={{DATABASE_HOST}}
|
|
7
|
+
DATABASE_PORT={{DATABASE_PORT_DEV}}
|
|
8
|
+
DATABASE_CONTAINER_PORT={{DATABASE_CONTAINER_PORT}}
|
|
9
|
+
DATABASE_NAME={{DATABASE_NAME_DEV}}
|
|
10
|
+
DATABASE_USER={{DATABASE_USER}}
|
|
11
|
+
DATABASE_PASSWORD={{DATABASE_PASSWORD}}
|
|
12
|
+
DATABASE_URL={{DATABASE_URL_DEV}}
|
|
13
|
+
|
|
14
|
+
POSTGRES_DB={{DATABASE_NAME_DEV}}
|
|
15
|
+
POSTGRES_USER={{DATABASE_USER}}
|
|
16
|
+
POSTGRES_PASSWORD={{DATABASE_PASSWORD}}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Copy one environment file to `.env` or set `APP_ENV` before running Docker Compose.
|
|
2
|
+
APP_ENV={{DEFAULT_ENV}}
|
|
3
|
+
PROJECT_SLUG={{PROJECT_SLUG}}
|
|
4
|
+
|
|
5
|
+
DATABASE_ENGINE={{DATABASE_ENGINE}}
|
|
6
|
+
DATABASE_IMAGE={{DATABASE_IMAGE}}
|
|
7
|
+
DATABASE_HOST={{DATABASE_HOST}}
|
|
8
|
+
DATABASE_PORT={{DATABASE_PORT}}
|
|
9
|
+
DATABASE_CONTAINER_PORT={{DATABASE_CONTAINER_PORT}}
|
|
10
|
+
DATABASE_NAME={{DATABASE_NAME_DEV}}
|
|
11
|
+
DATABASE_USER={{DATABASE_USER}}
|
|
12
|
+
DATABASE_PASSWORD={{DATABASE_PASSWORD}}
|
|
13
|
+
DATABASE_URL={{DATABASE_URL_DEV}}
|
|
14
|
+
|
|
15
|
+
POSTGRES_DB={{DATABASE_NAME_DEV}}
|
|
16
|
+
POSTGRES_USER={{DATABASE_USER}}
|
|
17
|
+
POSTGRES_PASSWORD={{DATABASE_PASSWORD}}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Application variables for the feature environment.
|
|
2
|
+
APP_ENV=feature
|
|
3
|
+
PROJECT_SLUG={{PROJECT_SLUG}}
|
|
4
|
+
|
|
5
|
+
DATABASE_ENGINE={{DATABASE_ENGINE}}
|
|
6
|
+
DATABASE_HOST={{DATABASE_HOST}}
|
|
7
|
+
DATABASE_PORT={{DATABASE_PORT_FEATURE}}
|
|
8
|
+
DATABASE_NAME={{DATABASE_NAME_FEATURE}}
|
|
9
|
+
DATABASE_USER={{DATABASE_USER}}
|
|
10
|
+
DATABASE_PASSWORD={{DATABASE_PASSWORD}}
|
|
11
|
+
DATABASE_URL={{DATABASE_URL_FEATURE}}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
APP_ENV=feature
|
|
2
|
+
PROJECT_SLUG={{PROJECT_SLUG}}
|
|
3
|
+
|
|
4
|
+
DATABASE_ENGINE={{DATABASE_ENGINE}}
|
|
5
|
+
DATABASE_IMAGE={{DATABASE_IMAGE}}
|
|
6
|
+
DATABASE_HOST={{DATABASE_HOST}}
|
|
7
|
+
DATABASE_PORT={{DATABASE_PORT_FEATURE}}
|
|
8
|
+
DATABASE_CONTAINER_PORT={{DATABASE_CONTAINER_PORT}}
|
|
9
|
+
DATABASE_NAME={{DATABASE_NAME_FEATURE}}
|
|
10
|
+
DATABASE_USER={{DATABASE_USER}}
|
|
11
|
+
DATABASE_PASSWORD={{DATABASE_PASSWORD}}
|
|
12
|
+
DATABASE_URL={{DATABASE_URL_FEATURE}}
|
|
13
|
+
|
|
14
|
+
POSTGRES_DB={{DATABASE_NAME_FEATURE}}
|
|
15
|
+
POSTGRES_USER={{DATABASE_USER}}
|
|
16
|
+
POSTGRES_PASSWORD={{DATABASE_PASSWORD}}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Application variables for the prod environment.
|
|
2
|
+
# WARNING: Replace placeholder values before deploying.
|
|
3
|
+
# Inject DATABASE_PASSWORD and DATABASE_URL via CI secrets or a secrets manager.
|
|
4
|
+
APP_ENV=prod
|
|
5
|
+
PROJECT_SLUG={{PROJECT_SLUG}}
|
|
6
|
+
|
|
7
|
+
DATABASE_ENGINE={{DATABASE_ENGINE}}
|
|
8
|
+
DATABASE_HOST={{DATABASE_HOST}}
|
|
9
|
+
DATABASE_PORT={{DATABASE_PORT_PROD}}
|
|
10
|
+
DATABASE_NAME={{DATABASE_NAME_PROD}}
|
|
11
|
+
DATABASE_USER={{DATABASE_USER}}
|
|
12
|
+
DATABASE_PASSWORD={{DATABASE_PASSWORD}}
|
|
13
|
+
DATABASE_URL={{DATABASE_URL_PROD}}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Infrastructure variables for the prod environment.
|
|
2
|
+
# WARNING: Do NOT commit real production credentials.
|
|
3
|
+
# Inject POSTGRES_PASSWORD via CI secrets or a secrets manager (doppler, sops, etc.)
|
|
4
|
+
POSTGRES_DB={{DATABASE_NAME_PROD}}
|
|
5
|
+
POSTGRES_USER={{DATABASE_USER}}
|
|
6
|
+
POSTGRES_PASSWORD={{DATABASE_PASSWORD}}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
APP_ENV=prod
|
|
2
|
+
PROJECT_SLUG={{PROJECT_SLUG}}
|
|
3
|
+
|
|
4
|
+
DATABASE_ENGINE={{DATABASE_ENGINE}}
|
|
5
|
+
DATABASE_IMAGE={{DATABASE_IMAGE}}
|
|
6
|
+
DATABASE_HOST={{DATABASE_HOST}}
|
|
7
|
+
DATABASE_PORT={{DATABASE_PORT_PROD}}
|
|
8
|
+
DATABASE_CONTAINER_PORT={{DATABASE_CONTAINER_PORT}}
|
|
9
|
+
DATABASE_NAME={{DATABASE_NAME_PROD}}
|
|
10
|
+
DATABASE_USER={{DATABASE_USER}}
|
|
11
|
+
DATABASE_PASSWORD={{DATABASE_PASSWORD}}
|
|
12
|
+
DATABASE_URL={{DATABASE_URL_PROD}}
|
|
13
|
+
|
|
14
|
+
POSTGRES_DB={{DATABASE_NAME_PROD}}
|
|
15
|
+
POSTGRES_USER={{DATABASE_USER}}
|
|
16
|
+
POSTGRES_PASSWORD={{DATABASE_PASSWORD}}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Spec Validation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [main, develop]
|
|
6
|
+
push:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
validate-specs:
|
|
11
|
+
name: Validate Specification Tree
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Set up Node.js
|
|
18
|
+
uses: actions/setup-node@v4
|
|
19
|
+
with:
|
|
20
|
+
node-version: "22"
|
|
21
|
+
|
|
22
|
+
- name: Install specgate
|
|
23
|
+
run: npm install -g @rsaglobaltech/specgate@latest
|
|
24
|
+
|
|
25
|
+
- name: Validate spec tree
|
|
26
|
+
run: specgate validate .
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Agent Manifest — {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
> This file helps AI coding agents (Claude, Copilot, Cursor, Aider, etc.)
|
|
4
|
+
> understand the structure and constraints of this project.
|
|
5
|
+
|
|
6
|
+
## Project overview
|
|
7
|
+
- **Name**: {{PROJECT_NAME}}
|
|
8
|
+
- **Domain**: {{DOMAIN}}
|
|
9
|
+
- **Stack**: {{STACK}}
|
|
10
|
+
- **API style**: {{API_STYLE}}
|
|
11
|
+
- **Testing**: {{TESTING}}
|
|
12
|
+
|
|
13
|
+
## Specification entry points
|
|
14
|
+
| Artefact | Path | Purpose |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| Root spec | `spec.md` | Vision, requirements, bounded contexts, risks |
|
|
17
|
+
| Domain model | `docs/specs/domain-model.md` | Aggregates, bounded contexts, value objects |
|
|
18
|
+
| Traceability | `docs/specs/traceability.md` | REQ → Scenario → UC → Aggregate → test |
|
|
19
|
+
| AI guardrails | `AI_RULES.md` | Stack constraints and conventions for this project |
|
|
20
|
+
| ADRs | `docs/specs/adr/` | Architecture decision records |
|
|
21
|
+
|
|
22
|
+
## Constraints
|
|
23
|
+
- **Always read `AI_RULES.md` before writing any code.** It specifies the exact stack, conventions and forbidden patterns.
|
|
24
|
+
- **Always check `docs/specs/traceability.md`** before claiming a requirement is implemented.
|
|
25
|
+
- **Do not implement features not linked to a requirement** in `spec.md`.
|
|
26
|
+
- **Run `npx @rsaglobaltech/specgate validate .`** after any change to `docs/specs/` or `features/`.
|
|
27
|
+
|
|
28
|
+
## Quality gates
|
|
29
|
+
A change is considered complete only when:
|
|
30
|
+
1. `npx @rsaglobaltech/specgate validate .` exits 0.
|
|
31
|
+
2. All Gherkin scenarios linked to the changed requirement are passing.
|
|
32
|
+
3. The traceability matrix is updated to reflect the new status.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} - Spec-Driven Development
|
|
2
|
+
|
|
3
|
+
This project was generated from the SDD MVP template.
|
|
4
|
+
|
|
5
|
+
## Context
|
|
6
|
+
- Project type: `{{PROJECT_TYPE}}`
|
|
7
|
+
- Domain: `{{DOMAIN}}`
|
|
8
|
+
|
|
9
|
+
## Structure
|
|
10
|
+
- `spec.md`: business manifesto and goals.
|
|
11
|
+
- `AI_RULES.md`: AI execution contract.
|
|
12
|
+
- `features/`: acceptance criteria in Gherkin.
|
|
13
|
+
- `docs/specs/traceability.md`: requirement -> scenario -> domain -> implementation -> test mapping.
|
|
14
|
+
- `docs/specs/domain-model.md`: bounded contexts, aggregates, value objects, and events.
|
|
15
|
+
- `docs/specs/use-cases.md`: use cases mapped to requirements and commands/queries.
|
|
16
|
+
- `docs/specs/commands.md`: commands and queries expected by the application layer.
|
|
17
|
+
- `docs/specs/events.md`: domain events used for meaningful state changes.
|
|
18
|
+
- `docs/specs/aggregates.md`: aggregate roots and invariants.
|
|
19
|
+
- `docs/specs/status-model.md`: lightweight Unified Process maturity states.
|
|
20
|
+
- `docs/specs/review-checklist.md`: pre-implementation and architecture gates.
|
|
21
|
+
- `docs/specs/adr/`: architecture decision records.
|
|
22
|
+
|
|
23
|
+
## Recommended Workflow
|
|
24
|
+
1. Define or refine `spec.md`.
|
|
25
|
+
2. Refine domain model documents in `docs/specs/`.
|
|
26
|
+
3. Adapt scenarios in `features/`.
|
|
27
|
+
4. Map scenarios in `docs/specs/traceability.md`.
|
|
28
|
+
5. Implement software until acceptance criteria pass.
|
|
29
|
+
|
|
30
|
+
## Support Command
|
|
31
|
+
- Validate spec structure:
|
|
32
|
+
- `../mvp-spec-template/scripts/validate_specs.sh .`
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
name: {{PROJECT_SLUG}}-${APP_ENV:-{{DEFAULT_ENV}}}
|
|
2
|
+
|
|
3
|
+
services:
|
|
4
|
+
workspace:
|
|
5
|
+
image: mcr.microsoft.com/devcontainers/base:ubuntu
|
|
6
|
+
command: sleep infinity
|
|
7
|
+
working_dir: /workspace
|
|
8
|
+
volumes:
|
|
9
|
+
- .:/workspace:cached
|
|
10
|
+
env_file:
|
|
11
|
+
- .env.${APP_ENV:-{{DEFAULT_ENV}}}.app
|
|
12
|
+
{{COMPOSE_DEPENDS_ON}}
|
|
13
|
+
{{COMPOSE_DB_SERVICE}}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Commands and Queries
|
|
2
|
+
|
|
3
|
+
## Commands
|
|
4
|
+
|
|
5
|
+
| ID | Command | Use Case | Fields |
|
|
6
|
+
|---|---|---|---|
|
|
7
|
+
| CMD-001 | ExampleCommand | UC-001 | example_id, occurred_at |
|
|
8
|
+
|
|
9
|
+
## Queries
|
|
10
|
+
|
|
11
|
+
| ID | Query | Use Case | Returns |
|
|
12
|
+
|---|---|---|---|
|
|
13
|
+
| QRY-001 | ExampleQuery | UC-001 | ExampleReadModel |
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Domain Model
|
|
2
|
+
|
|
3
|
+
## Bounded Contexts
|
|
4
|
+
|
|
5
|
+
| ID | Name | Type | Responsibility | Aggregates |
|
|
6
|
+
|---|---|---|---|---|
|
|
7
|
+
| BC-001 | Core | Core | Own the central business rules. | AGG-001 CoreAggregate |
|
|
8
|
+
|
|
9
|
+
## Aggregates
|
|
10
|
+
|
|
11
|
+
| ID | Aggregate | Context | Invariants |
|
|
12
|
+
|---|---|---|---|
|
|
13
|
+
| AGG-001 | CoreAggregate | Core | Define the first consistency rules. |
|
|
14
|
+
|
|
15
|
+
## Value Objects
|
|
16
|
+
|
|
17
|
+
| ID | Value Object | Fields | Invariants |
|
|
18
|
+
|---|---|---|---|
|
|
19
|
+
| VO-001 | ExampleValue | value | Must be valid for the business process. |
|
|
20
|
+
|
|
21
|
+
## Domain Events
|
|
22
|
+
|
|
23
|
+
| ID | Event | Producer | Consumers | Payload |
|
|
24
|
+
|---|---|---|---|---|
|
|
25
|
+
| EVT-001 | ExampleEvent | CoreAggregate | TBD | occurred_at |
|
|
26
|
+
|
|
27
|
+
## Context Notes
|
|
28
|
+
|
|
29
|
+
- Keep domain logic independent from HTTP, database, queues, and framework code.
|
|
30
|
+
- Add structure only when it improves clarity, traceability, generation, review, or validation.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Review Checklist
|
|
2
|
+
|
|
3
|
+
## Pre-Implementation Gates
|
|
4
|
+
|
|
5
|
+
- [ ] Requirement has an ID.
|
|
6
|
+
- [ ] Scenario has an ID.
|
|
7
|
+
- [ ] Scenario maps to a use case.
|
|
8
|
+
- [ ] Use case maps to a command or query.
|
|
9
|
+
- [ ] Command or query maps to an aggregate or read model.
|
|
10
|
+
- [ ] Domain events are listed when state changes matter.
|
|
11
|
+
- [ ] Traceability row is complete.
|
|
12
|
+
|
|
13
|
+
## Architecture Gates
|
|
14
|
+
|
|
15
|
+
- [ ] Domain logic is independent from HTTP, database, queues, and framework code.
|
|
16
|
+
- [ ] Controllers and adapters call application use cases, not repositories directly.
|
|
17
|
+
- [ ] Business rules live in domain entities, value objects, or domain services.
|
|
18
|
+
- [ ] ADRs exist for decisions that affect architecture boundaries.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Runtime Environments
|
|
2
|
+
|
|
3
|
+
> Normative contract, generated by `specgate init`. The environments below are the
|
|
4
|
+
> only ones this project recognises. Code must read its configuration from the
|
|
5
|
+
> environment — never hardcode a host, port or credential.
|
|
6
|
+
|
|
7
|
+
## Environment catalog
|
|
8
|
+
|
|
9
|
+
{{RUNTIME_ENV_TABLE}}
|
|
10
|
+
|
|
11
|
+
Declared environments: `{{ENVIRONMENTS}}`
|
|
12
|
+
Default environment: `{{DEFAULT_ENV}}`
|
|
13
|
+
|
|
14
|
+
The active environment is selected with `APP_ENV`. An unset `APP_ENV` means
|
|
15
|
+
`{{DEFAULT_ENV}}`.
|
|
16
|
+
|
|
17
|
+
{{RUNTIME_DATABASE_SECTION}}
|
|
18
|
+
|
|
19
|
+
{{RUNTIME_DOCKER_SECTION}}
|
|
20
|
+
|
|
21
|
+
## Invariants
|
|
22
|
+
|
|
23
|
+
These hold for every environment. A change that breaks one is a defect, not a
|
|
24
|
+
configuration choice.
|
|
25
|
+
|
|
26
|
+
{{RUNTIME_INVARIANTS}}
|