@peterxiaoyang/superspec 0.1.13 → 0.1.15-alpha

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.
Files changed (126) hide show
  1. package/dist/cli.d.ts +2 -0
  2. package/dist/cli.js +302 -0
  3. package/dist/format.d.ts +29 -0
  4. package/dist/format.js +141 -0
  5. package/dist/next.d.ts +3 -0
  6. package/dist/next.js +161 -0
  7. package/dist/openspec.d.ts +9 -0
  8. package/dist/openspec.js +41 -0
  9. package/dist/record.d.ts +20 -0
  10. package/dist/record.js +211 -0
  11. package/dist/skill_loop.d.ts +23 -0
  12. package/dist/skill_loop.js +58 -0
  13. package/dist/store.d.ts +31 -0
  14. package/dist/store.js +213 -0
  15. package/dist/sync.d.ts +3 -0
  16. package/dist/sync.js +135 -0
  17. package/dist/task.d.ts +7 -0
  18. package/dist/task.js +44 -0
  19. package/dist/transition.d.ts +34 -0
  20. package/dist/transition.js +400 -0
  21. package/dist/types.d.ts +138 -0
  22. package/dist/types.js +3 -0
  23. package/package.json +8 -53
  24. package/templates/workflow/skills/superspec-apply/SKILL.md +46 -118
  25. package/templates/workflow/skills/superspec-archive/SKILL.md +22 -47
  26. package/templates/workflow/skills/superspec-explore/SKILL.md +38 -69
  27. package/templates/workflow/skills/superspec-propose/SKILL.md +58 -57
  28. package/templates/workflow/skills/superspec-review/SKILL.md +36 -81
  29. package/adapters/codex/agents/architect.toml +0 -13
  30. package/adapters/codex/agents/code-reviewer.toml +0 -13
  31. package/adapters/codex/agents/critic.toml +0 -13
  32. package/adapters/codex/agents/executor.toml +0 -13
  33. package/adapters/codex/agents/explore.toml +0 -13
  34. package/adapters/codex/agents/test-engineer.toml +0 -13
  35. package/adapters/codex/agents/test-runner.toml +0 -13
  36. package/adapters/codex/agents/verifier.toml +0 -13
  37. package/adapters/codex/install-map.json +0 -116
  38. package/bin/launch.js +0 -37
  39. package/bin/superspec-check.js +0 -4
  40. package/bin/superspec-hook.js +0 -4
  41. package/bin/superspec-init.js +0 -4
  42. package/bin/superspec.js +0 -4
  43. package/dist/src/apply_worker_chain.d.ts +0 -60
  44. package/dist/src/apply_worker_chain.js +0 -1283
  45. package/dist/src/apply_worker_chain_lifecycle.d.ts +0 -21
  46. package/dist/src/apply_worker_chain_lifecycle.js +0 -409
  47. package/dist/src/archive.d.ts +0 -23
  48. package/dist/src/archive.js +0 -430
  49. package/dist/src/cli.d.ts +0 -1
  50. package/dist/src/cli.js +0 -33
  51. package/dist/src/cli_args.d.ts +0 -32
  52. package/dist/src/cli_args.js +0 -454
  53. package/dist/src/core.d.ts +0 -20
  54. package/dist/src/core.js +0 -394
  55. package/dist/src/disclosure.d.ts +0 -35
  56. package/dist/src/disclosure.js +0 -671
  57. package/dist/src/doctor.d.ts +0 -44
  58. package/dist/src/doctor.js +0 -230
  59. package/dist/src/evidence.d.ts +0 -29
  60. package/dist/src/evidence.js +0 -1107
  61. package/dist/src/gates.d.ts +0 -19
  62. package/dist/src/gates.js +0 -1631
  63. package/dist/src/git.d.ts +0 -8
  64. package/dist/src/git.js +0 -112
  65. package/dist/src/hooks/adapter.d.ts +0 -5
  66. package/dist/src/hooks/adapter.js +0 -347
  67. package/dist/src/hooks/guard_api.d.ts +0 -12
  68. package/dist/src/hooks/guard_api.js +0 -797
  69. package/dist/src/hooks/health.d.ts +0 -4
  70. package/dist/src/hooks/health.js +0 -86
  71. package/dist/src/hooks/policy_event.d.ts +0 -41
  72. package/dist/src/hooks/policy_event.js +0 -2634
  73. package/dist/src/hooks/types.d.ts +0 -72
  74. package/dist/src/hooks/types.js +0 -1
  75. package/dist/src/hooks/validation.d.ts +0 -3
  76. package/dist/src/hooks/validation.js +0 -70
  77. package/dist/src/i18n.d.ts +0 -21
  78. package/dist/src/i18n.js +0 -720
  79. package/dist/src/init_cli.d.ts +0 -28
  80. package/dist/src/init_cli.js +0 -399
  81. package/dist/src/install_engine.d.ts +0 -71
  82. package/dist/src/install_engine.js +0 -538
  83. package/dist/src/invariants.d.ts +0 -16
  84. package/dist/src/invariants.js +0 -363
  85. package/dist/src/openspec.d.ts +0 -37
  86. package/dist/src/openspec.js +0 -274
  87. package/dist/src/packet_render.d.ts +0 -5
  88. package/dist/src/packet_render.js +0 -1759
  89. package/dist/src/packet_schema.d.ts +0 -58
  90. package/dist/src/packet_schema.js +0 -1
  91. package/dist/src/paths.d.ts +0 -22
  92. package/dist/src/paths.js +0 -203
  93. package/dist/src/project_init.d.ts +0 -31
  94. package/dist/src/project_init.js +0 -167
  95. package/dist/src/self_update.d.ts +0 -14
  96. package/dist/src/self_update.js +0 -56
  97. package/dist/src/state.d.ts +0 -37
  98. package/dist/src/state.js +0 -464
  99. package/dist/src/tasks.d.ts +0 -38
  100. package/dist/src/tasks.js +0 -373
  101. package/dist/src/util.d.ts +0 -163
  102. package/dist/src/util.js +0 -792
  103. package/dist/superspec.d.ts +0 -6
  104. package/dist/superspec.js +0 -97
  105. package/dist/superspec_guard.d.ts +0 -4
  106. package/dist/superspec_guard.js +0 -19
  107. package/dist/superspec_hook.d.ts +0 -4
  108. package/dist/superspec_hook.js +0 -35
  109. package/dist/superspec_init.d.ts +0 -2
  110. package/dist/superspec_init.js +0 -17
  111. package/schemas/hook-event.schema.json +0 -27
  112. package/schemas/install-manifest.schema.json +0 -97
  113. package/templates/hooks/codex-hooks.json +0 -35
  114. package/templates/sidecar/archive-preservation.json +0 -11
  115. package/templates/sidecar/business-invariants.md +0 -38
  116. package/templates/sidecar/config.yaml +0 -13
  117. package/templates/sidecar/discovery.md +0 -33
  118. package/templates/sidecar/test-contract.md +0 -27
  119. package/templates/workflow/prompts/architect.md +0 -27
  120. package/templates/workflow/prompts/code-reviewer.md +0 -34
  121. package/templates/workflow/prompts/critic.md +0 -30
  122. package/templates/workflow/prompts/executor.md +0 -32
  123. package/templates/workflow/prompts/explore.md +0 -27
  124. package/templates/workflow/prompts/test-engineer.md +0 -28
  125. package/templates/workflow/prompts/test-runner.md +0 -35
  126. package/templates/workflow/prompts/verifier.md +0 -35
