Implement consistency architecture (10-principle framework)
Adds: - ARCHITECTURE.md: Full documentation of 3-layer system - Context Pipeline: Preprocessing layer (pipeline.js) - Workflow Router: 4 fixed workflows (coding, debug, deploy, audit) - Validation Layer: Post-response quality gate (validator.js) - Format Templates: Structured output templates - TOOLS.md: Beavault connection documentation Architecture: - Layer 1: Behavior rules (always injected) - Layer 2: Persistent facts (structured memory) - Layer 3: Ephemeral context - Priority enforcement: Rules > Prefs > Task > Chat - Memory write policy: Only confirmed fixes, repeated preferences
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
# Workflow: Audit
|
||||
|
||||
## Intent Classification
|
||||
|
||||
**Triggers:** Security reviews, inventory checks, compliance, "what's the state of..."
|
||||
|
||||
## Fixed Output Format
|
||||
|
||||
```markdownn## Scope
|
||||
[What was audited]
|
||||
|
||||
## Findings
|
||||
| Item | Status | Notes |
|
||||
|------|--------|-------|
|
||||
| [item1] | ✅/⚠️/❌ | [notes] |
|
||||
| [item2] | ✅/⚠️/❌ | [notes] |
|
||||
|
||||
## Risks Identified
|
||||
- [Risk 1]
|
||||
- [Risk 2]
|
||||
|
||||
## Recommendations
|
||||
- [Rec 1]
|
||||
- [Rec 2]
|
||||
|
||||
## Verification
|
||||
[How findings were confirmed]
|
||||
```
|
||||
|
||||
## Tool Access Rules
|
||||
|
||||
1. **Enumerate** - list everything in scope
|
||||
2. **Inspect** - check state of each item
|
||||
3. **Assess** - evaluate against standards
|
||||
4. **Report** - structured findings with evidence
|
||||
|
||||
## Constraints
|
||||
|
||||
- NO: Assumptions without verification
|
||||
- NO: Partial coverage reported as complete
|
||||
- NO: Risks without severity assessment
|
||||
- YES: Evidence cited for each finding
|
||||
- YES: Actionable recommendations
|
||||
@@ -0,0 +1,45 @@
|
||||
# Workflow: Coding
|
||||
|
||||
## Intent Classification
|
||||
|
||||
**Triggers:** Code changes, development tasks, bug fixes, feature implementation
|
||||
|
||||
## Fixed Output Format
|
||||
|
||||
```markdown
|
||||
## Summary
|
||||
[What changed - 1-2 sentences]
|
||||
|
||||
## Files Modified
|
||||
| File | Change |
|
||||
|------|--------|
|
||||
| file1.py | [description] |
|
||||
| file2.js | [description] |
|
||||
|
||||
## Verification
|
||||
- [ ] Tests pass: `command`
|
||||
- [ ] Lint passes: `command`
|
||||
- [ ] Manual verification: [how]
|
||||
|
||||
## Decisions Made
|
||||
- [Decision 1]
|
||||
- [Decision 2]
|
||||
|
||||
## Still Open
|
||||
- [ ] [if any]
|
||||
```
|
||||
|
||||
## Tool Access Rules
|
||||
|
||||
1. **Delegate to coding agents** when possible
|
||||
2. **Read before writing** - always check existing code first
|
||||
3. **Verify before reporting** - tests, lint, manual check
|
||||
4. **Update memory** - log decisions to DECISIONS.md
|
||||
|
||||
## Constraints
|
||||
|
||||
- NO: Direct production edits without verification
|
||||
- NO: Untested code reported as "done"
|
||||
- NO: Breaking changes without migration plan
|
||||
- YES: Clear acceptance criteria before starting
|
||||
- YES: Root cause analysis before fixes
|
||||
@@ -0,0 +1,40 @@
|
||||
# Workflow: Troubleshooting
|
||||
|
||||
## Intent Classification
|
||||
|
||||
**Triggers:** Errors, failures, unexpected behavior, debugging requests
|
||||
|
||||
## Fixed Output Format
|
||||
|
||||
```markdown
|
||||
## Problem
|
||||
[Symptom observed]
|
||||
|
||||
## Diagnosis
|
||||
- Checked: [what was checked]
|
||||
- Found: [what was found]
|
||||
|
||||
## Cause
|
||||
[Root cause - trace to why, not just what]
|
||||
|
||||
## Fix
|
||||
[What was changed]
|
||||
|
||||
## Validation
|
||||
[How verified it's fixed]
|
||||
```
|
||||
|
||||
## Tool Access Rules
|
||||
|
||||
1. **Inspect first** - logs, config, state before changing anything
|
||||
2. **Reproduce** - understand the failure before fixing
|
||||
3. **Trace to root** - fix cause, not symptom
|
||||
4. **Document** - add to ISSUES.md if pattern
|
||||
|
||||
## Constraints
|
||||
|
||||
- NO: Restart-as-first-response
|
||||
- NO: Regex patches without understanding root cause
|
||||
- NO: Fixes without verification
|
||||
- YES: Documented workaround if root cause blocked
|
||||
- YES: Regression test if applicable
|
||||
@@ -0,0 +1,46 @@
|
||||
# Workflow: Deployment
|
||||
|
||||
## Intent Classification
|
||||
|
||||
**Triggers:** Deploy to staging/production, release, infrastructure changes
|
||||
|
||||
## Fixed Output Format
|
||||
|
||||
```markdown
|
||||
## Deployment Summary
|
||||
[What and where]
|
||||
|
||||
## Pre-Deployment
|
||||
- [x] Backup created
|
||||
- [x] Tests pass
|
||||
- [x] Rollback plan documented
|
||||
|
||||
## Changes Applied
|
||||
| Step | Command | Status |
|
||||
|------|---------|--------|
|
||||
| 1 | [command] | ✅ |
|
||||
| 2 | [command] | ✅ |
|
||||
|
||||
## Verification
|
||||
- [x] Service responding: [url]
|
||||
- [x] Logs normal: [check]
|
||||
- [x] Smoke test: [result]
|
||||
|
||||
## Rollback (if needed)
|
||||
[Exact rollback steps]
|
||||
```
|
||||
|
||||
## Tool Access Rules
|
||||
|
||||
1. **Check first** - current state before changing
|
||||
2. **Backup** - always before production changes
|
||||
3. **Verify** - process running, endpoint responding, output correct
|
||||
4. **Document** - update RUNBOOK.md if procedure changed
|
||||
|
||||
## Constraints
|
||||
|
||||
- NO: Deployment without verification plan
|
||||
- NO: "It should work" = done
|
||||
- NO: Blurry rollback steps
|
||||
- YES: Status checked and reported
|
||||
- YES: Rollback tested if possible
|
||||
Reference in New Issue
Block a user