@grainulation/silo 1.0.0 → 1.0.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.
@@ -0,0 +1,25 @@
1
+ # Code of Conduct
2
+
3
+ ## Our standards
4
+
5
+ We are committed to providing a welcoming and productive environment for everyone. We expect participants to:
6
+
7
+ - Use welcoming and inclusive language
8
+ - Respect differing viewpoints and experiences
9
+ - Accept constructive criticism gracefully
10
+ - Focus on what is best for the community and the project
11
+ - Show empathy toward other participants
12
+
13
+ Unacceptable behavior includes harassment, trolling, personal attacks, and publishing others' private information without permission.
14
+
15
+ ## Scope
16
+
17
+ This code of conduct applies to all project spaces -- issues, pull requests, discussions, and any public channel where someone represents the project.
18
+
19
+ ## Enforcement
20
+
21
+ Instances of unacceptable behavior may be reported to the project maintainers. All complaints will be reviewed and investigated, and will result in a response deemed necessary and appropriate.
22
+
23
+ ## Attribution
24
+
25
+ Adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1.
@@ -0,0 +1,103 @@
1
+ # Contributing to Silo
2
+
3
+ Thanks for considering contributing. Silo is the knowledge store for the grainulation ecosystem -- it indexes, searches, and manages claim packs across sprints.
4
+
5
+ ## Quick setup
6
+
7
+ ```bash
8
+ git clone https://github.com/grainulation/silo.git
9
+ cd silo
10
+ node bin/silo.js --help
11
+ ```
12
+
13
+ No `npm install` needed -- silo has zero dependencies.
14
+
15
+ ## How to contribute
16
+
17
+ ### Report a bug
18
+
19
+ Open an issue with:
20
+
21
+ - What you expected
22
+ - What happened instead
23
+ - Your Node version (`node --version`)
24
+ - Steps to reproduce
25
+
26
+ ### Suggest a feature
27
+
28
+ Open an issue describing the use case, not just the solution. "I need X because Y" is more useful than "add X."
29
+
30
+ ### Submit a PR
31
+
32
+ 1. Fork the repo
33
+ 2. Create a branch (`git checkout -b fix/description`)
34
+ 3. Make your changes
35
+ 4. Run the tests: `node test/basic.test.js`
36
+ 5. Commit with a clear message
37
+ 6. Open a PR
38
+
39
+ ### Add a knowledge pack
40
+
41
+ Packs live in `packs/`. Each is a JSON file containing curated claims for a domain. To add one:
42
+
43
+ 1. Create `packs/your-domain.json`
44
+ 2. Follow the schema of existing packs (see `packs/architecture.json` for reference)
45
+ 3. Include claims with proper typing and evidence tiers
46
+ 4. Add a test case covering pack loading
47
+
48
+ ## Architecture
49
+
50
+ ```
51
+ bin/silo.js CLI entrypoint -- dispatches subcommands
52
+ lib/index.js Core library -- pack management and resolution
53
+ lib/store.js Persistent claim storage engine
54
+ lib/search.js Full-text and filtered claim search
55
+ lib/analytics.js Usage analytics and pack statistics
56
+ lib/import-export.js Bulk import/export of claim data
57
+ lib/packs.js Knowledge pack loading and validation
58
+ lib/serve-mcp.js MCP (Model Context Protocol) server
59
+ lib/server.js Local preview server (SSE, zero deps)
60
+ lib/templates.js Template rendering for HTML output
61
+ packs/ Built-in knowledge packs (JSON)
62
+ public/ Web UI -- search and browse interface
63
+ site/ Public website (silo.grainulation.com)
64
+ test/ Node built-in test runner tests
65
+ ```
66
+
67
+ The key architectural principle: **silo is a content-addressable claim store.** Claims go in with typed metadata, and come out via search, pack membership, or direct ID lookup. The store is append-friendly and merge-safe.
68
+
69
+ ## Code style
70
+
71
+ - Zero dependencies. If you need something, write it or use Node built-ins.
72
+ - No transpilation. Ship what you write.
73
+ - ESM imports (`import`/`export`). Node 18+ required.
74
+ - Keep functions small. If a function needs a scroll, split it.
75
+ - No emojis in code, CLI output, or pack data.
76
+
77
+ ## Testing
78
+
79
+ ```bash
80
+ node test/basic.test.js
81
+ ```
82
+
83
+ Tests use Node's built-in test runner. No test framework dependencies.
84
+
85
+ ## Commit messages
86
+
87
+ Follow the existing pattern:
88
+
89
+ ```
90
+ silo: <what changed>
91
+ ```
92
+
93
+ Examples:
94
+
95
+ ```
96
+ silo: add security knowledge pack
97
+ silo: fix search ranking for multi-word queries
98
+ silo: update import to handle duplicate claim IDs
99
+ ```
100
+
101
+ ## License
102
+
103
+ MIT. See LICENSE for details.
package/README.md CHANGED
@@ -1,40 +1,45 @@
1
- # @grainulation/silo
1
+ <p align="center">
2
+ <img src="site/wordmark.svg" alt="Silo" width="400">
3
+ </p>
2
4
 
