ether-to-astro 1.0.2 → 1.2.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/.github/ISSUE_TEMPLATE/bug-report.yml +87 -0
  2. package/.github/ISSUE_TEMPLATE/capability-request.yml +117 -0
  3. package/.github/ISSUE_TEMPLATE/config.yml +5 -0
  4. package/.github/ISSUE_TEMPLATE/paper-cut.yml +59 -0
  5. package/.github/pull_request_template.md +1 -0
  6. package/.github/workflows/release.yml +2 -2
  7. package/.github/workflows/test.yml +2 -2
  8. package/AGENTS.md +46 -1
  9. package/DEVELOPER.md +78 -0
  10. package/README.md +128 -75
  11. package/SETUP.md +100 -41
  12. package/dist/astro-service.d.ts +51 -2
  13. package/dist/astro-service.js +660 -56
  14. package/dist/cli.js +31 -0
  15. package/dist/entrypoint.d.ts +13 -0
  16. package/dist/entrypoint.js +78 -0
  17. package/dist/ephemeris.d.ts +15 -0
  18. package/dist/ephemeris.js +33 -0
  19. package/dist/formatter.d.ts +5 -1
  20. package/dist/formatter.js +4 -1
  21. package/dist/index.d.ts +2 -1
  22. package/dist/index.js +63 -114
  23. package/dist/loader.d.ts +1 -1
  24. package/dist/loader.js +61 -23
  25. package/dist/mcp-alias.d.ts +2 -0
  26. package/dist/mcp-alias.js +8 -0
  27. package/dist/time-utils.d.ts +8 -0
  28. package/dist/time-utils.js +16 -0
  29. package/dist/tool-registry.js +111 -5
  30. package/dist/tool-result.d.ts +8 -0
  31. package/dist/tool-result.js +39 -0
  32. package/dist/types.d.ts +79 -1
  33. package/docs/product/adrs/0001-mcp-vs-skill-boundary.md +96 -0
  34. package/docs/product/architecture-boundaries.md +223 -0
  35. package/docs/product/product-tenets.md +174 -0
  36. package/docs/releases/1.2.0-draft.md +48 -0
  37. package/package.json +7 -7
  38. package/skills/.curated/daily-brief/SKILL.md +75 -0
  39. package/skills/.curated/electional-overlay/SKILL.md +67 -0
  40. package/skills/.curated/weekly-overview/SKILL.md +73 -0
  41. package/skills/.system/write-skill/SKILL.md +90 -0
  42. package/src/astro-service.ts +861 -60
  43. package/src/cli.ts +84 -0
  44. package/src/entrypoint.ts +118 -0
  45. package/src/ephemeris.ts +44 -0
  46. package/src/formatter.ts +13 -1
  47. package/src/index.ts +77 -121
  48. package/src/loader.ts +69 -25
  49. package/src/mcp-alias.ts +10 -0
  50. package/src/time-utils.ts +18 -0
  51. package/src/tool-registry.ts +129 -9
  52. package/src/tool-result.ts +44 -0
  53. package/src/types.ts +91 -1
  54. package/tests/unit/astro-service.test.ts +751 -5
  55. package/tests/unit/cli-commands.test.ts +13 -0
  56. package/tests/unit/entrypoint.test.ts +67 -0
  57. package/tests/unit/error-mapping.test.ts +20 -0
  58. package/tests/unit/formatter.test.ts +6 -0
  59. package/tests/unit/tool-registry.test.ts +114 -2
  60. package/setup.sh +0 -21
