@panaversity/ksor 0.0.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 (4) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +1323 -0
  3. package/bin/ksor.js +22 -0
  4. package/package.json +39 -0
package/README.md ADDED
@@ -0,0 +1,1323 @@
1
+ # KSoR
2
+
3
+ **The Knowledge System of Record for humans and AI agents.**
4
+
5
+ KSoR turns governed knowledge into a single authoritative source that both people and AI agents can use.
6
+
7
+ Write and govern your knowledge once. KSoR publishes it through two synchronized surfaces:
8
+
9
+ * a **human-readable knowledge site**, and
10
+ * an **agent-readable interface** through MCP.
11
+
12
+ Both come from the same source, so humans and agents operate from the same institutional truth.
13
+
14
+ ---
15
+
16
+ > ### ⚠️ `0.0.0` is a name reservation, not a release.
17
+ >
18
+ > **Nothing described below is implemented in this package yet.** The commands in this README
19
+ > describe the design being built; running them today prints a status notice and exits 2. This
20
+ > version exists only to hold the name and state the intent in public.
21
+ >
22
+ > Do not install it as a dependency, and do not infer any capability from this page. The first
23
+ > working release will say so in its changelog and its version number.
24
+
25
+ ---
26
+
27
+ ```bash
28
+ npm install -g @panaversity/ksor
29
+
30
+ ksor init my-knowledge-sor
31
+ cd my-knowledge-sor
32
+
33
+ ksor dev
34
+ ```
35
+
36
+ Or run it without installing globally:
37
+
38
+ ```bash
39
+ npx @panaversity/ksor init my-knowledge-sor
40
+ ```
41
+
42
+ ---
43
+
44
+ ## Why KSoR Exists
45
+
46
+ Enterprises have relied on **Systems of Record** for decades.
47
+
48
+ An accounting system is authoritative for financial transactions.
49
+ A CRM is authoritative for customer records.
50
+ An HRIS is authoritative for employee records.
51
+
52
+ When a spreadsheet disagrees with the accounting ledger, the ledger wins.
53
+
54
+ These systems answer an important question:
55
+
56
+ > **What is the authoritative operational state of the business?**
57
+
58
+ AI agents introduce a second problem.
59
+
60
+ Agents also need to know:
61
+
62
+ * What policies apply?
63
+ * What rules govern this decision?
64
+ * Which procedure should be followed?
65
+ * What does this organization mean by this term?
66
+ * Which thresholds are approved?
67
+ * Which methodology should be used?
68
+ * What exceptions exist?
69
+ * What sources support this answer?
70
+ * What should the agent do when the answer is not known?
71
+
72
+ That knowledge is usually fragmented across:
73
+
74
+ * documents,
75
+ * wikis,
76
+ * PDFs,
77
+ * slide decks,
78
+ * websites,
79
+ * policies,
80
+ * manuals,
81
+ * repositories,
82
+ * employee experience,
83
+ * prompts,
84
+ * RAG indexes,
85
+ * and model context.
86
+
87
+ There is often no authoritative answer to:
88
+
89
+ > **Which knowledge should the AI trust?**
90
+
91
+ KSoR exists to solve that problem.
92
+
93
+ ---
94
+
95
+ # What Is a Knowledge System of Record?
96
+
97
+ A **Knowledge System of Record — KSoR — is the authoritative, governed source of knowledge that humans and AI agents use to understand, decide, and act.**
98
+
99
+ It can contain:
100
+
101
+ * domain knowledge,
102
+ * policies,
103
+ * procedures,
104
+ * rules,
105
+ * standards,
106
+ * methods,
107
+ * definitions,
108
+ * decision criteria,
109
+ * thresholds,
110
+ * specifications,
111
+ * controls,
112
+ * examples,
113
+ * exceptions,
114
+ * workflows,
115
+ * provenance,
116
+ * and supporting source material.
117
+
118
+ The goal is not merely to make information searchable.
119
+
120
+ The goal is to establish:
121
+
122
+ > **This is the knowledge we operate from.**
123
+
124
+ ---
125
+
126
+ ## Traditional SoR vs. KSoR
127
+
128
+ A traditional System of Record and a Knowledge System of Record solve different problems.
129
+
130
+ | | Traditional System of Record | Knowledge System of Record |
131
+ | ---------------- | ------------------------------------------------------- | ------------------------------------------------------------ |
132
+ | Primary purpose | Record operational state | Record institutional knowledge |
133
+ | Typical contents | Transactions, balances, customers, employees, inventory | Rules, policies, methods, procedures, standards, definitions |
134
+ | Typical systems | ERP, CRM, HRIS, accounting system | KSoR |
135
+ | Core question | **What is true right now?** | **What do we know and how should we operate?** |
136
+ | Optimized for | Applications and business processes | Humans and AI agents |
137
+ | Authority | Operational data | Governed knowledge |
138
+ | Change mechanism | Transactions | Review, governance, versioning |
139
+ | AI role | Tool consumer | First-class knowledge consumer |
140
+
141
+ AI-native organizations need both.
142
+
143
+ ```text
144
+ AI Agent
145
+
146
+ ┌──────────────┴──────────────┐
147
+ │ │
148
+ ▼ ▼
149
+ Knowledge System Traditional
150
+ of Record Systems
151
+ (KSoR) of Record
152
+ │ │
153
+ "How should I "What is true
154
+ operate?" right now?"
155
+ │ │
156
+ Rules · Policies Customers · Orders
157
+ Methods · Standards Balances · Inventory
158
+ Procedures · Specs Transactions · State
159
+ ```
160
+
161
+ A capable enterprise agent may read policy from a KSoR, retrieve current account data from a CRM, apply the governed rule, execute an action, and record the resulting state back into the traditional SoR.
162
+
163
+ ---
164
+
165
+ # KSoR Is More Than a Knowledge Base
166
+
167
+ A knowledge base stores information.
168
+
169
+ A KSoR establishes **authority**.
170
+
171
+ That distinction matters.
172
+
173
+ A conventional knowledge base may optimize for:
174
+
175
+ * storage,
176
+ * search,
177
+ * retrieval,
178
+ * similarity,
179
+ * document discovery,
180
+ * or question answering.
181
+
182
+ A Knowledge System of Record must additionally answer:
183
+
184
+ * Who owns this knowledge?
185
+ * Where did it come from?
186
+ * Which version is authoritative?
187
+ * Has it been reviewed?
188
+ * What is its scope?
189
+ * What happens when sources conflict?
190
+ * Can an AI distinguish evidence from inference?
191
+ * Can an answer be traced back to its source?
192
+ * What should happen when the KSoR does not contain the answer?
193
+
194
+ KSoR therefore treats **governance, provenance, citations, versioning, and abstention** as architectural concerns rather than optional features.
195
+
196
+ ---
197
+
198
+ # One Source. Two Surfaces.
199
+
200
+ KSoR follows a simple principle:
201
+
202
+ > **Humans and AI agents should not operate from different versions of organizational knowledge.**
203
+
204
+ Your governed source produces two surfaces.
205
+
206
+ ```text
207
+ Governed Knowledge
208
+ Markdown
209
+
210
+
211
+ ┌─────┴─────┐
212
+ │ KSoR │
213
+ └─────┬─────┘
214
+
215
+ ┌──────────────┴──────────────┐
216
+ │ │
217
+ ▼ ▼
218
+ Human Surface Agent Surface
219
+ Knowledge Site MCP
220
+ │ │
221
+ Search / Browse Search / Retrieve
222
+ Read / Learn Cite / Reason
223
+ Review / Share Abstain / Act
224
+ │ │
225
+ └──────────────┬──────────────┘
226
+
227
+ Same Truth
228
+ ```
229
+
230
+ The website is not maintained separately from the agent corpus.
231
+
232
+ The agent corpus is not an invisible copy of the website.
233
+
234
+ They are projections of the **same governed source**.
235
+
236
+ ---
237
+
238
+ # Core Principles
239
+
240
+ ## 1. One Authoritative Source
241
+
242
+ Knowledge should have one canonical location.
243
+
244
+ Different consumers may receive different representations, but those representations must derive from the same source.
245
+
246
+ ---
247
+
248
+ ## 2. Humans and Agents Are Both First-Class Consumers
249
+
250
+ Knowledge architecture can no longer assume that only people will read documentation.
251
+
252
+ Every important piece of institutional knowledge should be usable by:
253
+
254
+ * humans,
255
+ * AI assistants,
256
+ * autonomous agents,
257
+ * agent workflows,
258
+ * and applications.
259
+
260
+ ---
261
+
262
+ ## 3. Provenance Matters
263
+
264
+ An answer is much more useful when you can determine:
265
+
266
+ * what document it came from,
267
+ * which version was used,
268
+ * when it was built,
269
+ * and what source supported the claim.
270
+
271
+ KSoR preserves the chain from source knowledge to generated surface.
272
+
273
+ ---
274
+
275
+ ## 4. Citation Before Confidence
276
+
277
+ An AI sounding confident is not evidence.
278
+
279
+ KSoR is designed around traceable answers.
280
+
281
+ The agent should be able to identify the knowledge that supports its answer rather than relying on model memory.
282
+
283
+ ---
284
+
285
+ ## 5. Abstention Is a Feature
286
+
287
+ A governed AI system needs to know the boundary of its knowledge.
288
+
289
+ When the KSoR does not contain enough information to support an answer, the correct behavior is:
290
+
291
+ > **The Knowledge System of Record does not contain enough information to answer this.**
292
+
293
+ —not improvisation.
294
+
295
+ ---
296
+
297
+ ## 6. Governance Before Retrieval
298
+
299
+ Retrieval technology is not the hard part.
300
+
301
+ A perfectly optimized search system over ungoverned knowledge simply retrieves ungoverned knowledge faster.
302
+
303
+ The more important questions are:
304
+
305
+ * What belongs in the KSoR?
306
+ * Who can change it?
307
+ * What constitutes an authoritative source?
308
+ * How are conflicts resolved?
309
+ * How are changes reviewed?
310
+ * What is obsolete?
311
+ * What requires human judgment?
312
+
313
+ KSoR treats those questions as fundamental.
314
+
315
+ ---
316
+
317
+ ## 7. Vendor Neutrality
318
+
319
+ Your institutional knowledge should not belong to an AI model vendor.
320
+
321
+ KSoR keeps the knowledge layer independent from the model layer.
322
+
323
+ The same governed knowledge should be usable from:
324
+
325
+ * ChatGPT,
326
+ * Claude,
327
+ * coding agents,
328
+ * agent frameworks,
329
+ * custom applications,
330
+ * Digital FTEs,
331
+ * and future AI runtimes.
332
+
333
+ Models can change.
334
+
335
+ Your institutional truth should remain yours.
336
+
337
+ ---
338
+
339
+ # What Can You Build with KSoR?
340
+
341
+ KSoR is intentionally not limited to a particular industry or type of knowledge.
342
+
343
+ ### Organizational KSoRs
344
+
345
+ Examples:
346
+
347
+ ```text
348
+ Agent Factory KSoR
349
+ Engineering KSoR
350
+ Product Management KSoR
351
+ Company Operations KSoR
352
+ Security KSoR
353
+ AI Governance KSoR
354
+ ```
355
+
356
+ ### Domain KSoRs
357
+
358
+ Examples:
359
+
360
+ ```text
361
+ Accounting KSoR
362
+ Government Contracting KSoR
363
+ Healthcare KSoR
364
+ Legal KSoR
365
+ Banking KSoR
366
+ Insurance KSoR
367
+ Supply Chain KSoR
368
+ Sales KSoR
369
+ ```
370
+
371
+ ### Product or Method KSoRs
372
+
373
+ Examples:
374
+
375
+ ```text
376
+ Design System KSoR
377
+ API Standards KSoR
378
+ Architecture KSoR
379
+ Implementation Method KSoR
380
+ Compliance Framework KSoR
381
+ Operating Model KSoR
382
+ ```
383
+
384
+ The SDK does not impose verticality.
385
+
386
+ A **Vertical KSoR** is simply one application of KSoR: an authoritative knowledge layer for a particular profession, industry, or domain.
387
+
388
+ ---
389
+
390
+ # Example
391
+
392
+ Imagine an Accounting KSoR containing:
393
+
394
+ ```text
395
+ knowledge/
396
+ ├── accounting-policies/
397
+ │ ├── revenue-recognition.md
398
+ │ ├── capitalization.md
399
+ │ └── bad-debt.md
400
+ ├── procedures/
401
+ │ ├── month-end-close.md
402
+ │ └── journal-entry-review.md
403
+ ├── controls/
404
+ │ ├── segregation-of-duties.md
405
+ │ └── approval-thresholds.md
406
+ ├── definitions/
407
+ │ └── glossary.md
408
+ └── examples/
409
+ └── revenue-recognition-examples.md
410
+ ```
411
+
412
+ An employee can browse those documents through the generated website.
413
+
414
+ An accounting agent can access the same governed knowledge through MCP.
415
+
416
+ If asked:
417
+
418
+ > Can this $42,000 software implementation cost be capitalized?
419
+
420
+ the agent should retrieve the organization's capitalization policy, apply the relevant criteria, cite the governing source, and distinguish between what the KSoR states and any reasoning required to apply it.
421
+
422
+ If the capitalization policy does not address the situation, the system should not invent a policy.
423
+
424
+ ---
425
+
426
+ # Quick Start
427
+
428
+ ## Requirements
429
+
430
+ Install a current Node.js LTS release with npm.
431
+
432
+ Check your installation:
433
+
434
+ ```bash
435
+ node --version
436
+ npm --version
437
+ ```
438
+
439
+ ---
440
+
441
+ ## Create a KSoR
442
+
443
+ ```bash
444
+ npx @panaversity/ksor init my-ksor
445
+ ```
446
+
447
+ Then:
448
+
449
+ ```bash
450
+ cd my-ksor
451
+ ```
452
+
453
+ The scaffold gives you a working KSoR project containing the knowledge source, site configuration, and agent instructions needed to work with it.
454
+
455
+ ---
456
+
457
+ ## Start Development
458
+
459
+ ```bash
460
+ npx @panaversity/ksor dev
461
+ ```
462
+
463
+ KSoR starts the local knowledge site and watches for changes while you work.
464
+
465
+ Edit the Markdown source and the human-readable surface updates from the same corpus that will ultimately serve agents.
466
+
467
+ ---
468
+
469
+ ## Build
470
+
471
+ ```bash
472
+ npx @panaversity/ksor build
473
+ ```
474
+
475
+ The build produces the deployable human surface and records information needed to identify what knowledge went into that build.
476
+
477
+ ---
478
+
479
+ ## Serve to AI Agents
480
+
481
+ ```bash
482
+ npx @panaversity/ksor serve
483
+ ```
484
+
485
+ The agent surface exposes the governed KSoR through MCP.
486
+
487
+ > **Project status:** the human website surface is currently the more mature part of the implementation. The MCP agent surface is being completed and should not be represented as production-ready until its implementation and acceptance tests are complete.
488
+
489
+ See [`docs/status.md`](docs/status.md) for current implementation status.
490
+
491
+ ---
492
+
493
+ # Project Structure
494
+
495
+ A KSoR project is intentionally understandable without proprietary tooling.
496
+
497
+ A typical project looks like:
498
+
499
+ ```text
500
+ my-ksor/
501
+
502
+ ├── knowledge/
503
+ │ ├── about.md
504
+ │ ├── principles.md
505
+ │ ├── policies/
506
+ │ │ ├── policy-a.md
507
+ │ │ └── policy-b.md
508
+ │ └── procedures/
509
+ │ └── procedure-a.md
510
+
511
+ ├── site/
512
+ │ └── docusaurus.config.ts
513
+
514
+ ├── .agents/
515
+ │ └── skills/
516
+
517
+ ├── instance.md
518
+
519
+ └── ...
520
+ ```
521
+
522
+ ## `knowledge/`
523
+
524
+ The authoritative knowledge corpus.
525
+
526
+ Documents are plain Markdown so they are:
527
+
528
+ * portable,
529
+ * diffable,
530
+ * reviewable,
531
+ * version-controlled,
532
+ * readable by humans,
533
+ * readable by AI coding agents,
534
+ * and independent of a proprietary database.
535
+
536
+ Subdirectories naturally organize the knowledge hierarchy.
537
+
538
+ ---
539
+
540
+ ## `instance.md`
541
+
542
+ Describes the identity and purpose of this KSoR instance.
543
+
544
+ For example:
545
+
546
+ ```markdown
547
+ # Accounting KSoR
548
+
549
+ This Knowledge System of Record contains the governed accounting
550
+ policies, procedures, definitions, controls, and decision criteria
551
+ used by Example Corporation.
552
+ ```
553
+
554
+ ---
555
+
556
+ ## `site/`
557
+
558
+ Configuration and customization for the human-readable surface.
559
+
560
+ The website layer is based on Docusaurus and remains ordinary source code rather than an opaque hosted service.
561
+
562
+ ---
563
+
564
+ ## `.agents/`
565
+
566
+ Instructions and reusable skills for AI coding agents working on the KSoR.
567
+
568
+ KSoR is designed to be **agent-first**.
569
+
570
+ Instead of forcing users to manually perform repetitive repository operations, the project can carry the instructions an AI coding agent needs for recurring tasks such as:
571
+
572
+ * adding knowledge,
573
+ * importing source material,
574
+ * validating structure,
575
+ * creating learning material,
576
+ * checking provenance,
577
+ * building,
578
+ * testing,
579
+ * and deployment.
580
+
581
+ ---
582
+
583
+ # Knowledge as Code
584
+
585
+ KSoR treats institutional knowledge increasingly like software teams treat source code.
586
+
587
+ That means knowledge can be:
588
+
589
+ ```text
590
+ authored
591
+
592
+ reviewed
593
+
594
+ version controlled
595
+
596
+ validated
597
+
598
+ tested
599
+
600
+ built
601
+
602
+ published
603
+
604
+ consumed by humans + agents
605
+ ```
606
+
607
+ Git becomes more than storage.
608
+
609
+ It provides useful primitives for knowledge governance:
610
+
611
+ * history,
612
+ * authorship,
613
+ * diffs,
614
+ * branches,
615
+ * pull requests,
616
+ * approvals,
617
+ * releases,
618
+ * rollback,
619
+ * and reproducible builds.
620
+
621
+ This makes an important shift possible:
622
+
623
+ > **Institutional knowledge becomes governed infrastructure.**
624
+
625
+ ---
626
+
627
+ # Build Provenance
628
+
629
+ Every production answer should be traceable to the knowledge that produced it.
630
+
631
+ KSoR builds record the exact corpus used to produce a release.
632
+
633
+ For example:
634
+
635
+ ```text
636
+ build.lock.json
637
+ ```
638
+
639
+ can capture information such as:
640
+
641
+ * included documents,
642
+ * document hashes,
643
+ * source commit,
644
+ * KSoR version,
645
+ * build version,
646
+ * and other reproducibility metadata.
647
+
648
+ This creates a chain:
649
+
650
+ ```text
651
+ AI Answer
652
+
653
+ Retrieved Passage
654
+
655
+ Knowledge Document
656
+
657
+ KSoR Build
658
+
659
+ Git Commit
660
+
661
+ Reviewed Source
662
+ ```
663
+
664
+ When someone asks:
665
+
666
+ > Why did the agent say that?
667
+
668
+ the architecture should make the answer discoverable.
669
+
670
+ ---
671
+
672
+ # The Agent Surface
673
+
674
+ KSoR uses the **Model Context Protocol (MCP)** as the interoperability boundary between governed knowledge and AI runtimes.
675
+
676
+ The goal is not to create another model-specific knowledge plugin.
677
+
678
+ Instead:
679
+
680
+ ```text
681
+ KSoR
682
+
683
+ MCP
684
+
685
+ ┌──────────────┼──────────────┐
686
+ │ │ │
687
+ ▼ ▼ ▼
688
+ ChatGPT Claude AI Agents
689
+
690
+ ┌──────────┼──────────┐
691
+ ▼ ▼ ▼
692
+ Custom Agent Digital
693
+ Apps Frameworks FTEs
694
+ ```
695
+
696
+ The knowledge stays independent.
697
+
698
+ The model or runtime becomes replaceable.
699
+
700
+ ---
701
+
702
+ # Retrieval Is Not the Product
703
+
704
+ KSoR may use search, indexing, embeddings, full-text retrieval, structured lookup, or other retrieval techniques.
705
+
706
+ Those mechanisms are implementation details.
707
+
708
+ KSoR is not fundamentally:
709
+
710
+ * a vector database,
711
+ * an embedding service,
712
+ * a RAG framework,
713
+ * a chatbot,
714
+ * a document search engine,
715
+ * or an MCP wrapper.
716
+
717
+ Those technologies can help deliver a KSoR.
718
+
719
+ They do not make something a KSoR.
720
+
721
+ The defining property is **authoritative governed knowledge**.
722
+
723
+ ---
724
+
725
+ # KSoR and RAG
726
+
727
+ RAG answers:
728
+
729
+ > How can relevant information be retrieved and placed into model context?
730
+
731
+ KSoR answers a broader question:
732
+
733
+ > What knowledge is authoritative enough that an organization permits humans and AI agents to operate from it?
734
+
735
+ A useful relationship is:
736
+
737
+ ```text
738
+ KSoR
739
+
740
+ ├── Governance
741
+ ├── Authority
742
+ ├── Provenance
743
+ ├── Versioning
744
+ ├── Review
745
+ ├── Scope
746
+ ├── Human Surface
747
+ ├── Agent Surface
748
+
749
+ └── Retrieval
750
+ ├── Search
751
+ ├── Structured lookup
752
+ ├── Embeddings
753
+ └── RAG
754
+ ```
755
+
756
+ **RAG can be part of a KSoR.**
757
+
758
+ A KSoR is not merely a RAG system.
759
+
760
+ ---
761
+
762
+ # KSoR and a CMS
763
+
764
+ A Content Management System asks:
765
+
766
+ > How do we create and publish content?
767
+
768
+ A KSoR asks:
769
+
770
+ > Which knowledge is authoritative, governed, traceable, and safe for humans and agents to rely upon?
771
+
772
+ Content is an input.
773
+
774
+ Institutional knowledge is the asset.
775
+
776
+ Authority is the differentiator.
777
+
778
+ ---
779
+
780
+ # Governance Model
781
+
782
+ A production KSoR should make knowledge ownership explicit.
783
+
784
+ A simple governance lifecycle might be:
785
+
786
+ ```text
787
+ Source
788
+
789
+
790
+ Draft
791
+
792
+
793
+ Review
794
+
795
+
796
+ Approved
797
+
798
+
799
+ Authoritative KSoR
800
+
801
+ ├──────────────► Human Surface
802
+
803
+ └──────────────► Agent Surface
804
+
805
+
806
+ Superseded / Retired
807
+ ```
808
+
809
+ Organizations can impose additional controls appropriate to their domain.
810
+
811
+ For regulated or high-risk knowledge, those controls may include:
812
+
813
+ * named knowledge owners,
814
+ * approval requirements,
815
+ * effective dates,
816
+ * source citations,
817
+ * mandatory review periods,
818
+ * change records,
819
+ * conflict resolution,
820
+ * separation of duties,
821
+ * and audit history.
822
+
823
+ KSoR provides the architectural foundation; governance policy remains the responsibility of the organization operating the KSoR.
824
+
825
+ ---
826
+
827
+ # Knowledge Boundaries
828
+
829
+ A trustworthy KSoR has a boundary.
830
+
831
+ The existence of an AI model does not remove that boundary.
832
+
833
+ Consider three questions:
834
+
835
+ ### In scope
836
+
837
+ > What approval threshold applies to purchases over $50,000?
838
+
839
+ If an approved purchasing policy answers the question, KSoR should provide the answer and source.
840
+
841
+ ### Requires reasoning
842
+
843
+ > Does this particular purchase require CFO approval?
844
+
845
+ The system may need to combine the governed rule with operational facts from another System of Record.
846
+
847
+ ### Outside the KSoR
848
+
849
+ > What approval policy will the company adopt next year?
850
+
851
+ If that information has not been approved and entered into the KSoR, the system should decline rather than speculate.
852
+
853
+ This distinction is essential for trustworthy agentic systems.
854
+
855
+ ---
856
+
857
+ # KSoR in an AI-Native Architecture
858
+
859
+ KSoR becomes especially useful when AI agents begin performing real organizational work.
860
+
861
+ ```text
862
+ Human / AI Worker
863
+
864
+
865
+ Agent
866
+
867
+ ┌────────────┴────────────┐
868
+ │ │
869
+ ▼ ▼
870
+ KSoR Operational SoRs
871
+ │ │
872
+ Knowledge Current State
873
+ │ │
874
+ Policies / Methods CRM / ERP / HRIS
875
+ Rules / Procedures Ledger / Database
876
+ Standards / Specs Orders / Inventory
877
+ │ │
878
+ └────────────┬────────────┘
879
+
880
+
881
+ Decision
882
+
883
+
884
+ Action
885
+ ```
886
+
887
+ The KSoR tells the agent **how the organization operates**.
888
+
889
+ Traditional Systems of Record tell the agent **what is currently true**.
890
+
891
+ Together they provide the context required for reliable enterprise action.
892
+
893
+ ---
894
+
895
+ # Agent-First Development
896
+
897
+ KSoR is designed for a development world in which coding agents perform much of the mechanical work.
898
+
899
+ A scaffolded KSoR can carry machine-readable instructions for tasks such as:
900
+
901
+ ```text
902
+ "Add this policy to the KSoR."
903
+
904
+ "Convert these source documents into governed Markdown."
905
+
906
+ "Check every page for missing provenance."
907
+
908
+ "Build a quiz from this section."
909
+
910
+ "Validate the KSoR."
911
+
912
+ "Run the test suite."
913
+
914
+ "Prepare this release."
915
+
916
+ "Deploy the human surface."
917
+ ```
918
+
919
+ The repository therefore becomes both:
920
+
921
+ 1. the knowledge artifact, and
922
+ 2. the working context for the agents that maintain it.
923
+
924
+ This allows subject-matter experts and software engineers to collaborate around the same governed source.
925
+
926
+ ---
927
+
928
+ # Human-Readable by Default
929
+
930
+ KSoR does not require organizational knowledge to disappear into a vector database.
931
+
932
+ The canonical source remains inspectable.
933
+
934
+ A person should be able to:
935
+
936
+ * open it,
937
+ * read it,
938
+ * diff it,
939
+ * review it,
940
+ * copy it,
941
+ * migrate it,
942
+ * and understand what the AI is being allowed to use.
943
+
944
+ This is an intentional architectural property.
945
+
946
+ ---
947
+
948
+ # Vendor-Free by Design
949
+
950
+ Your KSoR should survive changes in:
951
+
952
+ * LLM providers,
953
+ * embedding models,
954
+ * vector stores,
955
+ * agent frameworks,
956
+ * cloud providers,
957
+ * AI applications,
958
+ * and user interfaces.
959
+
960
+ The durable asset is the governed knowledge.
961
+
962
+ Everything around it should be replaceable.
963
+
964
+ ---
965
+
966
+ # Deployment
967
+
968
+ The human surface generated by:
969
+
970
+ ```bash
971
+ npx @panaversity/ksor build
972
+ ```
973
+
974
+ is deployable as a static site.
975
+
976
+ That makes it suitable for hosts such as:
977
+
978
+ * Vercel,
979
+ * Netlify,
980
+ * GitHub Pages,
981
+ * static object storage,
982
+ * internal web servers,
983
+ * nginx,
984
+ * and private infrastructure.
985
+
986
+ Before production deployment, configure the canonical site URL in the site configuration.
987
+
988
+ Detailed deployment guidance can live with each generated project so the instructions remain version-aligned with the KSoR release being used.
989
+
990
+ ---
991
+
992
+ # Working Behind the Firewall
993
+
994
+ A Knowledge System of Record frequently contains internal organizational knowledge.
995
+
996
+ KSoR therefore aims to support architectures in which:
997
+
998
+ * the knowledge remains under organizational control,
999
+ * the website can be self-hosted,
1000
+ * external runtime dependencies are minimized,
1001
+ * and the agent interface can be deployed inside the organization's security boundary.
1002
+
1003
+ A KSoR should not require an organization to publish its institutional knowledge to a third-party SaaS platform simply to make it usable by AI.
1004
+
1005
+ ---
1006
+
1007
+ # Example Applications
1008
+
1009
+ ## Agent Factory KSoR
1010
+
1011
+ An Agent Factory KSoR can define the shared methodology used across many AI-native implementations:
1012
+
1013
+ ```text
1014
+ Agent Factory KSoR
1015
+ ├── architecture
1016
+ ├── principles
1017
+ ├── FDE methodology
1018
+ ├── governance
1019
+ ├── agent patterns
1020
+ ├── evaluation standards
1021
+ ├── implementation methods
1022
+ └── operating model
1023
+ ```
1024
+
1025
+ It acts as a shared methodological System of Record.
1026
+
1027
+ ---
1028
+
1029
+ ## Vertical KSoR
1030
+
1031
+ A Vertical KSoR captures knowledge specific to a profession or industry.
1032
+
1033
+ For example:
1034
+
1035
+ ```text
1036
+ Government Contract Accounting KSoR
1037
+ ├── accounting rules
1038
+ ├── FAR requirements
1039
+ ├── contract structures
1040
+ ├── indirect rates
1041
+ ├── revenue recognition
1042
+ ├── billing procedures
1043
+ ├── compliance controls
1044
+ ├── workflows
1045
+ └── decision criteria
1046
+ ```
1047
+
1048
+ Agents can combine the **Agent Factory KSoR** with the appropriate **Vertical KSoR** when performing domain work.
1049
+
1050
+ ```text
1051
+ Agent Factory KSoR
1052
+ Shared Method
1053
+
1054
+
1055
+
1056
+ AI Agent
1057
+
1058
+
1059
+
1060
+ Vertical KSoR
1061
+ Domain Truth
1062
+ ```
1063
+
1064
+ Both can be built using the same `ksor` SDK.
1065
+
1066
+ ---
1067
+
1068
+ # What KSoR Does Not Replace
1069
+
1070
+ KSoR is complementary to existing enterprise systems.
1071
+
1072
+ It does **not** replace:
1073
+
1074
+ * your CRM,
1075
+ * ERP,
1076
+ * accounting system,
1077
+ * HRIS,
1078
+ * transactional database,
1079
+ * data warehouse,
1080
+ * lakehouse,
1081
+ * document source systems,
1082
+ * or operational APIs.
1083
+
1084
+ Those systems remain authoritative for their respective operational state.
1085
+
1086
+ KSoR adds the authoritative **knowledge layer** agents need in order to understand how to interpret that state and what to do with it.
1087
+
1088
+ ---
1089
+
1090
+ # Design Goals
1091
+
1092
+ KSoR is being designed around the following goals.
1093
+
1094
+ ### Authoritative
1095
+
1096
+ There should be a clear canonical source.
1097
+
1098
+ ### Governed
1099
+
1100
+ Knowledge should have ownership and controlled change.
1101
+
1102
+ ### Traceable
1103
+
1104
+ Important answers should lead back to evidence.
1105
+
1106
+ ### Inspectable
1107
+
1108
+ Humans must be able to see what agents are reading.
1109
+
1110
+ ### Portable
1111
+
1112
+ Knowledge should not be trapped inside one vendor.
1113
+
1114
+ ### Agent-readable
1115
+
1116
+ AI agents must be able to consume the corpus programmatically.
1117
+
1118
+ ### Human-readable
1119
+
1120
+ People must be able to browse and understand the same knowledge.
1121
+
1122
+ ### Versioned
1123
+
1124
+ Changes to institutional truth should have history.
1125
+
1126
+ ### Reproducible
1127
+
1128
+ A deployed KSoR should be traceable to a particular corpus and version.
1129
+
1130
+ ### Composable
1131
+
1132
+ Multiple KSoRs should be usable together.
1133
+
1134
+ ### Extensible
1135
+
1136
+ Organizations should be able to adapt the framework to their requirements.
1137
+
1138
+ ---
1139
+
1140
+ # Project Status
1141
+
1142
+ KSoR is under active development.
1143
+
1144
+ The project is evolving from the original VSOR implementation into the more general **Knowledge System of Record** architecture.
1145
+
1146
+ The current implementation already establishes several important foundations, including:
1147
+
1148
+ * Markdown-based authoritative source content,
1149
+ * generated human-readable documentation sites,
1150
+ * project scaffolding,
1151
+ * local development,
1152
+ * static builds,
1153
+ * build provenance,
1154
+ * agent-oriented repository instructions,
1155
+ * automated testing,
1156
+ * and deployment workflows.
1157
+
1158
+ The MCP-based agent surface remains an active area of implementation.
1159
+
1160
+ See:
1161
+
1162
+ * [`CHANGELOG.md`](CHANGELOG.md) — what has shipped
1163
+ * [`docs/status.md`](docs/status.md) — current implementation status
1164
+ * [`CONTRIBUTING.md`](CONTRIBUTING.md) — contributing
1165
+ * [`SECURITY.md`](SECURITY.md) — security policy
1166
+
1167
+ Do not infer production readiness of a capability from this conceptual README alone. The status document and released package version are authoritative for implemented functionality.
1168
+
1169
+ ---
1170
+
1171
+ # CLI
1172
+
1173
+ The intended CLI vocabulary is deliberately small:
1174
+
1175
+ ```bash
1176
+ ksor init
1177
+ ksor dev
1178
+ ksor build
1179
+ ksor serve
1180
+ ```
1181
+
1182
+ ### `ksor init`
1183
+
1184
+ Create a new Knowledge System of Record.
1185
+
1186
+ ```bash
1187
+ ksor init accounting-ksor
1188
+ ```
1189
+
1190
+ ### `ksor dev`
1191
+
1192
+ Run the human surface locally with development tooling.
1193
+
1194
+ ```bash
1195
+ ksor dev
1196
+ ```
1197
+
1198
+ ### `ksor build`
1199
+
1200
+ Validate and build the deployable KSoR surfaces.
1201
+
1202
+ ```bash
1203
+ ksor build
1204
+ ```
1205
+
1206
+ ### `ksor serve`
1207
+
1208
+ Expose the agent-readable KSoR interface.
1209
+
1210
+ ```bash
1211
+ ksor serve
1212
+ ```
1213
+
1214
+ Refer to the CLI help for the commands supported by the installed release:
1215
+
1216
+ ```bash
1217
+ ksor --help
1218
+ ```
1219
+
1220
+ ---
1221
+
1222
+ # npm Package
1223
+
1224
+ The canonical npm package is:
1225
+
1226
+ ```text
1227
+ @panaversity/ksor
1228
+ ```
1229
+
1230
+ The unscoped name `ksor` is blocked by npm's similarity guard, so the package is
1231
+ scoped. The **command** installed by it is still `ksor`.
1232
+
1233
+ Install it:
1234
+
1235
+ ```bash
1236
+ npm install @panaversity/ksor
1237
+ ```
1238
+
1239
+ Install globally:
1240
+
1241
+ ```bash
1242
+ npm install -g @panaversity/ksor
1243
+ ```
1244
+
1245
+ Or execute without a global installation:
1246
+
1247
+ ```bash
1248
+ npx @panaversity/ksor
1249
+ ```
1250
+
1251
+ ---
1252
+
1253
+ # Contributing
1254
+
1255
+ Contributions are welcome.
1256
+
1257
+ Before contributing, read:
1258
+
1259
+ ```text
1260
+ AGENTS.md
1261
+ docs/status.md
1262
+ CONTRIBUTING.md
1263
+ ```
1264
+
1265
+ The project is intentionally agent-friendly, so coding agents should also read `AGENTS.md` before making changes.
1266
+
1267
+ Typical development checks include:
1268
+
1269
+ * linting,
1270
+ * type checking,
1271
+ * unit tests,
1272
+ * boundary tests,
1273
+ * build acceptance,
1274
+ * browser acceptance,
1275
+ * and deployment acceptance.
1276
+
1277
+ Do not weaken provenance, abstention, governance, or reproducibility guarantees merely to simplify an implementation.
1278
+
1279
+ Those are part of the product.
1280
+
1281
+ ---
1282
+
1283
+ # Security
1284
+
1285
+ Knowledge Systems of Record can contain sensitive institutional information and can influence AI agent behavior.
1286
+
1287
+ Treat security issues involving the following as particularly important:
1288
+
1289
+ * unauthorized corpus access,
1290
+ * provenance bypass,
1291
+ * malicious source ingestion,
1292
+ * prompt injection through knowledge content,
1293
+ * privilege escalation,
1294
+ * unsafe MCP exposure,
1295
+ * build tampering,
1296
+ * dependency compromise,
1297
+ * and the ability to make ungoverned knowledge appear authoritative.
1298
+
1299
+ See [`SECURITY.md`](SECURITY.md) for reporting instructions.
1300
+
1301
+ ---
1302
+
1303
+ # License
1304
+
1305
+ KSoR is licensed under the **Apache License 2.0**.
1306
+
1307
+ See [`LICENSE`](LICENSE) and [`NOTICE`](NOTICE).
1308
+
1309
+ ---
1310
+
1311
+ # The Idea in One Sentence
1312
+
1313
+ > **A traditional System of Record tells an AI agent what is true about the business; a Knowledge System of Record tells it what the organization knows and how it should operate.**
1314
+
1315
+ KSoR makes that knowledge **authoritative, governed, traceable, human-readable, agent-readable, and vendor-neutral**.
1316
+
1317
+ ---
1318
+
1319
+ ## KSoR
1320
+
1321
+ **Knowledge you can govern. Answers you can trace. Boundaries agents can respect.**
1322
+
1323
+ ---