From a1da041f14d227472906124bb16cf538010970a6 Mon Sep 17 00:00:00 2001 From: Santhosh Janardhanan Date: Thu, 12 Feb 2026 16:50:29 -0500 Subject: [PATCH] Initial Commit --- .dockerignore | 14 + .env | 6 + .env.example | 6 + .opencode/command/opsx-apply.md | 149 +++++ .opencode/command/opsx-archive.md | 154 +++++ .opencode/command/opsx-bulk-archive.md | 239 ++++++++ .opencode/command/opsx-continue.md | 111 ++++ .opencode/command/opsx-explore.md | 171 ++++++ .opencode/command/opsx-ff.md | 91 +++ .opencode/command/opsx-new.md | 66 +++ .opencode/command/opsx-onboard.md | 522 +++++++++++++++++ .opencode/command/opsx-sync.md | 131 +++++ .opencode/command/opsx-verify.md | 161 ++++++ .../skills/openspec-apply-change/SKILL.md | 156 ++++++ .../skills/openspec-archive-change/SKILL.md | 114 ++++ .../openspec-bulk-archive-change/SKILL.md | 246 ++++++++ .../skills/openspec-continue-change/SKILL.md | 118 ++++ .opencode/skills/openspec-explore/SKILL.md | 290 ++++++++++ .opencode/skills/openspec-ff-change/SKILL.md | 101 ++++ .opencode/skills/openspec-new-change/SKILL.md | 74 +++ .opencode/skills/openspec-onboard/SKILL.md | 529 ++++++++++++++++++ .opencode/skills/openspec-sync-specs/SKILL.md | 138 +++++ .../skills/openspec-verify-change/SKILL.md | 168 ++++++ Dockerfile | 22 + README.md | 135 +++++ backend/__init__.py | 0 backend/__pycache__/__init__.cpython-313.pyc | Bin 0 -> 129 bytes backend/__pycache__/cli.cpython-313.pyc | Bin 0 -> 3418 bytes backend/__pycache__/config.cpython-313.pyc | Bin 0 -> 1307 bytes backend/__pycache__/database.cpython-313.pyc | Bin 0 -> 1396 bytes backend/__pycache__/main.cpython-313.pyc | Bin 0 -> 8150 bytes backend/__pycache__/models.cpython-313.pyc | Bin 0 -> 2970 bytes .../__pycache__/news_service.cpython-313.pyc | Bin 0 -> 14367 bytes .../__pycache__/repository.cpython-313.pyc | Bin 0 -> 7648 bytes backend/__pycache__/schemas.cpython-313.pyc | Bin 0 -> 1894 bytes backend/cli.py | 71 +++ backend/config.py | 23 + backend/database.py | 27 + backend/init_db.py | 16 + backend/main.py | 173 ++++++ backend/models.py | 45 ++ backend/news_service.py | 299 ++++++++++ backend/repository.py | 171 ++++++ backend/schemas.py | 40 ++ .../48911d15e0f0b9cc0287d2c3608f6a0c.jpg | Bin 0 -> 186657 bytes backend/static/images/placeholder.png | Bin 0 -> 3633 bytes data/clawfort.db | Bin 0 -> 49152 bytes docker-compose.yml | 22 + frontend/index.html | 364 ++++++++++++ frontend/tailwind.config.js | 28 + .../p01-robust-onepager/.openspec.yaml | 2 + .../changes/p01-robust-onepager/design.md | 111 ++++ .../changes/p01-robust-onepager/proposal.md | 54 ++ .../specs/containerized-deployment/spec.md | 45 ++ .../specs/hero-display/spec.md | 55 ++ .../specs/news-aggregator/spec.md | 56 ++ openspec/changes/p01-robust-onepager/tasks.md | 82 +++ .../p02-force-fetch-command/.openspec.yaml | 2 + .../changes/p02-force-fetch-command/design.md | 93 +++ .../p02-force-fetch-command/proposal.md | 35 ++ .../specs/fetch-run-reporting/spec.md | 27 + .../specs/force-fetch-command/spec.md | 27 + .../specs/manual-fetch-recovery/spec.md | 22 + .../changes/p02-force-fetch-command/tasks.md | 28 + .../p03-languages-ml-tm/.openspec.yaml | 2 + .../changes/p03-languages-ml-tm/design.md | 94 ++++ .../changes/p03-languages-ml-tm/proposal.md | 37 ++ .../specs/article-translations-ml-tm/spec.md | 27 + .../language-aware-content-delivery/spec.md | 27 + .../language-preference-persistence/spec.md | 27 + openspec/changes/p03-languages-ml-tm/tasks.md | 40 ++ openspec/config.yaml | 20 + pyproject.toml | 28 + requirements.txt | 8 + 74 files changed, 6140 insertions(+) create mode 100644 .dockerignore create mode 100644 .env create mode 100644 .env.example create mode 100644 .opencode/command/opsx-apply.md create mode 100644 .opencode/command/opsx-archive.md create mode 100644 .opencode/command/opsx-bulk-archive.md create mode 100644 .opencode/command/opsx-continue.md create mode 100644 .opencode/command/opsx-explore.md create mode 100644 .opencode/command/opsx-ff.md create mode 100644 .opencode/command/opsx-new.md create mode 100644 .opencode/command/opsx-onboard.md create mode 100644 .opencode/command/opsx-sync.md create mode 100644 .opencode/command/opsx-verify.md create mode 100644 .opencode/skills/openspec-apply-change/SKILL.md create mode 100644 .opencode/skills/openspec-archive-change/SKILL.md create mode 100644 .opencode/skills/openspec-bulk-archive-change/SKILL.md create mode 100644 .opencode/skills/openspec-continue-change/SKILL.md create mode 100644 .opencode/skills/openspec-explore/SKILL.md create mode 100644 .opencode/skills/openspec-ff-change/SKILL.md create mode 100644 .opencode/skills/openspec-new-change/SKILL.md create mode 100644 .opencode/skills/openspec-onboard/SKILL.md create mode 100644 .opencode/skills/openspec-sync-specs/SKILL.md create mode 100644 .opencode/skills/openspec-verify-change/SKILL.md create mode 100644 Dockerfile create mode 100644 README.md create mode 100644 backend/__init__.py create mode 100644 backend/__pycache__/__init__.cpython-313.pyc create mode 100644 backend/__pycache__/cli.cpython-313.pyc create mode 100644 backend/__pycache__/config.cpython-313.pyc create mode 100644 backend/__pycache__/database.cpython-313.pyc create mode 100644 backend/__pycache__/main.cpython-313.pyc create mode 100644 backend/__pycache__/models.cpython-313.pyc create mode 100644 backend/__pycache__/news_service.cpython-313.pyc create mode 100644 backend/__pycache__/repository.cpython-313.pyc create mode 100644 backend/__pycache__/schemas.cpython-313.pyc create mode 100644 backend/cli.py create mode 100644 backend/config.py create mode 100644 backend/database.py create mode 100644 backend/init_db.py create mode 100644 backend/main.py create mode 100644 backend/models.py create mode 100644 backend/news_service.py create mode 100644 backend/repository.py create mode 100644 backend/schemas.py create mode 100644 backend/static/images/48911d15e0f0b9cc0287d2c3608f6a0c.jpg create mode 100644 backend/static/images/placeholder.png create mode 100644 data/clawfort.db create mode 100644 docker-compose.yml create mode 100644 frontend/index.html create mode 100644 frontend/tailwind.config.js create mode 100644 openspec/changes/p01-robust-onepager/.openspec.yaml create mode 100644 openspec/changes/p01-robust-onepager/design.md create mode 100644 openspec/changes/p01-robust-onepager/proposal.md create mode 100644 openspec/changes/p01-robust-onepager/specs/containerized-deployment/spec.md create mode 100644 openspec/changes/p01-robust-onepager/specs/hero-display/spec.md create mode 100644 openspec/changes/p01-robust-onepager/specs/news-aggregator/spec.md create mode 100644 openspec/changes/p01-robust-onepager/tasks.md create mode 100644 openspec/changes/p02-force-fetch-command/.openspec.yaml create mode 100644 openspec/changes/p02-force-fetch-command/design.md create mode 100644 openspec/changes/p02-force-fetch-command/proposal.md create mode 100644 openspec/changes/p02-force-fetch-command/specs/fetch-run-reporting/spec.md create mode 100644 openspec/changes/p02-force-fetch-command/specs/force-fetch-command/spec.md create mode 100644 openspec/changes/p02-force-fetch-command/specs/manual-fetch-recovery/spec.md create mode 100644 openspec/changes/p02-force-fetch-command/tasks.md create mode 100644 openspec/changes/p03-languages-ml-tm/.openspec.yaml create mode 100644 openspec/changes/p03-languages-ml-tm/design.md create mode 100644 openspec/changes/p03-languages-ml-tm/proposal.md create mode 100644 openspec/changes/p03-languages-ml-tm/specs/article-translations-ml-tm/spec.md create mode 100644 openspec/changes/p03-languages-ml-tm/specs/language-aware-content-delivery/spec.md create mode 100644 openspec/changes/p03-languages-ml-tm/specs/language-preference-persistence/spec.md create mode 100644 openspec/changes/p03-languages-ml-tm/tasks.md create mode 100644 openspec/config.yaml create mode 100644 pyproject.toml create mode 100644 requirements.txt diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..68deea6 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,14 @@ +.venv/ +__pycache__/ +*.pyc +.env +.git/ +.opencode/ +openspec/ +data/ +*.db +*.db-journal +*.db-wal +.ruff_cache/ +.pytest_cache/ +node_modules/ diff --git a/.env b/.env new file mode 100644 index 0000000..2951b72 --- /dev/null +++ b/.env @@ -0,0 +1,6 @@ +PERPLEXITY_API_KEY=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 +IMAGE_QUALITY=85 +OPENROUTER_API_KEY=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 +UMAMI_SCRIPT_URL=https://wa.santhoshj.com/script.js +UMAMI_WEBSITE_ID=b4315ab2-3075-44b7-b91a-d08497771c14 +RETENTION_DAYS=30 diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..f6cc711 --- /dev/null +++ b/.env.example @@ -0,0 +1,6 @@ +PERPLEXITY_API_KEY=pplx-xxxxxxxxxxxxxxxxxxxx +IMAGE_QUALITY=85 +OPENROUTER_API_KEY= +UMAMI_SCRIPT_URL= +UMAMI_WEBSITE_ID= +RETENTION_DAYS=30 diff --git a/.opencode/command/opsx-apply.md b/.opencode/command/opsx-apply.md new file mode 100644 index 0000000..94b8c1e --- /dev/null +++ b/.opencode/command/opsx-apply.md @@ -0,0 +1,149 @@ +--- +description: Implement tasks from an OpenSpec change (Experimental) +--- + +Implement tasks from an OpenSpec change. + +**Input**: Optionally specify a change name (e.g., `/opsx-apply add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes. + +**Steps** + +1. **Select the change** + + If a name is provided, use it. Otherwise: + - Infer from conversation context if the user mentioned a change + - Auto-select if only one active change exists + - If ambiguous, run `openspec list --json` to get available changes and use the **AskUserQuestion tool** to let the user select + + Always announce: "Using change: " and how to override (e.g., `/opsx-apply `). + +2. **Check status to understand the schema** + ```bash + openspec status --change "" --json + ``` + Parse the JSON to understand: + - `schemaName`: The workflow being used (e.g., "spec-driven") + - Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others) + +3. **Get apply instructions** + + ```bash + openspec instructions apply --change "" --json + ``` + + This returns: + - Context file paths (varies by schema) + - Progress (total, complete, remaining) + - Task list with status + - Dynamic instruction based on current state + + **Handle states:** + - If `state: "blocked"` (missing artifacts): show message, suggest using `/opsx-continue` + - If `state: "all_done"`: congratulate, suggest archive + - Otherwise: proceed to implementation + +4. **Read context files** + + Read the files listed in `contextFiles` from the apply instructions output. + The files depend on the schema being used: + - **spec-driven**: proposal, specs, design, tasks + - Other schemas: follow the contextFiles from CLI output + +5. **Show current progress** + + Display: + - Schema being used + - Progress: "N/M tasks complete" + - Remaining tasks overview + - Dynamic instruction from CLI + +6. **Implement tasks (loop until done or blocked)** + + For each pending task: + - Show which task is being worked on + - Make the code changes required + - Keep changes minimal and focused + - Mark task complete in the tasks file: `- [ ]` → `- [x]` + - Continue to next task + + **Pause if:** + - Task is unclear → ask for clarification + - Implementation reveals a design issue → suggest updating artifacts + - Error or blocker encountered → report and wait for guidance + - User interrupts + +7. **On completion or pause, show status** + + Display: + - Tasks completed this session + - Overall progress: "N/M tasks complete" + - If all done: suggest archive + - If paused: explain why and wait for guidance + +**Output During Implementation** + +``` +## Implementing: (schema: ) + +Working on task 3/7: +[...implementation happening...] +✓ Task complete + +Working on task 4/7: +[...implementation happening...] +✓ Task complete +``` + +**Output On Completion** + +``` +## Implementation Complete + +**Change:** +**Schema:** +**Progress:** 7/7 tasks complete ✓ + +### Completed This Session +- [x] Task 1 +- [x] Task 2 +... + +All tasks complete! You can archive this change with `/opsx-archive`. +``` + +**Output On Pause (Issue Encountered)** + +``` +## Implementation Paused + +**Change:** +**Schema:** +**Progress:** 4/7 tasks complete + +### Issue Encountered + + +**Options:** +1.