Personal Knowledge & Narrative Tool
Build a personal knowledge and narrative tool called "Thread" — a second brain that connects notes into a living story.
Core features:
- Note capture: fast input with title, body, tags, date, and an optional "life chapter" label (user-defined periods like "Building the company" or "Year in Berlin") — chapter labels create narrative structure
- Connection engine: [LLM API] periodically analyzes all notes and suggests thematic connections between entries. User sees a "Suggested connections" panel — accepts or rejects each. Accepted connections create bidirectional links
- Narrative timeline: a D3.js timeline showing notes grouped by chapter. Zoom out to decade view, zoom in to week view. Click any note to read it in context of its surrounding entries
- Weekly synthesis: every Sunday, AI generates a "week in review" paragraph from that week's notes — stored as a special entry in the timeline. Accumulates into a readable life chronicle
- Pattern report: monthly — AI identifies recurring themes (concepts mentioned 5+ times), most-linked ideas (high connection density), and "dormant" ideas (not referenced in 60+ days, surfaced as "worth revisiting")
- Chapter export: select any chapter by date range and export as a formatted PDF narrative document
Stack: React, [LLM API] for connection suggestions, synthesis, and pattern reports, D3.js for timeline visualization, localStorage with JSON export/import for backup. Literary design — serif fonts, generous whitespace.
A relaxed copper-haired woman resting sideways on a bed in a soft, low-light setting.
{
"image_analysis": {
"general_environment": {
"type": "Indoor",
"location_description": "Bedroom",
"details": "A bed with striped bedding and pillows",
"atmosphere": "Calm, cozy, and dim"
},
"technical_details": {
"camera_angle": "Slight high angle, close to eye level",
"lens_effect": "Focused on the subject, with slight depth in the background",
"framing": "Medium shot - most of the body visible while feet are cropped"
},
"lighting_conditions": {
"type": "Low light / Dim environment",
"source": "Likely artificial light source from the left or a bedside lamp",
"effect": "Shadows that highlight body contours, with a warm yellowish tone"
},
"people": [
{
"identity": "Young woman",
"position_and_posture": {
"general_description": "Lying sideways on the bed in a resting position",
"feet_position": "On the bed, knees bent and slightly overlapping",
"hands_position": "Right hand supports the head (nape/hair area), left arm extends towards the bed"
},
"head_area": {
"general_structure": "Oval facial features",
"hair": {
"color": "Reddish / Dark Copper",
"style": "Updo",
"shape_and_style": "Messy bun on top, with thin strands hanging"
},
"forehead_area": "Exposed, prominent due to hair pulled back",
"eyebrow_area": "Naturally thin and curved",
"eye_area": "Eyes looking down or nearly closed, freckles visible around",
"nose_area": "Small, slightly upturned, characteristic with freckles",
"upper_lip_area": "Clean, no mustache",
"mouth_area": "Closed lips, natural and calm expression",
"chin_area": "Defined jawline, visible from the side profile",
"ears": "Partially visible under hair strands"
},
"body_type_and_areas": {
"general_structure": "Slim, fit, and curvy",
"neck_area": "Long and slender, tense due to head position",
"shoulder_area": "Right shoulder sunk into the pillow, left shoulder elevated and defined",
"chest_area": "Conforming to the dress shape, naturally posed due to side lying",
"stomach_area": "Dress fabric hugs the body, flat stomach structure",
"hip_area": "Defined and curvy due to side lying position",
"thigh_area": "Upper thighs thick and full, touching each other",
"groin_area": "Not visible, covered by legs' position",
"below_knee_area": "Knees bent, lower legs extending backward",
"foot_area": "Outside the frame or in shadow"
},
"clothing": {
"general_description": "One-piece mini dress",
"upper_part": {
"type": "Spaghetti straps",
"color": "Light gray / Ice blue",
"detail": "Stretchy fabric conforming to the body"
},
"lower_part": {
"type": "Mini skirt length",
"color": "Same as upper part (one piece)",
"detail": "Hip-hugging cut"
}
},
"jewelry": "No visible prominent jewelry (necklace, earrings etc.)",
"footwear": "None (Barefoot / in bed)"
}
]
}
}
Repository Security & Architecture Audit Framework
title: Repository Security & Architecture Audit Framework
domain: backend,infra
anchors:
- OWASP Top 10 (2021)
- SOLID Principles (Robert C. Martin)
- DORA Metrics (Forsgren, Humble, Kim)
- Google SRE Book (production readiness)
variables:
repository_name: ${repository_name}
stack: ${stack:Auto-detect from package.json, requirements.txt, go.mod, Cargo.toml, pom.xml}
role: >
You are a senior software reliability engineer with dual expertise in
application security (OWASP, STRIDE threat modeling) and code architecture
(SOLID, Clean Architecture). You specialize in systematic repository
audits that produce actionable, severity-ranked findings with verified
fixes across any technology stack.
context:
repository: ${repository_name}
stack: ${stack:Auto-detect from package.json, requirements.txt, go.mod, Cargo.toml, pom.xml}
scope: >
Full repository audit covering security vulnerabilities, architectural
violations, functional bugs, and deployment hardening.
instructions:
- phase: 1
name: Repository Mapping (Discovery)
steps:
- Map project structure - entry points, module boundaries, data flow paths
- Identify stack and dependencies from manifest files
- Run dependency vulnerability scan (npm audit, pip-audit, or equivalent)
- Document CI/CD pipeline configuration and test coverage gaps
- phase: 2
name: Security Audit (OWASP Top 10)
steps:
- "A01 Broken Access Control: RBAC enforcement, IDOR via parameter tampering, missing auth on internal endpoints"
- "A02 Cryptographic Failures: plaintext secrets, weak hashing, missing TLS, insecure random"
- "A03 Injection: SQL/NoSQL injection, XSS, command injection, template injection"
- "A04 Insecure Design: missing rate limiting, no abuse prevention, missing input validation"
- "A05 Security Misconfiguration: DEBUG=True in prod, verbose errors, default credentials, open CORS"
- "A06 Vulnerable Components: known CVEs in dependencies, outdated packages, unmaintained libraries"
- "A07 Auth Failures: weak password policy, missing MFA, session fixation, JWT misconfiguration"
- "A08 Data Integrity Failures: missing CSRF, unsigned updates, insecure deserialization"
- "A09 Logging Failures: missing audit trail, PII in logs, no alerting on auth failures"
- "A10 SSRF: unvalidated URL inputs, internal network access from user input"
- phase: 3
name: Architecture Audit (SOLID)
steps:
- "SRP violations: classes/modules with multiple reasons to change"
- "OCP violations: code requiring modification (not extension) for new features"
- "LSP violations: subtypes that break parent contracts"
- "ISP violations: fat interfaces forcing unused dependencies"
- "DIP violations: high-level modules importing low-level implementations directly"
- phase: 4
name: Functional Bug Discovery
steps:
- "Logic errors: incorrect conditionals, off-by-one, race conditions"
- "State management: stale cache, inconsistent state transitions, missing rollback"
- "Error handling: swallowed exceptions, missing retry logic, no circuit breaker"
- "Edge cases: null/undefined handling, empty collections, boundary values, timezone issues"
- Dead code and unreachable paths
- phase: 5
name: Finding Documentation
schema: |
- id: BUG-001
severity: Critical | High | Medium | Low | Info
category: Security | Architecture | Functional | Edge Case | Code Quality
owasp: A01-A10 (if applicable)
file: path/to/file.ext
line: 42-58
title: One-line summary
current_behavior: What happens now
expected_behavior: What should happen
root_cause: Why the bug exists
impact:
users: How end users are affected
system: How system stability is affected
business: Revenue, compliance, or reputation risk
fix:
description: What to change
code_before: current code
code_after: fixed code
test:
description: How to verify the fix
command: pytest tests/test_x.py::test_name -v
effort: S | M | L
- phase: 6
name: Fix Implementation Plan
priority_order:
- Critical security fixes (deploy immediately)
- High-severity bugs (next release)
- Architecture improvements (planned refactor)
- Code quality and cleanup (ongoing)
method: Failing test first (TDD), minimal fix, regression test, documentation update
- phase: 7
name: Production Readiness Check
criteria:
- SLI/SLO defined for key user journeys
- Error budget policy documented
- Monitoring covers four DORA metrics
- Runbook exists for top 5 failure modes
- Graceful degradation path for each external dependency
constraints:
must:
- Evaluate all 10 OWASP categories with explicit pass/fail
- Check all 5 SOLID principles with file-level references
- Provide severity rating for every finding
- Include code_before and code_after for every fixable finding
- Order findings by severity then by effort
never:
- Mark a finding as fixed without a verification test
- Skip dependency vulnerability scanning
always:
- Include reproduction steps for functional bugs
- Document assumptions made during analysis
output_format:
sections:
- Executive Summary (findings by severity, top 3 risks, overall rating)
- Findings Registry (YAML array, BUG-XXX schema)
- Fix Batches (ordered deployment groups)
- OWASP Scorecard (Category, Status, Count, Severity)
- SOLID Compliance (Principle, Violations, Files)
- Production Readiness Checklist (Criterion, Status, Notes)
- Recommended Next Steps (prioritized actions)
success_criteria:
- All 10 OWASP categories evaluated with explicit status
- All 5 SOLID principles checked with file references
- Every Critical/High finding has a verified fix with test
- Findings registry parseable as valid YAML
- Fix batches deployable independently
- Production readiness checklist has zero unaddressed Critical items
Cinematic Street Photography Prompt
{
"colors": {
"color_temperature": "warm",
"contrast_level": "medium",
"dominant_palette": [
"brown",
"beige",
"muted teal",
"cream"
]
},
"composition": {
"camera_angle": "eye-level",
"depth_of_field": "shallow",
"focus": "A young ${gender} laughing",
"framing": "The main subject is framed by a blurred crowd in the background and a camera in the foreground. The camera's screen creates a frame-within-a-frame, emphasizing the act of photography."
},
"description_short": "An over-the-shoulder shot of a photographer taking a picture of a joyful young ${gender} laughing heartily in the middle of a blurred crowd.",
"environment": {
"location_type": "outdoor",
"setting_details": "A busy, crowded public space, likely a city street or plaza. The background is filled with many people, all rendered as a soft blur, with some red bokeh lights visible.",
"time_of_day": "afternoon",
"weather": "cloudy"
},
"lighting": {
"intensity": "moderate",
"source_direction": "front",
"type": "natural"
},
"mood": {
"atmosphere": "A candid moment of pure joy",
"emotional_tone": "joyful"
},
"narrative_elements": {
"character_interactions": "A photographer is capturing a candid, happy moment of a ${gender}, suggesting a positive and comfortable rapport between them.",
"environmental_storytelling": "The crowded, out-of-focus background highlights the ${gender} as a singular point of happiness and calm within a bustling environment, making the moment feel personal and intimate.",
"implied_action": "A photoshoot is actively in progress, capturing a spontaneous reaction from the subject."
},
"objects": [
"camera",
"${gender}",
"crowd"
],
"people": {
"ages": [
"young adult"
],
"clothing_style": "casual winter wear",
"count": "unknown",
"genders": [
"female"
]
},
"prompt": "Cinematic street photography from an over-the-shoulder perspective. A photographer holds a digital camera, its screen displaying the shot. The subject is a beautiful young Asian ${gender} with wavy brown hair, who is bursting into a joyful, open-mouthed laugh. She wears a cozy cream-colored knit sweater. The background is a dense, anonymous crowd, completely blurred with soft bokeh lights. The image has a warm, vintage color grade, shallow depth of field, and captures a candid, heartwarming moment of pure happiness.",
"style": {
"art_style": "realistic",
"influences": [
"street photography",
"candid portraiture",
"cinematic"
],
"medium": "photography"
},
"technical_tags": [
"shallow depth of field",
"bokeh",
"over-the-shoulder shot",
"candid photography",
"portrait",
"frame within a frame",
"warm tones"
],
"use_case": "Stock photography for themes of happiness, urban life, photography, and candid moments.",
"uuid": "c0e1b01c-e07e-41b1-b035-f8802d8ec319"
}