3
- Reusable knowledge for research sprints. Grab a starter pack in one command:
5
+ <p align="center">
6
+ <a href="https://www.npmjs.com/package/@grainulation/silo"><img src="https://img.shields.io/npm/v/@grainulation/silo" alt="npm version"></a> <a href="https://www.npmjs.com/package/@grainulation/silo"><img src="https://img.shields.io/npm/dm/@grainulation/silo" alt="npm downloads"></a> <a href="https://github.com/grainulation/silo/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green" alt="license"></a> <a href="https://nodejs.org"><img src="https://img.shields.io/node/v/@grainulation/silo" alt="node"></a> <a href="https://github.com/grainulation/silo/actions"><img src="https://github.com/grainulation/silo/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
7
+ <a href="https://deepwiki.com/grainulation/silo"><img src="https://deepwiki.com/badge.svg" alt="Explore on DeepWiki"></a>
8
+ </p>
9
+
10
+ <p align="center"><strong>Reusable knowledge for research sprints.</strong></p>
11
+
12
+ Instead of starting every sprint from scratch, pull in battle-tested constraint sets, risk patterns, and decision templates. Grab a starter pack in one command:
4
13
 
5
14
  ```bash
6
15
  npx @grainulation/silo pull compliance --into ./claims.json
7
16
  ```
8
17
 
9
- ## What is Silo?
10
-
11
- Silo stores and shares research knowledge across projects and teams. Instead of starting every sprint from scratch, pull in battle-tested constraint sets, risk patterns, and decision templates.
18
+ ## Install
12
19
 
13
- - **Shared claim libraries** -- reusable constraint sets (HIPAA, SOC 2, GDPR, etc.)
14
- - **Community sprint templates** -- pre-built research questions with seeded claims
15
- - **Claim import/export** -- pull claims from one sprint into another
16
- - **Knowledge packs** -- version-controlled bundles teams can subscribe to
17
- - **Full-text search** -- find relevant claims across everything you've stored
20
+ ```bash
21
+ npm install -g @grainulation/silo
22
+ ```
18
23
 
19
- Zero dependencies. Filesystem-based storage. Works offline.
24
+ ## Built-in packs
20
25
 
21
- ## Built-in Packs
26
+ 11 knowledge packs with 131 curated claims:
22
27
 
23
- | Pack | Claims | What's inside |
24
- |------|--------|---------------|
25
- | `api-design` | 13 | REST conventions, versioning, pagination, error formats, GraphQL tradeoffs |
26
- | `architecture` | 12 | Monolith vs micro, build vs buy, SQL vs NoSQL decision claims |
27
- | `ci-cd` | 12 | CI/CD pipeline patterns, caching, rollback strategies |
28
- | `compliance` | 14 | HIPAA, SOC 2, GDPR constraint sets with regulatory citations |
29
- | `data-engineering` | 12 | ETL patterns, data quality, warehouse design |
30
- | `frontend` | 12 | Frontend architecture, performance, accessibility patterns |
31
- | `migration` | 10 | Database/cloud/framework migration risks and patterns |
32
- | `observability` | 12 | Logging, metrics, tracing, alerting patterns |
33
- | `security` | 12 | Security constraints, threat models, authentication patterns |
34
- | `team-process` | 12 | Team workflow, code review, incident response patterns |
35
- | `testing` | 10 | Testing strategies, coverage, test architecture |
28
+ | Pack | Claims | What's inside |
29
+ | ------------------ | ------ | -------------------------------------------------------------------------- |
30
+ | `api-design` | 13 | REST conventions, versioning, pagination, error formats, GraphQL tradeoffs |
31
+ | `architecture` | 12 | Monolith vs micro, build vs buy, SQL vs NoSQL decision claims |
32
+ | `ci-cd` | 12 | CI/CD pipeline patterns, caching, rollback strategies |
33
+ | `compliance` | 14 | HIPAA, SOC 2, GDPR constraint sets with regulatory citations |
34
+ | `data-engineering` | 12 | ETL patterns, data quality, warehouse design |
35
+ | `frontend` | 12 | Frontend architecture, performance, accessibility patterns |
36
+ | `migration` | 10 | Database/cloud/framework migration risks and patterns |
37
+ | `observability` | 12 | Logging, metrics, tracing, alerting patterns |
38
+ | `security` | 12 | Security constraints, threat models, authentication patterns |
39
+ | `team-process` | 12 | Team workflow, code review, incident response patterns |
40
+ | `testing` | 10 | Testing strategies, coverage, test architecture |
36
41
 
37
- ## Quick Start
42
+ ## Quick start
38
43
 