@@ -0,0 +1,87 @@
1
+ name: Bug report
2
+ description: Report incorrect, misleading, lossy, or contract-drift behavior.
3
+ title: "[Bug]: "
4
+ labels:
5
+ - bug
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: |
10
+ Use this template when the current behavior is wrong, misleading, lossy, or does not match docs.
11
+
12
+ - type: dropdown
13
+ id: surface
14
+ attributes:
15
+ label: Affected surface
16
+ options:
17
+ - MCP
18
+ - CLI
19
+ - Docs
20
+ - Charts / rendering
21
+ - Validation / tests
22
+ - Mixed / not sure
23
+ validations:
24
+ required: true
25
+
26
+ - type: textarea
27
+ id: current
28
+ attributes:
29
+ label: Current behavior
30
+ description: What happens today?
31
+ validations:
32
+ required: true
33
+
34
+ - type: textarea
35
+ id: expected
36
+ attributes:
37
+ label: Expected behavior
38
+ description: What should happen instead?
39
+ validations:
40
+ required: true
41
+
42
+ - type: textarea
43
+ id: impact
44
+ attributes:
45
+ label: User impact
46
+ description: Why does this matter in practice?
47
+ placeholder: This causes incorrect astrology, misleading UX, or broken workflows because...
48
+ validations:
49
+ required: true
50
+
51
+ - type: textarea
52
+ id: repro
53
+ attributes:
54
+ label: Steps to reproduce
55
+ description: Include tool calls, CLI commands, or input parameters.
56
+ placeholder: |
57
+ 1. Call `...`
58
+ 2. With input `...`
59
+ 3. Observe `...`
60
+ validations:
61
+ required: true
62
+
63
+ - type: textarea
64
+ id: context
65
+ attributes:
66
+ label: Relevant chart/date/timezone context
67
+ description: Add sanitized astrology context if it matters.
68
+ placeholder: Date, timezone, house system, location, planet categories, days_ahead, etc.
69
+
70
+ - type: textarea
71
+ id: docs_drift
72
+ attributes:
73
+ label: Docs or contract drift
74
+ description: If docs/tool descriptions are involved, note the mismatch here.
75
+
76
+ - type: textarea
77
+ id: acceptance
78
+ attributes:
79
+ label: Fix acceptance criteria
80
+ description: What would make this bug fixed?
81
+ placeholder: |
82
+ - Tool docs say...
83
+ - Response no longer drops...
84
+ - Validation covers...
85
+ validations:
86
+ required: true
87
+
@@ -0,0 +1,117 @@
1
+ name: Capability request
2
+ description: Request a new feature, MCP primitive, skill, or reporting capability.
3
+ title: "[Capability]: "
4
+ labels:
5
+ - feature
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: |
10
+ Use this template for new capabilities across MCP, CLI, skills, or docs.
11
+
12
+ Before filing, check:
13
+ - `docs/product/product-tenets.md`
14
+ - `docs/product/architecture-boundaries.md`
15
+ - whether this belongs in MCP, a skill, or docs
16
+
17
+ - type: dropdown
18
+ id: surface
19
+ attributes:
20
+ label: Recommended surface
21
+ description: Where should this capability primarily live?
22
+ options:
23
+ - MCP
24
+ - Skill
25
+ - CLI
26
+ - Docs
27
+ - Mixed / not sure
28
+ validations:
29
+ required: true
30
+
31
+ - type: dropdown
32
+ id: type
33
+ attributes:
34
+ label: Capability type
35
+ options:
36
+ - Feature
37
+ - Gap
38
+ - Skill enhancement
39
+ - Docs enhancement
40
+ - RFC / decision needed
41
+ validations:
42
+ required: true
43
+
44
+ - type: textarea
45
+ id: problem
46
+ attributes:
47
+ label: Problem statement
48
+ description: What is missing or hard today? Write this like a PM problem statement.
49
+ placeholder: The current product can do X, but it cannot do Y, which blocks Z.
50
+ validations:
51
+ required: true
52
+
53
+ - type: textarea
54
+ id: user_story
55
+ attributes:
56
+ label: User story
57
+ description: Use the format “As a..., I want..., so that...”
58
+ placeholder: As a skill author, I want...
59
+ validations:
60
+ required: true
61
+
62
+ - type: textarea
63
+ id: value
64
+ attributes:
65
+ label: Why this matters
66
+ description: What user outcome or product goal does this unlock?
67
+ placeholder: This matters because...
68
+ validations:
69
+ required: true
70
+
71
+ - type: textarea
72
+ id: determinism
73
+ attributes:
74
+ label: Determinism and boundary check
75
+ description: Explain whether the proposed output is deterministic for the same inputs, and why it belongs in MCP, a skill, or another layer.
76
+ placeholder: The output is deterministic because... It belongs in MCP/Skill because...
77
+ validations:
78
+ required: true
79
+
80
+ - type: textarea
81
+ id: proposed_scope
82
+ attributes:
83
+ label: Proposed scope
84
+ description: What should this include? Keep it concrete.
85
+ placeholder: Add a new endpoint or mode that returns...
86
+ validations:
87
+ required: true
88
+
89
+ - type: textarea
90
+ id: acceptance
91
+ attributes:
92
+ label: Acceptance criteria
93
+ description: Flat list is fine. Focus on observable outcomes.
94
+ placeholder: |
95
+ - A client can...
96
+ - The response includes...
97
+ - Docs explain...
98
+ validations:
99
+ required: true
100
+
101
+ - type: textarea
102
+ id: examples
103
+ attributes:
104
+ label: Example input/output or workflow
105
+ description: Provide a tool call, user flow, or report snippet if helpful.
106
+
107
+ - type: textarea
108
+ id: dependencies
109
+ attributes:
110
+ label: Dependencies or related issues
111
+ description: Link related issues or note prerequisite work.
112
+
113
+ - type: textarea
114
+ id: non_goals
115
+ attributes:
116
+ label: Non-goals or constraints
117
+ description: What should this issue avoid doing?
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: true
2
+ contact_links:
3
+ - name: Product triage backlog
4
+ url: https://github.com/unsalted/ether-to-astro/blob/main/docs/product/product-tenets.md
5
+ about: Start here for product boundaries and MCP-vs-skill guidance.
@@ -0,0 +1,59 @@
1
+ name: Paper-cut
2
+ description: Report small UX, API, formatting, or workflow friction that should be easy to improve.
3
+ title: "[Paper-cut]: "
4
+ labels:
5
+ - paper-cut
6
+ body:
7
+ - type: dropdown
8
+ id: surface
9
+ attributes:
10
+ label: Affected surface
11
+ options:
12
+ - MCP
13
+ - CLI
14
+ - Docs
15
+ - Skill workflow
16
+ - Mixed / not sure
17
+ validations:
18
+ required: true
19
+
20
+ - type: textarea
21
+ id: friction
22
+ attributes:
23
+ label: Current friction
24
+ description: What is awkward or annoying today?
25
+ validations:
26
+ required: true
27
+
28
+ - type: textarea
29
+ id: desired
30
+ attributes:
31
+ label: Desired improvement
32
+ description: What small change would make this noticeably better?
33
+ validations:
34
+ required: true
35
+
36
+ - type: textarea
37
+ id: workaround
38
+ attributes:
39
+ label: Current workaround
40
+ description: How are you working around it now?
41
+
42
+ - type: textarea
43
+ id: user_story
44
+ attributes:
45
+ label: User story
46
+ description: Optional but helpful. Use “As a..., I want..., so that...”
47
+
48
+ - type: textarea
49
+ id: acceptance
50
+ attributes:
51
+ label: Acceptance criteria
52
+ description: Keep this small and concrete.
53
+ placeholder: |
54
+ - Response includes...
55
+ - Docs show...
56
+ - A client no longer needs to...
57
+ validations:
58
+ required: true
59
+
@@ -14,3 +14,4 @@
14
14
  - [ ] Scope is focused and avoids unrelated churn
