Skip to content

Commit e5a8185

Browse files
committed
docs: refresh PRD.md
1 parent f17e3d9 commit e5a8185

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

PRD.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ To provide developers with a fast, transparent, and integrable security tool tha
4343
3. **Usability:** Single command integration into existing workflows
4444
4. **Transparency:** All risk scores backed by specific rule matches and weights
4545
5. **Extensibility:** Support custom rule sets and pluggable LLM providers
46+
6. **Safety:** Enforce a configurable input-size guardrail (default 1 MB) across stdin, files, and tail mode
4647

4748
### 2.3 Non-Goals (Out of Scope)
4849

@@ -223,6 +224,10 @@ To provide developers with a fast, transparent, and integrable security tool tha
223224
└─────────────────────────────────────────┘
224225
```
225226

227+
- The CLI (`crates/llm-guard-cli`) handles argument parsing, configuration, and the shared chunked UTF-8 reader that enforces the configurable input-size guardrail (default 1 MB).
228+
- Core scanning, scoring, reporting, and LLM integrations live under `crates/llm-guard-core`.
229+
- See [`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md) for a deeper dive and [`docs/RULE_AUTHORING.md`](./docs/RULE_AUTHORING.md) when extending rule packs.
230+
226231
### 5.2 Data Models
227232

228233
#### Core Types
@@ -485,6 +490,7 @@ Return JSON with keys: label, rationale, mitigation.
485490
| Startup Time | <50ms | Time to first scan |
486491
| Rule Loading | <10ms for 100 rules | Initialization |
487492
| LLM Call (optional) | <2s timeout | API response time |
493+
| Input Guardrail | Default 1 MB, configurable via flag/env | CLI configuration audited |
488494
489495
---
490496
@@ -495,6 +501,7 @@ Return JSON with keys: label, rationale, mitigation.
495501
- **No persistent logging:** Raw inputs not stored unless --debug flag enabled
496502
- **Excerpt redaction:** Email addresses, API keys, tokens redacted in excerpts
497503
- **LLM truncation:** Snippets truncated to 800 chars before external API calls
504+
- **Bounded inputs:** Enforce streaming reads with a 1 MB default guardrail (CLI/env configurable) to prevent unbounded allocation
498505
- **API key security:** Accept from environment only; never log or expose
499506
500507
### 10.2 Threat Model
@@ -558,6 +565,8 @@ Return JSON with keys: label, rationale, mitigation.
558565
559566
## 12. Implementation Roadmap
560567
568+
_Implementation status is tracked live in [`PLAN.md`](./PLAN.md); the original hour-by-hour scaffolding is retained below for historical context._
569+
561570
### Phase 1: Foundation (Hours 1-2)
562571
- [x] Bootstrap Rust project with Cargo
563572
- [ ] Configure dependencies (clap, regex, aho-corasick, serde)
@@ -584,8 +593,8 @@ Return JSON with keys: label, rationale, mitigation.
584593
### Phase 5: Testing & Polish (Hour 7)
585594
- [ ] Unit test suite
586595
- [ ] E2E tests with seed data
587-
- [ ] Documentation and examples
588-
- [ ] README with usage guide
596+
- [x] Documentation (README, usage guide, architecture, rule authoring)
597+
- [ ] Example prompts / demos
589598
590599
### Phase 6: Stretch Features (Hour 8+)
591600
- [ ] Streaming/tail mode (--follow)
@@ -601,7 +610,7 @@ Return JSON with keys: label, rationale, mitigation.
601610
602611
- [ ] All P0 features implemented and tested
603612
- [ ] Unit test coverage >80%
604-
- [ ] Documentation complete (README, examples)
613+
- [ ] Documentation complete (README, usage guide, architecture, rule authoring, examples)
605614
- [ ] Performance targets met (scan <100ms for 10K chars)
606615
- [ ] Zero critical security issues
607616

0 commit comments

Comments
 (0)