michael-cahal-wsc-beta 0.1.0-beta.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 +44 -0
- package/CONTRIBUTING.md +64 -0
- package/GOVERNANCE.md +77 -0
- package/LICENSE +21 -0
- package/POLICY_LICENSE.md +54 -0
- package/POLICY_SPEC.md +471 -0
- package/README.md +227 -0
- package/SECURITY.md +50 -0
- package/bin/wsc.js +4 -0
- package/dist/cli/eval.d.ts +12 -0
- package/dist/cli/eval.d.ts.map +1 -0
- package/dist/cli/eval.js +143 -0
- package/dist/cli/eval.js.map +1 -0
- package/dist/cli/explain.d.ts +12 -0
- package/dist/cli/explain.d.ts.map +1 -0
- package/dist/cli/explain.js +83 -0
- package/dist/cli/explain.js.map +1 -0
- package/dist/cli/init.d.ts +12 -0
- package/dist/cli/init.d.ts.map +1 -0
- package/dist/cli/init.js +74 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli.d.ts +14 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +86 -0
- package/dist/cli.js.map +1 -0
- package/dist/config/createDefaultConfig.d.ts +5 -0
- package/dist/config/createDefaultConfig.d.ts.map +1 -0
- package/dist/config/createDefaultConfig.js +34 -0
- package/dist/config/createDefaultConfig.js.map +1 -0
- package/dist/config/loadConfig.d.ts +21 -0
- package/dist/config/loadConfig.d.ts.map +1 -0
- package/dist/config/loadConfig.js +101 -0
- package/dist/config/loadConfig.js.map +1 -0
- package/dist/evaluation/applyRuntimeThresholds.d.ts +5 -0
- package/dist/evaluation/applyRuntimeThresholds.d.ts.map +1 -0
- package/dist/evaluation/applyRuntimeThresholds.js +48 -0
- package/dist/evaluation/applyRuntimeThresholds.js.map +1 -0
- package/dist/evaluation/classifySeverity.d.ts +6 -0
- package/dist/evaluation/classifySeverity.d.ts.map +1 -0
- package/dist/evaluation/classifySeverity.js +21 -0
- package/dist/evaluation/classifySeverity.js.map +1 -0
- package/dist/evaluation/evaluate.d.ts +3 -0
- package/dist/evaluation/evaluate.d.ts.map +1 -0
- package/dist/evaluation/evaluate.js +153 -0
- package/dist/evaluation/evaluate.js.map +1 -0
- package/dist/evaluation/explainPolicyStack.d.ts +13 -0
- package/dist/evaluation/explainPolicyStack.d.ts.map +1 -0
- package/dist/evaluation/explainPolicyStack.js +93 -0
- package/dist/evaluation/explainPolicyStack.js.map +1 -0
- package/dist/evaluation/matchers.d.ts +4 -0
- package/dist/evaluation/matchers.d.ts.map +1 -0
- package/dist/evaluation/matchers.js +169 -0
- package/dist/evaluation/matchers.js.map +1 -0
- package/dist/evaluation/scoreInput.d.ts +10 -0
- package/dist/evaluation/scoreInput.d.ts.map +1 -0
- package/dist/evaluation/scoreInput.js +71 -0
- package/dist/evaluation/scoreInput.js.map +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/policy/loadPolicyPack.d.ts +16 -0
- package/dist/policy/loadPolicyPack.d.ts.map +1 -0
- package/dist/policy/loadPolicyPack.js +17 -0
- package/dist/policy/loadPolicyPack.js.map +1 -0
- package/dist/policy/mergeOverlays.d.ts +8 -0
- package/dist/policy/mergeOverlays.d.ts.map +1 -0
- package/dist/policy/mergeOverlays.js +56 -0
- package/dist/policy/mergeOverlays.js.map +1 -0
- package/dist/policy/resolvePolicyStack.d.ts +16 -0
- package/dist/policy/resolvePolicyStack.d.ts.map +1 -0
- package/dist/policy/resolvePolicyStack.js +19 -0
- package/dist/policy/resolvePolicyStack.js.map +1 -0
- package/dist/policy/validatePolicyPack.d.ts +20 -0
- package/dist/policy/validatePolicyPack.d.ts.map +1 -0
- package/dist/policy/validatePolicyPack.js +351 -0
- package/dist/policy/validatePolicyPack.js.map +1 -0
- package/dist/reporters/explainMarkdownReporter.d.ts +3 -0
- package/dist/reporters/explainMarkdownReporter.d.ts.map +1 -0
- package/dist/reporters/explainMarkdownReporter.js +100 -0
- package/dist/reporters/explainMarkdownReporter.js.map +1 -0
- package/dist/reporters/explainTextReporter.d.ts +3 -0
- package/dist/reporters/explainTextReporter.d.ts.map +1 -0
- package/dist/reporters/explainTextReporter.js +51 -0
- package/dist/reporters/explainTextReporter.js.map +1 -0
- package/dist/reporters/formatHelpers.d.ts +10 -0
- package/dist/reporters/formatHelpers.d.ts.map +1 -0
- package/dist/reporters/formatHelpers.js +28 -0
- package/dist/reporters/formatHelpers.js.map +1 -0
- package/dist/reporters/jsonReporter.d.ts +3 -0
- package/dist/reporters/jsonReporter.d.ts.map +1 -0
- package/dist/reporters/jsonReporter.js +24 -0
- package/dist/reporters/jsonReporter.js.map +1 -0
- package/dist/reporters/markdownReporter.d.ts +3 -0
- package/dist/reporters/markdownReporter.d.ts.map +1 -0
- package/dist/reporters/markdownReporter.js +117 -0
- package/dist/reporters/markdownReporter.js.map +1 -0
- package/dist/reporters/textReporter.d.ts +3 -0
- package/dist/reporters/textReporter.d.ts.map +1 -0
- package/dist/reporters/textReporter.js +57 -0
- package/dist/reporters/textReporter.js.map +1 -0
- package/dist/types/evaluation.d.ts +117 -0
- package/dist/types/evaluation.d.ts.map +1 -0
- package/dist/types/evaluation.js +10 -0
- package/dist/types/evaluation.js.map +1 -0
- package/dist/types/explain.d.ts +45 -0
- package/dist/types/explain.d.ts.map +1 -0
- package/dist/types/explain.js +2 -0
- package/dist/types/explain.js.map +1 -0
- package/dist/types/overlay.d.ts +42 -0
- package/dist/types/overlay.d.ts.map +1 -0
- package/dist/types/overlay.js +2 -0
- package/dist/types/overlay.js.map +1 -0
- package/dist/types/policy.d.ts +51 -0
- package/dist/types/policy.d.ts.map +1 -0
- package/dist/types/policy.js +16 -0
- package/dist/types/policy.js.map +1 -0
- package/dist/utils/readInput.d.ts +9 -0
- package/dist/utils/readInput.d.ts.map +1 -0
- package/dist/utils/readInput.js +65 -0
- package/dist/utils/readInput.js.map +1 -0
- package/docs/ARCHITECTURE.md +223 -0
- package/docs/QUALITY_WORKFLOW.md +212 -0
- package/docs/canonical-principle-inventory.md +53 -0
- package/docs/releases/0.1.0-beta.1.md +114 -0
- package/examples/chatbot-output.txt +1 -0
- package/examples/ci-fail-on-example.md +22 -0
- package/examples/company-overlay.yaml +15 -0
- package/examples/experimental-family-safe-usage.md +20 -0
- package/examples/json-output-example.json +35 -0
- package/examples/prompt-input.txt +1 -0
- package/examples/simple-use-case.txt +1 -0
- package/package.json +63 -0
- package/policy/experimental/family-safe.yaml +12 -0
- package/policy/experimental/healthcare.yaml +12 -0
- package/policy/matchers.yaml +200 -0
- package/policy/overlays/enterprise-default.yaml +15 -0
- package/policy/overlays/exceptions-example.yaml +13 -0
- package/policy/western-social-contract.md +35 -0
- package/policy/western-social-contract.yaml +346 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this repository should be recorded here.
|
|
4
|
+
|
|
5
|
+
This project uses task-scoped entries while the beta is being assembled. Each entry should name the task ID, summarize user-visible behavior, and call out any unresolved decisions or compatibility notes.
|
|
6
|
+
|
|
7
|
+
## Unreleased
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- T15: Added README documentation, usage examples, and changelog conventions.
|
|
12
|
+
- T16: Added package-content verification to CI, tightened the package allowlist,
|
|
13
|
+
and documented release-readiness checks.
|
|
14
|
+
- T17: Added beta release notes, publication blockers, and tag/publish plan for
|
|
15
|
+
`0.1.0-beta.1`.
|
|
16
|
+
- T14: Added `wsc explain` for policy-stack explanations in text and markdown.
|
|
17
|
+
- T13: Added `wsc init` for local starter config and company overlay files.
|
|
18
|
+
- T12: Added `wsc eval` for local deterministic evaluation with text, JSON, and markdown reports.
|
|
19
|
+
- T11: Added text, JSON, and markdown reporters for evaluation results.
|
|
20
|
+
- T10: Added deterministic evaluator result contract, scoring metadata, exceptions, and exit-threshold handling.
|
|
21
|
+
- T09: Added deterministic lexical matcher.
|
|
22
|
+
- T08: Added safe local input reading and runtime option normalization.
|
|
23
|
+
- T07: Added overlay validation and commutative merge behavior.
|
|
24
|
+
- T06: Added policy pack loading and validation.
|
|
25
|
+
|
|
26
|
+
### Notes
|
|
27
|
+
|
|
28
|
+
- The CLI remains local-only: no network calls, telemetry, remote policy fetch, hosted backend, database, or model-provider integration.
|
|
29
|
+
- `wsc validate` is still planned and not implemented in the current CLI.
|
|
30
|
+
- Policy/content licensing remains provisional during beta; source code is MIT
|
|
31
|
+
licensed.
|
|
32
|
+
- Beta release authority and package publishing authority are assigned to the
|
|
33
|
+
human owner during beta.
|
|
34
|
+
- The human owner accepted the canonical inventory for beta and approved
|
|
35
|
+
`0.1.0-beta.1` publication; release notes are recorded in
|
|
36
|
+
[docs/releases/0.1.0-beta.1.md](docs/releases/0.1.0-beta.1.md).
|
|
37
|
+
|
|
38
|
+
## Changelog Conventions
|
|
39
|
+
|
|
40
|
+
- Use task IDs in entries when changes are task-scoped.
|
|
41
|
+
- Prefer `Added`, `Changed`, `Fixed`, `Removed`, and `Security` headings.
|
|
42
|
+
- Mention command behavior, result-contract changes, fixture changes, and compatibility risks.
|
|
43
|
+
- Do not describe planned features as shipped behavior.
|
|
44
|
+
- Do not include certification, legal compliance, or safety approval language.
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thank you for contributing to the Western Social Contract CLI.
|
|
4
|
+
This repository is currently in planning mode, and contributions should follow
|
|
5
|
+
a strict task-based process.
|
|
6
|
+
|
|
7
|
+
## How to contribute
|
|
8
|
+
|
|
9
|
+
1. Review `AGENTS.md`, `PLANS.md`, `DECISIONS_NEEDED.md`, and the relevant task file.
|
|
10
|
+
2. Create a dedicated branch named `agent/<short-task-name>`.
|
|
11
|
+
3. Keep changes limited to the assigned task.
|
|
12
|
+
4. Open a pull request with a clear summary, files changed, and any blockers.
|
|
13
|
+
|
|
14
|
+
## Task-based workflow
|
|
15
|
+
|
|
16
|
+
- Do not implement product code until the relevant planning and spec tasks are complete.
|
|
17
|
+
- Do not create TypeScript source files unless a task explicitly authorizes them.
|
|
18
|
+
- Preserve local-first, no telemetry, no network calls, library-first / CLI-second,
|
|
19
|
+
deterministic lexical evaluation, and review-aid-only boundaries.
|
|
20
|
+
|
|
21
|
+
## Policy and governance changes
|
|
22
|
+
|
|
23
|
+
Policy-sensitive changes require explicit approval and should never be guessed.
|
|
24
|
+
If a decision is unresolved, add it to `DECISIONS_NEEDED.md` and continue only
|
|
25
|
+
with non-blocked planning or documentation work.
|
|
26
|
+
|
|
27
|
+
Do not make the following changes without approval:
|
|
28
|
+
|
|
29
|
+
- final canonical principles or principle IDs
|
|
30
|
+
- policy/content license decisions
|
|
31
|
+
- maintainer group membership
|
|
32
|
+
- official overlay status or promotion rules
|
|
33
|
+
- domain-review requirements
|
|
34
|
+
- compatibility claim language
|
|
35
|
+
- package ownership or publishing authority
|
|
36
|
+
- certification or legal claims
|
|
37
|
+
|
|
38
|
+
## Branching and commits
|
|
39
|
+
|
|
40
|
+
- Branches must be task-scoped.
|
|
41
|
+
- Commits should use the format `<task-id>: <short imperative summary>`.
|
|
42
|
+
- Keep pull requests small and focused.
|
|
43
|
+
|
|
44
|
+
## Changelog entries
|
|
45
|
+
|
|
46
|
+
- Add or update `CHANGELOG.md` for user-visible behavior, command changes,
|
|
47
|
+
result-contract changes, examples, release notes, and security-relevant changes.
|
|
48
|
+
- Use task IDs in unreleased entries while beta tasks are being assembled.
|
|
49
|
+
- Do not describe planned commands as current behavior.
|
|
50
|
+
- Do not use changelog language that implies certification, legal compliance,
|
|
51
|
+
safety approval, or regulatory endorsement.
|
|
52
|
+
|
|
53
|
+
## Tests and quality
|
|
54
|
+
|
|
55
|
+
- When implementation exists, add tests for any new behavior.
|
|
56
|
+
- Reviewers should verify that changes preserve the project’s policy and security guardrails.
|
|
57
|
+
- Before marking a task complete, run the standard quality steps when available.
|
|
58
|
+
- Documentation-only changes should still run formatting and any relevant
|
|
59
|
+
example validation commands.
|
|
60
|
+
|
|
61
|
+
## Reporting issues
|
|
62
|
+
|
|
63
|
+
If you discover a security or governance concern, report it through the
|
|
64
|
+
git repository issue tracker and note it in the relevant task.
|
package/GOVERNANCE.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Governance
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
This document describes the governance principles and review process for the
|
|
6
|
+
Western Social Contract CLI repository.
|
|
7
|
+
|
|
8
|
+
## Governance principles
|
|
9
|
+
|
|
10
|
+
The project is a policy pack and reusable library first, CLI second. It is
|
|
11
|
+
maintained as a local review aid with a strict no-certification and
|
|
12
|
+
no-network posture.
|
|
13
|
+
|
|
14
|
+
## Maintainers
|
|
15
|
+
|
|
16
|
+
The initial maintainer group is not yet finalized.
|
|
17
|
+
No individual maintainer names are listed here until the human owner or
|
|
18
|
+
approved governance process confirms them.
|
|
19
|
+
|
|
20
|
+
### Decision authority
|
|
21
|
+
|
|
22
|
+
- The human owner is the product and policy authority.
|
|
23
|
+
- During the beta period, the human owner is the sole beta-release approver.
|
|
24
|
+
Every public beta release requires explicit human-owner approval.
|
|
25
|
+
- Maintainers are responsible for reviewing and approving changes once
|
|
26
|
+
officially appointed.
|
|
27
|
+
- Changes to canonical policy, licensing, governance, or release decisions
|
|
28
|
+
require explicit approval before merging.
|
|
29
|
+
|
|
30
|
+
## Governance process
|
|
31
|
+
|
|
32
|
+
1. Use task files to scope work.
|
|
33
|
+
2. Create a dedicated branch for each task.
|
|
34
|
+
3. Keep commits small and focused.
|
|
35
|
+
4. Record unresolved policy or governance decisions in `DECISIONS_NEEDED.md`.
|
|
36
|
+
5. Do not implement policy or governance changes without human owner approval.
|
|
37
|
+
|
|
38
|
+
## Policy-sensitive changes
|
|
39
|
+
|
|
40
|
+
The following changes require explicit escalation and approval:
|
|
41
|
+
|
|
42
|
+
- canonical principle inventory and IDs
|
|
43
|
+
- policy content license
|
|
44
|
+
- initial maintainer group membership
|
|
45
|
+
- official vs. experimental overlay promotion rules
|
|
46
|
+
- domain-review requirements for sensitive areas
|
|
47
|
+
- compatibility claim language
|
|
48
|
+
- package ownership and npm publishing authority
|
|
49
|
+
- any certification or legal claim
|
|
50
|
+
- any release or publication decision
|
|
51
|
+
|
|
52
|
+
## Contribution review
|
|
53
|
+
|
|
54
|
+
Policy-sensitive pull requests should include:
|
|
55
|
+
|
|
56
|
+
- a clear task scope,
|
|
57
|
+
- relevant decision notes from `DECISIONS_NEEDED.md`,
|
|
58
|
+
- documentation of unresolved blockers,
|
|
59
|
+
- a human owner or maintainer signoff when required.
|
|
60
|
+
|
|
61
|
+
## Release readiness
|
|
62
|
+
|
|
63
|
+
Public beta release requires documented review of all legal, governance,
|
|
64
|
+
security, and licensing requirements.
|
|
65
|
+
|
|
66
|
+
Until the maintainer group is finalized, the human owner is the sole
|
|
67
|
+
beta-release approver. Each beta release must be approved by the human owner.
|
|
68
|
+
This beta-release approval requirement is per release and does not create
|
|
69
|
+
standing approval for future beta versions.
|
|
70
|
+
|
|
71
|
+
During the beta period, the npm package is owned by the human owner and only
|
|
72
|
+
the human owner may publish `@western-social-contract/wsc`.
|
|
73
|
+
|
|
74
|
+
## Updates
|
|
75
|
+
|
|
76
|
+
This governance document may be updated when the maintainer group and policy
|
|
77
|
+
license are finalized. Until then, use it as a provisional guardrail.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Western Social Contract CLI contributors
|
|
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.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Policy Content License
|
|
2
|
+
|
|
3
|
+
This repository contains two distinct categories of material:
|
|
4
|
+
|
|
5
|
+
- Source code, tooling, tests, and package metadata.
|
|
6
|
+
- Policy content and interpretive materials.
|
|
7
|
+
|
|
8
|
+
## Source code license
|
|
9
|
+
|
|
10
|
+
The source code in this repository is licensed under the MIT License.
|
|
11
|
+
See `LICENSE` for full terms.
|
|
12
|
+
|
|
13
|
+
## Policy content license status
|
|
14
|
+
|
|
15
|
+
Policy content is provided under provisional beta terms for evaluation only.
|
|
16
|
+
Final content licensing will be resolved before a stable public release.
|
|
17
|
+
|
|
18
|
+
Policy content and interpretive materials may not be redistributed,
|
|
19
|
+
republished, sold, or represented as an official Catholic, Church, or
|
|
20
|
+
institutional policy product.
|
|
21
|
+
|
|
22
|
+
This document is not a final license grant for policy content. Do not use the
|
|
23
|
+
policy pack, matcher phrases, overlays, examples, fixtures, canonical
|
|
24
|
+
references, or governance text as a basis for compatibility claims,
|
|
25
|
+
certification claims, or commercial re-use.
|
|
26
|
+
|
|
27
|
+
## Policy content scope
|
|
28
|
+
|
|
29
|
+
For beta licensing purposes, policy content and interpretive materials include:
|
|
30
|
+
|
|
31
|
+
- policy pack Markdown and YAML;
|
|
32
|
+
- principle mappings;
|
|
33
|
+
- matcher phrases and matcher metadata;
|
|
34
|
+
- canonical references;
|
|
35
|
+
- official and experimental overlays;
|
|
36
|
+
- exception examples;
|
|
37
|
+
- examples and test fixtures;
|
|
38
|
+
- reporter expected-output fixtures when they encode policy behavior;
|
|
39
|
+
- governance, compatibility, and policy interpretation materials.
|
|
40
|
+
|
|
41
|
+
## What this means
|
|
42
|
+
|
|
43
|
+
- Policy content should be treated as provisional beta material for evaluation
|
|
44
|
+
only until the license is finalized.
|
|
45
|
+
- Any third party wishing to reuse, redistribute, republish, sell, or build
|
|
46
|
+
official claims from policy content should wait until this document is updated
|
|
47
|
+
with an explicit final content license.
|
|
48
|
+
- Do not assume MIT applies to policy content unless this document is updated
|
|
49
|
+
to say so.
|
|
50
|
+
|
|
51
|
+
## Next step
|
|
52
|
+
|
|
53
|
+
A definitive stable-release policy/content license decision must be recorded in
|
|
54
|
+
`DECISIONS_NEEDED.md` and reflected here before a stable public release.
|