15
15
  - [ ] Tests were added or updated when behavior changed
16
16
  - [ ] Docs were updated when workflow or interfaces changed
17
+ - [ ] This change respects the MCP vs skill boundary in `docs/product/product-tenets.md` and `docs/product/adrs/0001-mcp-vs-skill-boundary.md`
@@ -13,10 +13,10 @@ jobs:
13
13
  runs-on: ubuntu-latest
14
14
 
15
15
  steps:
16
- - uses: actions/checkout@v4
16
+ - uses: actions/checkout@v6
17
17
 
18
18
  - name: Use Node.js 24
19
- uses: actions/setup-node@v4
19
+ uses: actions/setup-node@v6
20
20
  with:
21
21
  node-version: 24
22
22
  cache: npm
@@ -11,10 +11,10 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
 
13
13
  steps:
14
- - uses: actions/checkout@v4
14
+ - uses: actions/checkout@v6
15
15
 
16
16
  - name: Use Node.js 24
17
- uses: actions/setup-node@v4
17
+ uses: actions/setup-node@v6
18
18
  with:
19
19
  node-version: 24
20
20
  cache: npm
package/AGENTS.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # AGENTS.md
2
2
 
3
3
  ## Purpose
4
- This file is for coding agents working in `astro-mcp`. It documents the real architecture and safe change workflow so edits stay correct and low-risk.
4
+ This file is for coding agents working in `ether-to-astro`. It documents the real architecture and safe change workflow so edits stay correct, low-risk, and release-safe.
5
5
 
6
6
  ## Current Runtime Facts
