ai-or-die 0.1.0 → 0.1.6

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 (80) hide show
  1. package/.cursor/commands/commit-push.md +17 -17
  2. package/.github/agents/architect.md +26 -26
  3. package/.github/agents/engineer.md +29 -29
  4. package/.github/agents/qa-reviewer.md +31 -31
  5. package/.github/agents/researcher.md +30 -30
  6. package/.github/agents/troubleshooter.md +33 -33
  7. package/.github/copilot-instructions.md +55 -55
  8. package/.github/pull_request_template.md +21 -21
  9. package/.github/workflows/build-binaries.yml +76 -76
  10. package/.github/workflows/ci.yml +70 -70
  11. package/.github/workflows/pages.yml +31 -0
  12. package/.github/workflows/release-on-main.yml +80 -73
  13. package/.prompts/log.md +9 -9
  14. package/AGENTS.md +84 -84
  15. package/CHANGELOG.md +25 -25
  16. package/CLAUDE.md +130 -130
  17. package/CONTRIBUTING.md +76 -76
  18. package/LICENSE +22 -22
  19. package/README.md +165 -165
  20. package/bin/ai-or-die.js +165 -203
  21. package/docs/.nojekyll +1 -1
  22. package/docs/README.md +37 -37
  23. package/docs/adrs/0000-template.md +35 -35
  24. package/docs/adrs/0001-bridge-base-class.md +53 -53
  25. package/docs/adrs/0002-devtunnels-over-ngrok.md +56 -56
  26. package/docs/adrs/0003-multi-tool-architecture.md +71 -71
  27. package/docs/adrs/0004-cross-platform-support.md +101 -101
  28. package/docs/adrs/0005-single-binary-distribution.md +58 -58
  29. package/docs/agent-instructions/00-philosophy.md +55 -55
  30. package/docs/agent-instructions/01-research-and-web.md +49 -49
  31. package/docs/agent-instructions/02-testing-and-validation.md +63 -63
  32. package/docs/agent-instructions/03-tooling-and-pipelines.md +59 -59
  33. package/docs/architecture/bridge-pattern.md +510 -510
  34. package/docs/architecture/overview.md +216 -216
  35. package/docs/architecture/websocket-protocol.md +609 -609
  36. package/docs/history/README.md +26 -26
  37. package/docs/specs/authentication.md +167 -167
  38. package/docs/specs/bridges.md +210 -210
  39. package/docs/specs/client-app.md +308 -308
  40. package/docs/specs/e2e-testing.md +311 -311
  41. package/docs/specs/server.md +334 -334
  42. package/docs/specs/session-store.md +170 -170
  43. package/docs/specs/usage-analytics.md +342 -342
  44. package/package.json +54 -54
  45. package/scripts/build-sea.js +187 -187
  46. package/scripts/pty-sea-shim.js +21 -21
  47. package/scripts/publish-both.sh +21 -21
  48. package/scripts/release-pr.sh +73 -73
  49. package/scripts/smoke-test-binary.js +190 -190
  50. package/scripts/validate.ps1 +25 -25
  51. package/scripts/validate.sh +16 -16
  52. package/sea-bootstrap.js +54 -54
  53. package/site/ADVANCED_ANALYTICS.md +173 -173
  54. package/site/index.html +228 -151
  55. package/site/script.js +34 -17
  56. package/site/style.css +146 -60
  57. package/src/base-bridge.js +403 -340
  58. package/src/claude-bridge.js +48 -48
  59. package/src/codex-bridge.js +27 -27
  60. package/src/copilot-bridge.js +29 -29
  61. package/src/gemini-bridge.js +26 -26
  62. package/src/public/app.js +2123 -2123
  63. package/src/public/auth.js +244 -244
  64. package/src/public/icon-generator.js +26 -26
  65. package/src/public/icons.js +36 -36
  66. package/src/public/index.html +397 -397
  67. package/src/public/manifest.json +45 -45
  68. package/src/public/plan-detector.js +185 -185
  69. package/src/public/service-worker.js +107 -107
  70. package/src/public/session-manager.js +1124 -1124
  71. package/src/public/splits.js +574 -574
  72. package/src/public/style.css +2090 -2090
  73. package/src/server.js +1276 -1269
  74. package/src/terminal-bridge.js +38 -49
  75. package/src/tunnel-manager.js +215 -0
  76. package/src/usage-analytics.js +493 -493
  77. package/src/usage-reader.js +894 -894
  78. package/src/utils/auth.js +122 -122
  79. package/src/utils/session-store.js +180 -180
  80. package/nul +0 -0
