Skip to content

Commit bb4e7f6

Browse files
authored
Merge pull request #9 from biw/biw/check-future-plans-prs
Refactor generator and add executable bridge matrix
2 parents 4944d49 + 0611839 commit bb4e7f6

38 files changed

Lines changed: 6625 additions & 3014 deletions

.agents/skills/better-logging/references/runtime-patterns-electron.md

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -17,57 +17,57 @@ Wrap the entrypoint once, enrich inside the operation, and finalize in `finally`
1717

1818
```ts
1919
type OperationOutcome = {
20-
appVersion: string
21-
actor?: { idHash?: string | undefined; type: string } | undefined
22-
completedAt?: string | undefined
23-
correlationId?: string | undefined
24-
durationMs?: number | undefined
25-
environment: 'development' | 'preview' | 'production'
26-
errorCode?: null | string | undefined
27-
errorMessage?: null | string | undefined
28-
gitCommit?: string | undefined
29-
metrics?: Record<string, number> | undefined
30-
operationId: string
31-
operationName: string
20+
appVersion: string;
21+
actor?: { idHash?: string | undefined; type: string } | undefined;
22+
completedAt?: string | undefined;
23+
correlationId?: string | undefined;
24+
durationMs?: number | undefined;
25+
environment: "development" | "preview" | "production";
26+
errorCode?: null | string | undefined;
27+
errorMessage?: null | string | undefined;
28+
gitCommit?: string | undefined;
29+
metrics?: Record<string, number> | undefined;
30+
operationId: string;
31+
operationName: string;
3232
operationType:
33-
| 'ipc_command'
34-
| 'trpc_mutation'
35-
| 'trpc_query'
36-
| 'background_job'
37-
| 'startup_step'
38-
| 'queue_consumer'
39-
resource?: { id?: string | undefined; type: string } | undefined
40-
retryCount: number
41-
rollout?: Record<string, boolean | number | string> | undefined
42-
sessionId?: string | undefined
43-
startedAt: string
44-
statusCode?: number | undefined
45-
success: boolean
46-
trigger?: 'manual' | 'startup' | 'background' | 'retry' | 'auto' | undefined
47-
}
33+
| "ipc_command"
34+
| "trpc_mutation"
35+
| "trpc_query"
36+
| "background_job"
37+
| "startup_step"
38+
| "queue_consumer";
39+
resource?: { id?: string | undefined; type: string } | undefined;
40+
retryCount: number;
41+
rollout?: Record<string, boolean | number | string> | undefined;
42+
sessionId?: string | undefined;
43+
startedAt: string;
44+
statusCode?: number | undefined;
45+
success: boolean;
46+
trigger?: "manual" | "startup" | "background" | "retry" | "auto" | undefined;
47+
};
4848

4949
type OperationOutcomeSeed = Omit<
5050
OperationOutcome,
51-
| 'completedAt'
52-
| 'durationMs'
53-
| 'errorCode'
54-
| 'errorMessage'
55-
| 'operationId'
56-
| 'startedAt'
57-
| 'success'
58-
>
51+
| "completedAt"
52+
| "durationMs"
53+
| "errorCode"
54+
| "errorMessage"
55+
| "operationId"
56+
| "startedAt"
57+
| "success"
58+
>;
5959

6060
// Put these helpers in one shared file such as src/backend/lib/outcome.ts.
6161
const classifyError = (error: unknown): string => {
6262
// Classify domain errors before they reach this function.
6363
// Returning error.name is a last-resort fallback; prefer stable codes
6464
// like "update_feed_http_404" at the call site when possible.
65-
return error instanceof Error ? error.name : 'unknown_error'
66-
}
65+
return error instanceof Error ? error.name : "unknown_error";
66+
};
6767

6868
const formatErrorMessage = (error: unknown): string => {
69-
return error instanceof Error ? error.message : 'Unknown error'
70-
}
69+
return error instanceof Error ? error.message : "Unknown error";
70+
};
7171

7272
// Keep camelCase in memory and map to storage casing at the persistence boundary.
7373
const toStoredOutcome = (outcome: OperationOutcome) => ({
@@ -92,43 +92,43 @@ const toStoredOutcome = (outcome: OperationOutcome) => ({
9292
success: outcome.success,
9393
trigger: outcome.trigger,
9494
actor: outcome.actor,
95-
})
95+
});
9696

9797
const persistOutcome = async (outcome: OperationOutcome): Promise<void> => {
9898
// Replace this with a Prisma, SQLite, or analytics-sink write in your app.
9999
// Example: await prisma.operationOutcome.create({ data: toStoredOutcome(outcome) })
100-
void outcome
101-
}
100+
void outcome;
101+
};
102102

103103
const withOutcome = async <T>(
104104
seed: OperationOutcomeSeed,
105105
run: (outcome: OperationOutcome) => Promise<T>,
106106
): Promise<T> => {
107-
const startMs = Date.now()
107+
const startMs = Date.now();
108108
const outcome: OperationOutcome = {
109109
...seed,
110110
operationId: crypto.randomUUID(),
111111
startedAt: new Date(startMs).toISOString(),
112112
errorCode: null,
113113
success: false,
114-
}
114+
};
115115

116116
try {
117-
const result = await run(outcome)
118-
outcome.success = true
119-
return result
117+
const result = await run(outcome);
118+
outcome.success = true;
119+
return result;
120120
} catch (error) {
121-
outcome.errorCode = classifyError(error)
122-
outcome.errorMessage = formatErrorMessage(error)
123-
throw error
121+
outcome.errorCode = classifyError(error);
122+
outcome.errorMessage = formatErrorMessage(error);
123+
throw error;
124124
} finally {
125-
outcome.completedAt = new Date().toISOString()
126-
outcome.durationMs = Date.now() - startMs
125+
outcome.completedAt = new Date().toISOString();
126+
outcome.durationMs = Date.now() - startMs;
127127
await persistOutcome(outcome).catch((persistError: unknown) => {
128-
console.error('[outcome] failed to persist outcome', persistError)
129-
})
128+
console.error("[outcome] failed to persist outcome", persistError);
129+
});
130130
}
131-
}
131+
};
132132
```
133133

