@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,477 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The landing page's terminal, recorded from the real CLI.
|
|
4
|
+
*
|
|
5
|
+
* ## Why a recording and not a GIF
|
|
6
|
+
*
|
|
7
|
+
* This repository ships no binaries, and a marketing GIF would be the first —
|
|
8
|
+
* unreviewable in a diff, stale the moment output changes, and heavier than the
|
|
9
|
+
* rest of the page put together. A recording is text: it diffs, it is asserted
|
|
10
|
+
* against the CLI it claims to show, and the whole thing is about 15 KB.
|
|
11
|
+
*
|
|
12
|
+
* The claim the page makes is "this is what it prints". That claim is only
|
|
13
|
+
* worth making if it stays true, which is what `--check`, the guards in
|
|
14
|
+
* `tests/unit/docs-terminal.test.ts` and the pinned version are for.
|
|
15
|
+
*
|
|
16
|
+
* ## Determinism
|
|
17
|
+
*
|
|
18
|
+
* Every capture must produce the same bytes, or the file churns, people stop
|
|
19
|
+
* regenerating it, and the recording quietly becomes a lie. Two mechanisms: the
|
|
20
|
+
* environment is built from scratch rather than inherited (`buildEnv`), and
|
|
21
|
+
* what survives that is flattened by an ordered, named list of rules (`RULES`).
|
|
22
|
+
*
|
|
23
|
+
* Colour is not captured. `NO_COLOR` and a piped stdout make the CLI emit no
|
|
24
|
+
* escape at all, and the meaning is recovered from the markers it already
|
|
25
|
+
* prints — the tick, the cross, the warning sign. Classify, do not capture.
|
|
26
|
+
*/
|
|
27
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
30
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
31
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
32
|
+
}
|
|
33
|
+
Object.defineProperty(o, k2, desc);
|
|
34
|
+
}) : (function(o, m, k, k2) {
|
|
35
|
+
if (k2 === undefined) k2 = k;
|
|
36
|
+
o[k2] = m[k];
|
|
37
|
+
}));
|
|
38
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
39
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
40
|
+
}) : function(o, v) {
|
|
41
|
+
o["default"] = v;
|
|
42
|
+
});
|
|
43
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
44
|
+
var ownKeys = function(o) {
|
|
45
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
46
|
+
var ar = [];
|
|
47
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
48
|
+
return ar;
|
|
49
|
+
};
|
|
50
|
+
return ownKeys(o);
|
|
51
|
+
};
|
|
52
|
+
return function (mod) {
|
|
53
|
+
if (mod && mod.__esModule) return mod;
|
|
54
|
+
var result = {};
|
|
55
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
56
|
+
__setModuleDefault(result, mod);
|
|
57
|
+
return result;
|
|
58
|
+
};
|
|
59
|
+
})();
|
|
60
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
61
|
+
exports.INDEX_PATH = exports.JSON_PATH = exports.RULES = exports.COLS = void 0;
|
|
62
|
+
exports.classify = classify;
|
|
63
|
+
exports.normalise = normalise;
|
|
64
|
+
exports.assertNoSecrets = assertNoSecrets;
|
|
65
|
+
exports.pace = pace;
|
|
66
|
+
exports.promptFor = promptFor;
|
|
67
|
+
exports.renderTranscript = renderTranscript;
|
|
68
|
+
exports.renderFallbackHtml = renderFallbackHtml;
|
|
69
|
+
exports.recordTranscript = recordTranscript;
|
|
70
|
+
exports.serialise = serialise;
|
|
71
|
+
exports.writeRecording = writeRecording;
|
|
72
|
+
const node_child_process_1 = require("node:child_process");
|
|
73
|
+
const fs = __importStar(require("node:fs"));
|
|
74
|
+
const os = __importStar(require("node:os"));
|
|
75
|
+
const path = __importStar(require("node:path"));
|
|
76
|
+
const terminal_storyboard_1 = require("./terminal-storyboard");
|
|
77
|
+
const blocks_1 = require("./blocks");
|
|
78
|
+
const ROOT = path.resolve(__dirname, "../../..");
|
|
79
|
+
const DOCS = path.join(ROOT, "docs");
|
|
80
|
+
/** The pinned instant. Every timestamp in the recording becomes this. */
|
|
81
|
+
const PINNED_TIME = "2026-01-01T00-00-00-000Z";
|
|
82
|
+
/** Terminal width the capture pretends to have. */
|
|
83
|
+
exports.COLS = 88;
|
|
84
|
+
// ── Classification ───────────────────────────────────────────────────────────
|
|
85
|
+
/**
|
|
86
|
+
* A line's colour, derived from what the CLI printed rather than from ANSI.
|
|
87
|
+
*
|
|
88
|
+
* The CLI's diagnostics carry a marker in every surface, which is exactly the
|
|
89
|
+
* information the escape sequence would have encoded.
|
|
90
|
+
*/
|
|
91
|
+
function classify(line) {
|
|
92
|
+
const t = line.trim();
|
|
93
|
+
if (t === "")
|
|
94
|
+
return "out";
|
|
95
|
+
if (/^(❌|✖|✗)/.test(t) || /\[ERROR\]/.test(t) || /^not ok /.test(t))
|
|
96
|
+
return "err";
|
|
97
|
+
if (/^(⚠|▲|⛔)/.test(t) || /\[WARN\]/.test(t))
|
|
98
|
+
return "warn";
|
|
99
|
+
// The tick is not always first: the CLI prefixes most surfaces with an info
|
|
100
|
+
// marker, so `ℹ️ [INFO] ✅ Validation passed` would read as neutral grey if
|
|
101
|
+
// this were anchored. Error and warning are checked above, so a line carrying
|
|
102
|
+
// both still comes out as the worse of the two.
|
|
103
|
+
if (/[✅✔✓]/.test(t))
|
|
104
|
+
return "ok";
|
|
105
|
+
if (/^\s*\d+ passed\b/.test(t))
|
|
106
|
+
return "ok";
|
|
107
|
+
if (/^(ℹ)/.test(t) || /\[INFO\]/.test(t))
|
|
108
|
+
return "info";
|
|
109
|
+
if (/^[─—-]{2,}/.test(t) || t.startsWith("#"))
|
|
110
|
+
return "dim";
|
|
111
|
+
return "out";
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* The rules, in order and by name.
|
|
115
|
+
*
|
|
116
|
+
* Named rather than inlined so the test can assert each one still runs, and so
|
|
117
|
+
* a new rule cannot be slipped in without appearing here. Order matters: the
|
|
118
|
+
* scratch directory lives under the system temp directory, so `scratch` has to
|
|
119
|
+
* win before `tmp` gets a chance to flatten it.
|
|
120
|
+
*/
|
|
121
|
+
exports.RULES = [
|
|
122
|
+
{
|
|
123
|
+
// A spinner rewrites its line with a carriage return; only the last write
|
|
124
|
+
// was ever visible.
|
|
125
|
+
id: "carriage",
|
|
126
|
+
apply: (s) => (s.includes("\r") ? s.slice(s.lastIndexOf("\r") + 1) : s),
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
// Belt and braces: NO_COLOR should mean there is nothing here to strip.
|
|
130
|
+
// `no-control-regex` is disabled because matching the escape character is
|
|
131
|
+
// the entire job — there is no way to strip ANSI without naming it.
|
|
132
|
+
id: "ansi",
|
|
133
|
+
apply: (s) => s
|
|
134
|
+
// eslint-disable-next-line no-control-regex
|
|
135
|
+
.replace(/\u001b\[[0-9;?]*[ -/]*[@-~]/g, "")
|
|
136
|
+
// eslint-disable-next-line no-control-regex
|
|
137
|
+
.replace(/\u001b\][^\u0007]*\u0007/g, ""),
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
id: "scratch",
|
|
141
|
+
apply: (s, ctx) => ctx.scratch.reduce((acc, root) => acc.split(root).join("~"), s),
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
id: "repo",
|
|
145
|
+
apply: (s, ctx) => s.split(ctx.repoRoot).join("."),
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
id: "tmp",
|
|
149
|
+
apply: (s) => s.replace(/\/var\/folders\/\S+/g, "/tmp/csda-demo"),
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
// A path built by string concatenation would have escaped `scratch`.
|
|
153
|
+
id: "home",
|
|
154
|
+
apply: (s, ctx) => s
|
|
155
|
+
.split(ctx.home)
|
|
156
|
+
.join("~")
|
|
157
|
+
.replace(/\/Users\/[^/\s"']+/g, "~")
|
|
158
|
+
.replace(/\/home\/[^/\s"']+/g, "~"),
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
id: "iso",
|
|
162
|
+
apply: (s) => s.replace(/\d{4}-\d{2}-\d{2}T[\d:.-]+Z?/g, PINNED_TIME),
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
// Git dates are pinned, but a SHA still depends on tree content, so a
|
|
166
|
+
// template edit would otherwise rewrite every SHA in the file.
|
|
167
|
+
id: "sha",
|
|
168
|
+
apply: (s, ctx) => s.replace(/\b[0-9a-f]{7,40}\b/g, (sha) => {
|
|
169
|
+
let alias = ctx.shas.get(sha);
|
|
170
|
+
if (!alias) {
|
|
171
|
+
alias = (0xc5da000 + ctx.shas.size).toString(16);
|
|
172
|
+
ctx.shas.set(sha, alias);
|
|
173
|
+
}
|
|
174
|
+
return alias;
|
|
175
|
+
}),
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
id: "duration",
|
|
179
|
+
apply: (s) => s
|
|
180
|
+
.replace(/duration_ms [\d.]+/g, "duration_ms 1.234")
|
|
181
|
+
.replace(/\b\d+(\.\d+)?ms\b/g, "12ms")
|
|
182
|
+
.replace(/\b\d+\.\d+s\b/g, "1.2s"),
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
id: "nodever",
|
|
186
|
+
apply: (s) => s.replace(/\bv(\d+)\.\d+\.\d+\b/g, "v$1.x"),
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
id: "hostname",
|
|
190
|
+
apply: (s, ctx) => (ctx.hostname ? s.split(ctx.hostname).join("demo-host") : s),
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
id: "trim",
|
|
194
|
+
apply: (s) => s.replace(/[ \t]+$/, ""),
|
|
195
|
+
},
|
|
196
|
+
];
|
|
197
|
+
function normalise(line, ctx) {
|
|
198
|
+
return exports.RULES.reduce((acc, rule) => rule.apply(acc, ctx), line);
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Abort the capture on anything credential-shaped.
|
|
202
|
+
*
|
|
203
|
+
* Redacting silently would let a leaked pattern become normal. The recording is
|
|
204
|
+
* committed, so the only safe behaviour is to fail loudly and let a person look.
|
|
205
|
+
*/
|
|
206
|
+
function assertNoSecrets(line, where) {
|
|
207
|
+
const pattern = /(ghp_|gho_|ghs_|github_pat_)[A-Za-z0-9_]{8,}|sk-[A-Za-z0-9]{16,}|AKIA[0-9A-Z]{16}|-----BEGIN [A-Z ]*PRIVATE KEY/;
|
|
208
|
+
if (pattern.test(line)) {
|
|
209
|
+
throw new Error(`credential-shaped string in "${where}" — capture aborted, look at it yourself`);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
// ── Pacing ───────────────────────────────────────────────────────────────────
|
|
213
|
+
/**
|
|
214
|
+
* Computed, never hand-tuned.
|
|
215
|
+
*
|
|
216
|
+
* A hand-edited pace is the kind of edit that turns a recording into a
|
|
217
|
+
* dramatisation, so the test bounds-checks both numbers.
|
|
218
|
+
*/
|
|
219
|
+
function pace(lineCount) {
|
|
220
|
+
const hold = 700 + lineCount * 90;
|
|
221
|
+
return { typeMs: 26, holdMs: Math.max(900, Math.min(3600, hold)) };
|
|
222
|
+
}
|
|
223
|
+
// ── Rendering ────────────────────────────────────────────────────────────────
|
|
224
|
+
function escapeHtml(s) {
|
|
225
|
+
return s
|
|
226
|
+
.replace(/&/g, "&")
|
|
227
|
+
.replace(/</g, "<")
|
|
228
|
+
.replace(/>/g, ">")
|
|
229
|
+
.replace(/"/g, """);
|
|
230
|
+
}
|
|
231
|
+
function promptFor(step) {
|
|
232
|
+
return `${step.cwd} $`;
|
|
233
|
+
}
|
|
234
|
+
/** The transcript as plain text — what a reader would have seen. */
|
|
235
|
+
function renderTranscript(rec) {
|
|
236
|
+
const out = [];
|
|
237
|
+
for (const step of rec.steps) {
|
|
238
|
+
out.push(`${promptFor(step)} ${step.command}`);
|
|
239
|
+
for (const line of step.lines)
|
|
240
|
+
out.push(line.t);
|
|
241
|
+
if (step.truncated)
|
|
242
|
+
out.push(`… ${step.omitted} more lines`);
|
|
243
|
+
out.push("");
|
|
244
|
+
}
|
|
245
|
+
return out.join("\n").trimEnd();
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* The no-JavaScript fallback, written into `index.html` between sentinels.
|
|
249
|
+
*
|
|
250
|
+
* The player hides this only after its JSON has parsed, so a blocked fetch, a
|
|
251
|
+
* `file://` origin or a schema version it does not know all leave the reader
|
|
252
|
+
* with the complete transcript.
|
|
253
|
+
*/
|
|
254
|
+
function renderFallbackHtml(rec) {
|
|
255
|
+
return `<pre class="term__transcript"><code>${escapeHtml(renderTranscript(rec))}\n</code></pre>`;
|
|
256
|
+
}
|
|
257
|
+
// ── Capture ──────────────────────────────────────────────────────────────────
|
|
258
|
+
function buildEnv(scratch) {
|
|
259
|
+
const nodeDir = path.dirname(process.execPath);
|
|
260
|
+
return {
|
|
261
|
+
PATH: [path.join(scratch, "bin"), nodeDir, "/usr/bin", "/bin", "/usr/sbin", "/sbin"].join(":"),
|
|
262
|
+
HOME: scratch,
|
|
263
|
+
TMPDIR: path.join(scratch, "tmp"),
|
|
264
|
+
TZ: "UTC",
|
|
265
|
+
LC_ALL: "C",
|
|
266
|
+
LANG: "C.UTF-8",
|
|
267
|
+
NO_COLOR: "1",
|
|
268
|
+
TERM: "dumb",
|
|
269
|
+
COLUMNS: String(exports.COLS),
|
|
270
|
+
CI: "1",
|
|
271
|
+
GIT_CONFIG_GLOBAL: "/dev/null",
|
|
272
|
+
GIT_CONFIG_SYSTEM: "/dev/null",
|
|
273
|
+
GIT_AUTHOR_NAME: "csda demo",
|
|
274
|
+
GIT_COMMITTER_NAME: "csda demo",
|
|
275
|
+
GIT_AUTHOR_EMAIL: "demo@example.invalid",
|
|
276
|
+
GIT_COMMITTER_EMAIL: "demo@example.invalid",
|
|
277
|
+
GIT_AUTHOR_DATE: "2026-01-01T00:00:00+0000",
|
|
278
|
+
GIT_COMMITTER_DATE: "2026-01-01T00:00:00+0000",
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
const CONFIG_YAML = `PROJECT_NAME: Smart Parking
|
|
282
|
+
PROJECT_SLUG: smart-parking
|
|
283
|
+
PROJECT_TYPE: backend
|
|
284
|
+
DOMAIN: parking operations
|
|
285
|
+
STACK: Node 20, Express, PostgreSQL
|
|
286
|
+
API_STYLE: REST with DTO boundaries
|
|
287
|
+
TESTING: node:test
|
|
288
|
+
`;
|
|
289
|
+
const HARNESS_YAML = `harness_version: 1
|
|
290
|
+
agent: 'csda-stub-agent {prompt_file}'
|
|
291
|
+
test_cmd: 'node --test test/*.test.js'
|
|
292
|
+
max_attempts: 1
|
|
293
|
+
`;
|
|
294
|
+
function run(cwd, env, argv) {
|
|
295
|
+
const r = (0, node_child_process_1.spawnSync)(argv[0], argv.slice(1), { cwd, env, encoding: "utf8" });
|
|
296
|
+
if (r.status !== 0) {
|
|
297
|
+
throw new Error(`setup failed: ${argv.join(" ")}\n${r.stdout || ""}${r.stderr || ""}`);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Build the world the beats run in.
|
|
302
|
+
*
|
|
303
|
+
* Nothing here is shown. It exists so that what *is* shown is worth a reader's
|
|
304
|
+
* attention: putting a stub agent on PATH and copying a pack next to the work
|
|
305
|
+
* are both true, and neither is why anyone is on the page.
|
|
306
|
+
*/
|
|
307
|
+
function prepare(scratch) {
|
|
308
|
+
const bin = path.join(scratch, "bin");
|
|
309
|
+
fs.mkdirSync(bin, { recursive: true });
|
|
310
|
+
fs.mkdirSync(path.join(scratch, "tmp"), { recursive: true });
|
|
311
|
+
fs.writeFileSync(path.join(bin, "specgate"), `#!/usr/bin/env bash\nexec node "${path.join(ROOT, "bin", "specgate.js")}" "$@"\n`, { mode: 0o755 });
|
|
312
|
+
// Reused, not forked: one deterministic agent, one place to fix it.
|
|
313
|
+
fs.copyFileSync(path.join(ROOT, "scripts", "demo", "stub-agent.sh"), path.join(bin, "csda-stub-agent"));
|
|
314
|
+
fs.chmodSync(path.join(bin, "csda-stub-agent"), 0o755);
|
|
315
|
+
// A local pack rather than a clone: a recording CI can reproduce cannot
|
|
316
|
+
// depend on the network, and `--pack-root` is a documented way to work.
|
|
317
|
+
fs.cpSync(path.join(ROOT, "packs", "multi-tenant"), path.join(scratch, "packs", "multi-tenant"), {
|
|
318
|
+
recursive: true,
|
|
319
|
+
});
|
|
320
|
+
fs.writeFileSync(path.join(scratch, "smart-parking.yaml"), CONFIG_YAML, "utf8");
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* The repository the harness needs, created between the `plan` and `harness`
|
|
324
|
+
* beats.
|
|
325
|
+
*
|
|
326
|
+
* The harness reads git's own config rather than the environment, and refuses
|
|
327
|
+
* to start without an identity — measured, not assumed, and the reason
|
|
328
|
+
* `git config` appears here as well as in `buildEnv`.
|
|
329
|
+
*/
|
|
330
|
+
function projectSetup(scratch, env) {
|
|
331
|
+
const project = path.join(scratch, "smart-parking");
|
|
332
|
+
fs.writeFileSync(path.join(project, "harness.config.yaml"), HARNESS_YAML, "utf8");
|
|
333
|
+
run(project, env, ["git", "init", "-q", "-b", "main", "."]);
|
|
334
|
+
run(project, env, ["git", "config", "user.name", "csda demo"]);
|
|
335
|
+
run(project, env, ["git", "config", "user.email", "demo@example.invalid"]);
|
|
336
|
+
run(project, env, ["git", "add", "-A"]);
|
|
337
|
+
run(project, env, ["git", "commit", "-qm", "initial: specs and the pack"]);
|
|
338
|
+
}
|
|
339
|
+
function truncate(lines, maxLines) {
|
|
340
|
+
if (lines.length <= maxLines)
|
|
341
|
+
return { lines, truncated: false, omitted: 0 };
|
|
342
|
+
return { lines: lines.slice(0, maxLines), truncated: true, omitted: lines.length - maxLines };
|
|
343
|
+
}
|
|
344
|
+
/** The command as a reader should type it, with the scratch path shown as `~`. */
|
|
345
|
+
function displayCommand(beat) {
|
|
346
|
+
if (beat.shell)
|
|
347
|
+
return beat.shell;
|
|
348
|
+
return (beat.argv || [])
|
|
349
|
+
.map((a) => a.replace("{HOME}", "~"))
|
|
350
|
+
.map((a) => (/[ '"$]/.test(a) ? `"${a}"` : a))
|
|
351
|
+
.join(" ");
|
|
352
|
+
}
|
|
353
|
+
function recordTranscript() {
|
|
354
|
+
const scratch = fs.mkdtempSync(path.join(os.tmpdir(), "csda-term-"));
|
|
355
|
+
const env = buildEnv(scratch);
|
|
356
|
+
const ctx = {
|
|
357
|
+
// Longest first, so a prefix never shadows the path it is a prefix of.
|
|
358
|
+
scratch: [...new Set([fs.realpathSync(scratch), scratch])].sort((a, b) => b.length - a.length),
|
|
359
|
+
repoRoot: ROOT,
|
|
360
|
+
home: os.homedir(),
|
|
361
|
+
hostname: os.hostname(),
|
|
362
|
+
shas: new Map(),
|
|
363
|
+
};
|
|
364
|
+
try {
|
|
365
|
+
prepare(scratch);
|
|
366
|
+
const steps = [];
|
|
367
|
+
for (const beat of terminal_storyboard_1.BEATS) {
|
|
368
|
+
if (beat.id === "harness-config")
|
|
369
|
+
projectSetup(scratch, env);
|
|
370
|
+
const cwd = path.join(scratch, beat.cwd);
|
|
371
|
+
const argv = beat.shell
|
|
372
|
+
? ["bash", "-c", beat.shell]
|
|
373
|
+
: (beat.argv || []).map((a) => a.replace("{HOME}", scratch));
|
|
374
|
+
const r = (0, node_child_process_1.spawnSync)(argv[0], argv.slice(1), {
|
|
375
|
+
cwd,
|
|
376
|
+
env,
|
|
377
|
+
encoding: "utf8",
|
|
378
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
379
|
+
maxBuffer: 16 * 1024 * 1024,
|
|
380
|
+
});
|
|
381
|
+
if (r.error)
|
|
382
|
+
throw new Error(`${beat.id}: ${r.error.message}`);
|
|
383
|
+
const collect = (raw, stream) => (raw || "")
|
|
384
|
+
.replace(/\r\n/g, "\n")
|
|
385
|
+
.split("\n")
|
|
386
|
+
.map((line) => normalise(line, ctx))
|
|
387
|
+
.map((t) => {
|
|
388
|
+
assertNoSecrets(t, beat.id);
|
|
389
|
+
return { t, c: classify(t), s: stream };
|
|
390
|
+
});
|
|
391
|
+
// stdout and stderr come off two pipes; their real interleaving is not
|
|
392
|
+
// reproducible, so stderr is appended and `streamsMerged: false` says so
|
|
393
|
+
// rather than pretending otherwise.
|
|
394
|
+
const all = [...collect(r.stdout, "out"), ...collect(r.stderr, "err")];
|
|
395
|
+
while (all.length && all[all.length - 1].t.trim() === "")
|
|
396
|
+
all.pop();
|
|
397
|
+
while (all.length && all[0].t.trim() === "")
|
|
398
|
+
all.shift();
|
|
399
|
+
const { lines, truncated, omitted } = truncate(all, beat.maxLines);
|
|
400
|
+
const { typeMs, holdMs } = pace(lines.length);
|
|
401
|
+
steps.push({
|
|
402
|
+
id: beat.id,
|
|
403
|
+
caption: beat.caption,
|
|
404
|
+
cwd: beat.cwd ? `~/${beat.cwd}` : "~",
|
|
405
|
+
command: displayCommand(beat),
|
|
406
|
+
surface: beat.surface,
|
|
407
|
+
exit: r.status === null ? -1 : r.status,
|
|
408
|
+
typeMs,
|
|
409
|
+
holdMs,
|
|
410
|
+
truncated,
|
|
411
|
+
omitted,
|
|
412
|
+
lines,
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(ROOT, "package.json"), "utf8"));
|
|
416
|
+
return {
|
|
417
|
+
schemaVersion: 1,
|
|
418
|
+
recordedWith: {
|
|
419
|
+
version: pkg.version,
|
|
420
|
+
node: process.version.replace(/^v(\d+)\..*/, "v$1.x"),
|
|
421
|
+
platform: process.platform,
|
|
422
|
+
packSource: "local",
|
|
423
|
+
},
|
|
424
|
+
recordedAt: new Date().toISOString().slice(0, 10),
|
|
425
|
+
title: "smart-parking",
|
|
426
|
+
cols: exports.COLS,
|
|
427
|
+
streamsMerged: false,
|
|
428
|
+
steps,
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
finally {
|
|
432
|
+
fs.rmSync(scratch, { recursive: true, force: true });
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
// ── Writing ──────────────────────────────────────────────────────────────────
|
|
436
|
+
exports.JSON_PATH = path.join(DOCS, "assets", "terminal-demo.json");
|
|
437
|
+
exports.INDEX_PATH = path.join(DOCS, "index.html");
|
|
438
|
+
function serialise(rec) {
|
|
439
|
+
return `${JSON.stringify(rec, null, 2)}\n`;
|
|
440
|
+
}
|
|
441
|
+
function writeRecording(rec) {
|
|
442
|
+
fs.writeFileSync(exports.JSON_PATH, serialise(rec), "utf8");
|
|
443
|
+
const index = fs.readFileSync(exports.INDEX_PATH, "utf8");
|
|
444
|
+
fs.writeFileSync(exports.INDEX_PATH, (0, blocks_1.replaceBlock)(index, "terminal", renderFallbackHtml(rec)), "utf8");
|
|
445
|
+
}
|
|
446
|
+
function main() {
|
|
447
|
+
const check = process.argv.includes("--check");
|
|
448
|
+
const rec = recordTranscript();
|
|
449
|
+
if (!check) {
|
|
450
|
+
writeRecording(rec);
|
|
451
|
+
const bytes = Buffer.byteLength(serialise(rec));
|
|
452
|
+
process.stdout.write(`recorded ${rec.steps.length} steps from v${rec.recordedWith.version} — ` +
|
|
453
|
+
`${(bytes / 1024).toFixed(1)} KB\n`);
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
const problems = [];
|
|
457
|
+
const onDisk = fs.existsSync(exports.JSON_PATH) ? fs.readFileSync(exports.JSON_PATH, "utf8") : "";
|
|
458
|
+
// `recordedAt` is a date, not a claim about the CLI, so a capture on a later
|
|
459
|
+
// day is not staleness. Everything else must match byte for byte.
|
|
460
|
+
const strip = (s) => s.replace(/"recordedAt": "[^"]*"/, '"recordedAt": "-"');
|
|
461
|
+
if (strip(onDisk) !== strip(serialise(rec))) {
|
|
462
|
+
problems.push("docs/assets/terminal-demo.json is out of date — run `npm run docs:terminal`");
|
|
463
|
+
}
|
|
464
|
+
const block = (0, blocks_1.readBlock)(fs.readFileSync(exports.INDEX_PATH, "utf8"), "terminal");
|
|
465
|
+
if ((block || "").trim() !== renderFallbackHtml(rec).trim()) {
|
|
466
|
+
problems.push("the fallback transcript in docs/index.html no longer matches the recording");
|
|
467
|
+
}
|
|
468
|
+
if (problems.length > 0) {
|
|
469
|
+
process.stderr.write(`${problems.join("\n")}\n`);
|
|
470
|
+
process.exitCode = 1;
|
|
471
|
+
return;
|
|
472
|
+
}
|
|
473
|
+
process.stdout.write("the recording is current\n");
|
|
474
|
+
}
|
|
475
|
+
if (require.main === module)
|
|
476
|
+
main();
|
|
477
|
+
//# sourceMappingURL=record-terminal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-terminal.js","sourceRoot":"","sources":["../../../scripts/docs/record-terminal.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DH,4BAcC;AA0GD,8BAEC;AAQD,0CAQC;A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,EAAE,CAAC;QAC5C,QAAQ,CAAC,IAAI,CAAC,6EAA6E,CAAC,CAAC;IAC/F,CAAC;IACD,MAAM,KAAK,GAAG,IAAA,kBAAS,EAAC,EAAE,CAAC,YAAY,CAAC,kBAAU,EAAE,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC;IACzE,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,kBAAkB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QAC5D,QAAQ,CAAC,IAAI,CAAC,4EAA4E,CAAC,CAAC;IAC9F,CAAC;IAED,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjD,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;QACrB,OAAO;IACT,CAAC;IACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;AACrD,CAAC;AAED,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM;IAAE,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* What the landing page's terminal shows, declared as data.
|
|
4
|
+
*
|
|
5
|
+
* Read by two things that must not disagree: `record-terminal.ts`, which runs
|
|
6
|
+
* these commands for real and writes the recording, and `docs-terminal.test.ts`,
|
|
7
|
+
* which checks the recording is still of this storyboard and of this CLI.
|
|
8
|
+
*
|
|
9
|
+
* ## Why these nine
|
|
10
|
+
*
|
|
11
|
+
* `scripts/demo/demo.tape` tells the same story in ten beats for a video. A
|
|
12
|
+
* landing page is not a video: it is read beside prose, by someone deciding
|
|
13
|
+
* whether to spend an afternoon on this. So the beats that survive are the ones
|
|
14
|
+
* that answer a question an evaluator actually has —
|
|
15
|
+
*
|
|
16
|
+
* - how much do I have to write? `cat smart-parking.yaml`
|
|
17
|
+
* - what do I get? `init`, `specops add`
|
|
18
|
+
* - what does it think is left to do? `plan`
|
|
19
|
+
* - does it lock me to one AI vendor? `cat harness.config.yaml`
|
|
20
|
+
* - what happens when I let it run? `harness run`
|
|
21
|
+
* - did it touch my specs? `git diff --stat`
|
|
22
|
+
* - is the code real? `node --test`
|
|
23
|
+
* - and is the chain still intact? `validate`
|
|
24
|
+
*
|
|
25
|
+
* — and the beats that only look good in motion are gone.
|
|
26
|
+
*
|
|
27
|
+
* Every one of these was run against the real CLI before being written down.
|
|
28
|
+
* The last beat is `validate` because the page's "The loop" section promises
|
|
29
|
+
* exactly that, and ending there closes the loop the reader just read about.
|
|
30
|
+
*/
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
exports.BEATS = void 0;
|
|
33
|
+
exports.BEATS = [
|
|
34
|
+
{
|
|
35
|
+
id: "config",
|
|
36
|
+
caption: "Everything you have to write by hand. Seven lines.",
|
|
37
|
+
cwd: "",
|
|
38
|
+
argv: ["cat", "smart-parking.yaml"],
|
|
39
|
+
surface: null,
|
|
40
|
+
maxLines: 10,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: "init",
|
|
44
|
+
caption: "Requirements, Gherkin, a traceability matrix and the rules for agents.",
|
|
45
|
+
cwd: "",
|
|
46
|
+
argv: ["specgate", "init", "--config", "./smart-parking.yaml", "--out", ".", "--no-git"],
|
|
47
|
+
surface: "init",
|
|
48
|
+
maxLines: 14,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: "specops-add",
|
|
52
|
+
caption: "A domain pack, installed and pinned. Not copy-pasted.",
|
|
53
|
+
cwd: "smart-parking",
|
|
54
|
+
argv: [
|
|
55
|
+
"specgate",
|
|
56
|
+
"specops",
|
|
57
|
+
"add",
|
|
58
|
+
"--pack-root",
|
|
59
|
+
"{HOME}/packs",
|
|
60
|
+
"--pack",
|
|
61
|
+
"multi-tenant/backend",
|
|
62
|
+
"--var",
|
|
63
|
+
"PROJECT_NAME=Smart Parking",
|
|
64
|
+
"--var",
|
|
65
|
+
"PROJECT_SLUG=smart-parking",
|
|
66
|
+
"--var",
|
|
67
|
+
"DOMAIN=parking operations",
|
|
68
|
+
],
|
|
69
|
+
surface: "specops add",
|
|
70
|
+
maxLines: 8,
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "plan",
|
|
74
|
+
caption: "The queue, derived from the matrix. Nobody maintains this by hand.",
|
|
75
|
+
cwd: "smart-parking",
|
|
76
|
+
argv: ["specgate", "plan"],
|
|
77
|
+
surface: "plan",
|
|
78
|
+
maxLines: 15,
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: "harness-config",
|
|
82
|
+
caption: "Any CLI that takes a prompt. The tool never talks to a model itself.",
|
|
83
|
+
cwd: "smart-parking",
|
|
84
|
+
argv: ["cat", "harness.config.yaml"],
|
|
85
|
+
surface: null,
|
|
86
|
+
maxLines: 6,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: "harness-run",
|
|
90
|
+
caption: "One requirement, one worktree, one agent — and a gate that can say no.",
|
|
91
|
+
cwd: "smart-parking",
|
|
92
|
+
argv: ["specgate", "harness", "run", "--req", "REQ-000"],
|
|
93
|
+
surface: "harness run",
|
|
94
|
+
maxLines: 14,
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
id: "diff",
|
|
98
|
+
caption: "What the agent touched. The feature files are not on this list.",
|
|
99
|
+
cwd: "smart-parking",
|
|
100
|
+
argv: ["git", "diff", "--stat", "main", "harness/REQ-000"],
|
|
101
|
+
surface: null,
|
|
102
|
+
maxLines: 8,
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: "tests",
|
|
106
|
+
caption: "Its own test, on its own branch. Nothing was merged for you.",
|
|
107
|
+
cwd: "smart-parking",
|
|
108
|
+
shell: "git switch -q harness/REQ-000 && node --test test/*.test.js",
|
|
109
|
+
surface: null,
|
|
110
|
+
maxLines: 12,
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
id: "validate",
|
|
114
|
+
caption: "And the chain still holds. This is the command CI runs.",
|
|
115
|
+
cwd: "smart-parking",
|
|
116
|
+
argv: ["specgate", "validate", "."],
|
|
117
|
+
surface: "validate",
|
|
118
|
+
maxLines: 8,
|
|
119
|
+
},
|
|
120
|
+
];
|
|
121
|
+
//# sourceMappingURL=terminal-storyboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"terminal-storyboard.js","sourceRoot":"","sources":["../../../scripts/docs/terminal-storyboard.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;;;AAwBU,QAAA,KAAK,GAAoB;IACpC;QACE,EAAE,EAAE,QAAQ;QACZ,OAAO,EAAE,oDAAoD;QAC7D,GAAG,EAAE,EAAE;QACP,IAAI,EAAE,CAAC,KAAK,EAAE,oBAAoB,CAAC;QACnC,OAAO,EAAE,IAAI;QACb,QAAQ,EAAE,EAAE;KACb;IACD;QACE,EAAE,EAAE,MAAM;QACV,OAAO,EAAE,wEAAwE;QACjF,GAAG,EAAE,EAAE;QACP,IAAI,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,sBAAsB,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,CAAC;QACxF,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE,EAAE;KACb;IACD;QACE,EAAE,EAAE,aAAa;QACjB,OAAO,EAAE,uDAAuD;QAChE,GAAG,EAAE,eAAe;QACpB,IAAI,EAAE;YACJ,UAAU;YACV,SAAS;YACT,KAAK;YACL,aAAa;YACb,cAAc;YACd,QAAQ;YACR,sBAAsB;YACtB,OAAO;YACP,4BAA4B;YAC5B,OAAO;YACP,4BAA4B;YAC5B,OAAO;YACP,2BAA2B;SAC5B;QACD,OAAO,EAAE,aAAa;QACtB,QAAQ,EAAE,CAAC;KACZ;IACD;Q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
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.DoctorCommand = void 0;
|
|
5
|
+
exports.nodeFloor = nodeFloor;
|
|
6
|
+
const DoctorCommand_1 = require("./cli/commands/quality/DoctorCommand");
|
|
7
|
+
Object.defineProperty(exports, "DoctorCommand", { enumerable: true, get: function () { return DoctorCommand_1.DoctorCommand; } });
|
|
8
|
+
function nodeFloor() {
|
|
9
|
+
return (0, DoctorCommand_1.nodeFloor)();
|
|
10
|
+
}
|
|
11
|
+
if (require.main === module) {
|
|
12
|
+
new DoctorCommand_1.DoctorCommand(process.argv.slice(2)).execute();
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=doctor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doctor.js","sourceRoot":"","sources":["../../scripts/doctor.ts"],"names":[],"mappings":";;;;AAGA,8BAEC;AAJD,wEAAoG;AAM3F,8FANA,6BAAa,OAMA;AAJtB,SAAgB,SAAS;IACvB,OAAO,IAAA,yBAAgB,GAAE,CAAC;AAC5B,CAAC;AAID,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC5B,IAAI,6BAAa,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ALLOWED_STATUSES = exports.parseArgs = exports.DoneCommand = void 0;
|
|
5
|
+
exports.setRequirementStatus = setRequirementStatus;
|
|
6
|
+
const DoneCommand_1 = require("./cli/commands/spec/DoneCommand");
|
|
7
|
+
Object.defineProperty(exports, "DoneCommand", { enumerable: true, get: function () { return DoneCommand_1.DoneCommand; } });
|
|
8
|
+
Object.defineProperty(exports, "parseArgs", { enumerable: true, get: function () { return DoneCommand_1.parseArgs; } });
|
|
9
|
+
Object.defineProperty(exports, "ALLOWED_STATUSES", { enumerable: true, get: function () { return DoneCommand_1.ALLOWED_STATUSES; } });
|
|
10
|
+
const TraceabilityMatrix_1 = require("../packages/core/src/domain/TraceabilityMatrix");
|
|
11
|
+
function setRequirementStatus(content, reqId, newStatus) {
|
|
12
|
+
return TraceabilityMatrix_1.TraceabilityMatrix.updateStatus(content, reqId, newStatus);
|
|
13
|
+
}
|
|
14
|
+
if (require.main === module) {
|
|
15
|
+
new DoneCommand_1.DoneCommand(process.argv.slice(2)).execute();
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=done.js.map
|