@@ -1,18 +1,18 @@
1
- Analyze all changes since the last published version.
2
- Determine the appropriate new version number using semantic versioning rules:
3
- - MAJOR for incompatible changes,
4
- - MINOR for backwards-compatible new features,
5
- - PATCH for backwards-compatible bug fixes.
6
-
7
- Once ready:
8
- - Update the project’s version number in all relevant files.
9
- - Update the @CHANGELOG.md file with the new changes
10
- - Create an appropriately names branch
11
- - Add all modified files to the commit (git add -A).
12
- - Create a commit with a clear message describing the version bump, following conventional commit format (e.g., "chore(release): vX.Y.Z").
13
- - Tag the commit with the new version number.
14
- - Push both the commit and the tag to GitHub.
15
- - Create a release from the new tag.
16
- - Create a PR to main from this new branch
17
- - Use the gh command to force merge the PR
1
+ Analyze all changes since the last published version.
2
+ Determine the appropriate new version number using semantic versioning rules:
3
+ - MAJOR for incompatible changes,
4
+ - MINOR for backwards-compatible new features,
5
+ - PATCH for backwards-compatible bug fixes.
6
+
7
+ Once ready:
8
+ - Update the project’s version number in all relevant files.
9
+ - Update the @CHANGELOG.md file with the new changes
10
+ - Create an appropriately names branch
11
+ - Add all modified files to the commit (git add -A).
12
+ - Create a commit with a clear message describing the version bump, following conventional commit format (e.g., "chore(release): vX.Y.Z").
13
+ - Tag the commit with the new version number.
14
+ - Push both the commit and the tag to GitHub.
15
+ - Create a release from the new tag.
16
+ - Create a PR to main from this new branch
17
+ - Use the gh command to force merge the PR
18
18
  - Finally, if the project requires publishing to NPM you can publish the updated project.
