David sql task importance

From Matymatyk-business/david-skills · View interactive version

David sql task importance is an AI agent skill from the GitHub repository Matymatyk-business/david-skills. Use when David wants to score or rate the importance of his Todoist tasks in docs/data/todoist-task-dimensions.db. Presents tasks 7 at a time (A-G), David gives scores (0-10), AI saves them. Also updates brain/ and docs/data/user-behavior.db.

How to use this skill

Skill file

David SQL Task Importance — Batch Scoring

Goal: Score every task in docs/data/todoist-task-dimensions.db with a david_importance value (0-10 integer). David scores, AI records. No guessing.

Why This Matters

david_importance is fundamentally different from daily priority lists. Priority = "what should I do today?" Importance = "how much does this matter to my life, goals, and business?" A task can be low-priority today but importance-10. This column captures what David truly cares about — the signal that no daily triage can surface. Tasks scored 0 are archived to not_relevant automatically.

Scale

| Score | Meaning |

|---|---|

| 0 | Dead. Irrelevant. Completed with no future bearing. |

| 1 | Lowest leverage. Taking out trash, vacuuming. Does not matter long-term. |

| 5 | Mid-range. Has some value but not a priority mover. |

| 10 | Massive implications to David personally, the business, or the long-term vision/mission. |

Rules

Presentation Format

Present 7 tasks per batch, lettered A-G:

**X/Y scored, Z remaining**

A. task name here
B. task name here
C. task name here
D. task name here
E. task name here
F. task name here
G. task name here

Scoring Method (CRITICAL — NO OFFSETS)

Never use SQL OFFSET to map scores to tasks. Offsets shift when rows are added/deleted and cause cascading errors.

Step 1: Fetch with explicit IDs

SELECT DISTINCT todoist_id, task_name
FROM tasks
WHERE todoist_id IS NOT NULL AND david_importance IS NULL
GROUP BY todoist_id
ORDER BY id
LIMIT 7;

Store the 7 todoist_id values explicitly before presenting to David.

Step 2: Present task names (A-G)

Step 3: David gives scores

Step 4: Update using explicit todoist_id

Write each UPDATE as a separate, explicit SQL statement:

UPDATE tasks SET david_importance = 8 WHERE todoist_id = '<TODOIST_ID_1>';
UPDATE tasks SET david_importance = 0 WHERE todoist_id = '<TODOIST_ID_2>';

Never use subqueries, offsets, or shell loops. One todoist_id per UPDATE. No ambiguity.

Step 5: Auto-advance

After saving, immediately present the next 7. No confirmation needed.

Source of Tasks

Default: all tasks in docs/data/todoist-task-dimensions.db where david_importance IS NULL.

David may specify a different scope:

Fetching Fresh Tasks from Todoist

When David wants to score tasks not yet in the DB:

  1. Fetch from Todoist API using the todoist skill
  2. Check each task against DB by todoist_id
  3. INSERT new tasks (with whatever columns can be inferred from task text)
  4. Present for scoring

Companion Updates

After each batch of David's responses:

Database Location

docs/data/todoist-task-dimensions.db — column: david_importance INTEGER DEFAULT NULL

Wrap Up

When all tasks scored:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.