@aigile/core 0.2.1 → 0.4.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 (176) hide show
  1. package/dist/agent-config.d.ts +850 -0
  2. package/dist/agent-config.d.ts.map +1 -0
  3. package/dist/agent-config.js +111 -0
  4. package/dist/agent-config.js.map +1 -0
  5. package/dist/collections.d.ts +33 -1
  6. package/dist/collections.d.ts.map +1 -1
  7. package/dist/collections.js +33 -1
  8. package/dist/collections.js.map +1 -1
  9. package/dist/config-sections.d.ts +78 -0
  10. package/dist/config-sections.d.ts.map +1 -0
  11. package/dist/config-sections.js +42 -0
  12. package/dist/config-sections.js.map +1 -0
  13. package/dist/config.d.ts +6795 -445
  14. package/dist/config.d.ts.map +1 -1
  15. package/dist/config.js +724 -87
  16. package/dist/config.js.map +1 -1
  17. package/dist/domain/action-item.d.ts +409 -0
  18. package/dist/domain/action-item.d.ts.map +1 -0
  19. package/dist/domain/action-item.js +155 -0
  20. package/dist/domain/action-item.js.map +1 -0
  21. package/dist/domain/ai-call.d.ts +15 -11
  22. package/dist/domain/ai-call.d.ts.map +1 -1
  23. package/dist/domain/ai-call.js +2 -0
  24. package/dist/domain/ai-call.js.map +1 -1
  25. package/dist/domain/build.d.ts +47 -5
  26. package/dist/domain/build.d.ts.map +1 -1
  27. package/dist/domain/build.js +6 -0
  28. package/dist/domain/build.js.map +1 -1
  29. package/dist/domain/change-set.d.ts +216 -0
  30. package/dist/domain/change-set.d.ts.map +1 -0
  31. package/dist/domain/change-set.js +48 -0
  32. package/dist/domain/change-set.js.map +1 -0
  33. package/dist/domain/common.d.ts +6 -3
  34. package/dist/domain/common.d.ts.map +1 -1
  35. package/dist/domain/common.js +4 -1
  36. package/dist/domain/common.js.map +1 -1
  37. package/dist/domain/conflict.d.ts +8 -8
  38. package/dist/domain/conversation.d.ts +78 -8
  39. package/dist/domain/conversation.d.ts.map +1 -1
  40. package/dist/domain/conversation.js +2 -0
  41. package/dist/domain/conversation.js.map +1 -1
  42. package/dist/domain/deliverable.d.ts +235 -0
  43. package/dist/domain/deliverable.d.ts.map +1 -0
  44. package/dist/domain/deliverable.js +76 -0
  45. package/dist/domain/deliverable.js.map +1 -0
  46. package/dist/domain/index.d.ts +4 -1
  47. package/dist/domain/index.d.ts.map +1 -1
  48. package/dist/domain/index.js +4 -1
  49. package/dist/domain/index.js.map +1 -1
  50. package/dist/domain/message.d.ts +7 -7
  51. package/dist/domain/milestone.d.ts +11 -11
  52. package/dist/domain/organization.d.ts +2 -2
  53. package/dist/domain/project.d.ts +524 -3
  54. package/dist/domain/project.d.ts.map +1 -1
  55. package/dist/domain/project.js +38 -1
  56. package/dist/domain/project.js.map +1 -1
  57. package/dist/domain/question.d.ts +238 -26
  58. package/dist/domain/question.d.ts.map +1 -1
  59. package/dist/domain/question.js +49 -4
  60. package/dist/domain/question.js.map +1 -1
  61. package/dist/domain/reassignment.d.ts +23 -18
  62. package/dist/domain/reassignment.d.ts.map +1 -1
  63. package/dist/domain/reassignment.js +14 -6
  64. package/dist/domain/reassignment.js.map +1 -1
  65. package/dist/domain/reference.d.ts +595 -0
  66. package/dist/domain/reference.d.ts.map +1 -0
  67. package/dist/domain/reference.js +180 -0
  68. package/dist/domain/reference.js.map +1 -0
  69. package/dist/domain/release.d.ts +246 -10
  70. package/dist/domain/release.d.ts.map +1 -1
  71. package/dist/domain/release.js +6 -0
  72. package/dist/domain/release.js.map +1 -1
  73. package/dist/domain/review.d.ts +11 -11
  74. package/dist/domain/role-assignment.d.ts +5 -5
  75. package/dist/domain/role-assignment.js +1 -1
  76. package/dist/domain/role.d.ts +41 -6
  77. package/dist/domain/role.d.ts.map +1 -1
  78. package/dist/domain/role.js +12 -0
  79. package/dist/domain/role.js.map +1 -1
  80. package/dist/domain/spec.d.ts +197 -6
  81. package/dist/domain/spec.d.ts.map +1 -1
  82. package/dist/domain/spec.js +73 -1
  83. package/dist/domain/spec.js.map +1 -1
  84. package/dist/domain/sweep.d.ts +11 -11
  85. package/dist/domain/sweep.d.ts.map +1 -1
  86. package/dist/domain/sweep.js +1 -1
  87. package/dist/domain/sweep.js.map +1 -1
  88. package/dist/domain/track.d.ts +16 -16
  89. package/dist/domain/user.d.ts +50 -2
  90. package/dist/domain/user.d.ts.map +1 -1
  91. package/dist/domain/user.js +13 -0
  92. package/dist/domain/user.js.map +1 -1
  93. package/dist/domain/verification.d.ts +4 -4
  94. package/dist/id.d.ts +114 -0
  95. package/dist/id.d.ts.map +1 -0
  96. package/dist/id.js +204 -0
  97. package/dist/id.js.map +1 -0
  98. package/dist/ids.d.ts +0 -2
  99. package/dist/ids.d.ts.map +1 -1
  100. package/dist/ids.js +0 -5
  101. package/dist/ids.js.map +1 -1
  102. package/dist/index.d.ts +7 -0
  103. package/dist/index.d.ts.map +1 -1
  104. package/dist/index.js +7 -0
  105. package/dist/index.js.map +1 -1
  106. package/dist/jira.d.ts +26 -0
  107. package/dist/jira.d.ts.map +1 -0
  108. package/dist/jira.js +37 -0
  109. package/dist/jira.js.map +1 -0
  110. package/dist/outline.d.ts +64 -0
  111. package/dist/outline.d.ts.map +1 -0
  112. package/dist/outline.js +127 -0
  113. package/dist/outline.js.map +1 -0
  114. package/dist/plugins/action-source.d.ts +44 -0
  115. package/dist/plugins/action-source.d.ts.map +1 -0
  116. package/dist/plugins/action-source.js +2 -0
  117. package/dist/plugins/action-source.js.map +1 -0
  118. package/dist/plugins/ai.d.ts +5 -0
  119. package/dist/plugins/ai.d.ts.map +1 -1
  120. package/dist/plugins/blob-store.d.ts +36 -0
  121. package/dist/plugins/blob-store.d.ts.map +1 -0
  122. package/dist/plugins/blob-store.js +11 -0
  123. package/dist/plugins/blob-store.js.map +1 -0
  124. package/dist/plugins/datastore.d.ts +6 -0
  125. package/dist/plugins/datastore.d.ts.map +1 -1
  126. package/dist/plugins/design.d.ts +62 -0
  127. package/dist/plugins/design.d.ts.map +1 -0
  128. package/dist/plugins/design.js +2 -0
  129. package/dist/plugins/design.js.map +1 -0
  130. package/dist/plugins/git-host.d.ts +35 -0
  131. package/dist/plugins/git-host.d.ts.map +1 -0
  132. package/dist/plugins/git-host.js +2 -0
  133. package/dist/plugins/git-host.js.map +1 -0
  134. package/dist/plugins/index.d.ts +9 -0
  135. package/dist/plugins/index.d.ts.map +1 -1
  136. package/dist/plugins/index.js +9 -0
  137. package/dist/plugins/index.js.map +1 -1
  138. package/dist/plugins/registry.d.ts +360 -0
  139. package/dist/plugins/registry.d.ts.map +1 -0
  140. package/dist/plugins/registry.js +218 -0
  141. package/dist/plugins/registry.js.map +1 -0
  142. package/dist/plugins/release-gate.d.ts +53 -0
  143. package/dist/plugins/release-gate.d.ts.map +1 -0
  144. package/dist/plugins/release-gate.js +2 -0
  145. package/dist/plugins/release-gate.js.map +1 -0
  146. package/dist/plugins/spec-cache.d.ts +23 -0
  147. package/dist/plugins/spec-cache.d.ts.map +1 -0
  148. package/dist/plugins/spec-cache.js +2 -0
  149. package/dist/plugins/spec-cache.js.map +1 -0
  150. package/dist/plugins/spec-source.d.ts +177 -0
  151. package/dist/plugins/spec-source.d.ts.map +1 -0
  152. package/dist/plugins/spec-source.js +31 -0
  153. package/dist/plugins/spec-source.js.map +1 -0
  154. package/dist/plugins/test-runner.d.ts +68 -0
  155. package/dist/plugins/test-runner.d.ts.map +1 -0
  156. package/dist/plugins/test-runner.js +14 -0
  157. package/dist/plugins/test-runner.js.map +1 -0
  158. package/dist/preamble.d.ts +11 -0
  159. package/dist/preamble.d.ts.map +1 -0
  160. package/dist/preamble.js +12 -0
  161. package/dist/preamble.js.map +1 -0
  162. package/dist/prompts.d.ts +8 -0
  163. package/dist/prompts.d.ts.map +1 -0
  164. package/dist/prompts.js +13 -0
  165. package/dist/prompts.js.map +1 -0
  166. package/dist/settings.d.ts +90 -0
  167. package/dist/settings.d.ts.map +1 -0
  168. package/dist/settings.js +120 -0
  169. package/dist/settings.js.map +1 -0
  170. package/dist/template.d.ts +89 -0
  171. package/dist/template.d.ts.map +1 -0
  172. package/dist/template.js +9 -0
  173. package/dist/template.js.map +1 -0
  174. package/package.json +9 -3
  175. package/prompts/mission.md +3 -0
  176. package/prompts/preamble.md +37 -0
