@a-company/paradigm 6.2.1 → 6.3.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/dist/chunk-32XL3FIQ.js +2 -0
- package/dist/{chunk-MA75GS7J.js → chunk-SRWROALW.js} +68 -37
- package/dist/{enforcement-46XWPNSA.js → enforcement-FXO6IYYE.js} +1 -1
- package/dist/{enforcement-BEGPQIUN.js → enforcement-VRE3WZOI.js} +1 -1
- package/dist/index.js +2 -2
- package/dist/mcp.js +1 -1
- package/dist/rune-promotion-3JQ5LMWK.js +3 -0
- package/dist/{shift-3ATE2ONQ.js → shift-6Y3KQP62.js} +2 -2
- package/dist/{tools-BPEKRC2U.js → tools-2XPMZZBT.js} +1 -1
- package/dist/university-content/notes/N-para-001-shift-setup.md +2 -2
- package/dist/university-content/notes/N-para-301-enforcement-levels.md +18 -11
- package/dist/university-content/notes/N-para-301-paradigm-shift.md +2 -2
- package/dist/university-content/notes/N-para-301-rune-promotion.md +69 -0
- package/dist/university-content/notes/N-para-501-hook-enforcement.md +3 -1
- package/dist/university-content/notes/N-para-701-orchestration-enforcement.md +10 -1
- package/dist/university-content/quizzes/Q-para-301-enforcement-levels.yaml +21 -1
- package/dist/university-content/quizzes/Q-para-701-orchestration-enforcement.yaml +11 -1
- package/package.json +1 -1
- package/dist/chunk-KYA4TP26.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import*as i from'fs';import*as m from'path';import*as f from'js-yaml';var s=["purpose-coverage","purpose-exists","portal-gates","aspect-anchors","purpose-freshness","aspect-advisory","lore-required","habits-blocking","purpose-required-patterns","drift-detection","portal-compliance","graduation-tracking","orchestration-required"];var O={"purpose-coverage":"block","purpose-exists":"block","portal-gates":"block","aspect-anchors":"block","purpose-freshness":"warn","aspect-advisory":"warn","lore-required":"block","habits-blocking":"block","purpose-required-patterns":"block","drift-detection":"block","portal-compliance":"block","graduation-tracking":"warn","orchestration-required":"block"},A={"purpose-coverage":"block","purpose-exists":"warn","portal-gates":"warn","aspect-anchors":"warn","purpose-freshness":"warn","aspect-advisory":"off","lore-required":"warn","habits-blocking":"block","purpose-required-patterns":"warn","drift-detection":"warn","portal-compliance":"warn","graduation-tracking":"off","orchestration-required":"warn"},P={"purpose-coverage":"warn","purpose-exists":"off","portal-gates":"off","aspect-anchors":"off","purpose-freshness":"off","aspect-advisory":"off","lore-required":"off","habits-blocking":"warn","purpose-required-patterns":"off","drift-detection":"off","portal-compliance":"off","graduation-tracking":"off","orchestration-required":"off"},V={"purpose-coverage":"off","purpose-exists":"off","portal-gates":"off","aspect-anchors":"off","purpose-freshness":"off","aspect-advisory":"off","lore-required":"off","habits-blocking":"off","purpose-required-patterns":"off","drift-detection":"off","portal-compliance":"off","graduation-tracking":"off","orchestration-required":"off"},x={strict:O,balanced:A,minimal:P,none:V};function l(e){return {...x[e]}}function T(e,r){return x[e][r]}function b(e){return s.includes(e)}function E(e){return e==="block"||e==="warn"||e==="off"}function S(e){return e==="strict"||e==="balanced"||e==="minimal"||e==="none"}var L="none",j={threshold:3,detection:"git-diff",exempt:["*.md","*.yaml","*.yml",".purpose"]};function _(e){let r=m.join(e,".paradigm","config.yaml");if(!i.existsSync(r))return h();try{let o=i.readFileSync(r,"utf8"),t=f.load(o);if(!t||typeof t!="object")return h();let n=t.enforcement;if(!n||typeof n!="object")return h();let y=n.level,q=typeof y=="string"&&S(y)?y:L,v=n.checks,w={};if(v&&typeof v=="object")for(let[d,C]of Object.entries(v))b(d)&&typeof C=="string"&&E(C)&&(w[d]=C);let c=n.orchestration,p={...j};return c&&typeof c=="object"&&(typeof c.threshold=="number"&&(p.threshold=c.threshold),typeof c.detection=="string"&&(p.detection=c.detection),Array.isArray(c.exempt)&&(p.exempt=c.exempt.filter(d=>typeof d=="string"))),{level:q,checks:w,orchestration:p}}catch{return h()}}function h(){return {level:L,checks:{},orchestration:{...j}}}function D(e,r){let o=e.checks[r];return o!==void 0?o:l(e.level)[r]}function F(e){let r=l(e.level);for(let o of s){let t=e.checks[o];t!==void 0&&(r[o]=t);}return r}function k(e){let r=m.join(e,".paradigm","config.yaml");if(!i.existsSync(r))throw new Error(`Config not found: ${r}`);let o=i.readFileSync(r,"utf8"),t=f.load(o);if(!t||typeof t!="object")throw new Error("Config is not a valid YAML object");return [t,o]}function a(e,r){let o=m.join(e,".paradigm","config.yaml"),t=f.dump(r,{lineWidth:-1,noRefs:true,sortKeys:false,quotingType:"'"});i.writeFileSync(o,t,"utf8");}function g(e){return (!e.enforcement||typeof e.enforcement!="object")&&(e.enforcement={level:"none",checks:{}}),e.enforcement}function H(e,r){let[o]=k(e),t=g(o);t.level=r,a(e,o);}function K(e,r,o){let[t]=k(e),n=g(t);(!n.checks||typeof n.checks!="object")&&(n.checks={}),n.checks[r]=o,a(e,t);}function N(e,r){let[o]=k(e),t=g(o);t.checks&&typeof t.checks=="object"&&delete t.checks[r],a(e,o);}function M(e){let[r]=k(e),o=g(r);o.checks={},a(e,r);}function U(e){let r=m.join(e,".paradigm","config.yaml");if(!i.existsSync(r))return false;try{let o=i.readFileSync(r,"utf8"),t=f.load(o);return !t||typeof t!="object"||t.enforcement?!1:(t.enforcement={level:"none",checks:{},orchestration:{threshold:3,detection:"git-diff",exempt:["*.md","*.yaml","*.yml",".purpose"]}},a(e,t),!0)}catch{return false}}export{s as a,l as b,T as c,b as d,E as e,S as f,_ as g,D as h,F as i,H as j,K as k,N as l,M as m,U as n};
|