fenbs_routines
Routine Processes: the checks, scripts and procedures this work depends on -- saved groups managed with fenbs_groups. everyDays sets an optional schedule independently of the group. kind remains a legacy category. Each has howToRun (the steps, in order), checks (what to verify afterwards) and ruleRefs (the decisions and rules that govern it, e.g. DEC-049). fenbs keeps how to run it, never the code. Before deploying or testing something, list them and follow the matching one. After running one, log_run with result ok, issues or failed, notes, the refs of any tasks you filed, and measures: the numbers the run counted, by name (e.g. {name: 'Stuck buy notes', value: 3}). Use the same names every run -- fenbs compares each with the routine's last run that recorded it and returns the change (up 1 since RUN-012), so get the routine first and reuse its last run's measure names. Routines due show in fenbs_get_context under Waiting on you. action list (project, kind, dueOnly, q), get (id, with recent runs and their measures), add, update (id), delete (id), log_run (id, result, notes, tasks, measures). References are permanent and board-local. Use ref or the legacy id. get_run accepts runRef (RUN-001); list_runs accepts optional routine ref/id, itemRef, q, take and beforeId. log_run returns the exact runRef plus routineRef; logged.id remains the routine id. Writes need permission to change tasks.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | ||
| id | No | ||
| ref | No | RTN reference; numeric id remains supported. If both are supplied they must agree. | |
| kind | No | ||
| name | No | ||
| take | No | list_runs: 1-100, default 20. | |
| notes | No | log_run: what it found. | |
| tasks | No | log_run: refs of tasks filed from it. | |
| action | Yes | ||
| checks | No | What to verify afterwards. | |
| result | No | ||
| runRef | No | get_run: RUN reference. | |
| dueOnly | No | ||
| groupId | No | add/update: group from fenbs_groups on this page. 0 removes it from a group; omitted preserves it on update. | |
| itemRef | No | list_runs: runs linked to this task. | |
| project | No | ||
| purpose | No | What it checks or does, and why. | |
| beforeId | No | list_runs: nextBeforeId from the preceding page. | |
| howToRun | No | The steps, in order: a script path, a command, a skill name, or what to do by hand. | |
| measures | No | log_run: the numbers this run counted, at most 20, each name once. Reuse the names of the last run so the change is shown. | |
| ruleRefs | No | Decision refs that govern it. Replaces the list. | |
| everyDays | No | Days between runs, independent of group (1-366); 0 clears the schedule. |