Move PID file to project root (.impeccable-live.json)

os.tmpdir() returns /var/folders/.../T/ on macOS, not /tmp/. The skill
reference was telling the agent to cat /tmp/impeccable-live.json which
didn't exist. Moving the PID file to the project root makes it
predictable across platforms and project-scoped (multiple projects can
run independent live sessions).

Changed in: live-server.mjs, live-poll.mjs, live.md reference.
Added .impeccable-live.json to .gitignore.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Paul Bakaus
2026-04-13 12:32:42 -07:00
co-authored by Claude Opus 4.6
parent 4b52756edd
commit 4092ee5f22
108 changed files with 8432 additions and 126 deletions
+34
View File
@@ -475,6 +475,31 @@ function formatYamlScalar(value) {
return value;
}
function appendYamlObject(lines, data, indent = 0) {
const space = ' '.repeat(indent);
for (const [key, value] of Object.entries(data)) {
if (Array.isArray(value)) {
lines.push(`${space}${key}:`);
for (const item of value) {
if (item && typeof item === 'object' && !Array.isArray(item)) {
lines.push(`${space} -`);
appendYamlObject(lines, item, indent + 4);
} else {
lines.push(`${space} - ${formatYamlScalar(item)}`);
}
}
} else if (value && typeof value === 'object') {
lines.push(`${space}${key}:`);
appendYamlObject(lines, value, indent + 2);
} else if (typeof value === 'boolean') {
lines.push(`${space}${key}: ${value}`);
} else {
lines.push(`${space}${key}: ${formatYamlScalar(value)}`);
}
}
}
/**
* Generate YAML frontmatter string
*/
@@ -503,3 +528,12 @@ export function generateYamlFrontmatter(data) {
lines.push('---');
return lines.join('\n');
}
/**
* Generate a plain YAML document string.
*/
export function generateYamlDocument(data) {
const lines = [];
appendYamlObject(lines, data);
return lines.join('\n');
}