musubix3 0.1.0

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 (97) hide show
  1. package/.github/plugin/marketplace.json +16 -0
  2. package/.github/skills/sdd-change/SKILL.md +78 -0
  3. package/.github/skills/sdd-design/SKILL.md +26 -0
  4. package/.github/skills/sdd-formal-codegraph/SKILL.md +53 -0
  5. package/.github/skills/sdd-implementation/SKILL.md +54 -0
  6. package/.github/skills/sdd-knowledge/SKILL.md +24 -0
  7. package/.github/skills/sdd-quality/SKILL.md +69 -0
  8. package/.github/skills/sdd-requirements/SKILL.md +42 -0
  9. package/.github/skills/sdd-traceability/SKILL.md +28 -0
  10. package/CHANGELOG.md +152 -0
  11. package/LICENSE +21 -0
  12. package/README-ja.md +573 -0
  13. package/README.md +639 -0
  14. package/assets/ADR-0001.md +15 -0
  15. package/assets/constitution.md +17 -0
  16. package/assets/design.md +13 -0
  17. package/assets/requirements.md +15 -0
  18. package/dist/packages/analysis/src/adapters.d.ts +12 -0
  19. package/dist/packages/analysis/src/adapters.js +167 -0
  20. package/dist/packages/analysis/src/adapters.js.map +1 -0
  21. package/dist/packages/analysis/src/attestation.d.ts +50 -0
  22. package/dist/packages/analysis/src/attestation.js +474 -0
  23. package/dist/packages/analysis/src/attestation.js.map +1 -0
  24. package/dist/packages/analysis/src/change.d.ts +53 -0
  25. package/dist/packages/analysis/src/change.js +337 -0
  26. package/dist/packages/analysis/src/change.js.map +1 -0
  27. package/dist/packages/analysis/src/config.d.ts +104 -0
  28. package/dist/packages/analysis/src/config.js +456 -0
  29. package/dist/packages/analysis/src/config.js.map +1 -0
  30. package/dist/packages/analysis/src/files.d.ts +13 -0
  31. package/dist/packages/analysis/src/files.js +103 -0
  32. package/dist/packages/analysis/src/files.js.map +1 -0
  33. package/dist/packages/analysis/src/formal.d.ts +82 -0
  34. package/dist/packages/analysis/src/formal.js +579 -0
  35. package/dist/packages/analysis/src/formal.js.map +1 -0
  36. package/dist/packages/analysis/src/gate.d.ts +56 -0
  37. package/dist/packages/analysis/src/gate.js +484 -0
  38. package/dist/packages/analysis/src/gate.js.map +1 -0
  39. package/dist/packages/analysis/src/graph.d.ts +52 -0
  40. package/dist/packages/analysis/src/graph.js +737 -0
  41. package/dist/packages/analysis/src/graph.js.map +1 -0
  42. package/dist/packages/analysis/src/index.d.ts +17 -0
  43. package/dist/packages/analysis/src/index.js +18 -0
  44. package/dist/packages/analysis/src/index.js.map +1 -0
  45. package/dist/packages/analysis/src/knowledge.d.ts +29 -0
  46. package/dist/packages/analysis/src/knowledge.js +95 -0
  47. package/dist/packages/analysis/src/knowledge.js.map +1 -0
  48. package/dist/packages/analysis/src/model-correspondence.d.ts +45 -0
  49. package/dist/packages/analysis/src/model-correspondence.js +310 -0
  50. package/dist/packages/analysis/src/model-correspondence.js.map +1 -0
  51. package/dist/packages/analysis/src/mutation.d.ts +54 -0
  52. package/dist/packages/analysis/src/mutation.js +299 -0
  53. package/dist/packages/analysis/src/mutation.js.map +1 -0
  54. package/dist/packages/analysis/src/order.d.ts +23 -0
  55. package/dist/packages/analysis/src/order.js +89 -0
  56. package/dist/packages/analysis/src/order.js.map +1 -0
  57. package/dist/packages/analysis/src/performance.d.ts +65 -0
  58. package/dist/packages/analysis/src/performance.js +319 -0
  59. package/dist/packages/analysis/src/performance.js.map +1 -0
  60. package/dist/packages/analysis/src/process.d.ts +14 -0
  61. package/dist/packages/analysis/src/process.js +79 -0
  62. package/dist/packages/analysis/src/process.js.map +1 -0
  63. package/dist/packages/analysis/src/tdd.d.ts +65 -0
  64. package/dist/packages/analysis/src/tdd.js +353 -0
  65. package/dist/packages/analysis/src/tdd.js.map +1 -0
  66. package/dist/packages/analysis/src/trace.d.ts +45 -0
  67. package/dist/packages/analysis/src/trace.js +242 -0
  68. package/dist/packages/analysis/src/trace.js.map +1 -0
  69. package/dist/packages/analysis/src/workflow.d.ts +59 -0
  70. package/dist/packages/analysis/src/workflow.js +405 -0
  71. package/dist/packages/analysis/src/workflow.js.map +1 -0
  72. package/dist/packages/cli/src/install.d.ts +15 -0
  73. package/dist/packages/cli/src/install.js +71 -0
  74. package/dist/packages/cli/src/install.js.map +1 -0
  75. package/dist/packages/cli/src/main.d.ts +3 -0
  76. package/dist/packages/cli/src/main.js +364 -0
  77. package/dist/packages/cli/src/main.js.map +1 -0
  78. package/dist/packages/domain/src/constitution.d.ts +3 -0
  79. package/dist/packages/domain/src/constitution.js +46 -0
  80. package/dist/packages/domain/src/constitution.js.map +1 -0
  81. package/dist/packages/domain/src/design.d.ts +8 -0
  82. package/dist/packages/domain/src/design.js +59 -0
  83. package/dist/packages/domain/src/design.js.map +1 -0
  84. package/dist/packages/domain/src/index.d.ts +5 -0
  85. package/dist/packages/domain/src/index.js +6 -0
  86. package/dist/packages/domain/src/index.js.map +1 -0
  87. package/dist/packages/domain/src/markdown.d.ts +16 -0
  88. package/dist/packages/domain/src/markdown.js +72 -0
  89. package/dist/packages/domain/src/markdown.js.map +1 -0
  90. package/dist/packages/domain/src/requirements.d.ts +3 -0
  91. package/dist/packages/domain/src/requirements.js +195 -0
  92. package/dist/packages/domain/src/requirements.js.map +1 -0
  93. package/dist/packages/domain/src/types.d.ts +100 -0
  94. package/dist/packages/domain/src/types.js +14 -0
  95. package/dist/packages/domain/src/types.js.map +1 -0
  96. package/package.json +59 -0
  97. package/plugin.json +9 -0
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "musubix3-marketplace",
3
+ "owner": { "name": "nahisaho" },
4
+ "metadata": {
5
+ "description": "GitHub Copilot CLI specification-driven development skills",
6
+ "version": "0.1.0"
7
+ },
8
+ "plugins": [
9
+ {
10
+ "name": "musubix3",
11
+ "source": ".",
12
+ "version": "0.1.0",
13
+ "description": "Evidence-driven SDD without duplicating native Copilot capabilities."
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: sdd-change
3
+ description: "Use for feature additions, behavior changes, bug fixes, refactoring with observable impact, or any request that must propagate through requirements, design, code, tests, traceability, and quality evidence. 機能追加・仕様変更・バグ修正を一貫して反映するときに使用。"
4
+ ---
5
+ # Integrated change workflow / 統合変更ワークフロー
6
+
7
+ Follow the user's input language (日本語 / English). Use Copilot's native
8
+ planning, editing, research, review, security review and subagents where useful.
9
+ This skill coordinates SDD artifacts and checks; it is not another agent runtime.
10
+ Record exactly one final invocation outcome with `npx musubix3 workflow-record
11
+ sdd-change complete --status <status>`; `change-record` separately proves phases.
12
+ Run `workflow-verify <copilot.jsonl>` to bind this declaration to one Skill call.
13
+ For strict evidence, set an expected UUID or pass `--strict --session-id <uuid>`;
14
+ this checks lifecycles; GitHub origin needs strict OIDC with key-bound claims.
15
+ Never record multiple declarations per invocation; use only the configured CLI.
16
+ For a staged change, run `change-record <CHANGE-ID> <phase> --requirement
17
+ <REQ-ID...>` after each phase in this exact order: `impact`, `requirements`,
18
+ `design`, `red`, `implementation`, `green`, `quality`.
19
+ List only requirements whose statement or acceptance changes, classify each as
20
+ functional/non-functional, and document other impacts separately. Each listed
21
+ requirement needs fresh Red after `requirements` and Green after `implementation`.
22
+ The CHANGE document must contain `Requirements:` with exactly those normative IDs.
23
+ Persisted monotonic order, not wall-clock time, proves these phase boundaries.
24
+ ## 1. Classify and inspect / 分類と事前確認
25
+ 1. Classify the request as a feature, behavior change, defect correction,
26
+ refactoring, or documentation-only change.
27
+ 2. Read the constitution and relevant requirements, designs, ADRs, code and tests.
28
+ 3. Run `npx musubix3 trace impact <id-or-path> --json` and, when code exists,
29
+ `graph index` plus `graph impact <symbol-or-path> --json`.
30
+ 4. Separate confirmed intent, assumptions and open questions. Ask only questions
31
+ that materially affect observable behavior, safety or compatibility.
32
+
33
+ ## 2. Update specifications first / 仕様を先に更新
34
+ 1. For new or changed observable behavior, add or revise EARS requirements and
35
+ measurable acceptance criteria before implementation. Preserve stable IDs
36
+ when meaning remains the same; create new IDs when obligations are distinct.
37
+ 2. For a bug where implementation violates an existing requirement, keep that
38
+ requirement and record that no specification change is needed. Never rewrite
39
+ a requirement merely to make incorrect behavior appear compliant.
40
+ 3. Update design responsibilities, interfaces, constraints and requirement links.
41
+ Add or supersede an ADR only for a real architectural or trade-off decision.
42
+ 4. Run requirements, constitution and design validation. Stop on invalid
43
+ artifacts instead of continuing with unapproved assumptions.
44
+ ## 3. Implement and prove coverage / 実装と網羅性
45
+ 1. For observable behavior changes and defect fixes, write the smallest meaningful
46
+ test first. Include its `TEST-*` ID in the test name/output and link it to the
47
+ requirement with `@verifies`. Configure the command's `tddArgs` with
48
+ `{testId}` or `{testPath}` so only that test is selected. Configure
49
+ `tddReport` and make the runner write a fresh `musubix-json` result containing
50
+ exactly the target test with `failed` or `passed` status, or select a built-in
51
+ test adapter. For deterministic performance requirements, use a passing
52
+ instrumented `operations` report with command/report/run/exit provenance;
53
+ native adapters cannot emit app counters, and elapsed time is insufficient.
54
+ 2. Run `npx musubix3 tdd red <TEST-ID> --requirement <REQ-ID> --command <name>`.
55
+ Do not edit implementation code until this records the expected failing test.
56
+ 3. Implement the smallest complete change, preserving the test, then run
57
+ `tdd green` with the same IDs and command. Refactor only after Green and record
58
+ `tdd refactor` after the refactored code passes.
59
+ 4. Maintain unique `CODE-*` / `TEST-*` IDs and `@implements`, `@design`,
60
+ `@verifies` annotations in the authoritative implementation and test files.
61
+ Never create proxy or placeholder source files solely to satisfy trace coverage.
62
+ Links are evidence locations, not proof by themselves.
63
+ 5. Run focused tests during implementation, then the configured typecheck,
64
+ build and complete test commands.
65
+ Documentation, formatting and prototypes may omit TDD unless policy requires it;
66
+ record the reason and never exempt observable behavior changes.
67
+ ## 4. Rebuild evidence and finish / 根拠更新と完了
68
+ 1. Run `trace build`, `trace check --strict`, `graph index`, and `graph gate`.
69
+ 2. Run `formal check` when changed requirements fit its documented abstraction;
70
+ use strict `Formal:` JSON for explicit conditional, numeric, temporal or
71
+ transition semantics; report unsupported prose rather than claiming proof.
72
+ A required `formal` check enforces modeled fraction and configured solver.
73
+ 3. Run `gate --changed --json` and `status --json`. Repair failures, dangling
74
+ links and stale evidence; never weaken requirements or policy to obtain green.
75
+ 4. Complete only when required checks pass and `status.gate.ready` is true.
76
+ Otherwise report the exact blocker and which artifacts remain incomplete.
77
+ If the user limits the task to one phase, state which downstream work remains;
78
+ never treat an implementation-only change as a complete SDD change.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: sdd-design
3
+ description: "Use when translating approved requirements into explicit components, interfaces, constraints, ADRs, and deterministic architecture diagrams. 設計・ADR・構成図の作成時に使用。"
4
+ ---
5
+ # Design / 設計
6
+
7
+ Follow the user's input language (日本語 / English). Use Copilot's native planning,
8
+ editing, research and review to reason about alternatives; musubix3 validates
9
+ explicit artifacts, not generated prose quality.
10
+ After the work, run `npx musubix3 workflow-record sdd-design complete --status
11
+ completed` exactly once.
12
+
13
+ 1. Read requirements and constitution; identify requirement IDs before designing.
14
+ 2. Edit `.musubix/features/<slug>/design.md` with `## DES-FEATURE-001: Title`.
15
+ Each component needs `Responsibilities:`, `Interfaces:`, `Constraints:`,
16
+ `Requirements: REQ-FEATURE-001`, and `ADRs: ADR-0001`. Use `Depends-On:` for
17
+ explicit component dependencies. Fields also accept Japanese labels.
18
+ 3. Record real trade-offs under `.musubix/decisions/ADR-xxxx.md`: context, decision,
19
+ rejected alternatives and consequences. Do not invent existing decisions.
20
+ 4. Run `npx musubix3 design validate <file> --json` and
21
+ `npx musubix3 design c4 <file>`. The Mermaid output reflects only declared
22
+ components and dependencies; it is C4-like, not a full C4 model.
23
+ 5. Run `npx musubix3 trace build` then `npx musubix3 trace check`.
24
+ Do not hand-edit `trace.json`. Ask native review to inspect coupling and
25
+ coverage; use `sdd-formal-codegraph` for compiler-based impact checks.
26
+ 6. Hand off responsibilities, interfaces, constraints and IDs to implementation.
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: sdd-formal-codegraph
3
+ description: "Use for optional formal/neurosymbolic consistency checks, compiler dependency graphs, architecture cycles and conservative code impact analysis. 形式的整合性・コードグラフ・影響分析時に使用。"
4
+ ---
5
+ # Formal checks and codegraph / 形式手法・コードグラフ
6
+
7
+ Follow the user's input language (日本語 / English). Use native Copilot reasoning,
8
+ editing and code navigation to propose and refine artifacts. Deterministic checks
9
+ constrain these proposals; do not create a separate AI/agent runtime.
10
+ After the work, run `npx musubix3 workflow-record sdd-formal-codegraph complete
11
+ --status completed` exactly once.
12
+
13
+ ## Formal consistency / 形式的整合性
14
+ 1. Run `npx musubix3 formal generate <requirements-file> --format both --json`
15
+ to inspect reproducible SMT-LIB2 and Lean artifacts before execution.
16
+ 2. Run `npx musubix3 formal doctor --json`, then
17
+ `npx musubix3 formal check <requirements-file> --solver none --json`.
18
+ Controlled unconditional English/Japanese obligations enter the Boolean
19
+ abstraction. Strict optional `Formal:` JSON adds explicit conditional truth,
20
+ exact integer bounds (`ms`/`s`/`min`, `bytes`/`kib`/`mib`), intersected
21
+ optional `afterMs`/required `withinMs` response windows, and deterministic
22
+ state transitions. Other units and incompatible dimensions stay separate.
23
+ 3. Inspect `unsupported`, assumptions and diagnostics. Arbitrary prose, domain
24
+ axioms, scheduling and liveness are not proved. A partial consistency result
25
+ says nothing about unmodeled requirements or implementation correctness.
26
+ 4. Optionally use `--solver auto|z3|lean`. Z3 checks named QF_UFLIA assertions;
27
+ Lean checks explicit-witness Boolean and translated constraint theorems.
28
+ Use `--z3-command`, `--lean-command`, or the matching `MUSUBIX3_*`
29
+ environment variable for nonstandard installations. Missing,
30
+ unknown, timed-out or failed solvers are explicit, never proof success.
31
+ 5. Resolve contradictions with native planning/editing; retain domain judgment.
32
+ 6. For explicit `Formal:` JSON, run the full gate and
33
+ `model-correspondence validate`. The current model and generated trace must
34
+ reach an authoritative test passed in a fresh structured command report.
35
+
36
+ ## Code impact / コード影響
37
+ 1. Run `npx musubix3 graph index` (or `graph index --changed`).
38
+ 2. Run `graph impact <symbol-or-path>`, `graph cycles`, and `graph gate --json`.
39
+ Use `path#symbol` to disambiguate names. Reverse-import paths explain impact.
40
+ 3. Rules in config specify source and disallowed target globs; cycles use SCCs.
41
+ JS/TS imports, re-exports, literal require/dynamic imports, manifest
42
+ entrypoints and local cache-busting URL/templates with a static base are indexed.
43
+ Set `codeGraph.mode` to `strict` when unresolved computed `import()` or
44
+ `require()` calls must block graph gates; the compatible default warns.
45
+ Conservative native adapters index Rust modules/`use`, Python imports, Go
46
+ module imports, Java package imports, C/C++ includes, C# namespace imports,
47
+ PHP namespace/import dependencies, R source/package dependencies and Julia
48
+ include/module imports, declarations and direct calls. Other languages are
49
+ reported as unsupported.
50
+ Statically resolved cache-busting imports remain valid in strict mode.
51
+ Reflective behavior remains an explicit limitation.
52
+ 4. Use native navigation and review to confirm conservative results; rebuild
53
+ stale caches. No custom LSP/MCP management, generic review or daemon.
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: sdd-implementation
3
+ description: "Use when implementing approved SDD requirements and designs with explicit code/test trace annotations and real verification evidence. 設計に基づく実装・テスト時に使用。"
4
+ ---
5
+ # Implementation / 実装
6
+
7
+ Follow the user's input language (日本語 / English). Use Copilot's native planning,
8
+ editing and subagents for implementation; do not introduce code generators,
9
+ generic test generators or a second orchestration/task system.
10
+ Run only the repository's exact `musubix3` CLI. Never fall back to similarly
11
+ named npm packages; report a blocker if the executable is unavailable.
12
+ After the work, run `npx musubix3 workflow-record sdd-implementation complete
13
+ --status completed` exactly once.
14
+
15
+ 1. Read the approved requirement/design IDs and constitution. Use native planning
16
+ for small verifiable changes. Use native subagents only for independent work.
17
+ 2. For behavior changes and bug fixes, write a meaningful failing test before
18
+ implementation. Configure the selected command with `tddArgs` containing
19
+ `{testId}` or `{testPath}` and a `tddReport`, or use a built-in runner adapter.
20
+ Follow its native identity contract: pytest/Cargo use underscore names, Go
21
+ uses a `TEST-*` subtest, and JUnit uses an exact `@Tag("TEST-*")` plus an
22
+ underscore-form ID in the method name.
23
+ Make the runner emit a fresh
24
+ `musubix-json` report containing only the selected test (plus declared
25
+ deterministic `operations` counters when applicable) and run
26
+ `npx musubix3 tdd red <TEST-ID> --requirement <REQ-ID> --command <name>`.
27
+ 3. Implement only enough code to pass, preserving the test unchanged, then run
28
+ `tdd green`. Refactor only after Green and record `tdd refactor`.
29
+ 4. Add one block comment per trace entity:
30
+ ```ts
31
+ /** @id CODE-FEATURE-001
32
+ * @implements REQ-FEATURE-001
33
+ * @design DES-FEATURE-001
34
+ */
35
+ ```
36
+ Tests use a separate block:
37
+ ```ts
38
+ /** @id TEST-FEATURE-001
39
+ * @verifies REQ-FEATURE-001
40
+ */
41
+ ```
42
+ IDs are globally unique. Multiple targets are comma/space-separated.
43
+ Put annotations in the authoritative source and test files, including
44
+ supported non-JS/TS files; never add a proxy file just to increase coverage.
45
+ An annotation establishes a link, not proof that code or tests are correct.
46
+ 5. Run the project's actual focused tests/typecheck/build; fix failures.
47
+ When mutation evidence is required, use the project's existing lightweight
48
+ mutation mechanism to emit schema-v1 deterministic identities, requirement/
49
+ test linkage, source/test SHA-256, operator/location, and killed status.
50
+ Never fabricate results or add a large mutation dependency.
51
+ 6. Regenerate `npx musubix3 trace build`, check `trace check --strict`, then
52
+ `npx musubix3 gate --changed`. Configure real command/argument arrays first.
53
+ 7. Use Copilot's native review and security-review capabilities when appropriate.
54
+ Report executed evidence separately from review advice and skipped work.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: sdd-knowledge
3
+ description: "Use when retrieving local SDD decisions, requirements and Git co-change evidence with deterministic ranked search. 仕様・設計判断・Git根拠の検索時に使用。"
4
+ ---
5
+ # Knowledge / 知識
6
+
7
+ Follow the user's input language (日本語 / English). Use Copilot's native memory
8
+ for conversational/project memory and native research for external information.
9
+ This tool indexes local evidence; it is not another memory or research service.
10
+ After the work, run `npx musubix3 workflow-record sdd-knowledge complete --status
11
+ completed` exactly once.
12
+
13
+ 1. Run `npx musubix3 knowledge build`. Markdown artifacts and the last 100 Git
14
+ commits are indexed locally in `.musubix/cache/knowledge.json`.
15
+ 2. Query `npx musubix3 knowledge query "your requirement or decision" --json`.
16
+ Ranking is deterministic TF-IDF/cosine with Japanese bigram tokenization,
17
+ not GraphRAG, embeddings, learned expertise or a semantic truth engine.
18
+ 3. Read returned source paths before making claims. Scores indicate lexical
19
+ similarity only. Git co-change is correlation; author-directory counts are
20
+ contributions, not ownership or expertise assessments.
21
+ 4. Rebuild if `stale` is true. Git evidence can be explicitly skipped in an empty
22
+ repository or when Git is unavailable. Never invent historical evidence.
23
+ 5. Use native research only when local sources are insufficient, then native
24
+ editing to record confirmed decisions as ADRs. Keep cache data local.
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: sdd-quality
3
+ description: "Use when deciding release readiness from actual checks, measurable policy, architecture and trace evidence, including incremental change checks. 品質ゲート・リリース判定時に使用。"
4
+ ---
5
+ # Quality / 品質
6
+
7
+ Follow the user's input language (日本語 / English). Use native Copilot review and
8
+ security review for their specialist reasoning; this skill does not replace them.
9
+ After the work, run `npx musubix3 workflow-record sdd-quality complete --status
10
+ completed` exactly once.
11
+
12
+ 1. Inspect `.musubix/config.json` and `.musubix/policy-baseline.json` before
13
+ running commands. Only execute trusted project configuration. Commands are
14
+ executable/argument arrays, not shell text. Never edit the baseline without
15
+ explicit independent approval. Use only the exact `musubix3` CLI; never
16
+ substitute similarly named npm packages.
17
+ 2. Configure real tests/build/typecheck commands and timeouts. Use an explicit
18
+ custom report or a built-in Vitest/Jest, pytest, Go test, Cargo or JUnit
19
+ adapter. Require executable native adapter contracts in CI; JUnit targets use
20
+ an exact `@Tag("TEST-*")`, and pytest requires `pytest-json-report`. Review
21
+ `requiredChecks`, coverage thresholds and architecture rules. Use strict
22
+ `codeGraph.mode` when unresolved computed module loading must block release,
23
+ and ensure the trusted baseline prevents downgrading it. Configure a
24
+ fresh structured `testReport` for `test-identities`. Do not weaken policy.
25
+ 3. Run `npx musubix3 gate --json` or `npx musubix3 gate --changed --json`.
26
+ Changed mode reports Git changes and dependent files but conservatively runs
27
+ all checks, including commands. It never treats unrun checks as successful.
28
+ When `tdd` is required, confirm every command has test-scoped `tddArgs`, every
29
+ cycle has a fresh structured `tddReport`, and a real failing Red is followed
30
+ by a passing Green using the same command and unchanged test.
31
+ 4. Inspect `.musubix/evidence/quality.json`: pass/fail/skipped, required flags,
32
+ command exits/output, measured rules, preserved changed-run context and input
33
+ fingerprints. Inspect `formal.json` and `workflow.json` when configured.
34
+ Treat workflow records as declarations until `workflow-verify` binds each
35
+ completed declaration to one distinct completed Copilot Skill tool call.
36
+ In strict mode require one final successful result, matching session UUID,
37
+ causal timestamps, bounded freshness, complete tool lifecycles and canonical
38
+ transcript hash. Ensure the baseline protects strict/session/freshness policy.
39
+ When `change-history` is required,
40
+ confirm ordered checkpoints, chained TDD records, requirement-scoped Code
41
+ Graph changes, exact CHANGE requirement enumeration, measurable Acceptance,
42
+ concrete designs, authoritative tests and per-CHANGE artifact completeness.
43
+ Enforce declared operation counters for deterministic performance budgets;
44
+ wall-clock duration alone is insufficient. Confirm each observation's hashed
45
+ gate run, exact command, fresh report, passing test, counter and exit provenance;
46
+ duplicate sources, persisted stdout report changes and configuration drift
47
+ invalidate it. Equivalent reruns may change provenance IDs without changing
48
+ the signed semantic performance head.
49
+ For explicit `Formal:` JSON, require model-correspondence evidence binding
50
+ the current model and generated trace to an authoritative `TEST-*` passed by
51
+ a fresh structured report. For release, set `mutation.mode` to `strict`,
52
+ protect it and its command in the baseline, and require deterministic mutant
53
+ identities bound to must functional requirements, current source/test
54
+ fingerprints, operator/location, authoritative tests, and killed results.
55
+ Reject survived, skipped, duplicate, conflicting, stale, or unlinked mutants.
56
+ musubix3 validates evidence; it does not bundle a mutation engine.
57
+ Missing required tools, commands, artifacts or evidence block readiness.
58
+ 5. Use native review/security-review as needed, recording their findings
59
+ separately from machine evidence. Never fabricate review or test results.
60
+ 6. For static CI provenance, configure trusted Ed25519 public keys, freshness
61
+ bounds and `ci-required`; sign `attestation payload` outside musubix3. For
62
+ GitHub Actions identity, opt into strict `githubOidc`, derive the key-bound
63
+ custom audience, obtain a short-lived token, and include only the public key
64
+ and token in the payload. Verification must fetch issuer metadata/JWKS and
65
+ check all configured claims; offline strict verification fails closed.
66
+ Ensure the baseline protects CI-required mode, strict OIDC and key binding.
67
+ Never store a private key or overstate OIDC as proof of arbitrary runner work.
68
+ 7. Run `npx musubix3 status --json`; stale evidence must be refreshed. Report
69
+ limitations and residual risks before handoff. No resident watcher or REPL.
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: sdd-requirements
3
+ description: "Use when eliciting, refining, or validating EARS requirements and measurable constitution rules for specification-driven development. 要求定義・EARS検証・憲章策定に使用。"
4
+ ---
5
+ # Requirements / 要求
6
+
7
+ Respond and generate guidance in the user's input language (日本語 / English).
8
+ Use Copilot's native planning, questions, research and editing; do not create an
9
+ interview engine or research agent framework.
10
+ After the work, run `npx musubix3 workflow-record sdd-requirements complete
11
+ --status completed` exactly once.
12
+
13
+ 1. Inspect `.musubix/constitution.md` and the feature's existing requirements.
14
+ If absent, preview `npx musubix3 init --dry-run` before installing.
15
+ 2. Use native planning to clarify scope, stakeholders, measurable acceptance and
16
+ failure behavior. Separate assumptions from confirmed requirements.
17
+ 3. Edit `.musubix/features/<slug>/requirements.md` with headings
18
+ `## REQ-FEATURE-001: Title`, `Priority: must|should|may`,
19
+ `Type: functional|non-functional`, and `Statement: ...`. IDs are globally
20
+ unique. Keep one obligation per entry; add `Acceptance: ...`.
21
+ Acceptance must be non-placeholder and measurably testable. For semantics
22
+ that must enter formal coverage, add strict one-line `Formal:` JSON using
23
+ branch-scoped `conditional`, integer `numeric`, `temporal` with required
24
+ `withinMs` and optional nonnegative `afterMs`, or deterministic `transition`.
25
+ For numeric constraints, use compatible duration (`ms`/`s`/`min`) or size
26
+ (`bytes`/`kib`/`mib`) units when conversion is intended; never translate
27
+ arbitrary prose or incompatible dimensions by guesswork. A non-functional deterministic
28
+ budget uses `Performance:` with `counter`, integer `max`, and `testId`.
29
+ 4. Use all six controlled EARS forms as appropriate:
30
+ - The system shall respond.
31
+ - When an event occurs, the system shall respond.
32
+ - While a state holds, the system shall respond.
33
+ - If a fault occurs, then the system shall respond.
34
+ - Where a feature is enabled, the system shall respond.
35
+ - While a state holds, when an event occurs, the system shall respond.
36
+ Japanese equivalents use `システムは…しなければならない。`, with
37
+ `…とき、` / `…間、` / `もし…ならば、` / `…場合、` clauses.
38
+ 5. Validate with `npx musubix3 requirements validate <file> --json` and
39
+ `npx musubix3 constitution validate --json`. Rules use `PRINC-001`, `RULE-001`,
40
+ a supported `Metric:` and numeric `Limit:`. Validation is not execution evidence.
41
+ 6. Hand off confirmed IDs and unresolved assumptions to `sdd-design`; use native
42
+ review for semantic completeness, not merely syntactic conformance.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: sdd-traceability
3
+ description: "Use when checking requirements-to-design/code/test coverage, dangling IDs, stale trace sources, or bidirectional change impact. 追跡可能性・網羅性・変更影響の確認時に使用。"
4
+ ---
5
+ # Traceability / 追跡可能性
6
+
7
+ Follow the user's input language (日本語 / English). Use Copilot's native code
8
+ navigation, planning and editing to repair missing links; no custom LSP manager.
9
+ After the work, run `npx musubix3 workflow-record sdd-traceability complete
10
+ --status completed` exactly once.
11
+
12
+ 1. Run `npx musubix3 trace build`. It scans `.musubix` artifacts and comment
13
+ annotations in JS/TS, Rust, Python, Go, Java/Kotlin, C/C++, C#, Ruby, PHP and
14
+ Swift, then generates feature `trace.json` files plus an ignored cache.
15
+ 2. Run `npx musubix3 trace check --strict --json`.
16
+ Distinguish malformed IDs, dangling endpoints, stale inputs, and missing
17
+ mandatory design/implementation/test coverage. Non-strict coverage warnings
18
+ are not a release gate pass.
19
+ 3. Use `npx musubix3 trace impact REQ-FEATURE-001 --json` (or a source path).
20
+ Explain each result with its returned traversal path. Bidirectional
21
+ connectivity is conservative, not a prediction of behavioral impact.
22
+ 4. Use `sdd-formal-codegraph` for import/call evidence beyond explicit traces.
23
+ Explicit Formal JSON additionally requires model-correspondence validation:
24
+ generated trace evidence must reach an authoritative passing test.
25
+ Let native planning/editing make substantive repairs; never add annotations
26
+ or proxy source files solely to disguise unimplemented or untested requirements.
27
+ 5. Rebuild after any source/artifact change. Never maintain trace JSON by hand.
28
+ Use `npx musubix3 status` for one-shot readiness; do not start a watcher.
package/CHANGELOG.md ADDED
@@ -0,0 +1,152 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+
5
+ ## 0.1.0 - 2026-09-07
6
+
7
+ - Add SHA-pinned cross-platform CI, reproducible native/formal toolchains, and
8
+ release automation for version checks, package/SBOM/checksum artifacts,
9
+ strict GitHub OIDC-bound ephemeral-key attestations, GitHub Releases, and
10
+ separately approved npm provenance publishing.
11
+ - Stream workflow transcript verification with fail-closed total-byte,
12
+ per-line-byte, and event-count limits while preserving raw and canonical
13
+ transcript hashes.
14
+ - Add P4 fail-closed model-to-implementation correspondence evidence connecting
15
+ each explicit Formal JSON requirement through fresh generated trace evidence
16
+ to an authoritative test passed by a fresh structured command report.
17
+ - Add dependency-free schema-v1 requirement-scoped mutation evidence with
18
+ deterministic identities, source/test fingerprints, operator/location,
19
+ command/report provenance, strict policy protection, attestation heads, CLI
20
+ validation, and adversarial tamper/staleness coverage.
21
+ - Stabilize signed performance evidence across equivalent repeated gate runs by
22
+ hashing normalized semantic results while retaining volatile run, execution,
23
+ timestamp, report-hash, and provenance fields in `performance.json`.
24
+ - Extend trusted policy baselines to prevent weakening strict workflow session
25
+ and freshness constraints or CI-required/strict-OIDC attestation identity and
26
+ key binding.
27
+ - Replace change/TDD wall-clock ordering with a shared SHA-256-linked monotonic
28
+ order ledger and explicit migration diagnostics for legacy chronology.
29
+ - Bind stable non-attestation quality verdicts and widened formal solver,
30
+ coverage, consistency, and artifact fields into attestations without a
31
+ circular dependency.
32
+ - Persist stdout-native adapter reports for freshness/tamper validation, add
33
+ strict transcript freshness bounds, collision-safe formal grouping, explicit
34
+ OIDC signature/algorithm/key negative coverage, and failed/missing reporting
35
+ for absent CI-required attestations.
36
+ - Add configurable attestation age/future-skew enforcement and an opt-in,
37
+ fail-closed GitHub Actions OIDC mode that verifies issuer metadata/JWKS,
38
+ JWT signatures and identity claims, and authorizes either an ephemeral
39
+ Ed25519 public key or a statically trusted key ID through a bound audience.
40
+ - Bind every deterministic performance observation to a gate-generated run and
41
+ tamper-evident command/report provenance record, rejecting altered or duplicate
42
+ reports, failed/skipped test counters, configuration drift, and untraceable
43
+ observations while extending completeness, freshness, and attestation heads.
44
+ - Strengthen explicit formal constraints with temporal lower bounds and interval
45
+ conflicts, exact integer normalization for compatible duration and size units,
46
+ branch-consistent conditional consequences, faithful transition obligations,
47
+ scalable explicit-witness Lean proofs, and native Z3/Lean mixed-model tests.
48
+ - Add an opt-in strict Code Graph mode that upgrades unresolved computed
49
+ imports/requires from compatibility warnings to gate-blocking errors, protects
50
+ the setting in policy baselines, and preserves safe cache-busting resolution.
51
+ - Add opt-in strict Copilot JSONL workflow verification with terminal session
52
+ identity, successful result enforcement, causal timestamp/tool lifecycle
53
+ checks, canonical transcript hashing, expected-session matching, and
54
+ Ed25519-bound workflow evidence heads without claiming GitHub/OIDC origin.
55
+ - Add executable CI integration contracts for every built-in test adapter
56
+ (Vitest, Jest, pytest, Go test, Cargo and JUnit), including unrelated failing
57
+ tests that prove target isolation and authentic native-report normalization.
58
+ - Create native report parent directories before execution so Jest and other
59
+ file reporters can write fresh evidence, and replace the unsupported JUnit
60
+ method-name option with exact `@Tag("TEST-*")` selection plus no-test failure.
61
+ - Add strict optional `Formal:` JSON constraints for conditional implications,
62
+ integer bounds, bounded response time, and state transitions, with deterministic
63
+ coverage plus SMT-LIB2 and Lean translations.
64
+ - Add fail-closed Ed25519 CI evidence attestations bound to repository, commit,
65
+ CI provider/run ID, and deterministic evidence heads; private keys remain
66
+ outside musubix3.
67
+ - Add Vitest/Jest, pytest, Go test, Cargo and JUnit adapters for targeted TDD
68
+ arguments and native-result normalization while preserving custom reports;
69
+ filter unrelated skipped tests and use runner-valid identifier conventions.
70
+ - Require one distinct, completed, ordered Copilot Skill tool call for every
71
+ completed workflow declaration, with one final declaration per Skill invocation.
72
+ - Resolve package-manifest entrypoints and safe local cache-busting dynamic
73
+ imports while retaining warnings for arbitrary computed loading.
74
+ - Strengthen staged-change completeness with measurable Acceptance criteria,
75
+ concrete design fields, authoritative test declarations, exact CHANGE
76
+ requirement enumeration, and deterministic operation-budget evidence.
77
+ - Chain every TDD phase into an append-only SHA-256 ledger and reject missing,
78
+ reordered, altered, duplicate, or orphaned phase records.
79
+ - Scope staged implementation fingerprints to each changed requirement's linked
80
+ code and Code Graph dependencies, so unrelated source edits cannot satisfy it.
81
+ - Replace `test-identities` output substring matching with fresh structured
82
+ command reports that prove every annotated test actually passed.
83
+ - Add functional/non-functional requirement classification and an automatic
84
+ per-CHANGE completeness gate for requirements, design, ADR, code, tests, TDD,
85
+ and trace evidence.
86
+ - Automatically require workflow and TDD validation whenever their evidence is
87
+ present, and require TDD for every staged change document.
88
+ - Require test-scoped `tddArgs`, target-specific failed/passed output, and a
89
+ non-test source change between Red and Green.
90
+ - Require a fresh structured per-test JSON report; missing, malformed, skipped,
91
+ errored, or multi-test reports cannot satisfy a TDD phase.
92
+ - Reject legacy/unscoped TDD evidence and identical phase output reused across
93
+ different tests.
94
+ - Fingerprint the annotated JS/TS test declaration instead of the entire test
95
+ file, so adding an unrelated test does not invalidate existing TDD cycles.
96
+ - Preserve repeated TDD cycles append-only so later reruns cannot erase the
97
+ historical Red/Green evidence referenced by staged changes.
98
+ - Add `workflow-verify` to reconcile declarations with actual Copilot JSONL
99
+ Skill invocation events and invalidate verification after declaration changes.
100
+ - Add ordered `change-record` checkpoints and a `change-history` gate for
101
+ requirements, design, test, implementation, and TDD chronology.
102
+ - Require a one-to-one match between `CHANGE-*.md` documents and chronology
103
+ records; an unrecorded document or orphan record blocks readiness.
104
+ - Require each affected requirement's Red after the requirements checkpoint and
105
+ its matching Green after the implementation checkpoint, preventing reuse of
106
+ pre-change TDD cycles.
107
+ - Require every mandatory requirement to have a valid Red-Green cycle from an
108
+ authoritative verifying test when the TDD gate is enabled.
109
+ - Prohibit Skills from substituting `musubix`, `musubix2`, or other similarly
110
+ named packages when the exact `musubix3` CLI is unavailable.
111
+ - Added `sdd-change`, an integrated feature/change/fix workflow that propagates
112
+ observable behavior through requirements, design, implementation, tests,
113
+ traceability, graph evidence, and the final quality gate.
114
+ - Added reproducible SMT-LIB2 and Lean artifact generation with SHA-256 metadata.
115
+ - Added `formal doctor`, configurable solver executables, Lake fallback, versions,
116
+ execution duration, and configurable timeouts.
117
+ - Replaced Lean's concrete assignment check with decidable satisfiability and
118
+ unsatisfiability theorems for the documented Boolean abstraction.
119
+ - Added Japanese unconditional obligation/prohibition normalization so bilingual
120
+ requirements can participate in formal consistency checks.
121
+ - Added authoritative comment-trace scanning for Rust, Python, Go, Java/Kotlin,
122
+ C/C++, C#, Ruby, PHP and Swift, with string-literal masking.
123
+ - Prohibited synthetic trace proxy files in the implementation, traceability and
124
+ integrated change Skills.
125
+ - Added explicit `GRAPH_UNSUPPORTED_LANGUAGE` evidence for non-JS/TS sources.
126
+ - Excluded transient logs, JSONL sessions and installed Skill copies from quality
127
+ evidence freshness fingerprints.
128
+ - Added native Rust, Python, Go, Java, C/C++, C#, PHP, R and Julia
129
+ import/module/include/source, symbol and direct-call graph indexing.
130
+ - Added optional formal and executed-test-identity quality gates with persisted
131
+ formal coverage evidence.
132
+ - Added a trusted policy baseline, preserved changed-run context, workflow event
133
+ manifests with command hashes, N/A link coverage, and duplicate requirement
134
+ statement detection.
135
+ - Added verified TDD evidence commands for Red, Green and Refactor phases,
136
+ requiring linked requirement/test IDs, observed test IDs, expected exit states,
137
+ stable test fingerprints and consistent command hashes.
138
+
139
+ ## 0.1.0-rc.1
140
+
141
+ - Clean TypeScript ESM workspaces for domain checks, analysis and the `musubix3` CLI.
142
+ - Seven bilingual GitHub Copilot CLI skills; root plugin and native marketplace.
143
+ - Preservation-first npm installer with dry-run and injectable native plugin install.
144
+ - Six controlled EARS patterns, versioned measurable constitution, explicit designs.
145
+ - Generated trace graphs, bidirectional impact and coverage/staleness diagnostics.
146
+ - Compiler-based JS/TS dependency indexing, reverse impact, cycles and architecture rules.
147
+ - Local TF-IDF retrieval with bounded Git co-change/contribution evidence.
148
+ - Conservative deterministic consistency checks and optional real Z3/Lean adapters.
149
+ - Actual command quality gates with pass/fail/skipped, changed-file context and status.
150
+ - Tests, Node 20/24 CI and npm package-content verification.
151
+
152
+ This is a new artifact schema. No musubix2 migration or compatibility is provided.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 nahisaho
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.