activity-ingestion

Normalize and ingest activity records into Janus data files via a typed gateway.

Updated Sep 1, 2026
One-click install
npx skills add https://github.com/Hoczka-git/Janus --skill activity-ingestion-hoczka-git
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: activity-ingestion
Source: https://github.com/Hoczka-git/Janus/tree/main/skills/autonomous-ai-agents/activity-ingestion
Command: npx skills add https://github.com/Hoczka-git/Janus --skill activity-ingestion-hoczka-git

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Model-generated activity records (workouts, task completions, goal progress, measurements) risk corrupting persistent Janus data files when written directly. This Skill enforces a single controlled gateway that validates, normalizes, de-duplicates, and atomically persists records, preventing data loss and malformed writes. ## Core Features & Use Cases - Typed ActivityRecord Gateway: Construct ActivityRecord values for 10 activity types (task_completed, goal_progress, workout_added, measurement, inbox_captured, and more) and pass them to ingest_activities() for validated, routed persistence. - Dedup and Normalization: Automatic dedup key computation with configurable reject/merge/replace policies, timestamp UTC conversion, text cleanup, and unit conversion (e.g., lb to kg, mi to km). - Data Protection: All writes go through atomic_io and data_protection with backup rotation and conflict detection; direct model edits to data/ files are strictly forbidden. - Use Case: After a user logs a 5.2 km run in chat, construct a WORKOUT_ADDED ActivityRecord with distance, duration, and heart rate, then ingest it alongside a GOAL_PROGRESS record for the half-marathon goal in one batch call. ## Quick Start Ask the agent to record a completed workout or goal progress update, and it will build the appropriate ActivityRecord and ingest it through the activity_ingest gateway.

Frequently Asked Questions about activity-ingestion

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I ingest activity records into Janus data files?

Construct ActivityRecord dataclass instances with the appropriate ActivityType and fields, then pass them as a list to ingest_activities() from janus.services.activity_ingest. The gateway validates, normalizes, deduplicates, and routes each record to the correct service, returning an IngestResult per record.

How does deduplication work for activity ingestion?

Each record gets a dedup key via compute_dedup_key based on its type, such as task_id for tasks or date plus workout_type for workouts. The default reject policy skips duplicates; merge and replace policies can be set per call or in the [data_ingestion] config section.

Can the model write directly to Janus data files?

No. Direct model edits to files under data/ are strictly forbidden, including rewrites, inline edits, and generic file-write operations. All mutations must go through the activity_ingest gateway, a dedicated Janus CLI command, or a Janus service API.

What activity types does the ingestion gateway support?

The ActivityType enum supports ten types: task_completed, task_updated, goal_progress, goal_updated, goal_completed, milestone_completed, measurement, workout_added, followup_added, and inbox_captured. Each routes to a specific service or integration function and target data file.

Why was my activity record rejected during ingestion?

Rejections occur from validation failures, such as a missing goal_title, metric, value, or workout_type, or an out-of-range progress value, and from duplicate dedup keys under the reject policy. Check the IngestResult error field for the specific human-readable reason.