Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CodeQL
on:
push:
branches: [main]
pull_request:
schedule:
- cron: '27 4 * * 1'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze:
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
persist-credentials: false
# Static analysis of repository source only; no build step and no project code execution.
- uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
with:
languages: javascript-typescript, actions
build-mode: none
- uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
with:
category: '/language:javascript-typescript'
11 changes: 11 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,14 @@ jobs:
GITLEAKS_ENABLE_COMMENTS: 'false'
GITLEAKS_ENABLE_UPLOAD_ARTIFACT: 'false'
GITLEAKS_ENABLE_SUMMARY: 'false'
dependency-review:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
with:
fail-on-severity: moderate
comment-summary-in-pr: never
83 changes: 83 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our 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, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities

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.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at the project maintainer privately, using a contact method listed on the [@andrecoliveira GitHub profile](https://github.com/andrecoliveira). Do not open a public issue for a conduct report. Conduct that also violates GitHub's policies can be reported to GitHub through its [abuse reporting](https://docs.github.com/en/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam). All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of actions.

**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to Archwise

Archwise is preparing its open-source foundation under [Apache-2.0](LICENSE). The repository is public and contains specifications, governance, core graph contracts and a local Alpha Studio that runs from source (see the [Alpha testing guide](docs/alpha-testing.md)); no installable release is available yet. Contributions use the Developer Certificate of Origin (DCO). Report vulnerabilities through the [private security process](SECURITY.md).
Archwise is preparing its open-source foundation under [Apache-2.0](LICENSE). The repository is public and contains specifications, governance, core graph contracts and a local Alpha Studio that runs from source (see the [Alpha testing guide](docs/alpha-testing.md)); no installable release is available yet. Contributions use the Developer Certificate of Origin (DCO). Report vulnerabilities through the [private security process](SECURITY.md). Everyone participating follows the [Code of Conduct](CODE_OF_CONDUCT.md).

## Contribution certification

Expand All @@ -27,7 +27,7 @@ Use an issue to describe the problem, acceptance criteria, affected phase, and a
3. Add meaningful behavioral tests for code changes and reproduce relevant failure cases.
4. Update user documentation and package responsibilities alongside the implementation.
5. Describe the result, verification evidence, limitations, and compatibility impact in the PR template.
6. Address review comments and wait for required checks and review before merging.
6. Address review comments and wait for required checks and review before merging. `main` is protected: changes land only through pull requests with green required checks and resolved conversations.

Use Conventional Commit subjects such as `docs: explain snapshot provenance`, `fix: reject paths outside workspace roots`, or `feat: inspect package manifests`. Avoid mixing refactoring and unrelated features in the same PR.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The product starts from code already on a developer's machine. From a selected w

## Contributing

Start with the [contribution guide](CONTRIBUTING.md) for the current workflow and verification instructions.
Start with the [contribution guide](CONTRIBUTING.md) for the current workflow and verification instructions. Participation is governed by the [Code of Conduct](CODE_OF_CONDUCT.md).

The specification is the current source of truth. Before implementing a feature, read [AGENTS.md](AGENTS.md), identify the relevant document, and propose an ADR when changing an invariant or major boundary. Keep local-only workflows functional and do not make a cloud account a prerequisite for core features.

Expand Down
12 changes: 10 additions & 2 deletions docs/ci-cd.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@

The following workflows are configured today:
- `ci.yml`: `pnpm check` (format, build, lint, typecheck, boundaries, tests) on Linux/macOS/Windows × Node 24/26, with lockfile install and lifecycle scripts disabled.
- `security.yml`: `pnpm audit --audit-level moderate` and Gitleaks history scanning with redaction.
- `security.yml`: `pnpm audit --audit-level moderate`, Gitleaks history scanning with redaction, and dependency review on pull requests (fails on moderate or higher).
- `codeql.yml`: CodeQL static analysis of JavaScript/TypeScript and of the workflows themselves, in build-mode `none`; runs on PRs, `main` and weekly.
- `browser-smoke.yml`: a real-Chromium Studio acceptance test on Ubuntu 24.04.

Not yet configured: CodeQL, dependency review, coverage thresholds, the offline end-to-end immutability check, license policy, and required branch checks.
`main` is protected. It requires pull requests, these required checks, and resolved conversations:
- the six `check` matrix jobs;
- `dependencies`, `secrets` and `dependency-review`;
- CodeQL `analyze`.

The path-filtered browser smoke is not required, because it does not run on every PR.

Not yet configured: coverage thresholds, the offline end-to-end immutability check, and a license policy.

### Target

Expand Down
2 changes: 1 addition & 1 deletion docs/decisions/0004-foundation-quality-gates.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- Status: Accepted
- Date: 2026-11-09
- Note: the React foundation page was later replaced by Svelte 5 and Svelte Flow ([ADR 0005](0005-svelte-flow-browser-workspace.md)). The repository is now public, so the private-repository constraint on CodeQL and dependency-review below no longer applies.
- Note: the React foundation page was later replaced by Svelte 5 and Svelte Flow ([ADR 0005](0005-svelte-flow-browser-workspace.md)). The repository is now public, so the private-repository constraint on CodeQL and dependency-review below no longer applies. Both were enabled on 2026-11-15 (see `docs/ci-cd.md`).

## Decision

Expand Down
2 changes: 1 addition & 1 deletion docs/development/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Formatting covers tooling, packages, apps, scripts and CI; historical specificat

Run `node apps/cli/dist/bin.js --help` after building. Run `node apps/cli/dist/bin.js --serve --path <project>` for the authenticated local Studio. `pnpm dev` serves only the Svelte frontend on loopback without the authenticated graph API and performs no repository scanning.

`pnpm audit --audit-level moderate` checks registry advisories and requires network access. Security CI also scans Git history with Gitleaks, with redaction enabled and comments/uploads disabled. CodeQL and GitHub dependency-review are not configured yet. The repository is now public, so both are eligible; enabling them is an open Phase 1 item.
`pnpm audit --audit-level moderate` checks registry advisories and requires network access. Security CI also scans Git history with Gitleaks, with redaction enabled and comments/uploads disabled. CodeQL (`codeql.yml`) analyzes the JavaScript/TypeScript sources and the workflows on every PR, on `main`, and weekly, without building or executing project code. Dependency review (`security.yml`) blocks pull requests that introduce dependencies with moderate or higher advisories.

CI defines Linux, macOS and Windows checks on Node 24/26. Local success alone is not evidence that all matrix jobs pass.
21 changes: 8 additions & 13 deletions docs/implementation-roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ Snapshot as of 2026-11-15, after PRs #5, #6 and #7 merged into `main`. Issues an

| Phase | State on `main` | What is missing for the exit gate |
|---|---|---|
| 0 | Partial | `CODE_OF_CONDUCT.md` with an enforcement contact; branch protection on `main` |
| 1 | Partial | CodeQL and dependency review (now eligible because the repository is public); required branch checks |
| 0 | Complete (2026-11-15) | — |
| 1 | Complete (2026-11-15) | — |
| 2 | Partial: graph contracts slice | SQLite storage, application ports, migrations, backup/recovery, export redaction of home paths |
| 3 | Alpha only: manifest-only inventory in `apps/cli` | Budgets, ignore rules, symlink and nested-repository handling, `--repo` / `--workspace`, persisted scan metadata |
| 4 | Alpha only: Node package manifests | Analyzer SDK, TS imports, HTTP/DB/queue detectors, Compose, golden graphs |
Expand Down Expand Up @@ -73,14 +73,14 @@ Alpha slices were delivered ahead of the phase order. Their placement in apps is

## Phase 0 — Governance and irreversible decisions

Status: in progress. The following are in place:
Status: complete. The following are in place:
- contribution guidelines, issue forms, a PR template and initial code ownership;
- Apache-2.0, DCO and the security policy, with GitHub Private Vulnerability Reporting enabled and verified;
- accepted ADRs 0001–0005.

The repository is public. Two items remain open, so the phase exit gate is not yet satisfied:
- `CODE_OF_CONDUCT.md` with an enforcement contact;
- branch protection on `main`.
The repository is public. Completed 2026-11-15:
- [Code of Conduct](../CODE_OF_CONDUCT.md) (Contributor Covenant 2.1) with a private enforcement contact;
- `main` is protected by required PRs, required checks and resolved conversations.

### Goal

Expand All @@ -106,17 +106,12 @@ Make legal, contribution, compatibility, and architectural expectations explicit

## Phase 1 — Monorepo and quality foundation

Status: in progress. The foundation from PR #4 is on `main`:
Status: complete. The foundation from PR #4 is on `main`:
- seven private packages with strict TypeScript, lint, tested import boundaries and Changesets;
- component and process tests;
- cross-platform CI, dependency auditing and redacted secret scanning.

Still open:
- CodeQL and dependency review, which are now eligible because the repository is public;
- required branch checks;
- the Phase 0 governance prerequisites.

No application release has been published.
Completed 2026-11-15: CodeQL and dependency review are running, and the required branch checks are enforced on `main` (see [CI/CD](ci-cd.md)). No application release has been published.

### Goal

Expand Down
Loading