@@ -0,0 +1,120 @@
1
+ export const SETTINGS = [
2
+ { path: 'publicUrl', group: 'Workspace', label: 'Public address', description: 'Where people reach this workspace, for links in notices and in Jira (e.g. https://aigile.example.com).', env: 'AIGILE_PUBLIC_URL', kind: 'string', editable: true },
3
+ { path: 'ai.plugin', group: 'AI', label: 'AI provider', description: 'Which AI provider the agents use: claude, or stub (no AI: agents report themselves blocked).', env: 'AIGILE_AI_PLUGIN', kind: 'select', options: ['claude', 'stub'], editable: true, restart: true },
4
+ { path: 'ai.model', group: 'AI', label: 'Default model', description: 'The model the agents use unless an agent has its own (ai.roles).', env: 'AIGILE_AI_MODEL', kind: 'string', editable: true, restart: true },
5
+ { path: 'ai.effort', group: 'AI', label: 'Default effort', description: 'How hard the model thinks by default; more effort costs more.', env: 'AIGILE_AI_EFFORT', kind: 'select', options: ['low', 'medium', 'high', 'xhigh', 'max'], editable: true },
6
+ { path: 'ai.monthlyCostCapUsd', group: 'AI', label: 'Monthly cost cap (USD)', description: 'Agents stop calling the model once this month’s recorded cost reaches it.', env: 'AIGILE_AI_COST_CAP', kind: 'number', editable: true },
7
+ { path: 'secrets.anthropicKey', group: 'AI', label: 'Anthropic API key', description: 'The key the Claude provider spends against.', env: 'ANTHROPIC_API_KEY', kind: 'secret', editable: false },
8
+ { path: 'agents.schedule.enabled', group: 'Agents', label: 'The clock runs', description: 'The Orchestrator’s clock: merge sync, source sync, the Spec Analyst’s reviews, agent tasks, every tick.', env: null, kind: 'boolean', editable: true, restart: true },
9
+ { path: 'agents.engineer.autoBuild', group: 'Agents', label: 'Automatic builds', description: 'Start a build when a project’s specs change and settle, without a person asking.', env: null, kind: 'boolean', editable: true },
10
+ { path: 'agents.engineer.planGate', group: 'Agents', label: 'Plans need approval', description: 'The Engineer proposes a plan and waits for a person’s go before building.', env: null, kind: 'boolean', editable: true },
11
+ { path: 'agents.verifier.writeTests', group: 'Agents', label: 'The Verifier writes tests for builds', description: 'Before review, the Verifier adds the tests that prove a build’s change.', env: null, kind: 'boolean', editable: true },
12
+ { path: 'agents.specAnalyst.sweepDays', group: 'Agents', label: 'Spec sweep every (days)', description: 'How often the Spec Analyst reads every spec of each project at once to find conflicts; 0: never.', env: null, kind: 'number', editable: true },
13
+ { path: 'plugins.configRefreshMinutes', group: 'Plugins', label: 'Configuration sources read every (minutes)', description: 'How often configuration-source plugins are read again; 0: at start only.', env: null, kind: 'number', editable: true },
14
+ { path: 'jira.qa.writeBack', group: 'Jira', label: 'QA queue may mark tickets complete', description: 'In the QA queue, “Mark complete” moves a ticket to its done status with a comment on the tests. Writes to Jira; off unless the account may write.', env: null, kind: 'boolean', editable: true },
15
+ { path: 'jira.featureSync.enabled', group: 'Jira', label: 'Tickets follow their features', description: 'Comment on and transition a feature’s Jira tickets as it moves. Writes to Jira; off unless the account may write.', env: null, kind: 'boolean', editable: true },
16
+ { path: 'dataStore.plugin', group: 'Datastore', label: 'Datastore', description: 'Where records are kept: git-fs, sql or mongodb. Chosen before the datastore opens, so set in the file or the environment.', env: 'AIGILE_DATASTORE_PLUGIN', kind: 'select', options: ['git-fs', 'sql', 'mongodb'], editable: false },
17
+ { path: 'dataStore.mongodb.database', group: 'Datastore', label: 'MongoDB database', description: 'The database the mongodb datastore uses.', env: 'AIGILE_DATASTORE_DATABASE', kind: 'string', editable: false },
18
+ { path: 'secrets.datastoreUrl', group: 'Datastore', label: 'Datastore connection string', description: 'The sql or mongodb datastore’s connection string.', env: 'AIGILE_DATASTORE_URL', kind: 'secret', editable: false },
19
+ { path: 'auth.plugin', group: 'Sign-in', label: 'Sign-in', description: 'How people sign in: local accounts or OIDC.', env: 'AIGILE_AUTH_PLUGIN', kind: 'select', options: ['local', 'oidc'], editable: false },
20
+ { path: 'secrets.sessionSecret', group: 'Sign-in', label: 'Session secret', description: 'Signs the session cookie; changing it signs everyone out.', env: 'AIGILE_SESSION_SECRET', kind: 'secret', editable: false },
21
+ ];
22
+ /** The value at a dotted path, or undefined. */
23
+ export function getPath(value, path) {
24
+ let at = value;
25
+ for (const key of path.split('.')) {
26
+ if (!at || typeof at !== 'object')
27
+ return undefined;
28
+ at = at[key];
29
+ }
30
+ return at;
31
+ }
32
+ /** Set the value at a dotted path, creating objects on the way. */
33
+ export function setPath(target, path, value) {
34
+ const keys = path.split('.');
35
+ let at = target;
36
+ for (const key of keys.slice(0, -1)) {
37
+ if (!at[key] || typeof at[key] !== 'object')
38
+ at[key] = {};
39
+ at = at[key];
40
+ }
41
+ at[keys[keys.length - 1]] = value;
42
+ }
43
+ export const SETTINGS_COLLECTION = 'settings';
44
+ export const SETTINGS_RECORD = 'installation';
45
+ /**
46
+ * The platform's settings and the installed templates' (documentation/settings.md
47
+ * "Template settings"): `extra` is what the templates contribute
48
+ * (`TemplateModule.settingsCatalog`).
49
+ */
50
+ export function settingsCatalog(extra = []) {
51
+ return [...SETTINGS, ...extra.filter((d) => !SETTINGS.some((s) => s.path === d.path))];
52
+ }
53
+ /** The setting at a path, or at its older path (a stored `tests.dir` finds `templateSettings.software.dir`). */
54
+ export function findSetting(path, catalog = SETTINGS) {
55
+ return catalog.find((s) => s.path === path) ?? catalog.find((s) => s.legacyPath === path);
56
+ }
57
+ /** The settings a stored value may set: editable, and not pinned by an environment variable that is set. */
58
+ export function storableSetting(path, env, catalog = SETTINGS) {
59
+ const def = findSetting(path, catalog);
60
+ if (!def || !def.editable || def.kind === 'secret')
61
+ return null;
62
+ if (def.env && env[def.env] !== undefined && env[def.env] !== '')
63
+ return null;
64
+ return def;
65
+ }
66
+ /**
67
+ * Lay the stored settings over a config, in place (so services holding it see
68
+ * the change): each value that is storable and not pinned by the environment.
69
+ * Values that are not storable are ignored.
70
+ */
71
+ export function applyStoredSettings(config, stored, env, catalog = SETTINGS) {
72
+ const applied = [];
73
+ // A value kept under a setting's older path first, so one kept under its path since wins.
74
+ const entries = Object.entries(stored?.values ?? {}).sort(([a], [b]) => Number(catalog.some((s) => s.path === a)) - Number(catalog.some((s) => s.path === b)));
75
+ for (const [path, value] of entries) {
76
+ const def = storableSetting(path, env, catalog);
77
+ if (!def)
78
+ continue;
79
+ setPath(config, def.path, value);
80
+ applied.push(path);
81
+ }
82
+ // Plugin instances added in the window, after the file's (an id the file names wins).
83
+ const fileIds = new Set(config.plugins.instances.filter((i) => !i.fromSettings).map((i) => i.id));
84
+ config.plugins.instances = [
85
+ ...config.plugins.instances.filter((i) => !i.fromSettings),
86
+ ...(stored?.plugins ?? []).filter((p) => !fileIds.has(p.id)).map((p) => ({ plugin: p.plugin, id: p.id, config: p.config ?? {}, secrets: p.secrets ?? {}, target: p.target ?? null, fromSettings: true })),
87
+ ];
88
+ // The instances disabled in the Plugins window: pluginInstancesOf leaves them out.
89
+ config.plugins.disabled = [...new Set(stored?.disabled ?? [])];
90
+ return applied;
91
+ }
92
+ /** The plugin instance ids disabled in the Plugins window, as applyStoredSettings laid them on the config. */
93
+ export function disabledPluginInstances(config) {
94
+ return config.plugins.disabled ?? [];
95
+ }
96
+ /** The stored settings with these instance ids disabled (`disabled`), or enabled again (their ids removed). */
97
+ export function withPluginInstancesDisabled(stored, ids, disabled) {
98
+ const now = new Set(stored.disabled ?? []);
99
+ for (const id of ids) {
100
+ if (disabled)
101
+ now.add(id);
102
+ else
103
+ now.delete(id);
104
+ }
105
+ const { disabled: _old, ...rest } = stored;
106
+ return now.size ? { ...rest, disabled: [...now].sort() } : rest;
107
+ }
108
+ /** Every setting with its effective value and source, from the config in force, the file's raw values, the stored settings and the environment. */
109
+ export function viewSettings(config, fileValues, stored, env, catalog = SETTINGS) {
110
+ const at = (values, def) => getPath(values, def.path) ?? (def.legacyPath ? getPath(values, def.legacyPath) : undefined);
111
+ const kept = (def) => !!stored?.values && (def.path in stored.values || (!!def.legacyPath && def.legacyPath in stored.values));
112
+ return catalog.map((def) => {
113
+ const envSet = !!def.env && env[def.env] !== undefined && env[def.env] !== '';
114
+ if (def.kind === 'secret')
115
+ return { ...def, value: null, source: envSet ? 'environment' : 'default', set: envSet, pinned: true };
116
+ const source = envSet ? 'environment' : kept(def) && def.editable ? 'settings' : at(fileValues, def) !== undefined ? 'file' : 'default';
117
+ return { ...def, value: at(config, def), source, pinned: envSet };
118
+ });
119
+ }
120
+ //# sourceMappingURL=settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":"AA8BA,MAAM,CAAC,MAAM,QAAQ,GAAiC;IACpD,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,wGAAwG,EAAE,GAAG,EAAE,mBAAmB,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;IACnP,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,8FAA8F,EAAE,GAAG,EAAE,kBAAkB,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE;IAC1Q,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,kEAAkE,EAAE,GAAG,EAAE,iBAAiB,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE;IACjN,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,+DAA+D,EAAE,GAAG,EAAE,kBAAkB,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAA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AI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;QAC9E,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,SAAS,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACjI,MAAM,MAAM,GAAkB,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,UAAU,EAAE,GAAG,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;QACvJ,OAAO,EAAE,GAAG,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IACpE,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,89 @@
1
+ /**
2
+ * A template names what one kind of work fills in (documentation/templates.md):
3
+ * its agent roles with their default briefs, and the queue kinds it adds to the
4
+ * generic ones. The runtime half (the agents themselves) is `TemplateModule` in
5
+ * `@aigile/engine`; this is the data half, which the install seeds and the UI reads.
6
+ */
7
+ import type { AppRole } from './domain/role.js';
8
+ import type { ActionTypeDefinition } from './domain/action-item.js';
9
+ import type { Project } from './domain/project.js';
10
+ import type { JiraActionSourceConfig } from './config.js';
11
+ /** The installation's Jira: where it is and which environment variables hold its credentials (from the config's Jira spec source or action source). */
12
+ export interface JiraConnection {
13
+ baseUrl: string;
14
+ cloudId?: string | undefined;
15
+ tokenEnv: string;
16
+ emailEnv: string;
17
+ }
18
+ /**
19
+ * A role as a template seeds it: an agent (the shape of the engine's `*_ROLE`
20
+ * constants) or a human seat (Project Manager, Control Owner…). `agentKey` is
21
+ * the seat's stable key for both kinds (`Role.agentKey`): the same key in two
22
+ * templates is one shared role, so a Control Owner in finance and in security
23
+ * is one role a person holds across both kinds of work.
24
+ */
25
+ export interface AgentRoleSeed {
26
+ name: string;
27
+ description: string;
28
+ appRole: AppRole;
29
+ kind: 'agent' | 'human';
30
+ agentKey: string;
31
+ }
32
+ /** The seats a template fills: what each agent role does in the flow. A project imports seats, and each slot is played by the first imported seat that fills it. */
33
+ export declare const AGENT_SLOTS: readonly ["builder", "reviewer", "testWriter", "monitor", "releases"];
34
+ export type AgentSlot = (typeof AGENT_SLOTS)[number];
35
+ export interface TemplateDefinition {
36
+ /** Stable id, the value of `Project.templateId` ("software"). */
37
+ id: string;
38
+ name: string;
39
+ description: string;
40
+ /**
41
+ * The template's seats, in the order the install seeds them: agents with the
42
+ * slot each fills, and human seats (no slot). Each carries its built-in brief:
43
+ * an agent's is seeded once as a global spec mapped to the role; a human
44
+ * seat's is copied into every project that imports it, mapped to the role and
45
+ * the project, so each project edits its own.
46
+ */
47
+ roles: ReadonlyArray<{
48
+ role: AgentRoleSeed;
49
+ brief: string;
50
+ slot?: AgentSlot;
51
+ }>;
52
+ /** Queue kinds this template adds to the generic `task`, `question`, `review`, `conflict` and `approval`. */
53
+ actionKinds: readonly string[];
54
+ /** Action types of its own, beyond the built-in ones (documentation/action-items.md "Types"); their ids may appear in `actionKinds`. */
55
+ actionTypes?: readonly ActionTypeDefinition[];
56
+ /**
57
+ * The action sources this template adds for a project (documentation/action-items.md
58
+ * "Action sources"), from the installation's Jira connection: e.g. the project's
59
+ * open Jira issues as tasks. Called for every project the template is applied to.
60
+ */
61
+ actionSources?: (project: Project, jira: JiraConnection) => JiraActionSourceConfig[];
62
+ /** Plugins this kind of work benefits from (documentation/plugins.md "Recommended by templates"): offered with checkboxes when a project applies the template. */
63
+ recommendedPlugins?: ReadonlyArray<{
64
+ plugin: string;
65
+ why: string;
66
+ }>;
67
+ /**
68
+ * The words people see: what a change set is called ("build", "draft"), what a release is
69
+ * ("release", "publication"), what a deliverable is ("feature", "change") and what a project
70
+ * on this template is ("project", "operation"; `projectWord` gives "project" when unset).
71
+ */
72
+ words: {
73
+ changeSet: string;
74
+ release: string;
75
+ deliverable?: string;
76
+ project?: string;
77
+ };
78
+ /**
79
+ * The work never completes (documentation/templates.md "Ongoing work"): an operation runs for
80
+ * as long as the systems do, so its page leads with what is open now (changes, incidents,
81
+ * action items, questions, the change window) rather than with what it is building toward.
82
+ */
83
+ ongoing?: boolean;
84
+ }
85
+ /** What a project on this template is called ("operation"): its `words.project`, else "project". */
86
+ export declare function projectWord(template: Pick<TemplateDefinition, 'words'> | null | undefined): string;
87
+ /** The queue kinds every template has: a task, a question, a review (also how a requester accepts a resolution), a conflict between specs, an approval. */
88
+ export declare const GENERIC_ACTION_KINDS: readonly ["task", "question", "review", "conflict", "approval"];
89
+ //# sourceMappingURL=template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.d.ts","sourceRoot":"","sources":["../src/template.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE1D,uJAAuJ;AACvJ,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE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GAAG,MAAM,CAElG;AAED,2JAA2J;AAC3J,eAAO,MAAM,oBAAoB,iEAAkE,CAAC"}
@@ -0,0 +1,9 @@
1
+ /** The seats a template fills: what each agent role does in the flow. A project imports seats, and each slot is played by the first imported seat that fills it. */
2
+ export const AGENT_SLOTS = ['builder', 'reviewer', 'testWriter', 'monitor', 'releases'];
3
+ /** What a project on this template is called ("operation"): its `words.project`, else "project". */
4
+ export function projectWord(template) {
5
+ return template?.words.project?.trim() || 'project';
6
+ }
7
+ /** The queue kinds every template has: a task, a question, a review (also how a requester accepts a resolution), a conflict between specs, an approval. */
8
+ export const GENERIC_ACTION_KINDS = ['task', 'question', 'review', 'conflict', 'approval'];
9
+ //# sourceMappingURL=template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template.js","sourceRoot":"","sources":["../src/template.ts"],"names":[],"mappings":"AAkCA,oKAAoK;AACpK,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,CAAU,CAAC;AA0CjG,oGAAoG;AACpG,MAAM,UAAU,WAAW,CAAC,QAA8D;IACxF,OAAO,QAAQ,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;AACtD,CAAC;AAED,2JAA2J;AAC3J,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,CAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigile/core",
3
- "version": "0.2.1",
3
+ "version": "0.4.0",
4
4
  "description": "aigile: core package",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Ryan Goldstein <me@ryangoldstein.com>",