134134
If your store supports camelCase cleanly, standardize on camelCase end-to-end instead of mapping. The important rule is one casing per layer, not a forced snake_case database.

.agents/skills/better-logging/references/runtime-patterns-node.md

Lines changed: 63 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -8,105 +8,105 @@ Instrument one outcome per request or per important handler.
88

99
```ts
1010
type OperationOutcome = {
11-
appVersion: string
12-
actor?: { idHash?: string | undefined; type: string } | undefined
13-
completedAt?: string | undefined
14-
correlationId?: string | undefined
15-
durationMs?: number | undefined
16-
environment: 'development' | 'preview' | 'production' | string
17-
errorCode?: null | string | undefined
18-
errorMessage?: null | string | undefined
19-
gitCommit?: string | undefined
20-
metrics?: Record<string, number> | undefined
21-
operationId: string
22-
operationName: string
23-
operationType: 'http_request' | 'queue_consumer' | 'cron_run'
24-
resource?: { id?: string | undefined; type: string } | undefined
25-
retryCount: number
26-
rollout?: Record<string, boolean | number | string> | undefined
27-
sessionId?: string | undefined
28-
startedAt: string
29-
statusCode?: number | undefined
30-
success: boolean
31-
trigger?: 'manual' | 'startup' | 'background' | 'retry' | 'auto' | undefined
32-
}
11+
appVersion: string;
12+
actor?: { idHash?: string | undefined; type: string } | undefined;
13+
completedAt?: string | undefined;
14+
correlationId?: string | undefined;
15+
durationMs?: number | undefined;
16+
environment: "development" | "preview" | "production" | string;
17+
errorCode?: null | string | undefined;
18+
errorMessage?: null | string | undefined;
19+
gitCommit?: string | undefined;
20+
metrics?: Record<string, number> | undefined;
21+
operationId: string;
22+
operationName: string;
23+
operationType: "http_request" | "queue_consumer" | "cron_run";
24+
resource?: { id?: string | undefined; type: string } | undefined;
25+
retryCount: number;
26+
rollout?: Record<string, boolean | number | string> | undefined;
27+
sessionId?: string | undefined;
28+
startedAt: string;
29+
statusCode?: number | undefined;
30+
success: boolean;
31+
trigger?: "manual" | "startup" | "background" | "retry" | "auto" | undefined;
32+
};
3333

3434
const startOutcome = (
3535
startMs: number,
3636
seed: Omit<
3737
OperationOutcome,
38-
| 'completedAt'
39-
| 'durationMs'
40-
| 'errorCode'
41-
| 'errorMessage'
42-
| 'operationId'
43-
| 'startedAt'
44-
| 'statusCode'
45-
| 'success'
38+
| "completedAt"
39+
| "durationMs"
40+
| "errorCode"
41+
| "errorMessage"
42+
| "operationId"
43+
| "startedAt"
44+
| "statusCode"
45+
| "success"
4646
>,
4747
): OperationOutcome => ({
4848
...seed,
4949
errorCode: null,
5050
operationId: crypto.randomUUID(),
5151
startedAt: new Date(startMs).toISOString(),
5252
success: false,
53-
})
53+
});
5454

5555
const classifyError = (error: unknown): string => {
5656
// Classify domain errors before they reach this function.
5757
// Returning error.name is a last-resort fallback; prefer stable codes
5858
// like "checkout_card_declined" at the call site when possible.
59-
return error instanceof Error ? error.name : 'unknown_error'
60-
}
59+
return error instanceof Error ? error.name : "unknown_error";
60+
};
6161

6262
const formatErrorMessage = (error: unknown): string => {
63-
return error instanceof Error ? error.message : 'Unknown error'
64-
}
63+
return error instanceof Error ? error.message : "Unknown error";
64+
};
6565

6666
const inferStatusCode = (error: unknown): number => {
67-
return error instanceof Error && 'statusCode' in error && typeof error.statusCode === 'number'
67+
return error instanceof Error && "statusCode" in error && typeof error.statusCode === "number"
6868
? error.statusCode
69-
: 500
70-
}
69+
: 500;
70+
};
7171

7272
// Put these helpers in a shared file such as src/lib/outcome.ts.
7373
const persistOutcome = async (outcome: OperationOutcome): Promise<void> => {
74-
void outcome
74+
void outcome;
7575
// Replace this with your real DB or analytics write.
76-
}
76+
};
7777

78-
app.post('/checkout', async (req, res, next) => {
79-
const startMs = Date.now()
80-
const requestId = req.headers['x-request-id']
78+
app.post("/checkout", async (req, res, next) => {
79+
const startMs = Date.now();
80+
const requestId = req.headers["x-request-id"];
8181
const outcome = startOutcome(startMs, {
82-
appVersion: process.env.APP_VERSION ?? 'dev',
82+
appVersion: process.env.APP_VERSION ?? "dev",
8383
correlationId: Array.isArray(requestId) ? requestId[0] : requestId,
84-
environment: process.env.NODE_ENV ?? 'development',
85-
operationName: 'checkout.submit',
86-
operationType: 'http_request',
84+
environment: process.env.NODE_ENV ?? "development",
85+
operationName: "checkout.submit",
86+
operationType: "http_request",
8787
retryCount: 0,
88-
trigger: 'manual',
89-
})
88+
trigger: "manual",
89+
});
9090

9191
try {
92-
const result = await runCheckout(req, outcome)
93-
outcome.success = true
94-
outcome.statusCode = 200
95-
res.json(result)
92+
const result = await runCheckout(req, outcome);
93+
outcome.success = true;
94+
outcome.statusCode = 200;
95+
res.json(result);
9696
} catch (error) {
97-
outcome.success = false
98-
outcome.errorCode = classifyError(error)
99-
outcome.errorMessage = formatErrorMessage(error)
100-
outcome.statusCode = inferStatusCode(error)
101-
next(error)
97+
outcome.success = false;
98+
outcome.errorCode = classifyError(error);
99+
outcome.errorMessage = formatErrorMessage(error);
100+
outcome.statusCode = inferStatusCode(error);
101+
next(error);
102102
} finally {
103-
outcome.completedAt = new Date().toISOString()
104-
outcome.durationMs = Date.now() - startMs
103+
outcome.completedAt = new Date().toISOString();
104+
outcome.durationMs = Date.now() - startMs;
105105
await persistOutcome(outcome).catch((persistError: unknown) => {
106-
console.error('[outcome] failed to persist outcome', persistError)
107-
})
106+
console.error("[outcome] failed to persist outcome", persistError);
107+
});
108108
}
109-
})
109+
});
110110
```
111111

