Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Important

Generated mirror of a private source repo — do not open PRs here. This repository is an automatically generated, read-only mirror of a package built from Skhema's private monorepo. Pull requests are disabled and any change pushed here is overwritten on the next release. Questions and bug reports: support@skhema.com. Security: see SECURITY.md.

@skhema/method

The complete, public Skhema method as one installable artifact: the canonical vocabulary of strategic components and element types, the curated definitions that make each element buildable (slots, expected moods, examples, relationships), and a structural validator — with zero runtime dependencies. Validate your own strategy artifacts without the platform.

Install

npm i @skhema/method

Requires Node ≥ 18. ESM only.

The vocabulary

@skhema/method/vocabulary is the identity layer of the method: the 5 strategic components, the 19 element types, and the mapping between them. It is the same vocabulary that renders in Skhema embeds and API payloads.

import {
  COMPONENT_TYPES,
  ELEMENT_TYPES,
  SKHEMA_MAPPING,
  getElementsForComponent,
  isValidElementValue,
} from '@skhema/method/vocabulary'

ELEMENT_TYPES.KEY_CHALLENGE
// { value: 'key_challenge', label: 'Key Challenge', acronym: 'CHL' }

getElementsForComponent(COMPONENT_TYPES.DIAGNOSIS.value).map((e) => e.value)
// ['key_challenge', 'supporting_fact', 'impact']

isValidElementValue('experiment') // true

Stability: additive-only

Within a major version, the vocabulary only grows. Existing component and element values, labels, and acronyms are never renamed or removed; new entries may be added in minor releases. You can persist vocabulary values in your own systems and trust them across upgrades.

The definitions

The package root adds the definitions layer — what each element is and what a well-formed one contains — and re-exports the vocabulary, so a full consumer needs one import.

import {
  getElementDefinition,
  getRequiredMethodSlots,
  listElementRelationships,
  validateMethodSpec,
} from '@skhema/method'

const challenge = getElementDefinition('key_challenge')
challenge?.expectedMood // 'indicative'
challenge?.examples[0] // a worked example of a well-formed key challenge

getRequiredMethodSlots('key_challenge').map((slot) => slot.id)
// the semantic slots a complete key challenge must fill

// Relationships describe how elements connect across a strategy.
listElementRelationships().find(
  (r) => r.source === 'key_challenge' && r.target === 'solution'
)

// The spec validates itself — the same check runs in this package's CI.
validateMethodSpec() // [] when the shipped definitions are internally consistent

Some historical element-type names are kept as aliases so older artifacts keep resolving: associated_impactimpact, solution_alternativesolution. getElementDefinition accepts either form.

Which package do I want?

Package Purpose
@skhema/method (this) The method itself — vocabulary, definitions, validation. No network, no account needed.
@skhema/sdk Typed client for the Skhema Public API (api.skhema.com/v1).
@skhema/cli The same API as a terminal command (skhema), plus agent onboarding.
@skhema/embed Render Skhema elements on your own site.

License

MIT

About

Public mirror of @skhema/method — generated, read-only

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages