gnosys 5.2.7 → 5.2.10
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/dist/cli.js +274 -2
- package/dist/cli.js.map +1 -1
- package/dist/index.js +116 -32
- package/dist/index.js.map +1 -1
- package/dist/lib/db.d.ts +1 -0
- package/dist/lib/db.d.ts.map +1 -1
- package/dist/lib/db.js +3 -0
- package/dist/lib/db.js.map +1 -1
- package/dist/lib/portfolio.d.ts +93 -0
- package/dist/lib/portfolio.d.ts.map +1 -0
- package/dist/lib/portfolio.js +618 -0
- package/dist/lib/portfolio.js.map +1 -0
- package/dist/lib/portfolioHtml.d.ts +9 -0
- package/dist/lib/portfolioHtml.d.ts.map +1 -0
- package/dist/lib/portfolioHtml.js +537 -0
- package/dist/lib/portfolioHtml.js.map +1 -0
- package/dist/postinstall.d.ts +3 -2
- package/dist/postinstall.d.ts.map +1 -1
- package/dist/postinstall.js +67 -21
- package/dist/postinstall.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gnosys Portfolio — Cross-project status dashboard
|
|
3
|
+
*
|
|
4
|
+
* Queries the central DB for all registered projects and generates
|
|
5
|
+
* a formatted dashboard showing blockers, production readiness,
|
|
6
|
+
* open questions, and roadmap status.
|
|
7
|
+
*/
|
|
8
|
+
import { GnosysDB, DbProject } from "./db.js";
|
|
9
|
+
export interface ActionItem {
|
|
10
|
+
type: "question" | "blocker" | "manual" | "decision";
|
|
11
|
+
text: string;
|
|
12
|
+
projectName: string;
|
|
13
|
+
sourceId: string;
|
|
14
|
+
sourceTitle: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ProjectSnapshot {
|
|
17
|
+
project: DbProject;
|
|
18
|
+
memoryCounts: {
|
|
19
|
+
total: number;
|
|
20
|
+
byCategory: Record<string, number>;
|
|
21
|
+
};
|
|
22
|
+
/** Most recent landscape memory (status snapshot) */
|
|
23
|
+
latestStatus: {
|
|
24
|
+
id: string;
|
|
25
|
+
title: string;
|
|
26
|
+
modified: string;
|
|
27
|
+
content: string;
|
|
28
|
+
} | null;
|
|
29
|
+
/** Active roadmap memories */
|
|
30
|
+
roadmap: Array<{
|
|
31
|
+
id: string;
|
|
32
|
+
title: string;
|
|
33
|
+
content: string;
|
|
34
|
+
}>;
|
|
35
|
+
/** Active open questions */
|
|
36
|
+
openQuestions: Array<{
|
|
37
|
+
id: string;
|
|
38
|
+
title: string;
|
|
39
|
+
content: string;
|
|
40
|
+
}>;
|
|
41
|
+
/** Top tags across all memories */
|
|
42
|
+
topTags: Array<{
|
|
43
|
+
tag: string;
|
|
44
|
+
count: number;
|
|
45
|
+
}>;
|
|
46
|
+
/** Most recently modified memories (last 7 days) */
|
|
47
|
+
recentActivity: Array<{
|
|
48
|
+
id: string;
|
|
49
|
+
title: string;
|
|
50
|
+
category: string;
|
|
51
|
+
modified: string;
|
|
52
|
+
}>;
|
|
53
|
+
/** Extracted blockers and action items needing manual intervention */
|
|
54
|
+
actionItems: ActionItem[];
|
|
55
|
+
/** Production readiness assessment */
|
|
56
|
+
readiness: {
|
|
57
|
+
/** 0-100 score */
|
|
58
|
+
score: number;
|
|
59
|
+
/** Short label: "Shipped", "Ready", "Mostly Done", "In Progress", "Early" */
|
|
60
|
+
label: string;
|
|
61
|
+
/** What's done (extracted bullet points) */
|
|
62
|
+
done: string[];
|
|
63
|
+
/** What's blocking go-live */
|
|
64
|
+
blocking: string[];
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export interface PortfolioReport {
|
|
68
|
+
generated: string;
|
|
69
|
+
totalProjects: number;
|
|
70
|
+
totalMemories: number;
|
|
71
|
+
projects: ProjectSnapshot[];
|
|
72
|
+
/** All action items across projects, sorted by urgency */
|
|
73
|
+
allActionItems: ActionItem[];
|
|
74
|
+
}
|
|
75
|
+
/** Generate the full portfolio report */
|
|
76
|
+
export declare function generatePortfolio(db: GnosysDB): PortfolioReport;
|
|
77
|
+
/** Format the portfolio as markdown */
|
|
78
|
+
export declare function formatPortfolioMarkdown(report: PortfolioReport): string;
|
|
79
|
+
/** Format as compact text (for MCP tool responses) */
|
|
80
|
+
export declare function formatPortfolioCompact(report: PortfolioReport): string;
|
|
81
|
+
/**
|
|
82
|
+
* The canonical prompt to give any AI agent so it writes a dashboard-compatible
|
|
83
|
+
* status memory via gnosys_add_structured.
|
|
84
|
+
*
|
|
85
|
+
* The prompt is structured as a guided checklist. The AI must:
|
|
86
|
+
* 1. Analyze the codebase to fill in what it can determine
|
|
87
|
+
* 2. ASK the user for anything it cannot determine from code alone
|
|
88
|
+
* 3. Only write the status memory once all sections are addressed
|
|
89
|
+
*/
|
|
90
|
+
export declare const STATUS_UPDATE_PROMPT = "# Gnosys Status Update \u2014 Guided Checklist\n\nYou are updating the project status for the Gnosys portfolio dashboard. Follow this process exactly.\n\n## Step 1: Analyze the codebase\n\nRead the project structure, recent git history, test results, build status, and any existing status memories (use gnosys_discover and gnosys_read). Fill in as much as you can from code.\n\n## Step 2: Work through every section below\n\nFor EACH section, either fill it in from your analysis or ASK the user. Do NOT skip sections. Do NOT write the status memory until all sections are addressed.\n\n### Section A: What's Complete\nList all features, milestones, and capabilities that are done and working. Be specific (e.g., \"14 Playwright E2E tests passing\" not \"tests exist\").\n\n### Section B: What's NOT Done\nList everything remaining before the project can go live. Include partial work, missing features, and known gaps.\n\n### Section C: Waiting on Human\n**YOU MUST ASK THE USER** if you cannot determine these from code:\n- Are there accounts that need to be created or configured? (Apple Developer, cloud providers, API keys, DNS, domain registrars, app store submissions)\n- Are there approvals or sign-offs needed? (legal, compliance, stakeholder review)\n- Are there purchases needed? (certificates, licenses, subscriptions)\n- Are there manual deployment steps only the user can do?\n- Is the user waiting on anyone else? (contractors, partners, third-party services)\n\nIf the code shows signs of these (e.g., placeholder API keys, TODO comments about accounts, unsigned builds), list what you found and confirm with the user.\n\n### Section D: Blockers\nItems that are actively preventing progress. Distinguish between:\n- **Technical blockers**: bugs, dependency issues, broken builds\n- **External blockers**: waiting on third-party, account access, API approval\n- **Decision blockers**: choices that need to be made before work can continue\n\n### Section E: Open Decisions\nQuestions or choices that haven't been resolved yet. **ASK the user** about any you find:\n- Architecture or technology choices still open\n- Scope decisions (what's in v1 vs deferred)\n- Prioritization questions\n- Trade-offs that need a human call\n\n### Section F: Go-Live Readiness\nAssess each area \u2014 mark as Ready, Partial, Not Started, or N/A:\n- [ ] Core features functional\n- [ ] Error handling and edge cases\n- [ ] Security review (auth, input validation, secrets management)\n- [ ] Performance acceptable (or: performance testing not done)\n- [ ] Functional testing sufficient (state coverage level and any known gaps)\n- [ ] Documentation (user-facing: README, API docs, guides)\n- [ ] Deployment pipeline (CI/CD, hosting, domain, SSL)\n- [ ] Monitoring and logging\n- [ ] Data migration / seed data\n- [ ] Legal (privacy policy, terms, licenses, compliance)\n\n### Section G: Testing Status\n- **Functional tests**: What exists? What's the coverage? Any known failing tests?\n- **Performance tests**: Have they been run? Any issues found? Any remediation done?\n- **Integration tests**: Do external services / APIs work end-to-end?\n- **Known defects**: List any open bugs with severity (critical/major/minor)\n- **Defect remediation**: Any bugs that were found and fixed recently?\n\n### Section H: Roadmap Changes\n- Has the plan changed since the last status update?\n- Any new work discovered during development?\n- Any scope added or removed?\n- What's the recommended next priority?\n\n## Step 3: Ask the user about gaps\n\nBefore writing the memory, present your findings and explicitly ask about anything you couldn't determine:\n\n> \"I've analyzed the codebase and filled in what I can. I need your input on these items before I can write the status:\n> 1. [specific question]\n> 2. [specific question]\n> ...\"\n\nIf the user says \"skip\" or \"not applicable\" for a section, mark it as \"N/A \u2014 skipped by owner\" in the status.\n\n## Step 4: Write the status memory\n\nOnce all sections are addressed, call gnosys_add_structured with:\n\n- **title**: \"[Project Name] status as of [YYYY-MM-DD] \u2014 [one-line summary]\"\n- **category**: \"landscape\"\n- **tags**: { \"type\": [\"status\", \"milestone\"], \"concern\": [\"release\"] }\n- **relevance**: \"[project-name] status complete shipped ready go-live production blockers testing\"\n- **author**: \"human+ai\"\n- **authority**: \"observed\"\n- **confidence**: 0.95\n- **projectRoot**: \"[the project's working directory]\"\n\nThe content MUST use these exact heading formats (the dashboard parser depends on them):\n\n```markdown\n# [Project Name] Status \u2014 [YYYY-MM-DD]\n\n## What's Complete\n- [from Section A]\n\n## What's NOT Done\n- [from Section B]\n\n## Waiting on Human\n- [from Section C \u2014 manual steps, accounts, approvals]\n\n## Blockers\n- [from Section D \u2014 categorized as Technical / External / Decision]\n\n## Open Decisions\n- [from Section E]\n\n## Go-Live Readiness\n- [from Section F \u2014 checklist with status per area]\n\n## Testing Status\n- [from Section G \u2014 functional, performance, integration, defects]\n\n## Roadmap Changes\n- [from Section H \u2014 plan changes, new work, next priority]\n```\n\nIMPORTANT: Be specific enough that someone reading the dashboard can take action immediately. \"Needs testing\" is useless \u2014 \"No load tests run; API response times unknown under concurrent usage\" is actionable.";
|
|
91
|
+
/** Generate the status update prompt pre-filled for a specific project */
|
|
92
|
+
export declare function generateStatusPrompt(projectName: string, projectRoot: string): string;
|
|
93
|
+
//# sourceMappingURL=portfolio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portfolio.d.ts","sourceRoot":"","sources":["../../src/lib/portfolio.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAY,SAAS,EAAE,MAAM,SAAS,CAAC;AAIxD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,SAAS,CAAC;IACnB,YAAY,EAAE;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAA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