Skip to content

Commit 33cf5dc

Browse files
authored
Merge pull request #1 from NeuroverseOS/claude/review-readme-governance-KIkOw
Claude/review readme governance k ik ow
2 parents d02cc6d + 8083617 commit 33cf5dc

16 files changed

Lines changed: 3411 additions & 5 deletions

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
cache: npm
20+
21+
- run: npm ci
22+
- run: npx tsc --noEmit
23+
- run: npx vitest run
24+
- run: docker build .

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
dist/
3+
*.tsbuildinfo

CODE_OF_CONDUCT.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in the StarTalk community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contributes to a positive environment:
12+
13+
- Using welcoming and inclusive language
14+
- Being respectful of differing viewpoints and experiences
15+
- Gracefully accepting constructive criticism
16+
- Focusing on what is best for the community
17+
- Showing empathy towards other community members
18+
19+
Examples of unacceptable behavior:
20+
21+
- The use of sexualized language or imagery, and sexual attention or advances of any kind
22+
- Trolling, insulting or derogatory comments, and personal or political attacks
23+
- Public or private harassment
24+
- Publishing others' private information without explicit permission
25+
- Other conduct which could reasonably be considered inappropriate in a professional setting
26+
27+
## Enforcement Responsibilities
28+
29+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
## Scope
32+
33+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces.
34+
35+
## Enforcement
36+
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project team at **team@neuroverseos.com**. All complaints will be reviewed and investigated promptly and fairly.
38+
39+
## Attribution
40+
41+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1.

