@hcgstudio/ogma 0.0.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.
Files changed (60) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +39 -0
  3. package/dist/cli.d.ts +3 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +155 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/defineOgmaReview.d.ts +3 -0
  8. package/dist/defineOgmaReview.d.ts.map +1 -0
  9. package/dist/defineOgmaReview.js +4 -0
  10. package/dist/defineOgmaReview.js.map +1 -0
  11. package/dist/index.d.ts +5 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +4 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/node/project.d.ts +18 -0
  16. package/dist/node/project.d.ts.map +1 -0
  17. package/dist/node/project.js +104 -0
  18. package/dist/node/project.js.map +1 -0
  19. package/dist/node/server.d.ts +21 -0
  20. package/dist/node/server.d.ts.map +1 -0
  21. package/dist/node/server.js +476 -0
  22. package/dist/node/server.js.map +1 -0
  23. package/dist/node/templates.d.ts +5 -0
  24. package/dist/node/templates.d.ts.map +1 -0
  25. package/dist/node/templates.js +145 -0
  26. package/dist/node/templates.js.map +1 -0
  27. package/dist/types.d.ts +100 -0
  28. package/dist/types.d.ts.map +1 -0
  29. package/dist/types.js +2 -0
  30. package/dist/types.js.map +1 -0
  31. package/dist/viewer/OgmaReviewApp.d.ts +7 -0
  32. package/dist/viewer/OgmaReviewApp.d.ts.map +1 -0
  33. package/dist/viewer/OgmaReviewApp.js +387 -0
  34. package/dist/viewer/OgmaReviewApp.js.map +1 -0
  35. package/dist/viewer/client.d.ts +2 -0
  36. package/dist/viewer/client.d.ts.map +1 -0
  37. package/dist/viewer/client.js +13 -0
  38. package/dist/viewer/client.js.map +1 -0
  39. package/dist/viewer/defaultReview.d.ts +4 -0
  40. package/dist/viewer/defaultReview.d.ts.map +1 -0
  41. package/dist/viewer/defaultReview.js +55 -0
  42. package/dist/viewer/defaultReview.js.map +1 -0
  43. package/dist/viewer/normalizeReviewModule.d.ts +3 -0
  44. package/dist/viewer/normalizeReviewModule.d.ts.map +1 -0
  45. package/dist/viewer/normalizeReviewModule.js +58 -0
  46. package/dist/viewer/normalizeReviewModule.js.map +1 -0
  47. package/package.json +47 -0
  48. package/src/cli.ts +194 -0
  49. package/src/defineOgmaReview.ts +5 -0
  50. package/src/index.ts +17 -0
  51. package/src/node/project.ts +143 -0
  52. package/src/node/server.ts +598 -0
  53. package/src/node/templates.ts +148 -0
  54. package/src/types.ts +111 -0
  55. package/src/viewer/OgmaReviewApp.tsx +1099 -0
  56. package/src/viewer/client.tsx +18 -0
  57. package/src/viewer/defaultReview.tsx +168 -0
  58. package/src/viewer/normalizeReviewModule.ts +87 -0
  59. package/src/viewer/styles.css +1140 -0
  60. package/src/viewer/virtual.d.ts +11 -0