39
44
  ```bash
40
45
  # See available packs
@@ -56,55 +61,58 @@ silo store "q4-migration-findings" --from ./claims.json
56
61
  silo list
57
62
  ```
58
63
 
59
- ## CLI Reference
64
+ ## CLI
60
65
 
61
- | Command | Description |
62
- |---------|-------------|
63
- | `silo list` | List all stored collections |
64
- | `silo pull <pack> --into <file>` | Pull claims into a claims file |
65
- | `silo store <name> --from <file>` | Store claims from a sprint |
66
- | `silo search <query>` | Full-text search across claims |
67
- | `silo packs` | List available knowledge packs |
68
- | `silo templates` | List saved sprint templates |
69
- | `silo publish <name> --collections <ids>` | Bundle collections into a pack |
70
- | `silo install <file>` | Install a pack from a JSON file |
66
+ | Command | Description |
67
+ | ----------------------------------------- | ------------------------------- |
68
+ | `silo list` | List all stored collections |
69
+ | `silo pull <pack> --into <file>` | Pull claims into a claims file |
70
+ | `silo store <name> --from <file>` | Store claims from a sprint |
71
+ | `silo search <query>` | Full-text search across claims |
72
+ | `silo packs` | List available knowledge packs |
73
+ | `silo publish <name> --collections <ids>` | Bundle collections into a pack |
74
+ | `silo install <file>` | Install a pack from a JSON file |
71
75
 
72
- ## How It Works
76
+ ## How it works
73
77
 
74
- Silo uses your filesystem for storage (`~/.silo` by default). No database, no network calls, no accounts. Claims are JSON files organized by collection, indexed for search.
78
+ Silo uses your filesystem for storage (`~/.silo` by default). No database, no network calls, no accounts.
75
79
 
76
- When you `pull`, Silo:
77
- 1. Resolves the source (built-in pack or stored collection)
78
- 2. Re-prefixes claim IDs to avoid collisions
79
- 3. Deduplicates against existing claims in the target
80
- 4. Merges into your claims.json
80
+ When you `pull`, Silo re-prefixes claim IDs to avoid collisions, deduplicates against existing claims, and merges into your claims.json.
81
81
 
82
- When you `store`, Silo:
83
- 1. Reads your sprint's claims.json
84
- 2. Hashes the content for versioning
85
- 3. Saves to `~/.silo/claims/` with metadata
86
- 4. Updates the search index
82
+ When you `store`, Silo hashes the content for versioning, saves to `~/.silo/claims/`, and updates the search index.
87
83
 
88
84
  ## Programmatic API
89
85
 
90
86
  ```js
91
- const { Store } = require('@grainulation/silo/lib/store');
92
- const { Search } = require('@grainulation/silo/lib/search');
93
- const { ImportExport } = require('@grainulation/silo/lib/import-export');
87
+ const { Store } = require("@grainulation/silo/lib/store");
88
+ const { Search } = require("@grainulation/silo/lib/search");
89
+ const { ImportExport } = require("@grainulation/silo/lib/import-export");
94
90
 
95
91
  const store = new Store().init();
96
92
  const search = new Search(store);
97
93
  const io = new ImportExport(store);
98
94
 
99
- // Search for encryption-related claims
100
- const results = search.query('encryption', { type: 'constraint' });
95
+ const results = search.query("encryption", { type: "constraint" });
96
+ io.pull("compliance", "./claims.json");
97
+ io.push("./claims.json", "my-sprint-findings");
98
+ ```
101
99
 
102
- // Pull a pack programmatically
103
- io.pull('compliance', './claims.json');
100
+ ## Zero dependencies
104
101
 
105
- // Store findings
106
- io.push('./claims.json', 'my-sprint-findings');
107
- ```
102
+ Node built-in modules only. Filesystem-based storage. Works offline.
103
+
104
+ ## Part of the grainulation ecosystem
105
+
106
+ | Tool | Role |
107
+ | ------------------------------------------------------------ | ----------------------------------------------------------- |
108
+ | [wheat](https://github.com/grainulation/wheat) | Research engine -- grow structured evidence |
109
+ | [farmer](https://github.com/grainulation/farmer) | Permission dashboard -- approve AI actions in real time |
110
+ | [barn](https://github.com/grainulation/barn) | Shared tools -- templates, validators, sprint detection |
111
+ | [mill](https://github.com/grainulation/mill) | Format conversion -- export to PDF, CSV, slides, 24 formats |
112
+ | **silo** | Knowledge storage -- reusable claim libraries and packs |
113
+ | [harvest](https://github.com/grainulation/harvest) | Analytics -- cross-sprint patterns and prediction scoring |
114
+ | [orchard](https://github.com/grainulation/orchard) | Orchestration -- multi-sprint coordination and dependencies |
115
+ | [grainulation](https://github.com/grainulation/grainulation) | Unified CLI -- single entry point to the ecosystem |
108
116
 
109
117
  ## License
110
118