@dleangen/cage-issues 0.0.1 → 0.1.0

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.
package/package.json CHANGED
@@ -1,8 +1,46 @@
1
1
  {
2
2
  "name": "@dleangen/cage-issues",
3
- "version": "0.0.1",
3
+ "version": "0.1.0",
4
4
  "description": "File-based issue tracking for CAGE-enabled projects.",
5
5
  "license": "MIT",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "bin": {
9
+ "cage-issues-mcp": "./dist/mcp/server.js"
10
+ },
11
+ "files": [
12
+ "dist/",
13
+ "skills/",
14
+ "schemas/"
15
+ ],
16
+ "scripts": {
17
+ "build": "shx rm -rf dist && tsc -b",
18
+ "lint": "eslint",
19
+ "posttest": "npm run lint",
20
+ "test": "mocha --forbid-only \"test/**/*.test.ts\""
21
+ },
22
+ "dependencies": {
23
+ "@modelcontextprotocol/sdk": "^1",
24
+ "js-yaml": "^4",
25
+ "zod": "^4.4.3"
26
+ },
27
+ "devDependencies": {
28
+ "@types/chai": "^4",
29
+ "@types/js-yaml": "^4",
30
+ "@types/mocha": "^10",
31
+ "@types/node": "^18",
32
+ "chai": "^4",
33
+ "eslint": "^9",
34
+ "eslint-config-prettier": "^10",
35
+ "mocha": "^11",
36
+ "shx": "^0.3.3",
37
+ "ts-node": "^10",
38
+ "typescript": "^5",
39
+ "typescript-eslint": "^8"
40
+ },
41
+ "engines": {
42
+ "node": ">=18.0.0"
43
+ },
6
44
  "keywords": [
7
45
  "cage",
8
46
  "issues",
@@ -0,0 +1,23 @@
1
+ # backlog.yaml — per-topic backlog
2
+ # Place at: topics/{TOPIC}/backlog.yaml
3
+ # Resolved and cancelled issues are removed entirely — not commented out.
4
+ # History is accessed via list_issues.
5
+
6
+ active:
7
+ - id: SHELL-2026-0003
8
+ title: Add a dedicated dev-only /ops/api proxy
9
+ rationale: >
10
+ Removes credential sharing in chat; unblocks agent queries against
11
+ the data API.
12
+
13
+ up_next:
14
+ - id: SHELL-2026-0002
15
+ title: Extend guardedFetch coverage to documentApi
16
+ rationale: >
17
+ Follow-on to 0001. Three service files bypass 401 detection.
18
+
19
+ deferred:
20
+ - id: SHELL-2026-0001
21
+ title: CI gradient coordination
22
+ rationale: >
23
+ Depends on external coordination. No shell code change needed yet.
@@ -0,0 +1,28 @@
1
+ # config.yaml — root-level user configuration
2
+ # Place this file at the root of your management repository.
3
+
4
+ priority_labels:
5
+ p1: p1 # override with e.g. "Blocking"
6
+ p2: p2 # override with e.g. "High"
7
+ p3: p3 # override with e.g. "Medium"
8
+ p4: p4 # override with e.g. "Low"
9
+
10
+ impact_labels:
11
+ low: low
12
+ medium: medium
13
+ high: high
14
+ critical: critical
15
+
16
+ # Project-specific tracks. Generic tracks (Data, Docs, Meta, Issues)
17
+ # are built-in and do not need to be listed here.
18
+ tracks:
19
+ - id: frontend
20
+ name: Frontend
21
+ affects_patterns:
22
+ - src/
23
+ - components/
24
+ - id: api
25
+ name: API
26
+ affects_patterns:
27
+ - api/
28
+ - routes/
@@ -0,0 +1,61 @@
1
+ # issue.yaml — full example issue (all fields populated)
2
+ # Filename: {TOPIC}-{YEAR}-{SEQUENCE}.yaml
3
+ # Place at: topics/{TOPIC}/issues/{TOPIC}-{YEAR}-{SEQUENCE}.yaml
4
+
5
+ # System fields — auto-generated, immutable
6
+ id: SHELL-2026-0003
7
+ date: '2026-06-04'
8
+
9
+ # Required fields
10
+ title: Add a dedicated dev-only /ops/api proxy
11
+ description: >
12
+ The dev server currently exposes the API at /api, which requires
13
+ shared credentials in chat sessions. A dedicated /ops/api proxy
14
+ would allow agents to query the data API without credential sharing.
15
+
16
+ # Status
17
+ status: in_progress
18
+ status_history:
19
+ - status: open
20
+ timestamp: '2026-06-04T09:00:00Z'
21
+ by: owner
22
+ - status: in_progress
23
+ timestamp: '2026-06-04T14:00:00Z'
24
+ by: Manager
25
+
26
+ # Maturity-gating fields
27
+ priority: p2
28
+ what_to_resolve: >
29
+ Agents can query /ops/api in dev without needing shared credentials.
30
+ The proxy is dev-only and not present in production builds.
31
+
32
+ tasks:
33
+ - id: t1
34
+ description: Add /ops/api route to vite.config.ts proxy table.
35
+ status: done
36
+ priority: must-have
37
+ - id: t2
38
+ description: Update agent documentation to reference /ops/api.
39
+ status: open
40
+ priority: nice-to-have
41
+
42
+ affects:
43
+ - vite.config.ts
44
+ - docs/agent-api-access.md
45
+
46
+ signoffs:
47
+ - role: Architect
48
+ timestamp: '2026-06-04T15:00:00Z'
49
+ note: >
50
+ Reviewed proxy config. Scoped correctly to dev only. No concerns.
51
+
52
+ # Context fields (all optional)
53
+ focus: dev-tooling
54
+ facet: feature
55
+ impact: medium
56
+ impact_note: Unblocks agent-assisted API queries during development.
57
+ classification: standard
58
+ base_branch: main
59
+ related:
60
+ - SHELL-2026-0002
61
+ dependencies: []
@@ -0,0 +1,9 @@
1
+ # topic.yaml — topic registration file
2
+ # Place at: topics/{TOPIC}/topic.yaml
3
+
4
+ id: SHELL
5
+ name: LandVault Shell Application
6
+ description: >
7
+ Frontend application and its supporting infrastructure.
8
+ owner: david.leangen@example.com
9
+ status: active # active | closed
@@ -0,0 +1,41 @@
1
+ # Skill: Display Backlog
2
+
3
+ Display a topic's backlog (or an aggregated cross-topic backlog) in a table with Active → Up Next → Deferred sections.
4
+
5
+ ## When to use
6
+
7
+ - User asks to see the backlog
8
+ - User asks what's queued, what's next, or what's deferred
9
+ - User asks for the current work queue
10
+
11
+ ## Steps
12
+
13
+ 1. Call `get_backlog` with the topic (and optional track filter) the user specified. Omit topic for the cross-topic aggregate.
14
+ 2. Render using the format below.
15
+
16
+ ## Format
17
+
18
+ ```
19
+ ━━━ Backlog{topic_suffix}{track_suffix} ━━━
20
+
21
+ ── Active ───────────────────────────────────────────
22
+ {ID} {title}
23
+ {rationale}
24
+
25
+ ── Up Next ──────────────────────────────────────────
26
+ {ID} {title}
27
+ {rationale}
28
+
29
+ ── Deferred ─────────────────────────────────────────
30
+ {ID} {title}
31
+ {rationale}
32
+ ```
33
+
34
+ ## Rendering rules
35
+
36
+ - `{topic_suffix}`: ` — {TOPIC}` if scoped to a single topic, empty if aggregate.
37
+ - `{track_suffix}`: ` [track: {track}]` if a track filter was applied.
38
+ - If a section is empty, show ` (none)` on the line below the section header.
39
+ - Rationale text is optional — omit the line if the entry has no rationale.
40
+ - Entry IDs are left-aligned and right-padded so titles line up in a column.
41
+ - Preserve section order: Active first, then Up Next, then Deferred.
@@ -0,0 +1,72 @@
1
+ # Skill: Display Single Issue
2
+
3
+ Display a single issue in a structured, readable format. Use this whenever the user asks to see, view, or get details on a specific issue.
4
+
5
+ ## When to use
6
+
7
+ - User asks to see issue SHELL-2026-0003
8
+ - User says "show me that issue"
9
+ - User wants to review an issue before acting on it
10
+
11
+ ## Steps
12
+
13
+ 1. Call `get_issue` with the issue ID.
14
+ 2. Render using the format below.
15
+
16
+ ## Format
17
+
18
+ Render the issue as follows. Omit sections whose fields are all absent.
19
+
20
+ ```
21
+ ━━━ {ID} ━━━
22
+ {title}
23
+
24
+ Status: {status} Maturity: {maturity}
25
+ Priority: {priority_label} Track: {track}
26
+ Date: {date}
27
+
28
+ {description}
29
+
30
+ ── Resolution Criteria ──────────────────────────────
31
+ {what_to_resolve}
32
+
33
+ ── Tasks ────────────────────────────────────────────
34
+ [{task_status_icon}] [{task_priority}] {task_description}
35
+ ...
36
+
37
+ ── Affects ──────────────────────────────────────────
38
+ - {affects[0]}
39
+ - {affects[1]}
40
+ ...
41
+
42
+ ── Context ──────────────────────────────────────────
43
+ Focus: {focus}
44
+ Facet: {facet}
45
+ Impact: {impact_label} — {impact_note}
46
+ Classification: {classification}
47
+ Base branch: {base_branch}
48
+ PR: {pull_request}
49
+ Related: {related}
50
+ Dependencies: {dependencies}
51
+
52
+ ── Signoffs ─────────────────────────────────────────
53
+ ✓ {role} {timestamp}
54
+ {note}
55
+
56
+ ── Status History ───────────────────────────────────
57
+ {timestamp} {status} (by {by})
58
+ ...
59
+ ```
60
+
61
+ ## Rendering rules
62
+
63
+ - `{priority_label}`: look up the user's configured label for the priority value (from `config.yaml`). Fall back to the raw value (p1–p4) if config is unavailable.
64
+ - `{impact_label}`: same pattern for impact values.
65
+ - `{task_status_icon}`: `✓` for done, `→` for in_progress, ` ` (space) for open.
66
+ - `{track}`: show "—" if null.
67
+ - Omit the "Resolution Criteria" section if `what_to_resolve` is absent.
68
+ - Omit the "Tasks" section if `tasks` is empty or absent.
69
+ - Omit the "Affects" section if `affects` is empty or absent.
70
+ - Omit the "Signoffs" section if `signoffs` is empty or absent.
71
+ - Omit individual context fields that are absent.
72
+ - Status history is always shown.
@@ -0,0 +1,39 @@
1
+ # Skill: Display List of Issues
2
+
3
+ Display filtered or search results as a compact table. Use for multi-issue views where the user does not need full detail on each issue.
4
+
5
+ ## When to use
6
+
7
+ - User lists issues with filters (by status, priority, topic, track, date range)
8
+ - User searches for issues
9
+ - User asks "what's open in SHELL?" or "show me all p1 issues"
10
+
11
+ ## Steps
12
+
13
+ 1. Call `list_issues` or `search_issues` with the parameters the user specified.
14
+ 2. Render using the format below.
15
+
16
+ ## Format
17
+
18
+ ```
19
+ ━━━ Issues{filter_summary} ━━━
20
+
21
+ ID St Pri Mat Track Title
22
+ ────────────────── ── ─── ─────── ──────── ──────────────────────────────
23
+ SHELL-2026-0003 ● p2 ready frontend Add /ops/api proxy
24
+ SHELL-2026-0002 ○ p3 defined docs Extend guardedFetch coverage
25
+ ...
26
+
27
+ {count} issue(s)
28
+ ```
29
+
30
+ ## Rendering rules
31
+
32
+ - `{filter_summary}`: a compact summary of active filters, e.g. ` — SHELL / open / p1`. Omit if no filters.
33
+ - **St (status) icon**: `●` in_progress, `○` open, `✓` resolved, `✗` cancelled.
34
+ - **Mat (maturity)**: show the full word (draft / defined / ready / verified).
35
+ - **Track**: show "—" if null.
36
+ - Sort: by date descending (newest first) unless the user specifies otherwise.
37
+ - For `search_issues` results: preserve relevance ranking order.
38
+ - Truncate very long titles with `…` to keep the table readable.
39
+ - Show the count line at the bottom.
@@ -0,0 +1,50 @@
1
+ # Skill: Display Weekly Activity Summary
2
+
3
+ Display a summary of resolved issues over a date range, grouped by topic and track. Used for weekly reviews, standups, and progress reports.
4
+
5
+ ## When to use
6
+
7
+ - User asks for the weekly summary
8
+ - User asks what was resolved this week (or last week, or a specific date range)
9
+ - User wants a progress report for a time period
10
+
11
+ ## Steps
12
+
13
+ 1. Determine the date range:
14
+ - "this week" → Monday of current week through today
15
+ - "last week" → Monday through Sunday of the previous week
16
+ - Explicit dates → use as given
17
+ 2. Call `list_issues` with `status: resolved` and the date range. If the user scoped to a topic, pass it; otherwise omit for all topics.
18
+ 3. Render using the format below.
19
+
20
+ ## Format
21
+
22
+ ```
23
+ ━━━ Weekly Summary — {date_from} to {date_to} ━━━
24
+
25
+ {TOPIC} — {topic_name}
26
+ {track}
27
+ ✓ {ID} {title}
28
+ ✓ {ID} {title}
29
+
30
+ {TOPIC} — {topic_name}
31
+ {track}
32
+ ✓ {ID} {title}
33
+
34
+ ──────────────────────────────────────────────────────
35
+ {total} issue(s) resolved
36
+ ```
37
+
38
+ ## Rendering rules
39
+
40
+ - Group first by topic, then by track within each topic.
41
+ - Within each track group, sort issues by resolution date ascending.
42
+ - Show track as "—" for issues with no derived track.
43
+ - If no issues were resolved in the date range, say: `No issues resolved in this period.`
44
+ - The date range header uses ISO dates (YYYY-MM-DD).
45
+ - For cross-topic summaries, order topics alphabetically by ID.
46
+ - Include the total count line at the bottom.
47
+
48
+ ## Note on date filtering
49
+
50
+ `list_issues` filters on the `date` field (creation date). Resolved issues do not store a separate resolution date in v1. Filter by `date_from`/`date_to` as a proxy; the weekly summary covers issues *created* in the range that are now resolved. Document this limitation if it affects the user's interpretation.
@@ -1,31 +0,0 @@
1
- name: Publish to npm
2
-
3
- on:
4
- push:
5
- tags:
6
- - 'v*'
7
-
8
- jobs:
9
- publish:
10
- runs-on: ubuntu-latest
11
- permissions:
12
- contents: write # needed to create GitHub Release
13
- id-token: write # needed for npm trusted publishing
14
-
15
- steps:
16
- - name: Checkout
17
- uses: actions/checkout@v4
18
-
19
- - name: Setup Node.js
20
- uses: actions/setup-node@v4
21
- with:
22
- node-version: '24'
23
- registry-url: 'https://registry.npmjs.org'
24
-
25
- - name: Publish to npm
26
- run: npm publish --access public --provenance
27
-
28
- - name: Create GitHub Release
29
- uses: softprops/action-gh-release@v2
30
- with:
31
- generate_release_notes: true