backlog-tiny-mcp 0.34.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. backlog_mcp/__init__.py +29 -0
  2. backlog_mcp/__main__.py +10 -0
  3. backlog_mcp/auth.py +199 -0
  4. backlog_mcp/backlog.py +696 -0
  5. backlog_mcp/cli.py +2046 -0
  6. backlog_mcp/client.py +320 -0
  7. backlog_mcp/computer.py +33 -0
  8. backlog_mcp/database.py +80 -0
  9. backlog_mcp/embeddings.py +900 -0
  10. backlog_mcp/global_rules.md +126 -0
  11. backlog_mcp/guidance.py +11 -0
  12. backlog_mcp/guide/index.md +11 -0
  13. backlog_mcp/guide/memory.md +27 -0
  14. backlog_mcp/guide/projects.md +16 -0
  15. backlog_mcp/guide/search.md +72 -0
  16. backlog_mcp/guide/tasks.md +40 -0
  17. backlog_mcp/guide/workflow.md +22 -0
  18. backlog_mcp/httpd.py +270 -0
  19. backlog_mcp/migrate.py +113 -0
  20. backlog_mcp/migrations/0001-initial.sql +194 -0
  21. backlog_mcp/migrations/0002-task-assignment.sql +2 -0
  22. backlog_mcp/migrations/0003-task-edit-claims.sql +5 -0
  23. backlog_mcp/migrations/0004-memory-visibility.sql +42 -0
  24. backlog_mcp/model/CITATION.bib +9 -0
  25. backlog_mcp/model/LICENSE +202 -0
  26. backlog_mcp/model/README.md +12 -0
  27. backlog_mcp/model/UPSTREAM.md +2053 -0
  28. backlog_mcp/model/config.json +12 -0
  29. backlog_mcp/model/model.safetensors +4 -0
  30. backlog_mcp/model/modules.json +14 -0
  31. backlog_mcp/model/provenance.json +16 -0
  32. backlog_mcp/model/tokenizer.json +1 -0
  33. backlog_mcp/models.py +581 -0
  34. backlog_mcp/names.py +35 -0
  35. backlog_mcp/paths.py +53 -0
  36. backlog_mcp/protocol_storage.py +104 -0
  37. backlog_mcp/queries.py +7 -0
  38. backlog_mcp/queries.sql +531 -0
  39. backlog_mcp/records.py +215 -0
  40. backlog_mcp/render.py +479 -0
  41. backlog_mcp/server.py +2864 -0
  42. backlog_mcp/skills/autopilot/SKILL.md +96 -0
  43. backlog_mcp/skills/planning/SKILL.md +106 -0
  44. backlog_mcp/skills/planning/references/splitting.md +45 -0
  45. backlog_mcp/skills/triage/SKILL.md +104 -0
  46. backlog_mcp/skills/triage/references/conventions.md +43 -0
  47. backlog_mcp/skills.py +56 -0
  48. backlog_mcp/static/agent-config.js +20 -0
  49. backlog_mcp/static/app.css +1950 -0
  50. backlog_mcp/static/app.js +1301 -0
  51. backlog_mcp/static/assignments.js +96 -0
  52. backlog_mcp/static/breadcrumbs.js +54 -0
  53. backlog_mcp/static/comment-composer.js +95 -0
  54. backlog_mcp/static/connect.css +98 -0
  55. backlog_mcp/static/connect.html +74 -0
  56. backlog_mcp/static/connect.js +160 -0
  57. backlog_mcp/static/credentials.js +72 -0
  58. backlog_mcp/static/diagrams.js +128 -0
  59. backlog_mcp/static/dom.js +162 -0
  60. backlog_mcp/static/editor-claim.js +104 -0
  61. backlog_mcp/static/editor.js +355 -0
  62. backlog_mcp/static/index.html +137 -0
  63. backlog_mcp/static/markdown.css +33 -0
  64. backlog_mcp/static/markdown.js +72 -0
  65. backlog_mcp/static/mcp.js +177 -0
  66. backlog_mcp/static/memory-append.js +34 -0
  67. backlog_mcp/static/memory-editor.js +173 -0
  68. backlog_mcp/static/memory.js +279 -0
  69. backlog_mcp/static/package.json +1 -0
  70. backlog_mcp/static/project-form.js +71 -0
  71. backlog_mcp/static/project-settings.js +225 -0
  72. backlog_mcp/static/scope.js +90 -0
  73. backlog_mcp/static/statistics.js +87 -0
  74. backlog_mcp/static/task-browser.js +100 -0
  75. backlog_mcp/static/task-pagination.js +94 -0
  76. backlog_mcp/static/task-picker.js +164 -0
  77. backlog_mcp/static/task-table.js +74 -0
  78. backlog_mcp/static/vendor/README.md +12 -0
  79. backlog_mcp/static/vendor/dompurify-LICENSE +202 -0
  80. backlog_mcp/static/vendor/highlight-LICENSE +29 -0
  81. backlog_mcp/static/vendor/highlight-dark.css +118 -0
  82. backlog_mcp/static/vendor/highlight-light.css +118 -0
  83. backlog_mcp/static/vendor/highlight.min.js +1262 -0
  84. backlog_mcp/static/vendor/marked-LICENSE +44 -0
  85. backlog_mcp/static/vendor/marked.esm.js +80 -0
  86. backlog_mcp/static/vendor/marked.esm.js.map +7 -0
  87. backlog_mcp/static/vendor/mermaid-LICENSE +21 -0
  88. backlog_mcp/static/vendor/mermaid.min.js +4376 -0
  89. backlog_mcp/static/vendor/purify.es.mjs +2722 -0
  90. backlog_mcp/static/vendor/purify.es.mjs.map +1 -0
  91. backlog_mcp/transaction.py +47 -0
  92. backlog_mcp/version.py +79 -0
  93. backlog_mcp/webui.py +63 -0
  94. backlog_tiny_mcp-0.34.2.dist-info/METADATA +84 -0
  95. backlog_tiny_mcp-0.34.2.dist-info/RECORD +97 -0
  96. backlog_tiny_mcp-0.34.2.dist-info/WHEEL +4 -0
  97. backlog_tiny_mcp-0.34.2.dist-info/entry_points.txt +4 -0
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: autopilot
3
+ description: "Carry out an epic from the backlog without supervision: record the mandate and goals, take ready child tasks in order, claim, implement, verify, commit and close each one, file off-topic bugs, stop only for decisions that belong to the user, and finish with a short report."
4
+ ---
5
+
6
+ # Carry out an epic
7
+
8
+ Use this when the user asks you to do an epic, or a set of tasks, from start to end. The epic and
9
+ its child tasks come from the `planning` skill. The task bodies are the agreed definition: the
10
+ request, the facts, the constraints and the acceptance criteria.
11
+
12
+ ## 1. Load the context
13
+
14
+ Read `project_board(project=<absolute local path>)`, every `global_memory` entry, and the
15
+ relevant project notes from `memory_list` and `memory_get`. Call `search` for agreements about
16
+ the area of the epic. Read the epic with `task_get`: its body, every comment and its links.
17
+ The `contains` links are the child tasks. Read each child with `task_get`.
18
+
19
+ ## 2. Record the mandate and the goals
20
+
21
+ Add a comment on the epic before the first change:
22
+
23
+ - the mandate, in the user's words: what you may do, for example "implement, commit, no push";
24
+ - the goals: the child tasks to close and the acceptance criteria of the epic;
25
+ - the branch you work on;
26
+ - the stop conditions from section 5.
27
+
28
+ Claim the epic with `task_claim(task=<epic>, expected=<current>, assigned=<principal>:<marker>)`.
29
+ Keep the same marker for the whole epic.
30
+
31
+ ## 3. Take the next task
32
+
33
+ Take the ready child with the highest priority: open, unassigned, and every `depends_on` target
34
+ closed. Skip a task that another agent holds; never take over active work. When no child is
35
+ ready, go to section 6.
36
+
37
+ ## 4. Do one task
38
+
39
+ 1. Read the task with `task_get` again, including comments added since your last read.
40
+ 2. Claim it through `task_claim`. On a conflict, read it again and take another task.
41
+ 3. Set `doing` with `task_update`. When the task has no acceptance criteria in the body or the
42
+ comments, write them in a comment now. Explain for each criterion why it proves the task is
43
+ done: name the request, the decision or the fact that it comes from.
44
+ 4. For a change that touches more than one place, write the plan as a comment: what you will
45
+ change, in which files, and why. Say what you will not touch.
46
+ 5. Make the change. Stay inside the task: do not change code that the task does not name, do not
47
+ revert code that you did not write in this task, do not refactor on the way.
48
+ 6. Verify against each acceptance criterion. Run the project's tests, linters and type checks.
49
+ For a UI change, look at screenshots. A criterion that you cannot check stays open.
50
+ 7. Commit with one or more focused commits. Do not push and do not open a pull request unless the
51
+ mandate says so. Public text, such as a pull request body, needs the user's approval of the
52
+ exact text.
53
+ 8. Add a comment with the result, the changed files, the commit hashes, the verification and the
54
+ known limitations.
55
+ 9. Read the comments added since step 1. Act on them before you change the status.
56
+ 10. Set `done` and release the claim with `task_claim(..., assigned=null)`.
57
+
58
+ A task that asks to consider an option and that you think should not be done is not yours to
59
+ decline. Write the reasons in a comment, leave the task open, and continue with other tasks.
60
+
61
+ ## 5. Decide or stop
62
+
63
+ Make ordinary decisions inside the agreed scope yourself, and record each one in a comment on
64
+ the task. Stop work on a task, write the question as a comment, and continue with other ready
65
+ tasks when:
66
+
67
+ - the work grows past the task or the epic;
68
+ - the change would alter a requirement, an acceptance criterion or a public interface that the
69
+ task does not name;
70
+ - the next step is outward-facing or hard to reverse: push, deploy, publish, delete data;
71
+ - a note or a comment contradicts the task;
72
+ - a criterion cannot be met without changing the task.
73
+
74
+ A question is not consent. Silence is not consent. Wait for the user's answer before you act on
75
+ the question.
76
+
77
+ ## 6. Findings on the way
78
+
79
+ A bug that is not part of the current task goes into a new task. Trace it first and file it only
80
+ when it is confirmed. Write what was done, what happened and what was expected. Tag it `bug`,
81
+ link it `related_to` the task where you found it, and do not fix it in this epic.
82
+
83
+ Save new lasting knowledge from the user as a note at once. See `backlog://guide/memory`.
84
+
85
+ ## 7. Finish the epic
86
+
87
+ When no child is ready:
88
+
89
+ 1. Read the epic and every child again. Check that each closed child meets its criteria and that
90
+ each open child has a comment that says what it waits for.
91
+ 2. Run the full test suite on the branch. Check `git status` for changes without a commit.
92
+ 3. Read the new comments on the epic. When every child is closed, set the epic `done`.
93
+ Otherwise leave it open. Release your claim on the epic.
94
+ 4. Give a short report: the closed tasks with their commits, the open tasks with their open
95
+ question, the bugs you filed, and the limitations. Keep it to a few lines; the details are in
96
+ the task comments.
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: planning
3
+ description: "Plan a large feature, an epic or a whole project on the backlog: search for context and notes first, settle open choices with the user, file an epic with child tasks that a different agent can carry out, link real dependencies, set priorities, then review the plan."
4
+ ---
5
+
6
+ # Plan an epic on the backlog
7
+
8
+ Use this when a request is larger than one task: a feature, a component, a migration, an audit
9
+ result, or a whole project. The result is an epic task with child tasks. Another agent may carry
10
+ them out later with the `autopilot` skill, so write each task for a reader who has only the task.
11
+
12
+ ## 1. Load the context
13
+
14
+ Read `project_board(project=<absolute local path>)`. Use the returned `full_name` from then on.
15
+ Read every `global_memory` entry in full. Then call `memory_list(project=<full_name>)` and read
16
+ the relevant entries with `memory_get`.
17
+
18
+ Call `search` before each decision and for each new question. Write the query as a question in
19
+ natural language, and rephrase it when the results are weak. Look for tasks that already cover
20
+ part of the work, and for notes with agreements about this area. Update an existing task instead
21
+ of filing a duplicate. Use code and documentation for current technical facts.
22
+
23
+ ## 2. Find the shape of the work
24
+
25
+ - A feature or an audit result is one epic.
26
+ - A system with several components gets one epic for each component.
27
+ - A whole project is a set of epics. File the epics first, then the tasks of each epic.
28
+
29
+ Keep the user's words. Write down what the user asked for, what the user decided, and what the
30
+ code shows. Keep your own ideas out of the epic and the tasks.
31
+
32
+ ## 3. Settle open choices before filing
33
+
34
+ When the approach is not decided, list the options with the criteria that separate them. Put
35
+ them in the chat, or in a comment on the epic when the epic exists. Wait for the user's
36
+ decision. Record each decision as a comment: `User decision (YYYY-MM-DD): «quote»`.
37
+
38
+ Ask only for decisions that change the plan. Look in notes and code before you ask.
39
+
40
+ ## 4. File the epic
41
+
42
+ Call `task_add` with the tag `epic` and a title that starts with `Epic:`. The body holds:
43
+
44
+ - the request, in the user's words;
45
+ - the goal: the outcome that is true when the epic is done;
46
+ - the agreed scope and what is out of scope;
47
+ - the mandate: plan only, or plan and carry out;
48
+ - the acceptance criteria: the checks that prove the goal is reached;
49
+ - the closing rule for child tasks, when the epic asks to consider options: a child closes as
50
+ implemented and verified, or as declined with the reason written by the user's decision.
51
+
52
+ Write the acceptance criteria when you file the task, in the body or in the first comment.
53
+ Derive them from the user's request and decisions, so that another agent can check each one.
54
+ When you review a task that has no criteria, write them in a comment and explain why each
55
+ criterion proves the task is done.
56
+
57
+ ## 5. File the child tasks
58
+
59
+ Cut along outcomes, not along layers. See `references/splitting.md`.
60
+
61
+ Each child task body holds the request, the verified facts with file paths and line numbers, the
62
+ constraints and the notes that apply (`note #id`). The acceptance criteria go into the body or
63
+ into the first comment. The body does not hold
64
+ hypotheses or the agent's proposals. A future executor must understand the goal and know when
65
+ the task is done without the chat.
66
+
67
+ Then link the tasks:
68
+
69
+ - `task_link(child, "part_of", epic)` for every child. A sub-epic is `part_of` its epic.
70
+ - `task_link(later, "depends_on", earlier)` only for a real dependency. When several tasks share
71
+ a contract, file the contract first and let the other tasks depend on it. Tasks without a
72
+ dependency between them stay parallel.
73
+ - `related_to` for context in another epic. Say why in a comment.
74
+
75
+ Set a priority on every task. Use `high` for the work that unblocks the rest, `low` for work that
76
+ can wait. A plan where every task is `high` says nothing about order.
77
+
78
+ Follow the project's `preferred_language` for titles, bodies and comments.
79
+
80
+ ## 6. Plan each task when asked
81
+
82
+ When the user asks for detailed plans, start one subagent for each task. Each subagent reads the
83
+ task and the code, estimates the size of the change, and writes the plan as a comment on that
84
+ task. The plan is a proposal; the task body does not change.
85
+
86
+ ## 7. Review the plan
87
+
88
+ Read the epic and every child again with `task_get`. Look for contradictions, inaccurate facts,
89
+ missing or false dependencies, and tasks that are already done or outdated. Write each finding as
90
+ a comment.
91
+
92
+ When a disputed task is resolved, file a new task with a clean body, link the old task
93
+ `related_to` the new one, comment `Replaced by #<new>` on the old task, and close it as
94
+ `cancelled` with `task_update`. Read new comments before each status change.
95
+
96
+ ## 8. Keep what the user taught you
97
+
98
+ Save new lasting knowledge from the user at once: constraints, preferences, corrections, reasons
99
+ for decisions. Search first and update the existing note. Do not save the plan itself, guesses or
100
+ code snapshots. See `backlog://guide/memory`.
101
+
102
+ ## 9. Report
103
+
104
+ Give a short report: the epic id and title, the child ids in the expected order, the tasks that
105
+ are ready now, and the open questions. Do not start the implementation unless the mandate says
106
+ so. For execution, use the `autopilot` skill.
@@ -0,0 +1,45 @@
1
+ # Where to cut work into tasks
2
+
3
+ ## Cut along outcomes, not along layers
4
+
5
+ "Store the retry count", "read the retry count in the client" and "show the retry count in the
6
+ console" are three layers of one outcome. Filed separately, none of them can be verified alone.
7
+ File one task, "retry failed uploads three times", and let it touch three files.
8
+
9
+ Cut when the parts are useful on their own, or when different agents can do them at the same
10
+ time.
11
+
12
+ ## Shared contracts come first
13
+
14
+ When several tasks use the same format, interface or schema, file the contract as its own task.
15
+ The other tasks depend on it and stay independent of each other. Do not chain tasks one after
16
+ another when no real dependency exists.
17
+
18
+ ## Research is its own task
19
+
20
+ If nobody knows how to do the work yet, the first task is to find out. Give it an outcome that
21
+ can be delivered: "Measure which query makes the list page slow", not "look into performance".
22
+ Write the findings in comments. File the tasks that the findings make clear, and link them
23
+ `caused_by` the research task.
24
+
25
+ ## Consider is not implement
26
+
27
+ "Cover what the SDK has" can mean "review each feature". Then each child task closes in one of
28
+ two ways: implemented, tested and documented, or declined with the reason written. The user
29
+ decides a decline.
30
+
31
+ ## Bugs
32
+
33
+ File the report, not the guess: what was done, what happened, what was expected, and the error
34
+ text. Trace a suspected bug before you file it. When the cause is found, the fix may be several
35
+ tasks; the report stays one task.
36
+
37
+ ## Size
38
+
39
+ If a task cannot be finished in one session, it is too large. If another agent cannot verify a
40
+ task, it is too vague. If two tasks always have to be done together, they are one task.
41
+
42
+ ## Keep the plan together
43
+
44
+ Link every task `part_of` its epic. `task_get` on the epic then lists the whole plan, including
45
+ the closed parts.
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: triage
3
+ description: "Triage a backlog: search first for relevant notes and tasks, always consult notes when uncertain what to do, always work through tasks, keep status and priority true, close what is done, and retain user-provided knowledge unavailable elsewhere."
4
+ ---
5
+
6
+ # Triage a backlog
7
+
8
+ Triage keeps a board short and true. Do it when you start work on a project, when a session
9
+ ends, and whenever the board disagrees with the code.
10
+
11
+ ## 1. See where you are
12
+
13
+ Check the local project binding with `whoami` and `project_list`.
14
+ Read `project_board(project=<full_name>)` for context, counts and ready and claimed tasks.
15
+ Use `stats` for detailed counts by status and priority and the tags in use.
16
+ Several agents can work on different claimed tasks. Use `task_assigned` to inspect ownership;
17
+ status alone does not identify who is working.
18
+
19
+ ## 2. Search for what is already known and consult notes
20
+
21
+ Code changes; notes remain. Keep lasting user context unavailable elsewhere: preferences,
22
+ working agreements, people and responsibilities, business constraints, and reasons for decisions.
23
+ Exclude snapshots of implementation, architecture, configuration, bugs, and documentation.
24
+ A useful note should still help after the code is rewritten.
25
+
26
+ After checking the board, read every `global_memory` entry in full before work.
27
+ Global memory is mandatory context, not filtered by search relevance or list pagination.
28
+ Then call `memory_list(project=<full_name>)`.
29
+ Keep the default compact result and read relevant entries with `memory_get`.
30
+ Search other projects by topic only when needed; do not load unrelated memory.
31
+ Choose the audience by who needs the fact: `my dev server` is personal;
32
+ `team dev servers catalog` is shared. `global_scope` extends scope, not audience.
33
+ If the project, audience or global scope is unclear, ask the user before saving or
34
+ changing sharing. Do not guess or use defaults to resolve uncertainty.
35
+ Use `memory_sharing` to change shared/global flags. See `backlog://guide/memory`.
36
+
37
+ Use `search` as the primary retrieval tool alongside web search to recall past agreements and
38
+ user preferences. ALWAYS consult notes (`memory_get`, `memory_list`, `search`) whenever you do not
39
+ know what to do, what conventions or architecture to follow, or what the user prefers. Check notes
40
+ before making decisions, assuming answers, or asking the user again. Use code, documentation, and the
41
+ web for current technical facts. Search for relevant notes instead of reading them all.
42
+ Update outdated context when the user corrects it.
43
+
44
+ Start each session with `search` for the current task or question. Search frequently throughout
45
+ work: before investigating, choosing an approach, asking the user for project facts, or creating
46
+ a task or note. Search again whenever a new question arises. Inspect returned matches and use
47
+ `memory_get` or `task_get` only when more detail is needed. Verify facts that may have changed.
48
+ Avoid listing and reading all notes or tasks to find information. Search combines word prefixes
49
+ and meaning across languages; rephrase queries or adjust filters when needed.
50
+
51
+ ## 3. Always work through tasks: review and track work
52
+
53
+ Never perform untracked work. Use `search` to find tasks related to the request. Check whether each relevant task still
54
+ matches the code. Use `task_list` only when the user requests a complete board review or an
55
+ inventory; apply filters and paginate through that scope. Use `stats` for counts.
56
+
57
+ - Done in the code but open on the board: set `status="done"` with `task_update`.
58
+ - No longer wanted: set `status="cancelled"`. Do not delete it; a cancelled task records the decision.
59
+ - Blocked on something outside the task: set `status="blocked"` and explain the blocker with `task_comment_add`.
60
+ - Being worked on now: set `status="doing"`, one task at a time.
61
+
62
+ Use `task_comment_add(task_id, body)` for progress, review feedback, findings, questions,
63
+ suggestions, verification, and proposed requirement changes. The body is the agreed task
64
+ definition. Use `task_update(body=...)` only on an explicit user request or to reflect
65
+ explicitly agreed requirements that make it incorrect or outdated. Add a separate comment
66
+ explaining every body edit and its authorization. New findings alone do not authorize edits.
67
+ Status transitions create separate history entries. See `backlog://guide/tasks`.
68
+ Follow the project's `preferred_language` for task and comment text.
69
+
70
+ ## 4. File what is missing
71
+
72
+ Call `search` before you add anything, because a duplicate is worse than a missing
73
+ task. It answers with the tasks and the notes that match.
74
+ Search matches titles, bodies and tags by word prefix and meaning. Use specific terms or
75
+ a short natural-language question.
76
+
77
+ Add what the search did not find with `task_add`. Follow `references/conventions.md` for the
78
+ title, the body, the priority and the tags.
79
+
80
+ ## 5. Set priority against the other tasks
81
+
82
+ Priority is a ranking, not a feeling. At most a few tasks can be `urgent`; if everything is
83
+ urgent the ranking carries no information. Read `references/conventions.md` for what each
84
+ level means here.
85
+
86
+ ## 6. Retain knowledge supplied by the user
87
+
88
+ When the project, audience and scope are clear, save useful new user knowledge proactively.
89
+ Do not wait for a request to remember it or for the session to end. Capture preferences,
90
+ constraints, corrections, and reasons for decisions that a later session would otherwise need
91
+ to ask about again. Search first, then update the existing note or create one short note per topic.
92
+ Use `memory_save` for corrections and `memory_append` for related facts. Omit guesses, duplicates,
93
+ and summaries of code, documentation, or the session.
94
+
95
+ Link notes from tasks by stable id, such as `note #3`. Never store passwords, tokens, or keys.
96
+
97
+ ## 7. Report
98
+
99
+ Say what changed: how many tasks you closed, what you added, and what is blocked and on what.
100
+ Name tasks by id and title, so the user can follow up on one of them.
101
+
102
+ Prefer closing tasks with status `done` or `cancelled` during triage. `task_delete` marks
103
+ a task's status as `deleted` without removing the record. Closing or cancelling keeps the
104
+ history easily visible.
@@ -0,0 +1,43 @@
1
+ # Conventions for tasks on this backlog
2
+
3
+ ## Titles
4
+
5
+ One line, imperative, and specific enough to act on without the body: "Retry failed uploads
6
+ three times", not "Uploads". Name the thing the way the code names it. Keep it under about
7
+ 70 characters, because listings show titles in a column.
8
+
9
+ ## Bodies
10
+
11
+ The body holds what the title cannot: the reason, the constraint, the failing input, the
12
+ decision that was already made. Paste the error text if there is one. A body of three useful
13
+ lines beats a body of three paragraphs.
14
+
15
+ Write the body for whoever picks the task up cold, in a month.
16
+
17
+ ## Statuses
18
+
19
+ - `todo`: agreed, not started.
20
+ - `doing`: being worked on now. Keep one per person.
21
+ - `blocked`: cannot proceed. The body must say on what.
22
+ - `done`: finished. The closing time is stamped for you.
23
+ - `cancelled`: decided against. The body must say why.
24
+
25
+ `todo`, `doing` and `blocked` are the open statuses, and are what listings show by default.
26
+
27
+ ## Priorities
28
+
29
+ - `urgent`: work stops or users are affected until this is done.
30
+ - `high`: the next thing to pick up once the urgent tasks are clear.
31
+ - `normal`: agreed work with no date on it. Most tasks are normal.
32
+ - `low`: worth doing if it is ever convenient. A parking place, not a promise.
33
+
34
+ ## Tags
35
+
36
+ Lowercase, single words, and reused rather than invented: `bug`, `docs`, `tests`, `perf`,
37
+ `refactor`, plus one for the area of the code (`cli`, `http`, `store`). Two or three tags are
38
+ enough. Call `stats` to see which tags a project already uses before you add a new one.
39
+
40
+ ## One task, one outcome
41
+
42
+ If a task needs the word "and", it is two tasks. If it cannot be finished in a sitting, split
43
+ it, and keep a parent task only when it carries a decision the parts do not.
backlog_mcp/skills.py ADDED
@@ -0,0 +1,56 @@
1
+ """Text skills: instructions that a client loads, and the files that those instructions cite.
2
+
3
+ A skill is a directory under `skills/`. `<name>/SKILL.md` holds YAML frontmatter with `name`
4
+ and `description`, then the instructions. `<name>/references/` holds the files that the
5
+ instructions cite. The server does not execute these files. The client reads the text, and
6
+ the tools of this server do the work.
7
+
8
+ aiohttp-tiny-mcp publishes the directory through the `io.modelcontextprotocol/skills`
9
+ extension. The extension reads the files once, when this module is imported.
10
+ """
11
+
12
+ from __future__ import annotations
13
+
14
+ from pathlib import Path
15
+
16
+ from aiohttp_tiny_mcp.extensions.skills import SKILLS_EXTENSION, SKILLS_LIST, Skills
17
+
18
+ #: The extension that the skills belong to, as the specification names it.
19
+ EXTENSION = SKILLS_EXTENSION
20
+ #: The resource that lists every skill with the address of its root resource.
21
+ LIST_URI = SKILLS_LIST
22
+ SCHEME = "skill://"
23
+ MANIFEST = "SKILL.md"
24
+
25
+ ROOT = Path(__file__).parent / "skills"
26
+
27
+
28
+ def load(root: Path = ROOT) -> Skills:
29
+ """Read the skills under `root` into an extension. Changes on disk need a new extension."""
30
+ return Skills.from_directory(root)
31
+
32
+
33
+ def body(text: str) -> str:
34
+ """Give the instructions of a SKILL.md: all text below the frontmatter block."""
35
+ lines = text.splitlines()
36
+ if not lines or lines[0].strip() != "---":
37
+ return text.strip()
38
+ for index, line in enumerate(lines[1:], start=2):
39
+ if line.strip() == "---":
40
+ return "\n".join(lines[index:]).strip()
41
+ return ""
42
+
43
+
44
+ extension = load()
45
+
46
+
47
+ __all__ = [
48
+ "EXTENSION",
49
+ "LIST_URI",
50
+ "MANIFEST",
51
+ "ROOT",
52
+ "SCHEME",
53
+ "body",
54
+ "extension",
55
+ "load",
56
+ ]
@@ -0,0 +1,20 @@
1
+ import { authorization } from "./credentials.js";
2
+
3
+ export function agentConfig({
4
+ endpoint, computer = "", method = "basic", username = "", secret = "",
5
+ name = "backlog", level = "user", includeCredentials = true,
6
+ }) {
7
+ const url = new URL(endpoint);
8
+ if (!["http:", "https:"].includes(url.protocol) || url.username || url.password || endpoint.includes("#"))
9
+ throw new Error("Use an HTTP or HTTPS MCP URL without embedded credentials or a fragment.");
10
+ if (!computer.trim()) throw new Error("Enter your computer name.");
11
+ url.searchParams.set("computer", computer.trim());
12
+ let headers = {};
13
+ if (includeCredentials && method !== "none") {
14
+ if (method === "basic" && (!username || !secret))
15
+ throw new Error("Enter your username and password.");
16
+ const token = method === "bearer" ? secret.trim() : secret;
17
+ headers = { Authorization: authorization({ method, username, secret: token }) };
18
+ }
19
+ return globalThis.agentConfigurations({ endpoint: url.href, name, headers, level });
20
+ }