7
7
  - Engine is native Node binding: `sweph` (not WASM/WASI).
@@ -68,8 +68,15 @@ Defined in `tests/validation/utils/tolerances.ts`:
68
68
  - `EphemerisCalculator.findExactTransitTimes()` in `src/ephemeris.ts`.
69
69
  - Transit root-selection policy in `src/transits.ts`.
70
70
  - Time conversion/disambiguation in `src/time-utils.ts`.
71
+ - CLI/MCP surface drift between `src/cli.ts`, `src/index.ts`, and `src/astro-service.ts`.
72
+ - Packaging / bin / publish behavior for `e2a` and `e2a-mcp`.
71
73
  - Capability checks and comparator severity in validation harness.
72
74
 
75
+ ## Review Priority Ladder
76
+ - **P1** - Wrong astro math, wrong timezone/DST handling, wrong transit/root behavior, CLI/MCP contract drift, packaging/bin/publish breakage, or validation regressions that could ship incorrect results.
77
+ - **P2** - Missing or weak tests for high-risk changes, docs/help-text drift, profile resolution regressions, or changes that make validation/debugging harder.
78
+ - **P3** - Style, cleanup, wording, and low-risk refactors with no behavioral impact.
79
+
73
80
  ## Safe Change Workflow
74
81
  1. Make focused edits (avoid broad refactors).
75
82
  2. Run `npm run quality:gate` for normal changes.
@@ -86,9 +93,43 @@ Defined in `tests/validation/utils/tolerances.ts`:
86
93
  - Routine merge gate is `npm run build`, `npm run lint`, and `npm test -- --run`.
87
94
  - `npm run validate:astro` is targeted validation, not the default gate for every change.
88
95
  - Biome is the source of truth for formatting, import order, and linting.
