3 Commits

Author SHA1 Message Date
jacobh2 ac637a6dae Update todo 2026-06-03 22:55:29 +02:00
jacobh2 32af0f4ba3 ci: update checkout version, fix shell quoting, and add actionlint job 2026-06-03 22:50:45 +02:00
jacobh2 a4852a574a docs: fix OpenCode subagent terminology in AGENTS.md
Replace "sub-agent" (hyphenated) with "subagent" and update "spawn a
sub-agent" to "invoke a subagent via the Task tool" to match OpenCode's
actual documented terminology.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 22:45:41 +02:00
4 changed files with 89 additions and 74 deletions
+42 -35
View File
@@ -19,49 +19,56 @@ jobs:
steps: steps:
- name: Install Git and Docker CLI - name: Install Git and Docker CLI
run: apk add --no-cache git docker-cli docker-cli-buildx run: apk add --no-cache git docker-cli docker-cli-buildx
- name: Log in to Gitea Container Registry - name: Log in to Gitea Container Registry
# This uses the automated token provided natively by Gitea Actions # This uses the automated token provided natively by Gitea Actions
run: echo "${{ secrets.babymonitor_cicd }}" | docker login gitea.lan -u ${{ github.actor }} --password-stdin run: echo "${{ secrets.babymonitor_cicd }}" | docker login gitea.lan -u ${{ github.actor }} --password-stdin
- name: Create Custom Buildx Builder for HTTP - name: Create Custom Buildx Builder for HTTP
run: | run: |
# 1. Write a configuration rule forcing plain HTTP for your local domain # 1. Write a configuration rule forcing plain HTTP for your local domain
echo '[registry."gitea.lan"]' > buildkitd.toml echo '[registry."gitea.lan"]' > buildkitd.toml
echo ' http = true' >> buildkitd.toml echo ' http = true' >> buildkitd.toml
# 2. Tell buildx to create and use a builder with this rule # 2. Tell buildx to create and use a builder with this rule
docker buildx create --use --name local-http-builder --config buildkitd.toml docker buildx create --use --name local-http-builder --config buildkitd.toml
- name: Checkout
uses: actions/checkout@v4
with:
# Tells the action to use the local 'git' binary we just installed
set-safe-directory: 'true'
fetch-depth: 0
- name: Determine Version
run: |
LATEST_TAG=$(git tag -l "v${{ env.MAJOR }}.${{ env.MINOR }}.*" | sort -V | tail -n 1)
if [ -z "$LATEST_TAG" ]; then
VERSION="v${{ env.MAJOR }}.${{ env.MINOR }}.0"
else
# Strip the 'v' if present and get the patch version
PATCH=$(echo "$LATEST_TAG" | sed 's/v//' | cut -d'.' -f3)
NEW_PATCH=$((PATCH + 1))
VERSION="v${{ env.MAJOR }}.${{ env.MINOR }}.$NEW_PATCH"
fi
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
- name: Build Docker image
run: |
docker buildx build \
--platform linux/arm64 \
-t gitea.lan/jacobh2/babymonitor-backend:${{ env.VERSION }} \
./backend \
--push
- name: Tag and Push Version
run: |
git tag "$VERSION"
git push origin "$VERSION"
- name: Checkout lint:
uses: actions/checkout@v3 runs-on: host
with: steps:
# Tells the action to use the local 'git' binary we just installed - uses: actions/checkout@v4
set-safe-directory: 'true' - name: Run actionlint
fetch-depth: 0 run: |
# Trying to install it via apk if possible, otherwise fallback
- name: Determine Version apk add --no-cache actionlint || echo "actionlint not found in apk"
run: | if command -v actionlint >/dev/null 2>&1; then
LATEST_TAG=$(git tag -l "v${{ env.MAJOR }}.${{ env.MINOR }}.*" | sort -V | tail -n 1) actionlint .gitea/workflows/*.yml
if [ -z "$LATEST_TAG" ]; then else
VERSION="v${{ env.MAJOR }}.${{ env.MINOR }}.0" echo "Skipping actionlint: not installed"
else fi
# Strip the 'v' if present and get the patch version
PATCH=$(echo "$LATEST_TAG" | sed 's/v//' | cut -d'.' -f3)
NEW_PATCH=$((PATCH + 1))
VERSION="v${{ env.MAJOR }}.${{ env.MINOR }}.$NEW_PATCH"
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build Docker image
run: |
docker buildx build \
--platform linux/arm64 \
-t gitea.lan/jacobh2/babymonitor-backend:${{ env.VERSION }} \
./backend \
--push
- name: Tag and Push Version
run: |
git tag $VERSION
git push origin $VERSION
+42 -35
View File
@@ -19,49 +19,56 @@ jobs:
steps: steps:
- name: Install Git and Docker CLI - name: Install Git and Docker CLI
run: apk add --no-cache git docker-cli docker-cli-buildx run: apk add --no-cache git docker-cli docker-cli-buildx
- name: Log in to Gitea Container Registry - name: Log in to Gitea Container Registry
# This uses the automated token provided natively by Gitea Actions # This uses the automated token provided natively by Gitea Actions
run: echo "${{ secrets.babymonitor_cicd }}" | docker login gitea.lan -u ${{ github.actor }} --password-stdin run: echo "${{ secrets.babymonitor_cicd }}" | docker login gitea.lan -u ${{ github.actor }} --password-stdin
- name: Create Custom Buildx Builder for HTTP - name: Create Custom Buildx Builder for HTTP
run: | run: |
# 1. Write a configuration rule forcing plain HTTP for your local domain # 1. Write a configuration rule forcing plain HTTP for your local domain
echo '[registry."gitea.lan"]' > buildkitd.toml echo '[registry."gitea.lan"]' > buildkitd.toml
echo ' http = true' >> buildkitd.toml echo ' http = true' >> buildkitd.toml
# 2. Tell buildx to create and use a builder with this rule # 2. Tell buildx to create and use a builder with this rule
docker buildx create --use --name local-http-builder --config buildkitd.toml docker buildx create --use --name local-http-builder --config buildkitd.toml
- name: Checkout
uses: actions/checkout@v4
with:
# Tells the action to use the local 'git' binary we just installed
set-safe-directory: 'true'
fetch-depth: 0
- name: Determine Version
run: |
LATEST_TAG=$(git tag -l "v${{ env.MAJOR }}.${{ env.MINOR }}.*" | sort -V | tail -n 1)
if [ -z "$LATEST_TAG" ]; then
VERSION="v${{ env.MAJOR }}.${{ env.MINOR }}.0"
else
# Strip the 'v' if present and get the patch version
PATCH=$(echo "$LATEST_TAG" | sed 's/v//' | cut -d'.' -f3)
NEW_PATCH=$((PATCH + 1))
VERSION="v${{ env.MAJOR }}.${{ env.MINOR }}.$NEW_PATCH"
fi
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
- name: Build Docker image
run: |
docker buildx build \
--platform linux/arm64 \
-t gitea.lan/jacobh2/babymonitor-frontend:${{ env.VERSION }} \
./frontend \
--push
- name: Tag and Push Version
run: |
git tag "$VERSION"
git push origin "$VERSION"
- name: Checkout lint:
uses: actions/checkout@v3 runs-on: host
with: steps:
# Tells the action to use the local 'git' binary we just installed - uses: actions/checkout@v4
set-safe-directory: 'true' - name: Run actionlint
fetch-depth: 0 run: |
# Trying to install it via apk if possible, otherwise fallback
- name: Determine Version apk add --no-cache actionlint || echo "actionlint not found in apk"
run: | if command -v actionlint >/dev/null 2>&1; then
LATEST_TAG=$(git tag -l "v${{ env.MAJOR }}.${{ env.MINOR }}.*" | sort -V | tail -n 1) actionlint .gitea/workflows/*.yml
if [ -z "$LATEST_TAG" ]; then else
VERSION="v${{ env.MAJOR }}.${{ env.MINOR }}.0" echo "Skipping actionlint: not installed"
else fi
# Strip the 'v' if present and get the patch version
PATCH=$(echo "$LATEST_TAG" | sed 's/v//' | cut -d'.' -f3)
NEW_PATCH=$((PATCH + 1))
VERSION="v${{ env.MAJOR }}.${{ env.MINOR }}.$NEW_PATCH"
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build Docker image
run: |
docker buildx build \
--platform linux/arm64 \
-t gitea.lan/jacobh2/babymonitor-frontend:${{ env.VERSION }} \
./frontend \
--push
- name: Tag and Push Version
run: |
git tag $VERSION
git push origin $VERSION
+4 -4
View File
@@ -126,10 +126,10 @@ tree -I 'node_modules|.git|dist|build|__pycache__|venv|.venv|env|.pytest_cache|.
**Context:** The main OpenCode agent context window is our most critical resource. Executing complex tasks, debugging cross-file issues, or writing massive features directly in the main thread causes severe context bloat, leading to code hallucinations and dropped instructions. **Context:** The main OpenCode agent context window is our most critical resource. Executing complex tasks, debugging cross-file issues, or writing massive features directly in the main thread causes severe context bloat, leading to code hallucinations and dropped instructions.
* **Delegate Aggressively:** For any complex implementation, structural change, or task larger than a single file edit, you **MUST spawn a sub-agent**. Act strictly as the architectural orchestrator; let sub-agents handle the iterative coding labor. * **Delegate Aggressively:** For any complex implementation, structural change, or task larger than a single file edit, you **MUST invoke a subagent via the Task tool**. Act strictly as the architectural orchestrator; let subagents handle the iterative coding labor.
* **Scope Narrowly:** Give sub-agents highly specific, isolated, and atomic objectives (e.g., *"Read `backend/app/routers/auth.py` and summarize endpoints"* or *"Write a unit test for the frontend sleep tracker component"*). * **Scope Narrowly:** Give subagents highly specific, isolated, and atomic objectives (e.g., *"Read `backend/app/routers/auth.py` and summarize endpoints"* or *"Write a unit test for the frontend sleep tracker component"*).
* **Strict Summarization:** Sub-agents are **STRICTLY FORBIDDEN** from passing raw terminal dumps, unedited file blocks, or their internal step-by-step logs back to the main thread. * **Strict Summarization:** Subagents are **STRICTLY FORBIDDEN** from passing raw terminal dumps, unedited file blocks, or their internal step-by-step logs back to the main thread.
* **Return Format:** Sub-agents must return *only* clear, actionable results back to the orchestrator: a concise summary of findings, the exact lines of code that require modification, or direct confirmation of a successful execution. * **Return Format:** Subagents must return *only* clear, actionable results back to the orchestrator: a concise summary of findings, the exact lines of code that require modification, or direct confirmation of a successful execution.
## NOTES ## NOTES
+1
View File
@@ -21,3 +21,4 @@ exitcode '1': failure
- [ ] Editing a sleep session in "sleep sessions", when I click the edit button the times show up as UTC but should show as my local timezone - [ ] Editing a sleep session in "sleep sessions", when I click the edit button the times show up as UTC but should show as my local timezone
- [ ] We should drop the "notes" column from the sleep_session table - [ ] We should drop the "notes" column from the sleep_session table
- [ ] Switch over to oh-my-opencode and try it out - [ ] Switch over to oh-my-opencode and try it out
- [ ] Adda footer at the bottom of the app that shows the version (aka git tag) of the app