@sdd-method/sdd-cli 0.19.0 → 0.22.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.
- package/README.md +30 -10
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-harness.d.ts +20 -0
- package/dist/lib/agent-harness.d.ts.map +1 -0
- package/dist/lib/agent-harness.js +28 -0
- package/dist/lib/agent-harness.js.map +1 -0
- package/dist/lib/briefing/index.d.ts +15 -0
- package/dist/lib/briefing/index.d.ts.map +1 -0
- package/dist/lib/briefing/index.js +13 -0
- package/dist/lib/briefing/index.js.map +1 -0
- package/dist/lib/briefing/render.d.ts +57 -0
- package/dist/lib/briefing/render.d.ts.map +1 -0
- package/dist/lib/briefing/render.js +112 -0
- package/dist/lib/briefing/render.js.map +1 -0
- package/dist/lib/briefing/variables.d.ts +49 -0
- package/dist/lib/briefing/variables.d.ts.map +1 -0
- package/dist/lib/briefing/variables.js +92 -0
- package/dist/lib/briefing/variables.js.map +1 -0
- package/dist/lib/catalogue/aggregate.d.ts +19 -0
- package/dist/lib/catalogue/aggregate.d.ts.map +1 -1
- package/dist/lib/catalogue/aggregate.js +88 -0
- package/dist/lib/catalogue/aggregate.js.map +1 -1
- package/dist/lib/catalogue/build.d.ts.map +1 -1
- package/dist/lib/catalogue/build.js +78 -4
- package/dist/lib/catalogue/build.js.map +1 -1
- package/dist/lib/catalogue/builders/c4-containers.d.ts.map +1 -1
- package/dist/lib/catalogue/builders/c4-containers.js +15 -0
- package/dist/lib/catalogue/builders/c4-containers.js.map +1 -1
- package/dist/lib/catalogue/builders/capabilities.d.ts.map +1 -1
- package/dist/lib/catalogue/builders/capabilities.js +18 -4
- package/dist/lib/catalogue/builders/capabilities.js.map +1 -1
- package/dist/lib/catalogue/builders/capability-spec-walker.d.ts +55 -0
- package/dist/lib/catalogue/builders/capability-spec-walker.d.ts.map +1 -0
- package/dist/lib/catalogue/builders/capability-spec-walker.js +99 -0
- package/dist/lib/catalogue/builders/capability-spec-walker.js.map +1 -0
- package/dist/lib/catalogue/builders/capability-spec.d.ts +51 -0
- package/dist/lib/catalogue/builders/capability-spec.d.ts.map +1 -0
- package/dist/lib/catalogue/builders/capability-spec.js +276 -0
- package/dist/lib/catalogue/builders/capability-spec.js.map +1 -0
- package/dist/lib/catalogue/builders/contracts.d.ts.map +1 -1
- package/dist/lib/catalogue/builders/contracts.js +88 -41
- package/dist/lib/catalogue/builders/contracts.js.map +1 -1
- package/dist/lib/catalogue/builders/feature-subscription-channels.d.ts +12 -0
- package/dist/lib/catalogue/builders/feature-subscription-channels.d.ts.map +1 -0
- package/dist/lib/catalogue/builders/feature-subscription-channels.js +197 -0
- package/dist/lib/catalogue/builders/feature-subscription-channels.js.map +1 -0
- package/dist/lib/catalogue/builders/index.d.ts +8 -0
- package/dist/lib/catalogue/builders/index.d.ts.map +1 -1
- package/dist/lib/catalogue/builders/index.js +4 -0
- package/dist/lib/catalogue/builders/index.js.map +1 -1
- package/dist/lib/catalogue/builders/product-platform-dependencies.d.ts +10 -0
- package/dist/lib/catalogue/builders/product-platform-dependencies.d.ts.map +1 -0
- package/dist/lib/catalogue/builders/product-platform-dependencies.js +155 -0
- package/dist/lib/catalogue/builders/product-platform-dependencies.js.map +1 -0
- package/dist/lib/catalogue/builders/service-contract-consumes.d.ts +24 -0
- package/dist/lib/catalogue/builders/service-contract-consumes.d.ts.map +1 -0
- package/dist/lib/catalogue/builders/service-contract-consumes.js +173 -0
- package/dist/lib/catalogue/builders/service-contract-consumes.js.map +1 -0
- package/dist/lib/catalogue/canonical-schema.yaml +100 -5
- package/dist/lib/catalogue/service-contract-aliases-loader.d.ts +60 -0
- package/dist/lib/catalogue/service-contract-aliases-loader.d.ts.map +1 -0
- package/dist/lib/catalogue/service-contract-aliases-loader.js +109 -0
- package/dist/lib/catalogue/service-contract-aliases-loader.js.map +1 -0
- package/dist/lib/catalogue/traceability-loader.d.ts +17 -0
- package/dist/lib/catalogue/traceability-loader.d.ts.map +1 -1
- package/dist/lib/catalogue/traceability-loader.js +6 -0
- package/dist/lib/catalogue/traceability-loader.js.map +1 -1
- package/dist/lib/generate-briefing/index.d.ts +22 -0
- package/dist/lib/generate-briefing/index.d.ts.map +1 -0
- package/dist/lib/generate-briefing/index.js +77 -0
- package/dist/lib/generate-briefing/index.js.map +1 -0
- package/dist/lib/hooks-seed/copilot.d.ts +93 -0
- package/dist/lib/hooks-seed/copilot.d.ts.map +1 -0
- package/dist/lib/hooks-seed/copilot.js +167 -0
- package/dist/lib/hooks-seed/copilot.js.map +1 -0
- package/dist/lib/hooks-seed/index.d.ts +4 -0
- package/dist/lib/hooks-seed/index.d.ts.map +1 -1
- package/dist/lib/hooks-seed/index.js +2 -0
- package/dist/lib/hooks-seed/index.js.map +1 -1
- package/dist/lib/hooks-seed/lifecycle-mapping.d.ts +12 -0
- package/dist/lib/hooks-seed/lifecycle-mapping.d.ts.map +1 -0
- package/dist/lib/hooks-seed/lifecycle-mapping.js +28 -0
- package/dist/lib/hooks-seed/lifecycle-mapping.js.map +1 -0
- package/dist/lib/init/index.d.ts +6 -4
- package/dist/lib/init/index.d.ts.map +1 -1
- package/dist/lib/init/index.js +5 -26
- package/dist/lib/init/index.js.map +1 -1
- package/dist/lib/init/platform.d.ts +9 -0
- package/dist/lib/init/platform.d.ts.map +1 -1
- package/dist/lib/init/platform.js +8 -2
- package/dist/lib/init/platform.js.map +1 -1
- package/dist/lib/sync/briefing-merge.d.ts +34 -0
- package/dist/lib/sync/briefing-merge.d.ts.map +1 -0
- package/dist/lib/sync/briefing-merge.js +82 -0
- package/dist/lib/sync/briefing-merge.js.map +1 -0
- package/dist/lib/sync/copilot-hooks-merge.d.ts +30 -0
- package/dist/lib/sync/copilot-hooks-merge.d.ts.map +1 -0
- package/dist/lib/sync/copilot-hooks-merge.js +96 -0
- package/dist/lib/sync/copilot-hooks-merge.js.map +1 -0
- package/dist/lib/sync/index.d.ts +8 -3
- package/dist/lib/sync/index.d.ts.map +1 -1
- package/dist/lib/sync/index.js +63 -23
- package/dist/lib/sync/index.js.map +1 -1
- package/dist/verbs/generate-briefing.d.ts +3 -0
- package/dist/verbs/generate-briefing.d.ts.map +1 -0
- package/dist/verbs/generate-briefing.js +28 -0
- package/dist/verbs/generate-briefing.js.map +1 -0
- package/dist/verbs/init.d.ts.map +1 -1
- package/dist/verbs/init.js +11 -8
- package/dist/verbs/init.js.map +1 -1
- package/dist/verbs/sync.d.ts.map +1 -1
- package/dist/verbs/sync.js +11 -4
- package/dist/verbs/sync.js.map +1 -1
- package/package.json +2 -2
package/dist/verbs/sync.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AGENT_HARNESSES, resolveAgentHarness, } from "../lib/agent-harness.js";
|
|
1
2
|
import { runSync } from "../lib/sync/index.js";
|
|
2
3
|
export function registerSync(program) {
|
|
3
4
|
program
|
|
@@ -8,17 +9,23 @@ export function registerSync(program) {
|
|
|
8
9
|
.option("--dry-run", "report planned actions without writing")
|
|
9
10
|
.option("--allow-overwrite", "accept overwrites of locally-modified method content")
|
|
10
11
|
.option("--no-delete", "preserve files removed upstream")
|
|
11
|
-
.option("--agent-harness <name>",
|
|
12
|
+
.option("--agent-harness <name>", `target agent harness for hooks + briefing. Default: claude-code. Supported: ${AGENT_HARNESSES.join(", ")}`)
|
|
12
13
|
.action(async (opts) => {
|
|
14
|
+
let agentHarness;
|
|
15
|
+
try {
|
|
16
|
+
agentHarness = resolveAgentHarness(opts.agentHarness);
|
|
17
|
+
}
|
|
18
|
+
catch (err) {
|
|
19
|
+
process.stderr.write(`[FAIL] ${err.message}\n`);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
13
22
|
const { exitCode } = await runSync({
|
|
14
23
|
bundle: opts.bundle,
|
|
15
24
|
targetRepo: opts.targetRepo,
|
|
16
25
|
dryRun: opts.dryRun === true,
|
|
17
26
|
allowOverwrite: opts.allowOverwrite === true,
|
|
18
27
|
delete: opts.delete,
|
|
19
|
-
|
|
20
|
-
? { agentHarness: opts.agentHarness }
|
|
21
|
-
: {}),
|
|
28
|
+
agentHarness,
|
|
22
29
|
});
|
|
23
30
|
if (exitCode !== 0)
|
|
24
31
|
process.exit(exitCode);
|
package/dist/verbs/sync.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/verbs/sync.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAW/C,MAAM,UAAU,YAAY,CAAC,OAAgB;IAC3C,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CACV,mEAAmE,CACpE;SACA,cAAc,CAAC,iBAAiB,EAAE,qCAAqC,CAAC;SACxE,MAAM,CAAC,qBAAqB,EAAE,iBAAiB,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;SAC/D,MAAM,CAAC,WAAW,EAAE,wCAAwC,CAAC;SAC7D,MAAM,CACL,mBAAmB,EACnB,sDAAsD,CACvD;SACA,MAAM,CAAC,aAAa,EAAE,iCAAiC,CAAC;SACxD,MAAM,CACL,wBAAwB,EACxB,
|
|
1
|
+
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../src/verbs/sync.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAW/C,MAAM,UAAU,YAAY,CAAC,OAAgB;IAC3C,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CACV,mEAAmE,CACpE;SACA,cAAc,CAAC,iBAAiB,EAAE,qCAAqC,CAAC;SACxE,MAAM,CAAC,qBAAqB,EAAE,iBAAiB,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC;SAC/D,MAAM,CAAC,WAAW,EAAE,wCAAwC,CAAC;SAC7D,MAAM,CACL,mBAAmB,EACnB,sDAAsD,CACvD;SACA,MAAM,CAAC,aAAa,EAAE,iCAAiC,CAAC;SACxD,MAAM,CACL,wBAAwB,EACxB,+EAA+E,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAC5G;SACA,MAAM,CAAC,KAAK,EAAE,IAA0B,EAAE,EAAE;QAC3C,IAAI,YAAY,CAAC;QACjB,IAAI,CAAC;YACH,YAAY,GAAG,mBAAmB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACxD,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,UAAW,GAAa,CAAC,OAAO,IAAI,CAAC,CAAC;YAC3D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,OAAO,CAAC;YACjC,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,MAAM,EAAE,IAAI,CAAC,MAAM,KAAK,IAAI;YAC5B,cAAc,EAAE,IAAI,CAAC,cAAc,KAAK,IAAI;YAC5C,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,YAAY;SACb,CAAC,CAAC;QACH,IAAI,QAAQ,KAAK,CAAC;YAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdd-method/sdd-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Method-layer CLI for SDD repository lifecycle — init, sync, validate, list, plan, generate-
|
|
3
|
+
"version": "0.22.0",
|
|
4
|
+
"description": "Method-layer CLI for SDD repository lifecycle — init, sync, validate, list, plan, generate-briefing, mcp serve, catalogue {build,aggregate,validate,version}. v0.22.0 bundles three landed scopes. (a) ADR 0141 Phase 5 — `--agent-harness` flag on init/sync now accepts `github-copilot-cli` as the second reference implementation alongside the `claude-code` default; Copilot CLI sync writes `.github/hooks/{pre-tool-use,session-start}.json` with the same sentinel-based ownership pattern as the Claude Code `.claude/settings.json` block. Default changes from \"unset\" to `claude-code`; existing adopters on v0.12.2+ get sentinel-tagged-in-place via the dedupe pre-pass. Unknown harness values fail loudly instead of warning. (b) ADR 0148 Phase 4 — init and sync now emit `agent-instructions.md` at the SDD root (harness-neutral, fully method-managed, unconditional overwrite) plus a thin harness wrapper (`CLAUDE.md` under claude-code, `AGENTS.md` under github-copilot-cli) with `<!-- method-managed: begin/end -->` markers; adopter content around the marker block survives sync via the existing `writeMarkedBlockFile` machinery. The v0.3–v0.21 `generate-claude-md` verb + native rich-content renderer retire; the new `generate-briefing` verb regenerates both files from the on-disk templates for the no-bundle-sync case. Older bundles pre-dating ADR 0148 templates sync gracefully with a \"Skipped\" log line. Existing repos carrying a hand-rolled CLAUDE.md without markers will see the wrapper rewrite refused on first sync; pass --allow-overwrite after rehoming any custom content (covered in the upstream agent-instructions-migration-guide). (c) Catalogue schema 2.9.0 (lockstep with sdd-method v0.10.0 reverse-extension-baseline v0.9.0) carrying the Track 2 cohort-sweep field additions per content/plans/v0-9-0-cohort-sweep-derived-bundle.md: capabilities now carries data_subset (foundational/synthesis-tier keying axis) + slice_scope (multi-app-group capability slicing — same capability_id may appear with distinct slice_scope values, row identity becomes (id, slice_scope)); new per-feature edge catalogue feature_subscription_channels built from reverse-evidence/feature-grounding-evidence.yaml subscription_channels: entries (AppSync WebSocket / Pekko WS / MQTT / SSE channel layer, peer of graphql_operations: per resolved §1, kebab name + transport + evidence + optional payload_ref); new per-SDD edge catalogue product_platform_dependencies built from the product-scoped platform_dependencies: block in the same evidence file; new federated edge catalogue cross_sdd_platform_capability derived by the aggregator joining product_platform_dependencies × capability_service on target_service_id == service_id, emitting one row per resolved (consuming-product, platform-capability) pair with orphan findings for unresolved references. SCHEMA_COMPAT unchanged (still ^2.0.0); additive minor across both new catalogues and capability column additions. v0.21.0 ships catalogue schema 2.8.0 closing the long-tail contract-consumer mapping gap (K-03a). The contracts builder now also walks the platform-profile layout `docs/domains/<dom>/contracts/{openapi,proto,avro}/<file>.<ext>` documented in reverse/workflows/contract.md, in addition to the canonical `contracts/<subdir>/<dom>/<file>.<ext>` layout — backward-compatible additive change for federated SDDs that don't carry per-domain contracts. Adds a new buildServiceContractConsumes builder that parses each service's `repos/<service>/docs/service-architecture.md` External Interfaces table, reads Outbound rows, and emits `service_contract` rows with role=consumes via an adopter-supplied `.sdd/service-contract-aliases.yaml` (case-insensitive interface_aliases + interface_contains substring tier + same_product_inference templates with `{prefix}` substitution). Schema 2.8.0 marks service_contract.contract_id as external:true so federated SDDs can emit consumes rows pointing to platform-root contracts; aggregator validates the merged catalogue. Resolution failures become convention findings, not FK-invalid rows. Pattern documented in sdd-method ADR 0147. SCHEMA_COMPAT unchanged (still ^2.0.0). v0.19.0 ships catalogue schema 2.6.0 (lockstep with sdd-method): adds optional `sub_integrations:` array on integration-manifest.yaml per ADR 0144. Multi-provider integration monoliths (modernisation-in-flight or intentional permanent gateways brokering N providers) can declare each provider; the integrations.ts builder emits one integrations.csv row per sub_integration with parent_product_id = umbrella SDD's integrationId. Uses the existing parent_product_id column — no new schema columns. Backward compatible (optional field); SDDs without sub_integrations emit identical output to pre-2.6.0. Originating motivation: connect's sdd-camera-platform-legacy covering Surfsight v2 + VisionTrack v1/v2 + SureCam in one Spring-Boot codebase. SCHEMA_COMPAT unchanged (still ^2.0.0). v0.18.0 ships catalogue schema 2.5.0 (lockstep with sdd-method): adds feature-grounding source per ADR 0143. Canonical builder walks `docs/domains/<dom>/design/<capability>/feature-grounding.md` (platform-profile) and `docs/design/integration/feature-grounding.md` (integration-product), parses the markdown table form, and emits features.csv rows (source: feature-grounding, capability-owned) plus capability_feature / feature_repo / feature_service edges derived from the table columns. Optional per-SDD `.sdd/feature-grounding-aliases.yaml` translates display names (class names, file basenames) to canonical service / repo ids. SCHEMA_COMPAT unchanged (still ^2.0.0). v0.17.0 enables multi-level federation: organisation-level SDDs can now aggregate from organisation-level children (e.g. CXS aggregating sdd-mining, sdd-latam) via optional level: organisation field on siblings, skipping manifest requirements for pure orchestration repos. v0.16.0 adds organisation-profile support for system-of-systems aggregators (e.g. CXS aggregating sdd-connect, sdd-mining, sdd-latam), closing the gap for organisation-level SDD manifests. v0.15.0 ships catalogue schema 2.4.0 (lockstep with sdd-method): adds feature_contract derived edge (forward: capability_feature ⋈ capability_contract; reverse: feature_service ⋈ service_contract) closing the Capability → Feature → Contract chain pre-implementation, plus the new DomainModel entity per ADR 0142 with domain_models / capability_domain_model / feature_domain_model catalogues sourced from a new traceability.domain_model manifest field (forward) or docs/domains/*/architecture/data-model.mermaid.md file-system scan (reverse). Platform-profile only for domain_models; the metamodel now also documents non-catalogued method artefacts (work orders, discovery stories, execution stories, traceability manifests) so it's a complete reference for the forward SDD method's artefact set. SCHEMA_COMPAT unchanged (still ^2.0.0). v0.14.1 patches v0.14.0's domains-builder fix: products-builder now also clears domain_id for non-platform-profile rows even when manifest.domainId is declared. v0.14.0 stopped emitting umbrella domain rows but products.domain_id (and the applications.csv filtered view) still pointed at them, dangling at FK validation. Per ADR 0136 + schema description for products.domain_id, app/integration/support products do not have a primary domain — the builder now honours that statement regardless of manifest declaration, and emits an inferred finding when a manifest-declared value is overridden. v0.14.0 ships two post-v0.9.0-release fixes surfaced by the connect-cohort sync: (1) sync now enforces minimum_sdd_cli_version declared by bundle manifests — previously the orchestration check existed only in the shell sync script and was a no-op when adopters used `sdd-cli sync`, leaving the safety net for stale-CLI scenarios silently absent; (2) per ADR 0136 (App and Integration Products Do Not Belong to a Primary Domain), the domains.ts catalogue builder now skips row emission for non-platform-profile SDDs — application-product and integration-product SDDs that have a docs/domains/<umbrella>/ subdirectory as a structural-organisation convention no longer emit a member-declaration row that collides on PK at aggregation against the canonical platform-profile contribution. v0.13.2 fixed the aggregator's sibling-vendored-schema cross-check to use semver range satisfaction against SCHEMA_COMPAT.catalogue_schema (^2.0.0) instead of strict equality — siblings vendored at lower minor versions inside the same major are now accepted, unblocking aggregation across federated cohorts where the canonical schema is ahead of the bundled schema. v0.13.0 ships the feature-tree.md bullet parser per sdd-method schema 2.2.0 + plan extract-feature-tree-bullets.md: application-product builders now emit features.csv rows with source: \"feature-tree\" from per-app feature-tree.md bullets, populating the previously-empty edge catalogues (persona_feature, journey_feature) for portfolio monoliths whose feature inventory lives in the bullet form. Adds the optional runway column on features.csv with adopter-owned controlled-vocabulary validation via feature-runway-vocabulary.yaml at the SDD root. v0.12.2 dedupes equivalent unmarked adopter PreToolUse entries on settings.json upsert. v0.12.0 extends the integration profileType enum to 11 values (per sdd-method ADR 0137) and fixes the init→sync conflict. v0.11.0 shipped the canonical catalogue surface per ADR 0134 + schema 2.1.0.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sdd-method",
|
|
7
7
|
"sdd",
|