@grainulation/silo 1.0.0 → 1.0.2
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/CODE_OF_CONDUCT.md +25 -0
- package/CONTRIBUTING.md +103 -0
- package/README.md +67 -59
- package/bin/silo.js +212 -86
- package/lib/analytics.js +26 -11
- package/lib/confluence.js +343 -0
- package/lib/graph.js +414 -0
- package/lib/import-export.js +29 -24
- package/lib/index.js +15 -9
- package/lib/packs.js +60 -36
- package/lib/search.js +24 -16
- package/lib/serve-mcp.js +391 -95
- package/lib/server.js +205 -110
- package/lib/store.js +34 -18
- package/lib/templates.js +28 -17
- package/package.json +6 -3
- package/packs/adr.json +219 -0
- package/packs/api-design.json +67 -14
- package/packs/architecture-decision.json +152 -0
- package/packs/architecture.json +45 -9
- package/packs/ci-cd.json +51 -11
- package/packs/compliance.json +70 -14
- package/packs/coverage-ramp.json +180 -0
- package/packs/data-engineering.json +57 -12
- package/packs/frontend.json +56 -12
- package/packs/hackathon-best-ai.json +179 -0
- package/packs/hackathon-business-impact.json +180 -0
- package/packs/hackathon-innovation.json +210 -0
- package/packs/hackathon-most-innovative.json +179 -0
- package/packs/hackathon-most-rigorous.json +179 -0
- package/packs/hackathon-sprint-boost.json +173 -0
- package/packs/incident-postmortem.json +219 -0
- package/packs/migration.json +45 -9
- package/packs/observability.json +57 -12
- package/packs/security.json +61 -13
- package/packs/team-process.json +64 -13
- package/packs/testing.json +20 -4
- package/packs/vendor-eval.json +219 -0
- package/packs/vendor-evaluation.json +148 -0
|
@@ -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.
|
package/CONTRIBUTING.md
ADDED
|
@@ -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
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="site/wordmark.svg" alt="Silo" width="400">
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
24
|
+
## Built-in packs
|
|
20
25
|
|
|
21
|
-
|
|
26
|
+
11 knowledge packs with 131 curated claims:
|
|
22
27
|
|
|
23
|
-
| Pack
|
|
24
|
-
|
|
25
|
-
| `api-design`
|
|
26
|
-
| `architecture`
|
|
27
|
-
| `ci-cd`
|
|
28
|
-
| `compliance`
|
|
29
|
-
| `data-engineering` | 12
|
|
30
|
-
| `frontend`
|
|
31
|
-
| `migration`
|
|
32
|
-
| `observability`
|
|
33
|
-
| `security`
|
|
34
|
-
| `team-process`
|
|
35
|
-
| `testing`
|
|
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
|
|
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
|
|
64
|
+
## CLI
|
|
60
65
|
|
|
61
|
-
| Command
|
|
62
|
-
|
|
63
|
-
| `silo list`
|
|
64
|
-
| `silo pull <pack> --into <file>`
|
|
65
|
-
| `silo store <name> --from <file>`
|
|
66
|
-
| `silo search <query>`
|
|
67
|
-
| `silo packs`
|
|
68
|
-
| `silo
|
|
69
|
-
| `silo
|
|
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
|
|
76
|
+
## How it works
|
|
73
77
|
|
|
74
|
-
Silo uses your filesystem for storage (`~/.silo` by default). No database, no network calls, no accounts.
|
|
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(
|
|
92
|
-
const { Search } = require(
|
|
93
|
-
const { ImportExport } = require(
|
|
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
|
-
|
|
100
|
-
|
|
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
|
-
|
|
103
|
-
io.pull('compliance', './claims.json');
|
|
100
|
+
## Zero dependencies
|
|
104
101
|
|
|
105
|
-
|
|
106
|
-
|
|
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
|
|