diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-03-22 23:48:32 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-03-22 23:48:32 +0000 |
| commit | f024a6a1cbcb68395fe1a15d4ac852c2be2416e6 (patch) | |
| tree | 149db55dbc69b04a5aa02edf88dbe8a5d83f1841 | |
| parent | 455206121f2061d5bc81b629da7978e1975845d9 (diff) | |
chore: unify and centralize agent configuration in .agent/
| -rw-r--r-- | .agent/coding_standards.md | 14 | ||||
| -rw-r--r-- | .agent/config.md | 29 | ||||
| -rw-r--r-- | .agent/design.md (renamed from docs/COMPONENT_DESIGN.md) | 0 | ||||
| -rw-r--r-- | .agent/mission.md | 13 | ||||
| -rw-r--r-- | .agent/narrative.md (renamed from docs/RAW_NARRATIVE.md) | 0 | ||||
| -rw-r--r-- | .agent/preferences.md | 7 | ||||
| -rw-r--r-- | .agent/worklog.md (renamed from SESSION_STATE.md) | 0 | ||||
| -rw-r--r-- | .claude/settings.local.json | 3 | ||||
| -rw-r--r-- | .gemini/GEMINI.md | 7 | ||||
| -rw-r--r-- | CLAUDE.md | 7 | ||||
| -rw-r--r-- | android-app/app/src/main/kotlin/org/terst/nav/ui/MapHandler.kt | 14 | ||||
| -rwxr-xr-x | android-app/local.properties | 12 | ||||
| -rwxr-xr-x | scripts/.claude/claudomator-db-20260315.sh | 55 |
13 files changed, 149 insertions, 12 deletions
diff --git a/.agent/coding_standards.md b/.agent/coding_standards.md new file mode 100644 index 0000000..3d43e88 --- /dev/null +++ b/.agent/coding_standards.md @@ -0,0 +1,14 @@ +# Coding Standards + +Technical standards for the **Nav** (Sailing Companion) project. + +## 1. Android (Kotlin) +- **Architecture:** MVVM with ViewBinding/DataBinding. +- **UI:** Glanceable, high-contrast, cockpit-friendly design. +- **Persistence:** Room for local database; offline-first approach. +- **Async:** Kotlin Coroutines for non-blocking UI. + +## 2. Boating Domain +- **Safety First:** MOB and Anchor Alarm features are critical. +- **Offline Utility:** Must work without internet connectivity (using cached charts/GRIBs). +- **Integration:** Standard NMEA interface for instrument data. diff --git a/.agent/config.md b/.agent/config.md new file mode 100644 index 0000000..6094452 --- /dev/null +++ b/.agent/config.md @@ -0,0 +1,29 @@ +# Agent Configuration & Master Rulebook (.agent/config.md) + +This is the primary source of truth for all AI agents working on **Nav**. These instructions take absolute precedence over general defaults. + +## 1. Project Directory Structure (.agent/) + +| File | Purpose | +|------|---------| +| `config.md` | **Main Entry Point** — Rules, workflows, and core mandates. | +| `worklog.md` | **Session State** — Current focus, recently completed, and next steps. | +| `design.md` | **Architecture** — Component design, UI mockups, and roadmap. | +| `coding_standards.md` | **Technical Standards** — Android/Kotlin best practices, offline-first. | +| `mission.md` | **Mission & Values** — Strategic goals and agent personality. | +| `narrative.md` | **Background** — Historical context and evolution of the project. | +| `preferences.md` | **User Prefs** — Living record of user-specific likes/dislikes. | + +## 2. Core Mandates + +### ULTRA-STRICT ROOT SAFETY PROTOCOL +1. **Inquiry-Only Default:** Treat every message as research/analysis unless it is an explicit, imperative command (Directive). +2. **Zero Unsolicited Implementation:** Never modify files, directories, or processes based on assumptions. +3. **Interactive Strategy Checkpoint:** Research first, present a strategy, and **WAIT** for an explicit "GO" before any system-changing tool call. +4. **No Destructive Assumptions:** Always verify state (`ps`, `ls`, `git status`) before proposing actions. +5. **Root-Awareness:** Prioritize system integrity and user confirmation over proactiveness. + +### Living Documentation Mandate +1. **Continuous Capture:** Agents MUST proactively update the files in ".agent/" as new decisions, patterns, or user preferences are revealed. +2. **No Stale Instructions:** If a workflow or technical standard evolves, the agent is responsible for reflecting that change in the Master Rulebook immediately. +3. **Worklog Integrity:** The ".agent/worklog.md" must be updated at the start and end of EVERY session. diff --git a/docs/COMPONENT_DESIGN.md b/.agent/design.md index ba82612..ba82612 100644 --- a/docs/COMPONENT_DESIGN.md +++ b/.agent/design.md diff --git a/.agent/mission.md b/.agent/mission.md new file mode 100644 index 0000000..dc89364 --- /dev/null +++ b/.agent/mission.md @@ -0,0 +1,13 @@ +# Project Mission & Strategic Values + +## 1. Core Mission +**One Screen, Dock to Dock.** A unified bridge instrument, weather advisor, and safety system for sailors. + +## 2. Strategic Values +- **No Social:** Purely technical boating features; no community or social components. +- **Offline Integrity:** Full charting and routing must work offshore. +- **Single Pane of Glass:** Weather, charts, and instruments on one unified view. + +## 3. Agent Personality & Role +- **Proactive Navigator:** Anticipate technical needs (weather updates, safety checks). +- **Precision & Clarity:** Scientific/technical accuracy in boating data. diff --git a/docs/RAW_NARRATIVE.md b/.agent/narrative.md index 567c343..567c343 100644 --- a/docs/RAW_NARRATIVE.md +++ b/.agent/narrative.md diff --git a/.agent/preferences.md b/.agent/preferences.md new file mode 100644 index 0000000..7ca21d6 --- /dev/null +++ b/.agent/preferences.md @@ -0,0 +1,7 @@ +# User Preferences & Workflow Quirks + +Living record of user preferences for the Nav project. + +## 1. Interaction & Workflow +- **Safety First:** Cautious and deliberate action. +- **Checkpoint Model:** Research -> Strategy -> GO. diff --git a/SESSION_STATE.md b/.agent/worklog.md index e17781b..e17781b 100644 --- a/SESSION_STATE.md +++ b/.agent/worklog.md diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 846deab..120b3ae 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -32,7 +32,8 @@ "Bash(claudomator task:*)", "Bash(claudomator:*)", "Bash(/workspace/nav/scripts/.claude/claudomator-db-20260315.sh deps:*)", - "Bash(/workspace/nav/scripts/.claude/claudomator-db-20260315.sh task:*)" + "Bash(/workspace/nav/scripts/.claude/claudomator-db-20260315.sh task:*)", + "Bash(curl:*)" ] } } diff --git a/.gemini/GEMINI.md b/.gemini/GEMINI.md new file mode 100644 index 0000000..0a22b71 --- /dev/null +++ b/.gemini/GEMINI.md @@ -0,0 +1,7 @@ +# Nav — Gemini CLI Instructions + +This repository uses a centralized agent configuration. + +**Primary Source of Truth:** ".agent/config.md" + +Refer to ".agent/config.md" before performing any tasks. These project-specific instructions take absolute precedence over general defaults. diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..6227634 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,7 @@ +# Nav — Agent Instructions + +This repository uses a centralized agent configuration. + +**Primary Source of Truth:** ".agent/config.md" + +Refer to ".agent/config.md" before performing any tasks. diff --git a/android-app/app/src/main/kotlin/org/terst/nav/ui/MapHandler.kt b/android-app/app/src/main/kotlin/org/terst/nav/ui/MapHandler.kt index 2e67975..91569cf 100644 --- a/android-app/app/src/main/kotlin/org/terst/nav/ui/MapHandler.kt +++ b/android-app/app/src/main/kotlin/org/terst/nav/ui/MapHandler.kt @@ -1,6 +1,9 @@ package org.terst.nav.ui import android.graphics.Bitmap +import org.maplibre.android.camera.CameraPosition +import org.maplibre.android.camera.CameraUpdateFactory +import org.maplibre.android.geometry.LatLng import org.maplibre.android.maps.MapLibreMap import org.maplibre.android.maps.Style import org.maplibre.android.style.layers.CircleLayer @@ -82,6 +85,17 @@ class MapHandler(private val maplibreMap: MapLibreMap) { } /** + * Centers the map on the specified location. + */ + fun centerOnLocation(lat: Double, lon: Double, zoom: Double = 14.0) { + val position = CameraPosition.Builder() + .target(LatLng(lat, lon)) + .zoom(zoom) + .build() + maplibreMap.animateCamera(CameraUpdateFactory.newCameraPosition(position), 1000) + } + + /** * Updates the anchor watch visualization on the map. */ fun updateAnchorWatch(state: AnchorWatchState) { diff --git a/android-app/local.properties b/android-app/local.properties index 7c003fd..daae45e 100755 --- a/android-app/local.properties +++ b/android-app/local.properties @@ -1,11 +1 @@ -# This file must *NOT* be checked into Version Control Systems, -# as it contains information specific to your local installation. -# -# Location of the Android SDK. This is only used by Gradle. -# ANDROID_HOME environment variable must be set to your Android SDK path. -# Example: -# sdk.dir=/home/user/Android/Sdk -# sdk.dir=/Users/user/Library/Android/sdk (macOS) -# sdk.dir=C\:\\Users\\user\\AppData\\Local\\Android\\Sdk (Windows) -# -# sdk.dir= +sdk.dir=/opt/android-sdk diff --git a/scripts/.claude/claudomator-db-20260315.sh b/scripts/.claude/claudomator-db-20260315.sh new file mode 100755 index 0000000..796ad43 --- /dev/null +++ b/scripts/.claude/claudomator-db-20260315.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash +# Purpose: Query the claudomator SQLite database +# Usage: +# ./claudomator-db.sh task <short-id-or-uuid> -- task + dependencies +# ./claudomator-db.sh deps <short-id-or-uuid> -- blocking dependencies +# ./claudomator-db.sh blocked -- all BLOCKED tasks +# ./claudomator-db.sh list [STATE] -- list tasks, optionally filter by state + +DB=/site/doot.terst.org/data/claudomator.db +CMD=${1:-list} + +resolve_id() { + local id=$1 + sqlite3 "$DB" "SELECT id FROM tasks WHERE id LIKE '${id}%' LIMIT 1;" +} + +case "$CMD" in + task) + full=$(resolve_id "$2") + [ -z "$full" ] && { echo "Task not found: $2"; exit 1; } + sqlite3 -column -header "$DB" "SELECT id, name, state, priority, created_at FROM tasks WHERE id = '$full';" + ;; + deps) + full=$(resolve_id "$2") + [ -z "$full" ] && { echo "Task not found: $2"; exit 1; } + echo "=== Blocking dependencies of ${full} ===" + sqlite3 -column -header "$DB" \ + "SELECT t.id, t.name, t.state FROM tasks t + WHERE t.id IN ( + SELECT value FROM tasks, json_each(tasks.depends_on_json) WHERE tasks.id = '$full' + );" + echo "" + echo "=== Tasks blocked by ${full} ===" + sqlite3 -column -header "$DB" \ + "SELECT t.id, t.name, t.state FROM tasks t + WHERE EXISTS ( + SELECT 1 FROM json_each(t.depends_on_json) WHERE value = '$full' + );" + ;; + blocked) + sqlite3 -column -header "$DB" "SELECT id, name, state, priority FROM tasks WHERE state = 'BLOCKED' ORDER BY created_at DESC;" + ;; + list) + STATE=${2:-} + if [ -n "$STATE" ]; then + sqlite3 -column -header "$DB" "SELECT id, name, state, priority, created_at FROM tasks WHERE state = '$STATE' ORDER BY created_at DESC;" + else + sqlite3 -column -header "$DB" "SELECT id, name, state, priority, created_at FROM tasks ORDER BY created_at DESC;" + fi + ;; + *) + echo "Unknown command: $CMD" + exit 1 + ;; +esac |