CONTRIBUTING.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Contributing to StarTalk
2+
3+
Thank you for your interest in contributing to StarTalk! This document provides guidelines and information for contributors.
4+
5+
## How to Contribute
6+
7+
### Reporting Issues
8+
9+
- Use [GitHub Issues](https://github.com/NeuroverseOS/startalk/issues) to report bugs or suggest features.
10+
- Include steps to reproduce any bug, along with your environment details (Node version, OS, AI provider).
11+
- Check existing issues before opening a new one to avoid duplicates.
12+
13+
### Submitting Changes
14+
15+
1. Fork the repository.
16+
2. Create a feature branch from `main` (`git checkout -b feature/your-feature`).
17+
3. Make your changes and test them locally with `npm run dev`.
18+
4. Commit with clear, descriptive messages.
19+
5. Push to your fork and open a pull request against `main`.
20+
21+
### Pull Request Guidelines
22+
23+
- Keep PRs focused on a single change.
24+
- Describe what the PR does and why.
25+
- Reference any related issues.
26+
- Ensure your code follows the existing TypeScript style in the project.
27+
28+
## Development Setup
29+
30+
```bash
31+
git clone https://github.com/NeuroverseOS/startalk.git
32+
cd startalk
33+
npm install
34+
npm run dev
35+
```
36+
37+
**Requirements:**
38+
- Node.js 20+
39+
- A MentraOS app API key (`MENTRA_APP_API_KEY` environment variable)
40+
- An AI provider API key (Anthropic or OpenAI, configured in app settings)
41+
42+
## Areas of Contribution
43+
44+
- **Zodiac sign definitions** (`src/signs/*.nv-world.md`): Refine traits, communication styles, compatibility, and mode directives.
45+
- **Interaction modes**: Improve mode selection logic and response quality.
46+
- **Governance integration**: Enhance trust scoring and guard evaluation.
47+
- **People memory**: Improve the persistent people chart system.
48+
- **Documentation**: Improve the README, guides, and inline comments.
49+
50+
## Zodiac World File Format
51+
52+
If you are contributing to sign definitions, each `.nv-world.md` file follows a structured format with frontmatter metadata and markdown sections for thesis, traits, communication, modes, compatibility, and tone. See any existing sign file in `src/signs/` as a reference.
53+
54+
## Code of Conduct
55+
56+
All contributors are expected to follow our [Code of Conduct](CODE_OF_CONDUCT.md). Please be respectful and constructive.
57+
58+
## License
59+
60+
By contributing to StarTalk, you agree that your contributions will be licensed under the [Apache License 2.0](LICENSE).

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [yyyy] [name of copyright owner]
189+
Copyright 2025 NeuroverseOS
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
# StarTalk
2+
3+
Astrological translator for MentraOS smart glasses. Set your signs. Tap. Get cosmic perspective.
4+
5+
StarTalk is an AI-powered app that translates real-time social moments through the lens of your astrological chart. Running on MentraOS smart glasses, it gives you cosmic insight into what's happening around you — who you're talking to, how your signs interact, and what the stars have to say about the moment.
6+
7+
## How It Works
8+
9+
1. **Set your chart** in app settings: pick your Sun Sign (core identity) and optionally your Rising Sign (how you come across).
10+
2. **Tap or say "star"** to get a cosmic read on the current moment.
11+
3. **Tap again within 30 seconds** to expand or follow up.
12+
4. **Long press** to dismiss.
13+
14+
StarTalk auto-selects the best interaction mode for each moment:
15+
16+
| Mode | When It Fires | Example |
17+
|---|---|---|
18+
| **Translate** | Understanding someone else's behavior | "That's classic Taurus — they're not ignoring you, they're processing." |
19+
| **Reflect** | Understanding your own behavior | "Your Cancer moon is holding onto that comment. Let it go." |
20+
| **Challenge** | Falling into shadow traits | "You're avoiding the conversation. That's your Libra dodge." |
21+
| **Teach** | Learning the dynamic at play | "Fire signs speak to act. Water signs speak to connect." |
22+
| **Direct** | Need a clear recommendation | "Say it now. Aries energy rewards directness." |
23+
24+
## Features
25+
26+
### World Stacking
27+
28+
StarTalk's core innovation. Your Sun Sign defines *who you are*; your Rising Sign defines *how you present*. StarTalk combines both into a unified personality lens, weighting the sun as dominant and the rising as a modifier. A Cancer with Aries rising gets emotionally deep reads delivered with bold directness.
29+
30+
### People Memory
31+
32+
Tell StarTalk about the people in your life:
33+
- "Sophie is a Cancer with Aries rising"
34+
- "talking to Sophie" (recalls her chart automatically)
35+
- "talking to a Taurus" (anonymous sign-based translation)
36+
37+
People are persisted across sessions via MentraOS SimpleStorage.
38+
39+
### Ambient Context
40+
41+
With explicit opt-in (and bystander acknowledgment), StarTalk can listen to nearby conversation and factor it into reads. The audio buffer is configurable (1, 2, or 5 minutes) and is held in memory only — never persisted or transmitted beyond the AI call.
42+
43+
### AI Provider Choice
44+
45+
StarTalk uses a bring-your-own-key model. Choose between:
46+
- **Anthropic Claude** (Claude Haiku 4.5)
47+
- **OpenAI GPT** (GPT-4o Mini)
48+
49+
No data is retained. Your API key goes directly to your chosen provider.
50+
51+
## Getting Started
52+
53+
### Prerequisites
54+
55+
- Node.js 20+
56+
- A MentraOS app API key
57+
- An Anthropic or OpenAI API key
58+
59+
### Install and Run
60+
61+
```bash
62+
git clone https://github.com/NeuroverseOS/startalk.git
63+
cd startalk
64+
npm install
65+
npm run dev
66+
```
67+
68+
Set the `MENTRA_APP_API_KEY` environment variable before starting.
69+
70+
### Docker
71+
72+
```bash
73+
docker build -t startalk .
74+
docker run -p 3001:3001 -e MENTRA_APP_API_KEY=<your-key> startalk
75+
```
76+
77+
The container runs as a non-root user on port 3001 with a built-in health check at `/health`.
78+
79+
## Project Structure
80+
81+
```
82+
startalk/
83+
src/
84+
server.ts Main MentraOS app server
85+
sign-loader.ts Zodiac world parser and prompt builder
86+
signs/
87+
aries.nv-world.md Zodiac sign world definitions (x12)
88+
taurus.nv-world.md
89+
...
90+
app_config.json MentraOS settings schema
91+
mentra.app.json App metadata and permissions
92+
Dockerfile Multi-stage container build
93+
```
94+
95+
### Zodiac World Files
96+
97+
Each sign is defined in a `.nv-world.md` file — the NeuroverseOS world definition format. These structured markdown files contain frontmatter metadata (element, modality, ruling planet, dates) followed by sections for thesis, traits, communication style, the five interaction modes, compatibility, and tone. The sign-loader parses these at startup and caches them for prompt building.
98+
99+
## NeuroverseOS Governance Integration
100+
101+
StarTalk integrates with the [NeuroverseOS governance framework](https://github.com/NeuroverseOS/neuroverseos-governance), which provides three layers of runtime safety:
102+
103+
- **Guard Engine** (`evaluateGuard()`): Checks all AI inputs and outputs against platform content rules before anything is displayed on the glasses.
104+
- **World Simulation** (`simulateWorld()`): Evaluates trust scores based on session behavior (AI call volume, activation patterns). Trust gates adjust response length invisibly to the user — from full 50-word reads at high trust down to glance-only 15-word reads at low trust, with responses disabled entirely if trust drops to revoked levels.
105+
- **Governed Executor** (`MentraGovernedExecutor`): Hooks into the MentraOS app lifecycle with callbacks for blocking or pausing actions that violate rules.
106+
107+
The app declares its AI usage transparently in `mentra.app.json`, including that AI is opt-in only, keys are user-provided, and data retention is none.
108+
109+
## Repository Governance Files
110+
111+
Open-source projects benefit from clear governance — a set of files that define how the project is licensed, how people can contribute, what behavior is expected, and how security issues should be handled. GitHub recognizes these files and surfaces them in the repository's community profile. Here is how StarTalk uses each one:
112+
113+
### LICENSE
114+
115+
The [LICENSE](LICENSE) file contains the full text of the **Apache License 2.0**. This is the legal foundation of the project. It grants users a perpetual, royalty-free right to use, modify, and distribute StarTalk (including for commercial purposes), while requiring attribution and notice of changes. It also includes an explicit patent grant, which provides additional legal protection for contributors and users. The Apache 2.0 license was chosen for its balance of openness and legal clarity.
116+
117+
### CONTRIBUTING.md
118+
119+
The [CONTRIBUTING.md](CONTRIBUTING.md) file is the guide for anyone who wants to help improve StarTalk. It covers how to report bugs, submit pull requests, set up a development environment, and which areas of the codebase welcome contributions (sign definitions, interaction modes, governance integration, people memory, and documentation). Having clear contribution guidelines lowers the barrier to entry and keeps the project's quality consistent.
120+
121+
### CODE_OF_CONDUCT.md
122+
123+
The [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) sets behavioral expectations for everyone participating in the StarTalk community — contributors, maintainers, and users interacting in project spaces. It is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), the most widely adopted code of conduct in open source. It defines what positive participation looks like, what is not acceptable, and how violations are handled.
124+
125+
### SECURITY.md
126+
127+
The [SECURITY.md](SECURITY.md) file tells security researchers how to responsibly disclose vulnerabilities. Instead of opening public issues (which would expose the vulnerability to everyone), reporters email the team directly. The file also documents StarTalk's security architecture: BYO-key model with no key storage, opt-in ambient listening with bystander acknowledgment, governance-layer content filtering, and non-root Docker deployment.
128+
129+
### Why Governance Files Matter
130+
131+
These four files together form the governance foundation of an open-source project:
132+
133+
- **LICENSE** answers: "Can I use this, and under what terms?"
134+
- **CONTRIBUTING.md** answers: "How do I help?"
135+
- **CODE_OF_CONDUCT.md** answers: "What behavior is expected?"
136+
- **SECURITY.md** answers: "What do I do if I find a vulnerability?"
137+
138+
Without them, potential contributors don't know if they're welcome, users don't know their legal rights, and security researchers don't know how to reach you. GitHub tracks these files as part of your repository's "Community Standards" and will prompt you to add any that are missing.
139+
140+
## Tech Stack
141+
142+
- **Runtime**: Node.js 20+ / TypeScript
143+
- **Framework**: MentraOS SDK (`@mentra/sdk`)
144+
- **AI**: Anthropic Claude SDK, OpenAI SDK (user-selected)
145+
- **Governance**: NeuroverseOS governance framework
146+
- **Deployment**: Docker (multi-stage, non-root)
147+
148+
## License
149+
150+
StarTalk is licensed under the [Apache License 2.0](LICENSE).
151+
152+
```
153+
Copyright 2025 NeuroverseOS
154+
155+
Licensed under the Apache License, Version 2.0 (the "License");
156+
you may not use this file except in compliance with the License.
157+
You may obtain a copy of the License at
158+
159+
http://www.apache.org/licenses/LICENSE-2.0
160+
```

SECURITY.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
| ------- | ------------------ |
7+
| 1.0.x | Yes |
8+
9+
## Reporting a Vulnerability
10+
11+
If you discover a security vulnerability in StarTalk, please report it responsibly.
12+
13+
**Do not open a public GitHub issue for security vulnerabilities.**
14+
15+
Instead, email **team@neuroverseos.com** with:
16+
17+
- A description of the vulnerability
18+
- Steps to reproduce it
19+
- The potential impact
20+
- Any suggested fixes (if applicable)
21+
22+
We will acknowledge receipt within 48 hours and aim to provide an initial assessment within 5 business days.
23+
24+
## Security Considerations
25+
26+
### AI Provider API Keys
27+
28+
- StarTalk uses a BYO-key model. User API keys are passed directly to the configured AI provider (Anthropic or OpenAI) and are never stored, logged, or transmitted elsewhere.
29+
- Keys are configured via the MentraOS app settings interface using the `secret` field type.
30+
31+
### Ambient Listening
32+
33+
- Ambient audio capture is opt-in only and disabled by default.
34+
- Users must explicitly enable ambient mode **and** acknowledge the bystander notice before any audio processing occurs.
35+
- Audio buffers are held in memory only and are not persisted to disk or transmitted beyond the AI provider call.
36+
37+
### Governance and Content Safety
38+
39+
- All AI inputs and outputs are checked through the NeuroverseOS governance framework (`evaluateGuard()`) before being displayed.
40+
- Trust scoring (`simulateWorld()`) provides behavioral degradation if anomalous usage patterns are detected.
41+
- The app declares `"data_retention": "none"` in its MentraOS manifest.
42+
43+
### Docker Deployment
44+
45+
- The container runs as a non-root user (`startalk`, uid 1001).
46+
- The Dockerfile uses a multi-stage build to minimize the attack surface of the runtime image.

0 commit comments

Comments
 (0)