Add Phase 8 features: analytics, reporting, health check

- Add pageviews table and /api/v1/analytics/pageview endpoint
- Abuse reporting API already existed at /api/v1/reports
- Add health_check.py script for monitoring
- ChatGPT additions: report modal UI, analytics tracking JS

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
This commit is contained in:
rob
2025-12-31 22:49:58 -04:00
co-authored by Claude Opus 4.5
parent 096c0739d8
commit 1ac3054aaa
13 changed files with 453 additions and 42 deletions
@@ -0,0 +1,21 @@
# code-review
Review code for issues, risks, and improvements.
## Usage
```bash
code-review --language python --focus bugs,security --severity medium < app.py
```
## Arguments
- `--language`: Programming language or `auto`.
- `--focus`: Comma-separated focus areas (e.g., `bugs,security,performance`).
- `--severity`: Minimum severity level (`low`, `medium`, `high`).
## Examples
```bash
cat main.go | code-review --language go --focus performance --severity high
```
@@ -0,0 +1,37 @@
name: code-review
version: "1.0.0"
description: "Review code for issues and improvements"
category: code-analysis
tags:
- code
- review
- quality
arguments:
- name: language
flag: "--language"
default: "auto"
description: "Programming language (e.g., python, javascript, go)"
- name: focus
flag: "--focus"
default: "bugs,security,performance"
description: "Comma-separated focus areas"
- name: severity
flag: "--severity"
default: "medium"
description: "Minimum severity: low, medium, high"
steps:
- type: prompt
provider: "claude"
template: |
You are a senior code reviewer.
Language: {language}
Focus areas: {focus}
Minimum severity: {severity}
Review the following code. Identify issues, risks, and improvements.
Provide a concise, prioritized list with suggestions.
Code:
{input}
output_var: review
output: "{review}"
+20
View File
@@ -0,0 +1,20 @@
# explain
Explain code or concepts clearly with adjustable audience and format.
## Usage
```bash
explain --audience beginner --format step-by-step < snippet.txt
```
## Arguments
- `--audience`: Audience level (`beginner`, `general`, `expert`).
- `--format`: Output format (`paragraph`, `bullet`, `step-by-step`).
## Examples
```bash
echo "Explain recursion" | explain --audience general --format bullet
```
@@ -0,0 +1,29 @@
name: explain
version: "1.0.0"
description: "Explain code or concepts clearly"
category: education
tags:
- explanation
- learning
- code
arguments:
- name: audience
flag: "--audience"
default: "general"
description: "Audience level: beginner, general, expert"
- name: format
flag: "--format"
default: "paragraph"
description: "Output format: paragraph, bullet, or step-by-step"
steps:
- type: prompt
provider: "claude"
template: |
You are a clear and concise explainer.
Audience: {audience}
Format: {format}
Explain the following content:
{input}
output_var: explanation
output: "{explanation}"
@@ -0,0 +1,20 @@
# summarize
Summarize text using AI. Designed for quick overviews, briefs, or executive summaries.
## Usage
```bash
summarize --max-length 200 --style neutral < input.txt
```
## Arguments
- `--max-length`: Maximum length of the summary in words. Default: `200`.
- `--style`: Summary style. Options: `neutral`, `bullet`, `executive`.
## Examples
```bash
cat report.txt | summarize --max-length 120 --style executive
```
@@ -0,0 +1,29 @@
name: summarize
version: "1.0.0"
description: "Summarize text using AI"
category: text-processing
tags:
- summarization
- text
- ai
arguments:
- name: max_length
flag: "--max-length"
default: "200"
description: "Maximum length of the summary in words"
- name: style
flag: "--style"
default: "neutral"
description: "Summary style: neutral, bullet, or executive"
steps:
- type: prompt
provider: "claude"
template: |
You are a helpful assistant that summarizes text.
Style: {style}
Max length: {max_length} words.
Summarize the following text:
{input}
output_var: summary
output: "{summary}"
@@ -0,0 +1,21 @@
# translate
Translate text between languages using AI.
## Usage
```bash
translate --from auto --to en --tone neutral < input.txt
```
## Arguments
- `--from`: Source language (e.g., `en`, `es`, `fr`) or `auto`.
- `--to`: Target language (e.g., `en`, `es`, `fr`).
- `--tone`: Translation tone: `neutral`, `formal`, `casual`.
## Examples
```bash
echo "Hola mundo" | translate --from es --to en --tone formal
```
@@ -0,0 +1,34 @@
name: translate
version: "1.0.0"
description: "Translate text between languages using AI"
category: text-processing
tags:
- translation
- localization
- text
arguments:
- name: from_language
flag: "--from"
default: "auto"
description: "Source language (e.g., en, es, fr) or auto"
- name: to_language
flag: "--to"
default: "en"
description: "Target language (e.g., en, es, fr)"
- name: tone
flag: "--tone"
default: "neutral"
description: "Tone: neutral, formal, or casual"
steps:
- type: prompt
provider: "claude"
template: |
You are a translation assistant.
Translate from: {from_language}
Translate to: {to_language}
Tone: {tone}
Translate the following text:
{input}
output_var: translation
output: "{translation}"