@@ -0,0 +1,148 @@
1
+ export const DEFAULT_SKILL_URL =
2
+ 'https://raw.githubusercontent.com/hcgstudio/ogma/main/docs/skills/ogma/SKILL.md';
3
+
4
+ export const DEFAULT_DESIGN_DIR = 'designs/ogma';
5
+
6
+ export const DEFAULT_REVIEW_SOURCE = `import { defineOgmaReview, type OgmaPrototypeScreenProps } from '@hcgstudio/ogma';
7
+
8
+ function DashboardPrototype() {
9
+ return (
10
+ <div className="ogma-demo-screen">
11
+ <aside className="ogma-demo-sidebar">
12
+ <div className="ogma-demo-brand">O</div>
13
+ <span className="ogma-demo-nav is-active">Overview</span>
14
+ <span className="ogma-demo-nav">Signals</span>
15
+ <span className="ogma-demo-nav">Queue</span>
16
+ <span className="ogma-demo-nav">Settings</span>
17
+ </aside>
18
+ <main className="ogma-demo-content">
19
+ <div className="ogma-demo-header">
20
+ <div>
21
+ <p>Dashboard</p>
22
+ <h2>Atlas Brief</h2>
23
+ </div>
24
+ <button type="button">Review ready</button>
25
+ </div>
26
+ <div className="ogma-demo-grid">
27
+ <section className="ogma-demo-card is-wide">
28
+ <div className="ogma-demo-card-title" />
29
+ <div className="ogma-demo-chart">
30
+ {[42, 68, 53, 81, 61, 75, 88].map((value) => (
31
+ <span key={value} style={{ height: \`\${value}%\` }} />
32
+ ))}
33
+ </div>
34
+ </section>
35
+ <section className="ogma-demo-card is-accent">
36
+ <strong>91%</strong>
37
+ <p>Review confidence</p>
38
+ </section>
39
+ <section className="ogma-demo-card">
40
+ <div className="ogma-demo-list-row" />
41
+ <div className="ogma-demo-list-row is-medium" />
42
+ <div className="ogma-demo-list-row is-short" />
43
+ </section>
44
+ <section className="ogma-demo-card is-action">
45
+ <strong>2</strong>
46
+ <p>Copy edits before approval</p>
47
+ </section>
48
+ </div>
49
+ </main>
50
+ </div>
51
+ );
52
+ }
53
+
54
+ function DesignSpecPrototype({ screen }: OgmaPrototypeScreenProps) {
55
+ return (
56
+ <div className="ogma-spec-screen">
57
+ <header>
58
+ <p>{screen.title}</p>
59
+ <h2>Decision System</h2>
60
+ </header>
61
+ <div className="ogma-spec-grid">
62
+ {['Information density', 'Review confidence', 'Agent handoff', 'Mobile parity'].map(
63
+ (item, index) => (
64
+ <section key={item}>
65
+ <span>{\`0\${index + 1}\`}</span>
66
+ <h3>{item}</h3>
67
+ <p>Prototype state prepared for pinned reviewer feedback and agent follow-up.</p>
68
+ </section>
69
+ )
70
+ )}
71
+ </div>
72
+ </div>
73
+ );
74
+ }
75
+
76
+ function MobileNavigationPrototype() {
77
+ return (
78
+ <div className="ogma-mobile-screen">
79
+ <div className="ogma-phone">
80
+ <header>
81
+ <span>Ogma</span>
82
+ <button type="button">New</button>
83
+ </header>
84
+ <main>
85
+ <section>
86
+ <p>Mobile nav</p>
87
+ <h2>Design queue</h2>
88
+ </section>
89
+ <div className="ogma-phone-list">
90
+ <span />
91
+ <span />
92
+ <span />
93
+ </div>
94
+ </main>
95
+ <nav>
96
+ <span className="is-active" />
97
+ <span />
98
+ <span />
99
+ </nav>
100
+ </div>
101
+ </div>
102
+ );
103
+ }
104
+
105
+ export default defineOgmaReview({
106
+ title: 'Ogma starter review',
107
+ description: 'Replace these JSX screens with the product states the reviewer should inspect.',
108
+ metadata: {
109
+ agent: 'starter',
110
+ iteration: '0',
111
+ source: 'designs/ogma/review.tsx'
112
+ },
113
+ screens: [
114
+ {
115
+ id: 'dashboard',
116
+ title: 'Dashboard',
117
+ description: 'Desktop review surface',
118
+ component: DashboardPrototype
119
+ },
120
+ {
121
+ id: 'design-spec',
122
+ title: 'Design spec',
123
+ description: 'Design rationale and product decisions',
124
+ component: DesignSpecPrototype
125
+ },
126
+ {
127
+ id: 'mobile-navigation',
128
+ title: 'Mobile nav',
129
+ description: 'Compact navigation state',
130
+ component: MobileNavigationPrototype,
131
+ width: 390
132
+ }
133
+ ]
134
+ });
135
+ `;
136
+
137
+ export const DEFAULT_PRODUCT_NOTES = `# Product Design Notes
138
+
139
+ ## Intent
140
+
141
+ Replace this starter note with product-specific design rationale, interaction states, and open decisions.
142
+
143
+ ## Review Loop
144
+
145
+ - Keep JSX prototype screens in this directory.
146
+ - Keep reviewer feedback IDs, such as OG-001, in agent change summaries.
147
+ - Update this file whenever the product direction changes.
148
+ `;
package/src/types.ts ADDED
@@ -0,0 +1,111 @@
1
+ import type { ComponentType } from 'react';
2
+
3
+ export type OgmaAnnotationStatus = 'open' | 'queued' | 'addressed';
4
+
5
+ export interface OgmaPrototypeScreenProps {
6
+ review: OgmaReviewDefinition;
7
+ screen: OgmaPrototypeScreen;
8
+ }
9
+
10
+ export interface OgmaPrototypeScreen {
11
+ id: string;
12
+ title: string;
13
+ description?: string;
14
+ width?: number;
15
+ height?: number;
16
+ component: ComponentType<OgmaPrototypeScreenProps>;
17
+ }
18
+
19
+ export interface OgmaReviewMetadata {
20
+ agent?: string;
21
+ iteration?: string;
22
+ source?: string;
23
+ updatedAt?: string;
24
+ [key: string]: unknown;
25
+ }
26
+
27
+ export interface OgmaReviewDefinition {
28
+ title: string;
29
+ description?: string;
30
+ screens: OgmaPrototypeScreen[];
31
+ notes?: string;
32
+ metadata?: OgmaReviewMetadata;
33
+ }
34
+
35
+ export interface OgmaAnnotation {
36
+ id: string;
37
+ screenId: string;
38
+ x: number;
39
+ y: number;
40
+ title: string;
41
+ detail: string;
42
+ status: OgmaAnnotationStatus;
43
+ action: string;
44
+ createdAt: string;
45
+ updatedAt: string;
46
+ }
47
+
48
+ export interface OgmaReviewSession {
49
+ reviewId: string;
50
+ annotations: OgmaAnnotation[];
51
+ updatedAt: string;
52
+ }
53
+
54
+ export interface OgmaClientConfig {
55
+ cwd: string;
56
+ dataDir: string;
57
+ defaultDesignDir: string;
58
+ reviewUrl: string;
59
+ skillUrl: string;
60
+ serverStartedAt: string;
61
+ }
62
+
63
+ export interface OgmaServerStatus {
64
+ packageName: '@hcgstudio/ogma';
65
+ version: string;
66
+ cwd: string;
67
+ dataDir: string;
68
+ designEntry: string;
69
+ historyPath: string;
70
+ notesPath: string;
71
+ reviewUrl: string;
72
+ skillUrl: string;
73
+ snapshotsDir: string;
74
+ serverStartedAt: string;
75
+ }
76
+
77
+ export interface OgmaFeedbackExport {
78
+ reviewId: string;
79
+ generatedAt: string;
80
+ reviewUrl: string;
81
+ annotations: Array<{
82
+ id: string;
83
+ screenId: string;
84
+ title: string;
85
+ detail: string;
86
+ status: OgmaAnnotationStatus;
87
+ action: string;
88
+ location: {
89
+ x: number;
90
+ y: number;
91
+ };
92
+ }>;
93
+ }
94
+
95
+ export interface OgmaSessionHistoryEntry {
96
+ id: string;
97
+ annotationCount: number;
98
+ counts: Record<OgmaAnnotationStatus, number>;
99
+ reviewId: string;
100
+ updatedAt: string;
101
+ }
102
+
103
+ export interface OgmaViewportSnapshot {
104
+ id: string;
105
+ annotations: OgmaAnnotation[];
106
+ createdAt: string;
107
+ reviewId: string;
108
+ reviewUrl: string;
109
+ screenId: string;
110
+ viewportMode: string;
111
+ }