@@ -1,60 +0,0 @@
1
- import type { JsonMap, Reason } from "./util.ts";
2
- export type ArtifactRefExpected = {
3
- kind?: string;
4
- role?: string;
5
- taskId?: string;
6
- chainId?: string | null;
7
- };
8
- export type ApplyWorkerArtifactMaterializeInput = {
9
- taskId: string;
10
- kind: "worker_report" | "raw_transcript" | "diff_transcript" | "status_report";
11
- role: "test-runner" | "executor" | "code-reviewer" | "verifier";
12
- content: string | Buffer | JsonMap;
13
- path?: string;
14
- refPath?: string;
15
- filename?: string;
16
- workerChainContext?: "none" | "executor_worker";
17
- applyWorkerChainId?: string;
18
- originPacketFingerprint?: string;
19
- sourceImplementationFingerprint?: unknown;
20
- producedImplementationFingerprint?: unknown;
21
- observedImplementationFingerprint?: unknown;
22
- inputRefDigest?: string;
23
- command?: string;
24
- cwd?: string;
25
- phase?: string;
26
- testId?: string;
27
- exitCode?: number;
28
- maxBytes?: number;
29
- metadata?: JsonMap;
30
- };
31
- export declare const APPLY_WORKER_MAX_INLINE_REPORT_CHARS = 12000;
32
- export declare const APPLY_TEST_RUNNER_REPORT_REQUIRED_FIELDS: readonly ["role", "command", "command_source", "cwd", "phase", "task_id", "test_id", "exit_code", "semantic_status_candidate", "result_summary", "runtime_raw_transcript_ref", "repo_head", "pre_dirty_state", "post_dirty_state", "changed_files", "untracked_files", "invariant_refs", "source_refs", "origin_packet_fingerprint", "input_ref_digest", "source_implementation_fingerprint", "observed_implementation_fingerprint", "guard_fingerprint", "unverified_items"];
33
- export declare const APPLY_EXECUTOR_REPORT_REQUIRED_FIELDS: readonly ["role", "task_id", "apply_worker_chain_id", "cwd", "repo_head", "guard_fingerprint", "changed_files", "suggested_green_checks", "test_invariant_mapping", "runtime_artifact_refs", "origin_packet_fingerprint", "input_ref_digest", "source_implementation_fingerprint", "produced_implementation_fingerprint", "unverified_items", "risk_notes"];
34
- export declare const APPLY_CODE_REVIEW_REPORT_REQUIRED_FIELDS: readonly ["role", "review_status_candidate", "cwd", "repo_head", "guard_fingerprint", "executor_report_ref", "actual_changed_files", "changed_files", "untracked_files", "implementation_dirty_file_list", "implementation_fingerprint", "guard_artifact_manifest_fingerprint", "scope_verdict", "protected_path_verdict", "executor_report_mismatch", "test_invariant_mapping_verdict", "suggested_green_test_ids", "risk_notes", "runtime_raw_git_status_transcript_ref", "runtime_raw_git_diff_name_status_transcript_ref", "runtime_path_scoped_diff_transcript_refs", "origin_packet_fingerprint", "input_ref_digest", "source_implementation_fingerprint", "observed_implementation_fingerprint", "unverified_items"];
35
- export declare const APPLY_VERIFIER_REPORT_REQUIRED_FIELDS: readonly ["role", "completion_proof_kind", "pre_edit_proof_kind", "verification_status_candidate", "task_completion_verdict", "chain_consistency_verdict", "acceptance_coverage_verdict", "invariant_coverage_verdict", "test_coverage_verdict", "cwd", "repo_head", "guard_fingerprint", "expected_freshness_fingerprint", "observed_freshness_fingerprint", "freshness_verdict", "executor_report_ref", "task_code_review_report_ref", "actual_changed_files", "changed_files", "untracked_files", "implementation_dirty_file_list", "implementation_fingerprint", "guard_artifact_manifest_fingerprint", "unexpected_guard_owned_dirty_paths", "scope_verdict", "protected_path_verdict", "executor_code_review_mismatch", "test_evidence_mismatch", "runtime_raw_git_status_transcript_ref", "runtime_raw_git_diff_name_status_transcript_ref", "runtime_path_scoped_diff_transcript_refs", "diff_summary_refs", "origin_packet_fingerprint", "input_ref_digest", "source_implementation_fingerprint", "observed_implementation_fingerprint", "risk_notes", "triggered_stop_conditions", "unverified_items"];
36
- export declare function apply_worker_implementation_fingerprint(repoRoot: string, changeRoot: string, expectedGuardRefs?: unknown[], opts?: {
37
- declaredTaskWriteScope?: string[];
38
- protectedPathRefs?: unknown[];
39
- }): JsonMap;
40
- export declare function apply_worker_protected_path_refs(repoRoot: string, changeRoot: string, expectedGuardRefs?: unknown[]): JsonMap[];
41
- export declare function worker_input_ref_digest(refs: unknown[]): string;
42
- export declare function apply_worker_executor_input_ref_digest(evidences: JsonMap[], active: JsonMap): string;
43
- export declare function apply_worker_guard_artifact_manifest_fingerprint(items: JsonMap): JsonMap;
44
- export declare function fingerprint_digest(value: unknown): string;
45
- export declare function fingerprint_matches(actual: unknown, expected: unknown): boolean;
46
- export declare function read_pinned_artifact_json(changeRoot: string, refItem: unknown): JsonMap | null;
47
- export declare function materialize_apply_worker_artifact_ref(changeRoot: string, input: ApplyWorkerArtifactMaterializeInput): JsonMap;
48
- export declare function pinned_artifact_ref_reasons(changeRoot: string, refItem: unknown, label: string, expected?: ArtifactRefExpected, code?: string): Reason[];
49
- export declare function worker_test_run_reasons(changeRoot: string, ev: JsonMap, taskId: string, chainId: string | null, code?: string): Reason[];
50
- export declare function pre_edit_worker_test_run_reasons(changeRoot: string, ev: JsonMap, taskId: string, code?: string): Reason[];
51
- export declare function pre_edit_evidence_ref_reasons(changeRoot: string, evidences: JsonMap[], active: JsonMap | null | undefined, taskId: string, code?: string): Reason[];
52
- export declare function compute_apply_worker_freshness(repoRoot: string, changeRoot: string, evidences: JsonMap[], taskId: string, chainId: string, refs: {
53
- executor_report_ref: unknown;
54
- task_code_review_report_ref: unknown;
55
- green_test_run_evidence_ref?: string;
56
- green_test_run_evidence_refs?: string[];
57
- alternative_verification_evidence_refs?: string[];
58
- completion_proof_kind?: "green_tests" | "alternative_verification";
59
- verifier_report_ref?: unknown;
60
- }): JsonMap;