@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
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Status Model
|
|
2
|
+
|
|
3
|
+
Use these statuses for requirements, scenarios, use cases, and traceability rows.
|
|
4
|
+
|
|
5
|
+
| Status | Meaning |
|
|
6
|
+
|---|---|
|
|
7
|
+
| Draft | A first version exists. |
|
|
8
|
+
| Needs Clarification | Ambiguities block implementation. |
|
|
9
|
+
| Domain Reviewed | The domain model was reviewed. |
|
|
10
|
+
| Architecture Reviewed | Technical solution and ADRs were reviewed. |
|
|
11
|
+
| Ready for Dev | Implementation can start. |
|
|
12
|
+
| In Dev | Implementation is in progress. |
|
|
13
|
+
| In Review | Change is ready for review. |
|
|
14
|
+
| Verified | Tests, contracts, or acceptance criteria pass. |
|
|
15
|
+
| Released | Available to users or the target environment. |
|
|
16
|
+
| Deprecated | Requirement or scenario was retired. |
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Traceability Matrix
|
|
2
|
+
|
|
3
|
+
Map requirements to scenarios, domain model elements, implementation artifacts, and tests.
|
|
4
|
+
|
|
5
|
+
| Requirement | Scenario ID | Feature file | Use Case | Command/Query | Aggregate | Event | Technical artifact | Test artifact | Status |
|
|
6
|
+
|---|---|---|---|---|---|---|---|---|---|
|
|
7
|
+
| REQ-000 | SCN-000 | `features/core/health.feature` | UC-000 Health baseline | QRY-000 HealthCheckQuery | - | - | `API /health`, smoke test | TBD | Draft |
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Use Cases
|
|
2
|
+
|
|
3
|
+
| ID | Use Case | Actor | Requirement | Command/Query | Aggregate | Emits | Status |
|
|
4
|
+
|---|---|---|---|---|---|---|---|
|
|
5
|
+
| UC-001 | Describe the first use case | Primary actor | REQ-TBD | CMD-001 ExampleCommand | AGG-001 CoreAggregate | EVT-001 ExampleEvent | Draft |
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Spec: {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
## 1. Product context
|
|
4
|
+
{{PROJECT_NAME}} operates in the **{{DOMAIN}}** domain and follows a Spec-Driven Development approach.
|
|
5
|
+
|
|
6
|
+
## 2. Target users
|
|
7
|
+
- Primary users:
|
|
8
|
+
- Secondary users:
|
|
9
|
+
- Internal stakeholders:
|
|
10
|
+
|
|
11
|
+
## 3. Main objective
|
|
12
|
+
Define functional requirements, domain language, and acceptance criteria clearly before writing implementation code.
|
|
13
|
+
|
|
14
|
+
## 4. In scope
|
|
15
|
+
- Core workflows for the first release.
|
|
16
|
+
- Acceptance criteria for externally visible behavior.
|
|
17
|
+
- Traceability from requirements to scenarios, domain model, implementation, and tests.
|
|
18
|
+
|
|
19
|
+
## 5. Out of scope
|
|
20
|
+
- Features that are not mapped to requirements or scenarios.
|
|
21
|
+
- Infrastructure decisions that do not affect the initial implementation.
|
|
22
|
+
- Premature workflow, microservice, CQRS, or Event Sourcing complexity.
|
|
23
|
+
|
|
24
|
+
## 6. Success criteria
|
|
25
|
+
- Every business feature has traceable Gherkin scenarios.
|
|
26
|
+
- Every scenario maps to a requirement and a technical artifact.
|
|
27
|
+
- Domain terminology is captured before implementation starts.
|
|
28
|
+
- The team can reuse this structure in new projects.
|
|
29
|
+
|
|
30
|
+
## 7. Initial bounded contexts
|
|
31
|
+
- Core Domain: central business rules.
|
|
32
|
+
- Supporting Domain: integrations and reporting.
|
|
33
|
+
- Generic Domain: identity, auditing, and notifications.
|
|
34
|
+
|
|
35
|
+
## 8. Key requirements
|
|
36
|
+
|
|
37
|
+
<!--
|
|
38
|
+
Add requirements with `specgate req add "<what the requirement does>"`, which
|
|
39
|
+
writes the row here **and** in docs/specs/traceability.md at the same time.
|
|
40
|
+
|
|
41
|
+
Do not hand-write a row here alone. A requirement that exists in this file and
|
|
42
|
+
not in the matrix fails `specgate validate --strict-tdd` with [TDD-3], and the
|
|
43
|
+
table below is the one a generated project used to ship pre-filled with an
|
|
44
|
+
example — so every new project was born with a red gate (H20).
|
|
45
|
+
-->
|
|
46
|
+
|
|
47
|
+
| ID | Requirement | Priority | Status |
|
|
48
|
+
|---|---|---|---|
|
|
49
|
+
|
|
50
|
+
## 9. Non-functional requirements
|
|
51
|
+
| ID | Requirement | Quality attribute | Status |
|
|
52
|
+
|---|---|---|---|
|
|
53
|
+
| NFR-001 | Define the first measurable non-functional requirement. | Reliability | Draft |
|
|
54
|
+
|
|
55
|
+
## 10. Risks and open questions
|
|
56
|
+
| ID | Topic | Impact | Owner | Status |
|
|
57
|
+
|---|---|---|---|---|
|
|
58
|
+
| RISK-001 | Capture the first domain, delivery, or architecture risk. | Medium | TBD | Draft |
|
|
59
|
+
|
|
60
|
+
## 11. Domain language
|
|
61
|
+
| Term | Meaning | Notes |
|
|
62
|
+
|---|---|---|
|
|
63
|
+
| Example term | Define the term using business language. | Replace with project language. |
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Generated by `specgate ci init --provider azure`
|
|
2
|
+
# Spec-Driven Development gate for Azure Pipelines.
|
|
3
|
+
trigger:
|
|
4
|
+
branches:
|
|
5
|
+
include: [main]
|
|
6
|
+
pr:
|
|
7
|
+
branches:
|
|
8
|
+
include: ['*']
|
|
9
|
+
|
|
10
|
+
pool:
|
|
11
|
+
vmImage: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- task: NodeTool@0
|
|
15
|
+
inputs:
|
|
16
|
+
versionSpec: '22.x'
|
|
17
|
+
displayName: Use Node.js 22
|
|
18
|
+
|
|
19
|
+
- script: npx @rsaglobaltech/specgate@{{SPECGATE_VERSION}} validate . --strict-tdd
|
|
20
|
+
displayName: Validate specs (strict TDD)
|
|
21
|
+
|
|
22
|
+
# Supply-chain gate: fails when rendered pack content no longer matches the
|
|
23
|
+
# digest pinned in .specops.lock. Skipped when no packs are installed.
|
|
24
|
+
- script: |
|
|
25
|
+
if [ -f .specops.lock ]; then
|
|
26
|
+
npx @rsaglobaltech/specgate@{{SPECGATE_VERSION}} validate . --against-lock
|
|
27
|
+
else
|
|
28
|
+
echo "No .specops.lock — no packs installed, nothing to check."
|
|
29
|
+
fi
|
|
30
|
+
displayName: Check pack drift
|
|
31
|
+
|
|
32
|
+
- script: npx @rsaglobaltech/specgate@{{SPECGATE_VERSION}} plan --project-dir . --format json > $(Build.ArtifactStagingDirectory)/spec-plan.json
|
|
33
|
+
condition: always()
|
|
34
|
+
displayName: Export pending-work plan
|
|
35
|
+
|
|
36
|
+
- task: PublishBuildArtifacts@1
|
|
37
|
+
condition: always()
|
|
38
|
+
inputs:
|
|
39
|
+
pathToPublish: $(Build.ArtifactStagingDirectory)/spec-plan.json
|
|
40
|
+
artifactName: spec-plan
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Generated by `specgate ci init --provider github`
|
|
2
|
+
# Spec-Driven Development gate: no PR merges if a requirement loses its
|
|
3
|
+
# feature file, its test artifact, or its traceability row.
|
|
4
|
+
name: Spec gate
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
pull_request:
|
|
8
|
+
push:
|
|
9
|
+
branches: [main]
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
spec-gate:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
- uses: actions/setup-node@v4
|
|
17
|
+
with:
|
|
18
|
+
node-version: '22'
|
|
19
|
+
- name: Validate specs (strict TDD)
|
|
20
|
+
run: npx @rsaglobaltech/specgate@{{SPECGATE_VERSION}} validate . --strict-tdd
|
|
21
|
+
# Supply-chain gate: fails when the rendered pack content no longer
|
|
22
|
+
# matches the digest pinned in .specops.lock — a moved tag, a rewritten
|
|
23
|
+
# history, or a hand-edited generated file. Skipped when the project
|
|
24
|
+
# installs no packs.
|
|
25
|
+
- name: Check pack drift
|
|
26
|
+
run: |
|
|
27
|
+
if [ -f .specops.lock ]; then
|
|
28
|
+
npx @rsaglobaltech/specgate@{{SPECGATE_VERSION}} validate . --against-lock
|
|
29
|
+
else
|
|
30
|
+
echo "No .specops.lock — no packs installed, nothing to check."
|
|
31
|
+
fi
|
|
32
|
+
- name: Export pending-work plan
|
|
33
|
+
if: always()
|
|
34
|
+
run: npx @rsaglobaltech/specgate@{{SPECGATE_VERSION}} plan --project-dir . --format json > spec-plan.json
|
|
35
|
+
- name: Upload plan artifact
|
|
36
|
+
if: always()
|
|
37
|
+
uses: actions/upload-artifact@v4
|
|
38
|
+
with:
|
|
39
|
+
name: spec-plan
|
|
40
|
+
path: spec-plan.json
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Generated by `specgate ci init --provider gitlab`
|
|
2
|
+
# Spec-Driven Development gate for GitLab CI. If your project already has a
|
|
3
|
+
# .gitlab-ci.yml, paste the `spec-gate` job into it instead.
|
|
4
|
+
spec-gate:
|
|
5
|
+
image: node:22
|
|
6
|
+
stage: test
|
|
7
|
+
script:
|
|
8
|
+
- npx @rsaglobaltech/specgate@{{SPECGATE_VERSION}} validate . --strict-tdd
|
|
9
|
+
# Supply-chain gate: fails when rendered pack content no longer matches the
|
|
10
|
+
# digest pinned in .specops.lock. Skipped when no packs are installed.
|
|
11
|
+
- >
|
|
12
|
+
if [ -f .specops.lock ]; then
|
|
13
|
+
npx @rsaglobaltech/specgate@{{SPECGATE_VERSION}} validate . --against-lock;
|
|
14
|
+
else
|
|
15
|
+
echo "No .specops.lock — no packs installed, nothing to check.";
|
|
16
|
+
fi
|
|
17
|
+
- npx @rsaglobaltech/specgate@{{SPECGATE_VERSION}} plan --project-dir . --format json > spec-plan.json
|
|
18
|
+
artifacts:
|
|
19
|
+
when: always
|
|
20
|
+
paths:
|
|
21
|
+
- spec-plan.json
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Generated by `specgate ci init --provider jenkins`
|
|
2
|
+
// Spec-Driven Development gate for Jenkins (declarative pipeline).
|
|
3
|
+
// If your project already has a Jenkinsfile, paste the 'Spec gate' stage in.
|
|
4
|
+
pipeline {
|
|
5
|
+
agent {
|
|
6
|
+
docker { image 'node:22' }
|
|
7
|
+
}
|
|
8
|
+
stages {
|
|
9
|
+
stage('Spec gate') {
|
|
10
|
+
steps {
|
|
11
|
+
sh 'npx @rsaglobaltech/specgate@{{SPECGATE_VERSION}} validate . --strict-tdd'
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
// Supply-chain gate: fails when rendered pack content no longer
|
|
15
|
+
// matches the digest pinned in .specops.lock. Skipped when the
|
|
16
|
+
// project installs no packs.
|
|
17
|
+
stage('Pack drift') {
|
|
18
|
+
steps {
|
|
19
|
+
sh '''
|
|
20
|
+
if [ -f .specops.lock ]; then
|
|
21
|
+
npx @rsaglobaltech/specgate@{{SPECGATE_VERSION}} validate . --against-lock
|
|
22
|
+
else
|
|
23
|
+
echo "No .specops.lock — no packs installed, nothing to check."
|
|
24
|
+
fi
|
|
25
|
+
'''
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
post {
|
|
30
|
+
always {
|
|
31
|
+
sh 'npx @rsaglobaltech/specgate@{{SPECGATE_VERSION}} plan --project-dir . --format json > spec-plan.json || true'
|
|
32
|
+
archiveArtifacts artifacts: 'spec-plan.json', allowEmptyArchive: true
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# AI_RULES.md — {{PROJECT_NAME}} Contract Layer
|
|
2
|
+
|
|
3
|
+
> **Scope:** This file governs AI-assisted development in the `{{PROJECT_SLUG}}` contract layer.
|
|
4
|
+
> All AI tools (Claude, Copilot, etc.) must follow these rules before generating or modifying any contract artefact.
|
|
5
|
+
|
|
6
|
+
## 1. Contract-First Mandate
|
|
7
|
+
|
|
8
|
+
Never write provider implementation code before the OpenAPI / AsyncAPI specification exists and is reviewed.
|
|
9
|
+
Every endpoint and every event must have a corresponding entry in `contracts/openapi/` or `contracts/asyncapi/` **before** any code is generated for it.
|
|
10
|
+
|
|
11
|
+
## 2. Consumer-Driven Test Coverage (TDD Rule 1)
|
|
12
|
+
|
|
13
|
+
For every API contract (`AC-*` in `pack.yaml`), at least one Pact interaction must exist in `contracts/pacts/`.
|
|
14
|
+
Do not mark a contract as `Verified` in the traceability matrix until the Pact test passes in CI.
|
|
15
|
+
|
|
16
|
+
## 3. No Breaking Changes Without Versioning (TDD Rule 2)
|
|
17
|
+
|
|
18
|
+
Before modifying any schema file:
|
|
19
|
+
1. Check `breaking_change_rules` in `pack.yaml` for the relevant contract.
|
|
20
|
+
2. If the change matches a breaking-change rule, bump the contract's major version and create a new schema file (`provider-v2.yaml`). Do **not** overwrite the existing version.
|
|
21
|
+
3. Update `api_contracts[].schema_ref` to point to the new version.
|
|
22
|
+
|
|
23
|
+
## 4. Traceability Gate (TDD Rule 3)
|
|
24
|
+
|
|
25
|
+
Every contract entry (`AC-*`) must be traceable to a requirement (`REQ-*`) via `api_contracts[].requirement`.
|
|
26
|
+
Do not add a contract without a corresponding requirement, and do not close a requirement without at least one associated contract or consumer-driven test.
|
|
27
|
+
|
|
28
|
+
## 5. Status Promotion Rules (TDD Rule 4)
|
|
29
|
+
|
|
30
|
+
A contract record in `docs/specs/contract-traceability.md` may only advance past `Ready for Dev` when:
|
|
31
|
+
- The schema file referenced by `schema_ref` exists and validates against its format spec (OpenAPI 3.x / AsyncAPI 2.x).
|
|
32
|
+
- At least one `CDT-*` entry links this contract's provider.
|
|
33
|
+
- The corresponding Pact file exists on disk.
|
|
34
|
+
|
|
35
|
+
Do not auto-promote status. Status changes must be explicit edits to the traceability document, committed with a message explaining the promotion reason.
|
|
36
|
+
|
|
37
|
+
## 6. Test Artifact Must Not Be TBD (TDD Rule 5)
|
|
38
|
+
|
|
39
|
+
In `docs/specs/contract-traceability.md`, the **Test Artifact** column must never contain `TBD` for a record whose **Status** is `In Dev` or later.
|
|
40
|
+
If the test artifact is not yet known, keep the record at `Draft` or `Needs Clarification`.
|
|
41
|
+
|
|
42
|
+
## 7. Schema Files Are Source of Truth
|
|
43
|
+
|
|
44
|
+
- OpenAPI / AsyncAPI files in `contracts/` are the authoritative contract.
|
|
45
|
+
- Generated client stubs, server stubs, and mock servers derive from these — never the reverse.
|
|
46
|
+
- If a generated file conflicts with the schema, the schema wins. Update the schema deliberately, not the generated file.
|
|
47
|
+
|
|
48
|
+
## References
|
|
49
|
+
|
|
50
|
+
- Requirements: see `pack.yaml` → `requirements[]`
|
|
51
|
+
- API Contracts: see `pack.yaml` → `api_contracts[]`
|
|
52
|
+
- Consumer-Driven Tests: see `pack.yaml` → `consumer_driven_tests[]`
|
|
53
|
+
- Breaking-Change Rules: see `pack.yaml` → `breaking_change_rules[]`
|
|
54
|
+
- Traceability: `docs/specs/contract-traceability.md`
|
|
55
|
+
- Test Strategy: `docs/specs/test-strategy.md`
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
asyncapi: "2.6.0"
|
|
2
|
+
info:
|
|
3
|
+
title: "{{PROVIDER_SERVICE}} Events"
|
|
4
|
+
version: "1.0.0"
|
|
5
|
+
description: |
|
|
6
|
+
AsyncAPI contract for events published by {{PROVIDER_SERVICE}}.
|
|
7
|
+
Generated by specgate from the contracts pack.
|
|
8
|
+
channels:
|
|
9
|
+
{{PROJECT_SLUG}}/events:
|
|
10
|
+
subscribe:
|
|
11
|
+
summary: Domain events published by {{PROVIDER_SERVICE}}
|
|
12
|
+
message:
|
|
13
|
+
name: DomainEvent
|
|
14
|
+
payload:
|
|
15
|
+
type: object
|
|
16
|
+
properties:
|
|
17
|
+
eventId:
|
|
18
|
+
type: string
|
|
19
|
+
format: uuid
|
|
20
|
+
occurredAt:
|
|
21
|
+
type: string
|
|
22
|
+
format: date-time
|
|
23
|
+
eventType:
|
|
24
|
+
type: string
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Contract Traceability Matrix — {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
| Requirement | Contract ID | Contract Title | Type | Test Artifact | Status |
|
|
4
|
+
|---|---|---|---|---|---|
|
|
5
|
+
| REQ-001 | AC-001 | {{PROVIDER_SERVICE}} REST API — v1 | REST | CDT-001 | Draft |
|
|
6
|
+
| REQ-004 | AC-002 | {{PROVIDER_SERVICE}} Events — v1 | AsyncAPI | TBD | Draft |
|
|
7
|
+
|
|
8
|
+
**Legend:**
|
|
9
|
+
- `TBD` in Test Artifact = no Pact test exists yet (blocks promotion past `Ready for Dev`)
|
|
10
|
+
- Status values follow the same lifecycle as the domain traceability matrix
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
openapi: "3.1.0"
|
|
2
|
+
info:
|
|
3
|
+
title: "{{PROVIDER_SERVICE}} API"
|
|
4
|
+
version: "1.0.0"
|
|
5
|
+
description: |
|
|
6
|
+
REST API contract for {{PROJECT_NAME}}.
|
|
7
|
+
Generated by specgate from the contracts pack.
|
|
8
|
+
Replace stub paths with real endpoint definitions.
|
|
9
|
+
servers:
|
|
10
|
+
- url: "https://api.{{PROJECT_SLUG}}.example.com/v1"
|
|
11
|
+
description: Production
|
|
12
|
+
- url: "http://localhost:8080/v1"
|
|
13
|
+
description: Local development
|
|
14
|
+
paths:
|
|
15
|
+
/health:
|
|
16
|
+
get:
|
|
17
|
+
operationId: getHealth
|
|
18
|
+
summary: Health check
|
|
19
|
+
responses:
|
|
20
|
+
"200":
|
|
21
|
+
description: Service is healthy
|
|
22
|
+
content:
|
|
23
|
+
application/json:
|
|
24
|
+
schema:
|
|
25
|
+
type: object
|
|
26
|
+
properties:
|
|
27
|
+
status:
|
|
28
|
+
type: string
|
|
29
|
+
example: ok
|
|
File without changes
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Test Strategy — {{PROJECT_NAME}} Contract Layer
|
|
2
|
+
|
|
3
|
+
**Project:** {{PROJECT_NAME}} (`{{PROJECT_SLUG}}`)
|
|
4
|
+
**Provider:** {{PROVIDER_SERVICE}}
|
|
5
|
+
**Consumer:** {{CONSUMER_SERVICE}}
|
|
6
|
+
**Date:** <!-- filled in at expand time -->
|
|
7
|
+
**Status:** Draft
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
This document describes the contract-testing strategy for the `{{PROJECT_SLUG}}` project.
|
|
12
|
+
It follows the **Consumer-Driven Contract Testing** (CDCT) pattern, where consumers publish their
|
|
13
|
+
expected interactions (Pact files) and providers verify them in CI before any release.
|
|
14
|
+
|
|
15
|
+
## Testing Pyramid
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
┌───────────────────┐
|
|
19
|
+
│ E2E / Integration│ ← minimal; catch wiring errors only
|
|
20
|
+
├───────────────────┤
|
|
21
|
+
│ Contract Tests │ ← primary gate; Pact consumer + provider
|
|
22
|
+
├───────────────────┤
|
|
23
|
+
│ Schema Tests │ ← validate OpenAPI / AsyncAPI files on every commit
|
|
24
|
+
├───────────────────┤
|
|
25
|
+
│ Unit Tests │ ← serialisation, mapping, validation logic
|
|
26
|
+
└───────────────────┘
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## TDD Rules Enforced by `validate --strict-tdd`
|
|
30
|
+
|
|
31
|
+
| Rule | Check | Gate |
|
|
32
|
+
|------|-------|------|
|
|
33
|
+
| **TDD-1** | Every `AC-*` has at least one `CDT-*` linking it | Pre-merge |
|
|
34
|
+
| **TDD-2** | No `Test Artifact = TBD` when Status ≥ `In Dev` | Pre-merge |
|
|
35
|
+
| **TDD-3** | Every requirement has a traceability row | Pre-merge |
|
|
36
|
+
| **TDD-4** | No duplicate scenario/contract IDs | Pre-merge |
|
|
37
|
+
| **TDD-5** | Breaking-change rules documented for every `AC-*` | Pre-merge |
|
|
38
|
+
| **TDD-6** | Schema files referenced by `schema_ref` must exist on disk | Pre-merge |
|
|
39
|
+
|
|
40
|
+
## Contract Test Workflow
|
|
41
|
+
|
|
42
|
+
### Consumer side
|
|
43
|
+
|
|
44
|
+
1. Write a failing Pact test describing the expected HTTP interaction.
|
|
45
|
+
2. Run the Pact test — it generates `contracts/pacts/{{CONSUMER_SERVICE}}-{{PROVIDER_SERVICE}}.json`.
|
|
46
|
+
3. Commit the Pact file alongside the consumer feature.
|
|
47
|
+
4. Open a PR — CI runs `validate --strict-tdd` to confirm the Pact file is registered.
|
|
48
|
+
|
|
49
|
+
### Provider side
|
|
50
|
+
|
|
51
|
+
1. Pull the latest Pact file from the repository (or Pact Broker if configured).
|
|
52
|
+
2. Run provider verification: `pact-provider-verifier` or the framework-native equivalent.
|
|
53
|
+
3. Only after verification passes may the provider merge a change that touches a contracted endpoint.
|
|
54
|
+
|
|
55
|
+
## Schema Validation
|
|
56
|
+
|
|
57
|
+
OpenAPI files are validated on every CI run:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npx @redocly/cli lint contracts/openapi/provider-v1.yaml
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
AsyncAPI files:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npx @asyncapi/cli validate contracts/asyncapi/provider-events-v1.yaml
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
These commands run in the `contract-lint` CI step before any contract tests.
|
|
70
|
+
|
|
71
|
+
## Breaking-Change Detection
|
|
72
|
+
|
|
73
|
+
Before merging any change to a `contracts/` schema file:
|
|
74
|
+
|
|
75
|
+
1. Run `oasdiff breaking contracts/openapi/provider-v1.yaml contracts/openapi/provider-v1-proposed.yaml`.
|
|
76
|
+
2. If any breaking change is detected, increment the major version and update `pack.yaml`.
|
|
77
|
+
3. Maintain the old version for consumers still pinned to it.
|
|
78
|
+
|
|
79
|
+
## Coverage Requirements
|
|
80
|
+
|
|
81
|
+
| Metric | Threshold |
|
|
82
|
+
|--------|-----------|
|
|
83
|
+
| Pact interactions per endpoint | ≥ 1 happy path + ≥ 1 error path |
|
|
84
|
+
| Provider verification pass rate | 100% on main |
|
|
85
|
+
| Schema lint errors | 0 on main |
|
|
86
|
+
| Strict-TDD gate (`validate --strict-tdd`) | Must pass on every PR |
|
|
87
|
+
|
|
88
|
+
## References
|
|
89
|
+
|
|
90
|
+
- API Contracts: `pack.yaml` → `api_contracts[]`
|
|
91
|
+
- Consumer-Driven Tests: `pack.yaml` → `consumer_driven_tests[]`
|
|
92
|
+
- Breaking-Change Rules: `pack.yaml` → `breaking_change_rules[]`
|
|
93
|
+
- AI Rules: `AI_RULES.md`
|
|
94
|
+
- Traceability: `docs/specs/contract-traceability.md`
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# AI Rules - Frontend ({{PROJECT_NAME}})
|
|
2
|
+
|
|
3
|
+
## Role
|
|
4
|
+
You are the Lead Frontend Engineer and UX owner. 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 integration: {{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
|
+
|
|
18
|
+
## Non-Negotiables
|
|
19
|
+
- Componentization and reusability by default.
|
|
20
|
+
- Responsive behavior as acceptance criteria.
|
|
21
|
+
- No implementation without a traceability entry.
|
|
22
|
+
|
|
23
|
+
## Domain Modeling Rules
|
|
24
|
+
{{ARCHITECTURE_MODELING_RULES}}
|
|
25
|
+
|
|
26
|
+
## Pre-Implementation Gates
|
|
27
|
+
{{ARCHITECTURE_GATES}}
|
|
28
|
+
|
|
29
|
+
## Workflow
|
|
30
|
+
1. Read `spec.md`.
|
|
31
|
+
{{ARCHITECTURE_READS}}
|
|
32
|
+
3. Read scenarios in `features/`.
|
|
33
|
+
4. Update `docs/specs/traceability.md`.
|
|
34
|
+
5. Build UI until acceptance criteria pass.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Generated by `specgate harness init`
|
|
2
|
+
#
|
|
3
|
+
# Per-project defaults for `specgate harness run`. Every key is optional, and any
|
|
4
|
+
# CLI flag overrides what is written here.
|
|
5
|
+
harness_version: 1
|
|
6
|
+
|
|
7
|
+
# The agent invocation. `{prompt_file}` is replaced with the path to the
|
|
8
|
+
# generated per-requirement prompt.
|
|
9
|
+
#
|
|
10
|
+
# Left commented out on purpose: which agent runs this is your choice and your
|
|
11
|
+
# credentials, and a default committed here is a default somebody pays for by
|
|
12
|
+
# accident. Pass it explicitly the first few times:
|
|
13
|
+
#
|
|
14
|
+
# specgate harness run --req REQ-001 --agent "claude -p < {prompt_file}"
|
|
15
|
+
#
|
|
16
|
+
# Then uncomment the line you settled on.
|
|
17
|
+
#
|
|
18
|
+
# agent: "claude -p < {prompt_file}"
|
|
19
|
+
# agent: "cursor-agent -p < {prompt_file}"
|
|
20
|
+
# agent: "aider --yes --message-file {prompt_file}"
|
|
21
|
+
|
|
22
|
+
# Or name a profile from .harness/profiles.yaml, so the team commits the
|
|
23
|
+
# commands it uses and each environment picks one:
|
|
24
|
+
#
|
|
25
|
+
# agent_profile: local-claude
|
|
26
|
+
#
|
|
27
|
+
# # .harness/profiles.yaml
|
|
28
|
+
# profiles_version: 1
|
|
29
|
+
# profiles:
|
|
30
|
+
# local-claude:
|
|
31
|
+
# agent: "claude -p < {prompt_file}"
|
|
32
|
+
# ci:
|
|
33
|
+
# agent: "aider --yes --message-file {prompt_file}"
|
|
34
|
+
#
|
|
35
|
+
# An explicit `agent:` wins over a profile.
|
|
36
|
+
|
|
37
|
+
# An *additional* gate, on top of the `validate --strict-tdd` the harness always
|
|
38
|
+
# runs. Left commented out when no build file gave it away — an unset key is
|
|
39
|
+
# safe, whereas a placeholder that exits 0 would be a gate that always passes.
|
|
40
|
+
#
|
|
41
|
+
# Three placeholders are substituted per requirement, so the gate can run the
|
|
42
|
+
# scenario belonging to the requirement under test:
|
|
43
|
+
#
|
|
44
|
+
# {req} REQ-007
|
|
45
|
+
# {scenario} SCN-007
|
|
46
|
+
# {feature_file} features/billing/refund.feature
|
|
47
|
+
#
|
|
48
|
+
# Worth using. The gate runs before `specgate done`, so the requirement is still
|
|
49
|
+
# Draft and `validate --strict-tdd` does not yet demand its test — without one
|
|
50
|
+
# of these, a requirement can be marked Implemented with its scenario never run:
|
|
51
|
+
#
|
|
52
|
+
# test_cmd: "npm run verify && npm run test:e2e -- {feature_file}"
|
|
53
|
+
#
|
|
54
|
+
# The harness runs each requirement in a fresh git worktree, which contains only
|
|
55
|
+
# what git tracks — so there is no node_modules. Install first if your gate
|
|
56
|
+
# needs one, or the agent will spend its attempt doing it:
|
|
57
|
+
#
|
|
58
|
+
# test_cmd: "npm ci && npm run verify && npm run test:e2e -- {feature_file}"
|
|
59
|
+
{{TEST_CMD_LINE}}
|
|
60
|
+
|
|
61
|
+
# Retries per requirement, each one fed the previous failure. Past three, the
|
|
62
|
+
# loop is usually stuck on something a human needs to read.
|
|
63
|
+
max_attempts: 3
|
|
64
|
+
|
|
65
|
+
# Universal directives — Role, Active Project Boundary, Execution Policy —
|
|
66
|
+
# prepended to every per-requirement prompt. Use `prompt_prefix` for a
|
|
67
|
+
# one-liner; the file form exists because the realistic version is multi-line.
|
|
68
|
+
prompt_prefix_file: ./.harness/prompt-prefix.md
|
|
69
|
+
|
|
70
|
+
# CI mode: push each green branch and open a PR, leaving review to a human.
|
|
71
|
+
# The harness never merges.
|
|
72
|
+
# push: true
|
|
73
|
+
# remote: origin
|
|
74
|
+
# pr_cmd: "gh pr create --head {branch} --title '{req} via harness' --fill"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<!-- Generated by `specgate harness init`. Edit freely — this is
|
|
2
|
+
your project's voice, and the harness prepends it verbatim to every
|
|
3
|
+
per-requirement prompt. -->
|
|
4
|
+
|
|
5
|
+
# Role
|
|
6
|
+
|
|
7
|
+
You are a senior engineer implementing **one requirement** of {{PROJECT_NAME}}.
|
|
8
|
+
|
|
9
|
+
The specification is not a suggestion. Every requirement already has a
|
|
10
|
+
scenario, a use case and a place in the traceability matrix, written before
|
|
11
|
+
any code existed. Your job is to satisfy the scenario, not to redesign the
|
|
12
|
+
domain.
|
|
13
|
+
|
|
14
|
+
# Active project boundary
|
|
15
|
+
|
|
16
|
+
**Do not edit these.** They are the specification, and several are regenerated
|
|
17
|
+
from a domain pack:
|
|
18
|
+
|
|
19
|
+
- `features/**/*.feature` — the Gherkin scenarios. If a scenario looks wrong,
|
|
20
|
+
stop and say so in your final message. Editing a scenario so your code
|
|
21
|
+
passes is the one failure mode that makes this whole exercise worthless.
|
|
22
|
+
- `docs/specs/**` — spec.md, the traceability matrix, domain model, use cases,
|
|
23
|
+
commands, events, aggregates, ADRs. `specgate done` updates the matrix; you do
|
|
24
|
+
not.
|
|
25
|
+
- `AI_RULES.md`, `spec.md`, `.specops.lock`, `.specops/**`.
|
|
26
|
+
|
|
27
|
+
**Do edit these:**
|
|
28
|
+
|
|
29
|
+
- the implementation source tree.
|
|
30
|
+
- the tests.
|
|
31
|
+
- `features/step_definitions/**` and `features/support/**` — step definitions
|
|
32
|
+
are code, not specification. This is the one place inside `features/` you
|
|
33
|
+
own.
|
|
34
|
+
|
|
35
|
+
# Execution policy
|
|
36
|
+
|
|
37
|
+
1. Read the requirement and its scenario under `features/` before writing
|
|
38
|
+
anything.
|
|
39
|
+
2. Write or extend the step definitions so the scenario fails **for the right
|
|
40
|
+
reason** — a missing implementation, not a typo in a step.
|
|
41
|
+
3. Implement the smallest thing that makes it pass. Unit-test the pure parts:
|
|
42
|
+
the scenario proves the wiring, the unit tests pin the rules.
|
|
43
|
+
4. Run the gate before declaring done:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
{{GATE_COMMAND}}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
5. Do not invent requirements. If the scenario does not ask for it, it is not
|
|
50
|
+
in scope, however obviously useful it seems.
|
|
51
|
+
|
|
52
|
+
# Definition of done
|
|
53
|
+
|
|
54
|
+
- The scenario for this requirement passes.
|
|
55
|
+
- The gate command above is green.
|
|
56
|
+
- You have not touched `features/**/*.feature` or `docs/specs/**`.
|
|
57
|
+
|
|
58
|
+
If you cannot meet the definition of done, say precisely which part failed and
|
|
59
|
+
why. A clear report of a blocked requirement is worth more than a green run
|
|
60
|
+
that skipped the scenario.
|