96
+ - CLI profile resolution is adapter-only behavior; do not leak `.astro.json`, `--profile`, or profile-file semantics into MCP tool contracts.
97
+ - `src/astro-service.ts` is the shared behavior layer; prefer fixing logic there before adding surface-specific patches in CLI or MCP.
89
98
  - Preferred commit types: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`, `build`, `ci`.
90
99
  - Keep commits scoped to one coherent change whenever possible.
91
100
 
101
+ ## Request Triage Guidance
102
+ - When responding to bug reports, feature requests, or product-boundary questions, consult these docs first:
103
+ - `docs/product/product-tenets.md`
104
+ - `docs/product/architecture-boundaries.md`
105
+ - `docs/product/adrs/0001-mcp-vs-skill-boundary.md`
106
+ - `docs/product/post-iteration-2-triage.private.md` if present locally
107
+ - Use those docs to classify the request before proposing implementation:
108
+ - `bug` for incorrect, lossy, misleading, or contract-drift behavior
109
+ - `feature` for reusable product capability
110
+ - `paper-cut` for small interface or workflow friction
111
+ - `skill` when the work is primarily synthesis, formatting, ranking, or preference-aware orchestration
112
+ - `MCP` when the work is deterministic or mostly deterministic, computational, reusable, and risky to reconstruct client-side
113
+ - Apply the determinism rule explicitly:
114
+ - deterministic and generic astro computation is a strong candidate for MCP
115
+ - deterministic but policy-heavy or personalized workflow synthesis still belongs in a skill
116
+ - If a competent LLM can solve the request in one or two calls using stable MCP primitives, prefer keeping it out of MCP unless there is strong evidence the pattern should become a reusable primitive.
117
+ - For incoming product requests, prefer extending an existing tool with flags, fields, modes, or range support before proposing a new narrowly scoped MCP tool.
118
+
119
+ ## Writing Skills
120
+ - When a request is classified as a `skill`, default the deliverable to a concrete `SKILL.md` or equivalent workflow spec, not a broad product narrative.
121
+ - Repo-owned `SKILL.md` files should follow the Agent Skills spec, including YAML frontmatter with at least `name` and `description`.
122
+ - Treat repo-owned skills as boring, compliant instruction bundles:
123
+ - clear purpose
124
+ - required inputs and assumptions
125
+ - exact MCP/tools to call
126
+ - output shape
127
+ - boundaries and non-goals
128
+ - Prefer one or two stable MCP calls plus synthesis over embedding custom astro math, hidden heuristics, or pseudo-tool contracts in the skill.
129
+ - Keep deterministic astro facts in MCP and user-specific ranking, emphasis, and interpretation in the skill.
130
+ - Do not treat every skill idea in product docs or issues as a committed repo artifact. Many skill ideas are incubation examples unless explicitly promoted.
131
+ - If authoring or revising a skill, prefer following the repo-local skill authoring guidance in `skills/.system/write-skill/SKILL.md`.
132
+
92
133
  ## Release Governance
93
134
  - `main` is PR-only and branch-protected; do not push directly.
94
135
  - Use Conventional Commits / commitizen-style messages for all commits.
@@ -102,9 +143,13 @@ Defined in `tests/validation/utils/tolerances.ts`:
102
143
 
103
144
  ## Known Gotchas
104
145
  - `sweph` has process-wide settings (e.g., ephemeris path); avoid per-request mutation.
146
+ - In the normal Node runtime, rise/set and eclipse functionality are expected to work. Treat breakage there as a real regression, not as optional capability drift.
147
+ - `get_server_status` is the source of truth for loaded-chart state on the MCP side. Do not invent parallel state reporting elsewhere.
105
148
 
106
149
  ## Agent Style for This Repo
107
150
  - Prefer minimal, typed, fixture-driven changes.
108
151
  - Keep adapter normalization stable when comparing outputs.
109
152
  - Do not mask solver regressions with broad dedupe/tolerance changes.
110
153
  - Keep external CLI parity optional and auto-skippable.
154
+ - If changing command/tool signatures, update all three together: schema/help text, implementation, and tests.
155
+ - For release-facing changes, check README/help text/package metadata for drift.
package/DEVELOPER.md ADDED
@@ -0,0 +1,78 @@
1
+ # Developer Guide
2
+
3
+ This guide is for contributors working in the repository.
4
+
5
+ For product setup and end-user usage, see [SETUP.md](/Users/salted/Code/astro-mcp/SETUP.md).
6
+
7
+ ## Local Repo Setup
8
+
9
+ Requirements:
10
+
11
+ - Node.js 22+
12
+
13
+ Install dependencies:
14
+
15
+ ```bash
16
+ npm install
17
+ ```
18
+
19
+ Build the local checkout:
20
+
21
+ ```bash
22
+ npm run build
23
+ ```
24
+
25
+ Use the local CLI after building:
26
+
27
+ ```bash
28
+ npm run start:cli -- --help
29
+ ```
30
+
31
+ ## Quality Gates
32
+
33
+ Routine merge gate:
34
+
35
+ ```bash
36
+ npm run quality:gate
37
+ ```
38
+
39
+ This runs:
40
+
41
+ - `npm run build`
42
+ - `npm run lint`
43
+ - `npm test -- --run`
44
+
45
+ Targeted validation for high-risk astrology engine changes:
46
+
47
+ ```bash
48
+ npm run validate:astro
49
+ ```
50
+
51
+ ## Contributor Contract
52
+
53
+ - Keep changes focused and avoid unrelated churn in the same diff.
54
+ - Treat Biome as the source of truth for formatting, import order, and linting.
55
+ - Use conventional commit messages: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`, `build`, `ci`.
56
+ - Keep PR descriptions short and explicit about what changed and how it was verified.
57
+ - Respect the MCP-vs-skill boundary documented in:
58
+ - [docs/product/product-tenets.md](/Users/salted/Code/astro-mcp/docs/product/product-tenets.md)
59
+ - [docs/product/architecture-boundaries.md](/Users/salted/Code/astro-mcp/docs/product/architecture-boundaries.md)
60
+ - [docs/product/adrs/0001-mcp-vs-skill-boundary.md](/Users/salted/Code/astro-mcp/docs/product/adrs/0001-mcp-vs-skill-boundary.md)
61
+
62
+ ## Technical Notes
63
+
64
+ - Engine: native Swiss Ephemeris via Node `sweph` bindings
65
+ - `sweph` is pinned to an exact version to keep validation fixtures and numerical baselines stable
66
+ - Primary accuracy mode uses Swiss Ephemeris data files
67
+ - `EPHEMERIS_VERSION=moshier` is supported as a lower-precision fallback
68
+ - Chart rendering uses `@astrodraw/astrochart` with JSDOM
69
+
70
+ ## Common Commands
71
+
72
+ ```bash
73
+ npm run build
74
+ npm run lint
75
+ npm test -- --run
76
+ npm run validate:astro
77
+ npm run start:cli -- --help
78
+ ```