@@ -12,16 +12,22 @@
12
12
  "type": "module",
13
13
  "files": [
14
14
  "dist",
15
+ "prompts",
15
16
  "!dist/**/*.test.*"
16
17
  ],
17
18
  "main": "./dist/index.js",
18
19
  "types": "./dist/index.d.ts",
19
20
  "exports": {
20
21
  ".": "./dist/index.js",
21
- "./names": "./dist/domain/names.js"
22
+ "./id": "./dist/id.js",
23
+ "./names": "./dist/domain/names.js",
24
+ "./outline": "./dist/outline.js",
25
+ "./action-types": "./dist/domain/action-item.js",
26
+ "./spec": "./dist/domain/spec.js"
22
27
  },
23
28
  "scripts": {
24
- "build": "tsc --build"
29
+ "build": "tsc --build",
30
+ "test": "tsc --build && node --test \"dist/**/*.test.js\""
25
31
  },
26
32
  "dependencies": {
27
33
  "zod": "^3.23.8"
@@ -0,0 +1,3 @@
1
+ *** Mission ***
2
+
3
+ The Agile/Scrum project management methodology has become too cumbersone in the age of AI. We are spending more time managing processes than we are writing code. AI can handle all of our processes, freeing up humans to define what the AI should build and review what the AI has built in order to refine our specifications (specs) accordingly. Our specs will be created by human roles in the company. For instance, executives can write high-level objectives, product managers can define features, and engineers can define technical requirements. AI can evaluate changes (diffs) to find and resolve conflicting objectives, evaluate impacts of changes, ask questions related to a diff, build the changes, and analyze the user impact after it goes live. AI does it's best work when it has all of the context available to it as opposed to having all of that context spread across many different computers.
@@ -0,0 +1,37 @@
1
+ # aigile
2
+
3
+ ## Mission
4
+
5
+ {{MISSION}}
6
+
7
+ ## What aigile is
8
+
9
+ aigile is the system you are part of. People write specs: statements of intent in Markdown, mapped to organizations, projects, roles and people. Every project resolves to a ranked set of specs; where specs overlap, the spec whose author holds the higher-ranked role wins. The specs are the record of what should be true; code, documents and deployments follow from them. The sources of specs (a git repository, a wiki, a tracker) are the truth and keep the history; aigile keeps where each spec applies and reads the versions it needs.
10
+
11
+ Every organization, project, person and role also has one spec of its own, written on its page and named after it. An organization's own spec is its Charter. A role's own spec is its brief: for an agent, what it is told every time it works. A person's own spec says what they are good at and how they like to work. Other specs are attached to whatever they apply to.
12
+
13
+ ## How the work flows
14
+
15
+ Each project follows a template: a kind of work (software, operations, content, legal…) with its own words, seats and agents. Some work finishes, like a product's features; some never does, like an operation's changes, incidents and change windows. In every template the change moves the same way:
16
+ 1. A builder makes the change on a branch, from the specs that apply. When the work comes from an outside tracker, it works only on tickets that are open; a ticket in progress belongs to a person and is left alone; a finished ticket may be checked, but is changed only with a person's approval.
17
+ 2. It plans first. Questions are asked while planning, each to the person best placed to answer it; the work waits for the answers, which come back as spec edits a person approves. Once building starts, ambiguity is resolved with the reading that changes the least, recorded as an assumption for the approver.
18
+ 3. A reviewer reads the change, the checks prove it, and a person approves it.
19
+ 4. It is released stage by stage, a person giving each gate its go, and a monitor watches what is running.
20
+
21
+ ## The ideals
22
+
23
+ - Specs are written, or at least approved, by a person. An agent proposes; a person decides and saves.
24
+ - Knowledge goes into the specs, not into chat. When a person answers a question, the answer is carried into the specs where it belongs, so nobody has to ask again; the question keeps the answer verbatim as its log.
25
+ - One writer per record. Each role writes only what it owns and reports the rest.
26
+ - Blocked is reported, not routed around. What you cannot do, you say, with what you would have done.
27
+ - Nothing ships without a person's approval: a build, a release, a change to the specs.
28
+ - Say what you know and how you know it: documented, inferred, or undecided, with the spec you read.
29
+
30
+ ## The interface
31
+
32
+ - Specs: read them through the resolver for the project at hand; cite them by id and revision; never alter one yourself. Propose edits as a change set, which a person reviews in one window and saves to the source.
33
+ - Questions: ask when a spec is silent; one person is responsible for answering; a question stays open until someone marks it resolved. Answers, spec edits and code changes are its resolutions. Ask the person best placed to decide: judge by their roles, the specs they wrote and their own spec. When no one person fits, ask a role; when no role fits, ask the project manager.
34
+ - Queues: what waits on whom. Put an item in a person's queue only when a decision is theirs; say in one line what and why.
35
+ - Builds, reviews, verifications, releases, sweeps: each is a record with one writer; report at milestones (claimed, plan ready, blocked, finished, finding).
36
+ - Tracks: units of work with one counter; claim before you work.
37
+ - The Charters, when there are any, follow this preamble (the project's organization's and the organizations above it): it is the people's own grounding for their organization and outranks nothing in the specs, but it tells you how they want to work. Your own brief follows the Charter.