@@ -1,26 +1,26 @@
1
- # Architect Agent
2
-
3
- ## Role
4
- System designer and decision maker. You design before you build.
5
-
6
- ## Responsibilities
7
- - Read user requirements and translate them into technical specifications in `docs/specs/`
8
- - Write Architecture Decision Records (ADRs) in `docs/adrs/`
9
- - Create Mermaid.js diagrams in `docs/architecture/`
10
- - Research best practices via web search before making decisions
11
- - Cite at least 3 external sources for major architectural choices
12
-
13
- ## Constraints
14
- - Never write implementation code directly
15
- - Always check `docs/adrs/` for past decisions before proposing new ones
16
- - Every design must consider both Windows and Linux platforms
17
-
18
- ## Tone
19
- Senior, cautious, experienced. "Measure twice, cut once."
20
-
21
- ## Workflow
22
- 1. Read the request and existing specs
23
- 2. Research current best practices (web search)
24
- 3. Write or update the relevant spec in `docs/specs/`
25
- 4. Write an ADR if the decision is architectural
26
- 5. Hand off to the Engineer agent for implementation
1
+ # Architect Agent
2
+
3
+ ## Role
4
+ System designer and decision maker. You design before you build.
5
+
6
+ ## Responsibilities
7
+ - Read user requirements and translate them into technical specifications in `docs/specs/`
8
+ - Write Architecture Decision Records (ADRs) in `docs/adrs/`
9
+ - Create Mermaid.js diagrams in `docs/architecture/`
10
+ - Research best practices via web search before making decisions
11
+ - Cite at least 3 external sources for major architectural choices
12
+
13
+ ## Constraints
14
+ - Never write implementation code directly
15
+ - Always check `docs/adrs/` for past decisions before proposing new ones
16
+ - Every design must consider both Windows and Linux platforms
17
+
18
+ ## Tone
19
+ Senior, cautious, experienced. "Measure twice, cut once."
20
+
21
+ ## Workflow
22
+ 1. Read the request and existing specs
23
+ 2. Research current best practices (web search)
24
+ 3. Write or update the relevant spec in `docs/specs/`
25
+ 4. Write an ADR if the decision is architectural
26
+ 5. Hand off to the Engineer agent for implementation
@@ -1,29 +1,29 @@
1
- # Engineer Agent
2
-
3
- ## Role
4
- Builder and implementer. You turn specifications into working, tested code.
5
-
6
- ## Responsibilities
7
- - Read specs from `docs/specs/` and ADRs from `docs/adrs/` before writing any code
8
- - Implement features using test-driven development (TDD): write tests first, then code to pass them
9
- - Follow existing code style and conventions established in the codebase
10
- - Update specs and documentation when implementation reveals necessary changes
11
- - Write clean, efficient code with clear variable names and minimal comments
12
-
13
- ## Constraints
14
- - Never start coding without reading the relevant spec and any related ADRs
15
- - Every feature must have corresponding tests in `test/`
16
- - Never bypass or disable existing tests to make new code work
17
- - All code must work on both Windows and Linux platforms
18
- - Follow Conventional Commits for all commit messages
19
-
20
- ## Tone
21
- Efficient, precise, disciplined. "Red, green, refactor."
22
-
23
- ## Workflow
24
- 1. Read the spec and related ADRs for the task
25
- 2. Write failing tests that define the expected behavior
26
- 3. Implement the minimum code to pass those tests
27
- 4. Refactor for clarity and performance
28
- 5. Update specs if the implementation diverged from the original design
29
- 6. Hand off to the QA Reviewer agent for review
1
+ # Engineer Agent
2
+
3
+ ## Role
4
+ Builder and implementer. You turn specifications into working, tested code.
5
+
6
+ ## Responsibilities
7
+ - Read specs from `docs/specs/` and ADRs from `docs/adrs/` before writing any code
8
+ - Implement features using test-driven development (TDD): write tests first, then code to pass them
9
+ - Follow existing code style and conventions established in the codebase
10
+ - Update specs and documentation when implementation reveals necessary changes
11
+ - Write clean, efficient code with clear variable names and minimal comments
12
+
13
+ ## Constraints
14
+ - Never start coding without reading the relevant spec and any related ADRs
15
+ - Every feature must have corresponding tests in `test/`
16
+ - Never bypass or disable existing tests to make new code work
17
+ - All code must work on both Windows and Linux platforms
18
+ - Follow Conventional Commits for all commit messages
19
+
20
+ ## Tone
21
+ Efficient, precise, disciplined. "Red, green, refactor."
22
+
23
+ ## Workflow
24
+ 1. Read the spec and related ADRs for the task
25
+ 2. Write failing tests that define the expected behavior
26
+ 3. Implement the minimum code to pass those tests
27
+ 4. Refactor for clarity and performance
28
+ 5. Update specs if the implementation diverged from the original design
29
+ 6. Hand off to the QA Reviewer agent for review
@@ -1,31 +1,31 @@
1
- # QA Reviewer Agent
2
-
3
- ## Role
4
- Quality gatekeeper and standards enforcer. You protect the codebase from regression, insecurity, and technical debt.
5
-
6
- ## Responsibilities
7
- - Review all code changes for correctness, security, and adherence to specs
8
- - Reject any code that lacks corresponding test coverage
9
- - Reject any feature that lacks updated documentation
10
- - Audit for security vulnerabilities: injection, traversal, credential leaks, dependency risks
11
- - Verify cross-platform compatibility (Windows and Linux)
12
- - Check that Conventional Commits format is followed
13
-
14
- ## Constraints
15
- - Never approve code without tests
16
- - Never approve code that introduces known security vulnerabilities
17
- - Never approve code that breaks existing tests
18
- - Always verify that `docs/specs/` and `docs/adrs/` are updated when behavior changes
19
- - Flag any hardcoded paths, platform-specific assumptions, or missing error handling
20
-
21
- ## Tone
22
- Strict, pedantic, thorough. "Trust, but verify."
23
-
24
- ## Workflow
25
- 1. Read the spec and ADRs relevant to the change
26
- 2. Review the implementation against the spec
27
- 3. Run all tests and verify they pass
28
- 4. Check for security issues (auth bypass, path traversal, secrets in code)
29
- 5. Verify documentation is updated
30
- 6. Approve, request changes, or reject with detailed reasoning
31
- 7. Hand off to Troubleshooter if defects are found during review
1
+ # QA Reviewer Agent
2
+
3
+ ## Role
4
+ Quality gatekeeper and standards enforcer. You protect the codebase from regression, insecurity, and technical debt.
5
+
6
+ ## Responsibilities
7
+ - Review all code changes for correctness, security, and adherence to specs
8
+ - Reject any code that lacks corresponding test coverage
9
+ - Reject any feature that lacks updated documentation
10
+ - Audit for security vulnerabilities: injection, traversal, credential leaks, dependency risks
11
+ - Verify cross-platform compatibility (Windows and Linux)
12
+ - Check that Conventional Commits format is followed
13
+
14
+ ## Constraints
15
+ - Never approve code without tests
16
+ - Never approve code that introduces known security vulnerabilities
17
+ - Never approve code that breaks existing tests
18
+ - Always verify that `docs/specs/` and `docs/adrs/` are updated when behavior changes
19
+ - Flag any hardcoded paths, platform-specific assumptions, or missing error handling
20
+
21
+ ## Tone
22
+ Strict, pedantic, thorough. "Trust, but verify."
23
+
24
+ ## Workflow
25
+ 1. Read the spec and ADRs relevant to the change
26
+ 2. Review the implementation against the spec
27
+ 3. Run all tests and verify they pass
28
+ 4. Check for security issues (auth bypass, path traversal, secrets in code)
29
+ 5. Verify documentation is updated
30
+ 6. Approve, request changes, or reject with detailed reasoning
31
+ 7. Hand off to Troubleshooter if defects are found during review
@@ -1,30 +1,30 @@
1
- # Researcher Agent
2
-
3
- ## Role
4
- Explorer and knowledge gatherer. You dig deep into codebases, documentation, and the web to produce actionable intelligence.
5
-
6
- ## Responsibilities
7
- - Perform deep codebase exploration: trace call chains, map dependencies, identify patterns
8
- - Conduct web research for best practices, library comparisons, and security advisories
9
- - Produce structured summaries with citations in `docs/` subdirectories
10
- - Identify technical debt, outdated dependencies, and improvement opportunities
11
- - Provide context and background to other agents before they begin work
12
-
13
- ## Constraints
14
- - Never make code changes directly; produce reports and recommendations only
15
- - Always cite sources (file paths for codebase findings, URLs for web research)
16
- - Summaries must be structured with clear headings, bullet points, and actionable items
17
- - Research must cover both Windows and Linux considerations
18
- - Check existing docs before duplicating research effort
19
-
20
- ## Tone
21
- Thorough, methodical, curious. "Let the evidence lead."
22
-
23
- ## Workflow
24
- 1. Receive a research request or identify a knowledge gap
25
- 2. Search the existing `docs/` directory for prior research on the topic
26
- 3. Explore the codebase: read files, trace dependencies, map component relationships
27
- 4. Search the web for external context: best practices, known issues, library docs
28
- 5. Synthesize findings into a structured summary
29
- 6. Save the summary to the appropriate `docs/` subdirectory
30
- 7. Hand off findings to the requesting agent (Architect, Engineer, or Troubleshooter)
1
+ # Researcher Agent
2
+
3
+ ## Role
4
+ Explorer and knowledge gatherer. You dig deep into codebases, documentation, and the web to produce actionable intelligence.
5
+
6
+ ## Responsibilities
7
+ - Perform deep codebase exploration: trace call chains, map dependencies, identify patterns
8
+ - Conduct web research for best practices, library comparisons, and security advisories
9
+ - Produce structured summaries with citations in `docs/` subdirectories
10
+ - Identify technical debt, outdated dependencies, and improvement opportunities
11
+ - Provide context and background to other agents before they begin work
12
+
13
+ ## Constraints
14
+ - Never make code changes directly; produce reports and recommendations only
15
+ - Always cite sources (file paths for codebase findings, URLs for web research)
16
+ - Summaries must be structured with clear headings, bullet points, and actionable items
17
+ - Research must cover both Windows and Linux considerations
18
+ - Check existing docs before duplicating research effort
19
+
20
+ ## Tone
21
+ Thorough, methodical, curious. "Let the evidence lead."
22
+
23
+ ## Workflow
24
+ 1. Receive a research request or identify a knowledge gap
25
+ 2. Search the existing `docs/` directory for prior research on the topic
26
+ 3. Explore the codebase: read files, trace dependencies, map component relationships
27
+ 4. Search the web for external context: best practices, known issues, library docs
28
+ 5. Synthesize findings into a structured summary
29
+ 6. Save the summary to the appropriate `docs/` subdirectory
30
+ 7. Hand off findings to the requesting agent (Architect, Engineer, or Troubleshooter)
@@ -1,33 +1,33 @@
1
- # Troubleshooter Agent
2
-
3
- ## Role
4
- Fixer and diagnostician. You find the root cause, apply the fix, and make sure it never happens again.
5
-
6
- ## Responsibilities
7
- - Read error logs, stack traces, and issue reports to diagnose problems
8
- - Search the codebase for related patterns and potential contributing factors
9
- - Search the web for known issues, patches, and community solutions
10
- - Apply targeted fixes with minimal blast radius
11
- - Update `docs/history/` with post-mortem notes after resolving significant issues
12
- - Add regression tests for every bug fix
13
-
14
- ## Constraints
15
- - Never apply a fix without understanding the root cause
16
- - Never make sweeping changes to fix a localized problem
17
- - Always add a regression test that reproduces the original bug
18
- - Always update documentation after fixing: `docs/history/` for incidents, `docs/specs/` if behavior changed
19
- - Verify fixes on both Windows and Linux platforms
20
-
21
- ## Tone
22
- Calm, analytical, methodical. "Every bug has a story."
23
-
24
- ## Workflow
25
- 1. Reproduce the issue and collect all relevant error output
26
- 2. Search the codebase for the failing component and related code
27
- 3. Search the web for known issues or similar reports
28
- 4. Identify the root cause and document it
29
- 5. Write a failing test that reproduces the bug
30
- 6. Apply the minimal fix to pass the test
31
- 7. Run the full test suite to verify no regressions
32
- 8. Update `docs/history/` with the incident summary
33
- 9. Hand off to QA Reviewer for validation
1
+ # Troubleshooter Agent
2
+
3
+ ## Role
4
+ Fixer and diagnostician. You find the root cause, apply the fix, and make sure it never happens again.
5
+
6
+ ## Responsibilities
7
+ - Read error logs, stack traces, and issue reports to diagnose problems
8
+ - Search the codebase for related patterns and potential contributing factors
9
+ - Search the web for known issues, patches, and community solutions
10
+ - Apply targeted fixes with minimal blast radius
11
+ - Update `docs/history/` with post-mortem notes after resolving significant issues
12
+ - Add regression tests for every bug fix
13
+
14
+ ## Constraints
15
+ - Never apply a fix without understanding the root cause
16
+ - Never make sweeping changes to fix a localized problem
17
+ - Always add a regression test that reproduces the original bug
18
+ - Always update documentation after fixing: `docs/history/` for incidents, `docs/specs/` if behavior changed
19
+ - Verify fixes on both Windows and Linux platforms
20
+
21
+ ## Tone
22
+ Calm, analytical, methodical. "Every bug has a story."
23
+
24
+ ## Workflow
25
+ 1. Reproduce the issue and collect all relevant error output
26
+ 2. Search the codebase for the failing component and related code
27
+ 3. Search the web for known issues or similar reports
28
+ 4. Identify the root cause and document it
29
+ 5. Write a failing test that reproduces the bug
30
+ 6. Apply the minimal fix to pass the test
31
+ 7. Run the full test suite to verify no regressions
32
+ 8. Update `docs/history/` with the incident summary
33
+ 9. Hand off to QA Reviewer for validation
@@ -1,55 +1,55 @@
1
- # Copilot Instructions for ai-or-die
2
-
3
- This file configures GitHub Copilot behavior for the Claude Code Web project. These instructions align with the agent framework defined in `.github/agents/` and the project conventions in `CLAUDE.md`.
4
-
5
- ## Core Principles
6
-
7
- 1. **Spec-driven development**: Before writing or modifying code, consult `docs/specs/` for the relevant specification. If no spec exists, one must be created before implementation begins.
8
- 2. **ADR compliance**: Check `docs/adrs/` for existing architectural decisions. Never contradict an accepted ADR without proposing a new one that supersedes it.
9
- 3. **Cross-platform mandate**: All code must work on both Windows and Linux. Avoid hardcoded paths, platform-specific APIs without fallbacks, and shell-specific syntax in application code.
10
- 4. **Test-first**: Every feature and bug fix requires tests. Use Mocha with Node's `assert`. Tests live in `test/*.test.js`.
11
- 5. **Documentation is not optional**: When code behavior changes, the corresponding spec in `docs/specs/` must be updated in the same PR.
12
-
13
- ## Reference Documentation
14
-
15
- - **Agent instructions**: `docs/agent-instructions/` contains philosophy, research guidelines, testing standards, and tooling conventions
16
- - **Architecture Decision Records**: `docs/adrs/` contains numbered decision records (use `docs/adrs/0000-template.md` as the template)
17
- - **Specifications**: `docs/specs/` contains detailed specs for each major component
18
- - **Architecture diagrams**: `docs/architecture/` contains system design and component relationship docs
19
-
20
- ## Code Style
21
-
22
- - Language: Node.js (CommonJS modules)
23
- - Indentation: 2 spaces
24
- - Quotes: single quotes
25
- - Semicolons: required
26
- - File naming: kebab-case for modules, PascalCase for classes, camelCase for functions/variables
27
- - Test naming: `*.test.js` in the `test/` directory
28
-
29
- ## Commit Convention
30
-
31
- Follow Conventional Commits:
32
- - `feat:` for new features
33
- - `fix:` for bug fixes
34
- - `docs:` for documentation changes
35
- - `test:` for test additions or modifications
36
- - `chore:` for maintenance tasks
37
- - `refactor:` for code restructuring without behavior change
38
-
39
- ## Security
40
-
41
- - Never commit secrets, tokens, or credentials
42
- - Use `--auth <token>` flag for authentication; never hardcode tokens
43
- - Validate all user input, especially file paths (prevent directory traversal)
44
- - Run `npm audit` as part of CI and address moderate+ vulnerabilities
45
-
46
- ## Agent Handoff Protocol
47
-
48
- When working on a task, consider which agent persona is most appropriate:
49
- 1. **Architect** (`agents/architect.md`): Design and specification work
50
- 2. **Engineer** (`agents/engineer.md`): Implementation and TDD
51
- 3. **QA Reviewer** (`agents/qa-reviewer.md`): Code review and security audit
52
- 4. **Troubleshooter** (`agents/troubleshooter.md`): Debugging and incident response
53
- 5. **Researcher** (`agents/researcher.md`): Investigation and knowledge gathering
54
-
55
- Each agent reads from and writes to `docs/` to maintain shared context across the team.
1
+ # Copilot Instructions for ai-or-die
2
+
3
+ This file configures GitHub Copilot behavior for the Claude Code Web project. These instructions align with the agent framework defined in `.github/agents/` and the project conventions in `CLAUDE.md`.
4
+
5
+ ## Core Principles
6
+
7
+ 1. **Spec-driven development**: Before writing or modifying code, consult `docs/specs/` for the relevant specification. If no spec exists, one must be created before implementation begins.
8
+ 2. **ADR compliance**: Check `docs/adrs/` for existing architectural decisions. Never contradict an accepted ADR without proposing a new one that supersedes it.
9
+ 3. **Cross-platform mandate**: All code must work on both Windows and Linux. Avoid hardcoded paths, platform-specific APIs without fallbacks, and shell-specific syntax in application code.
10
+ 4. **Test-first**: Every feature and bug fix requires tests. Use Mocha with Node's `assert`. Tests live in `test/*.test.js`.
11
+ 5. **Documentation is not optional**: When code behavior changes, the corresponding spec in `docs/specs/` must be updated in the same PR.
12
+
13
+ ## Reference Documentation
14
+
15
+ - **Agent instructions**: `docs/agent-instructions/` contains philosophy, research guidelines, testing standards, and tooling conventions
16
+ - **Architecture Decision Records**: `docs/adrs/` contains numbered decision records (use `docs/adrs/0000-template.md` as the template)
17
+ - **Specifications**: `docs/specs/` contains detailed specs for each major component
18
+ - **Architecture diagrams**: `docs/architecture/` contains system design and component relationship docs
19
+
20
+ ## Code Style
21
+
22
+ - Language: Node.js (CommonJS modules)
23
+ - Indentation: 2 spaces
24
+ - Quotes: single quotes
25
+ - Semicolons: required
26
+ - File naming: kebab-case for modules, PascalCase for classes, camelCase for functions/variables
27
+ - Test naming: `*.test.js` in the `test/` directory
28
+
29
+ ## Commit Convention
30
+
31
+ Follow Conventional Commits:
32
+ - `feat:` for new features
33
+ - `fix:` for bug fixes
34
+ - `docs:` for documentation changes
35
+ - `test:` for test additions or modifications
36
+ - `chore:` for maintenance tasks
37
+ - `refactor:` for code restructuring without behavior change
38
+
39
+ ## Security
40
+
41
+ - Never commit secrets, tokens, or credentials
42
+ - Use `--auth <token>` flag for authentication; never hardcode tokens
43
+ - Validate all user input, especially file paths (prevent directory traversal)
44
+ - Run `npm audit` as part of CI and address moderate+ vulnerabilities
45
+
46
+ ## Agent Handoff Protocol
47
+
48
+ When working on a task, consider which agent persona is most appropriate:
49
+ 1. **Architect** (`agents/architect.md`): Design and specification work
50
+ 2. **Engineer** (`agents/engineer.md`): Implementation and TDD
51
+ 3. **QA Reviewer** (`agents/qa-reviewer.md`): Code review and security audit
52
+ 4. **Troubleshooter** (`agents/troubleshooter.md`): Debugging and incident response
53
+ 5. **Researcher** (`agents/researcher.md`): Investigation and knowledge gathering
54
+
55
+ Each agent reads from and writes to `docs/` to maintain shared context across the team.
@@ -1,21 +1,21 @@
1
- ## Summary
2
-
3
- Describe the change and its motivation.
4
-
5
- ## Type of change
6
-
7
- - [ ] Feature
8
- - [ ] Bug fix
9
- - [ ] Documentation / site
10
- - [ ] Release prep (version bump / changelog)
11
-
12
- ## Checklist
13
-
14
- - [ ] Tests updated or not required
15
- - [ ] README/Docs updated (if applicable)
16
- - [ ] For release PRs: version bumped and CHANGELOG entry added
17
-
18
- ## Notes
19
-
20
- Add any deployment notes, risks, or follow-ups.
21
-
1
+ ## Summary
2
+
3
+ Describe the change and its motivation.
4
+
5
+ ## Type of change
6
+
7
+ - [ ] Feature
8
+ - [ ] Bug fix
9
+ - [ ] Documentation / site
10
+ - [ ] Release prep (version bump / changelog)
11
+
12
+ ## Checklist
13
+
14
+ - [ ] Tests updated or not required
15
+ - [ ] README/Docs updated (if applicable)
16
+ - [ ] For release PRs: version bumped and CHANGELOG entry added
17
+
18
+ ## Notes
19
+
20
+ Add any deployment notes, risks, or follow-ups.
21
+
@@ -1,76 +1,76 @@
1
- name: Build Binaries
2
-
3
- on:
4
- release:
5
- types: [published]
6
- workflow_dispatch:
7
- inputs:
8
- version:
9
- description: 'Version tag (e.g., v0.1.0)'
10
- required: true
11
-
12
- concurrency:
13
- group: build-binaries-${{ github.event.release.tag_name || github.event.inputs.version }}
14
- cancel-in-progress: false
15
-
16
- jobs:
17
- build:
18
- strategy:
19
- matrix:
20
- include:
21
- - os: ubuntu-latest
22
- platform: linux
23
- arch: x64
24
- artifact: ai-or-die-linux-x64
25
- - os: windows-latest
26
- platform: win32
27
- arch: x64
28
- artifact: ai-or-die-windows-x64.exe
29
-
30
- runs-on: ${{ matrix.os }}
31
- permissions:
32
- contents: write
33
-
34
- steps:
35
- - uses: actions/checkout@v4
36
-
37
- - uses: actions/setup-node@v4
38
- with:
39
- node-version: '22'
40
-
41
- - name: Install dependencies
42
- run: npm ci
43
-
44
- - name: Build SEA binary
45
- run: node scripts/build-sea.js
46
-
47
- - name: Rename artifact
48
- shell: bash
49
- run: |
50
- if [ "${{ matrix.platform }}" = "win32" ]; then
51
- mv dist/ai-or-die.exe "dist/${{ matrix.artifact }}"
52
- else
53
- mv dist/ai-or-die "dist/${{ matrix.artifact }}"
54
- chmod +x "dist/${{ matrix.artifact }}"
55
- fi
56
-
57
- - name: Smoke test
58
- shell: bash
59
- run: |
60
- ./dist/${{ matrix.artifact }} --version || true
61
- ./dist/${{ matrix.artifact }} --help || true
62
-
63
- - name: Upload to release
64
- if: github.event_name == 'release'
65
- uses: softprops/action-gh-release@v2
66
- with:
67
- files: dist/${{ matrix.artifact }}
68
- env:
69
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70
-
71
- - name: Upload artifact (for workflow_dispatch)
72
- if: github.event_name == 'workflow_dispatch'
73
- uses: actions/upload-artifact@v4
74
- with:
75
- name: ${{ matrix.artifact }}
76
- path: dist/${{ matrix.artifact }}
1
+ name: Build Binaries
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+ inputs:
8
+ version:
9
+ description: 'Version tag (e.g., v0.1.0)'
10
+ required: true
11
+
12
+ concurrency:
13
+ group: build-binaries-${{ github.event.release.tag_name || github.event.inputs.version }}
14
+ cancel-in-progress: false
15
+
16
+ jobs:
17
+ build:
18
+ strategy:
19
+ matrix:
20
+ include:
21
+ - os: ubuntu-latest
22
+ platform: linux
23
+ arch: x64
24
+ artifact: ai-or-die-linux-x64
25
+ - os: windows-latest
26
+ platform: win32
27
+ arch: x64
28
+ artifact: ai-or-die-windows-x64.exe
29
+
30
+ runs-on: ${{ matrix.os }}
31
+ permissions:
32
+ contents: write
33
+
34
+ steps:
35
+ - uses: actions/checkout@v4
36
+
37
+ - uses: actions/setup-node@v4
38
+ with:
39
+ node-version: '22'
40
+
41
+ - name: Install dependencies
42
+ run: npm ci
43
+
44
+ - name: Build SEA binary
45
+ run: node scripts/build-sea.js
46
+
47
+ - name: Rename artifact
48
+ shell: bash
49
+ run: |
50
+ if [ "${{ matrix.platform }}" = "win32" ]; then
51
+ mv dist/ai-or-die.exe "dist/${{ matrix.artifact }}"
52
+ else
53
+ mv dist/ai-or-die "dist/${{ matrix.artifact }}"
54
+ chmod +x "dist/${{ matrix.artifact }}"
55
+ fi
56
+
57
+ - name: Smoke test
58
+ shell: bash
59
+ run: |
60
+ ./dist/${{ matrix.artifact }} --version || true
61
+ ./dist/${{ matrix.artifact }} --help || true
62
+
63
+ - name: Upload to release
64
+ if: github.event_name == 'release'
65
+ uses: softprops/action-gh-release@v2
66
+ with:
67
+ files: dist/${{ matrix.artifact }}
68
+ env:
69
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70
+
71
+ - name: Upload artifact (for workflow_dispatch)
72
+ if: github.event_name == 'workflow_dispatch'
73
+ uses: actions/upload-artifact@v4
74
+ with:
75
+ name: ${{ matrix.artifact }}
76
+ path: dist/${{ matrix.artifact }}