112112
## Queues and Workers

.agents/skills/conductor-setup/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Use this skill when configuring a repository for Conductor workspaces. When invo
1717
- `references/settings-and-migration.md` for settings layers, schemas, supported repository fields, or `conductor.json` migration.
1818
- `references/scripts-and-environment.md` for setup/run/archive scripts, shells, variables, concurrency, Spotlight, or caches.
1919
- `references/files-layouts-and-troubleshooting.md` for Files to copy, `.worktreeinclude`, monorepos, linked repositories, MCP/privacy, or diagnosis.
20-
Read more than one only when the task crosses those concerns.
20+
Read more than one only when the task crosses those concerns.
2121
3. Apply the selected reference's documented contract. Prefer team settings over machine-local configuration; preserve an existing deliberate script layout; use Conductor variables instead of hard-coded workspace paths, resources, and local ports.
2222
4. Keep secrets and machine-specific credentials out of committed settings. Change MCP/privacy configuration only when asked or required by repository policy.
2323
5. Validate TOML and run the narrowest relevant check for every script changed. Report when the existing setup already satisfies the requested outcome.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: create-readme
3+
description: 'Create a README.md file for the project'
4+
---
5+
6+
## Role
7+
8+
You're a senior expert software engineer with extensive experience in open source projects. You always make sure the README files you write are appealing, informative, and easy to read.
9+
10+
## Task
11+
12+
1. Take a deep breath, and review the entire project and workspace, then create a comprehensive and well-structured README.md file for the project.
13+
2. Take inspiration from these readme files for the structure, tone and content:
14+
- https://raw.githubusercontent.com/Azure-Samples/serverless-chat-langchainjs/refs/heads/main/README.md
15+
- https://raw.githubusercontent.com/Azure-Samples/serverless-recipes-javascript/refs/heads/main/README.md
16+
- https://raw.githubusercontent.com/sinedied/run-on-output/refs/heads/main/README.md
17+
- https://raw.githubusercontent.com/sinedied/smoke/refs/heads/main/README.md
18+
3. Do not overuse emojis, and keep the readme concise and to the point.
19+
4. Do not include sections like "LICENSE", "CONTRIBUTING", "CHANGELOG", etc. There are dedicated files for those sections.
20+
5. Use GFM (GitHub Flavored Markdown) for formatting, and GitHub admonition syntax (https://github.com/orgs/community/discussions/16925) where appropriate.
21+
6. If you find a logo or icon for the project, use it in the readme's header.

0 commit comments

Comments
 (0)