chore(oss): add OSS infrastructure — CoC, security, contributing, CI

Community and contributor support:
- CONTRIBUTING.md: what we welcome, what we don't, style guide,
  templates for MCP walkthroughs and specialized-agent prompts.
- CODE_OF_CONDUCT.md: Contributor Covenant 2.1.
- SECURITY.md: scope (this is a docs repo, not application code), how
  to report a vulnerability in the example plugins or in misleading
  documentation, where OpenCode-core bugs should go instead.

GitHub plumbing:
- .github/PULL_REQUEST_TEMPLATE.md: type, sources, hygiene checklist.
- .github/ISSUE_TEMPLATE/{bug_report,feature_request}.md and config.yml
  that redirects OpenCode-tool issues to the right place.
- .github/workflows/lint-docs.yml: three jobs on every push and PR —
  markdownlint, link check (with sensible ignore patterns for
  ../../issues, security advisories, localhost), codespell with a
  project-specific ignore list.

Lint/style configs:
- .markdownlint.json + .markdownlintignore: ATX headings, ordered list
  numbering, line-length and inline-HTML rules tuned for our content.
- .editorconfig: LF, UTF-8, 2-space indent, trim trailing whitespace
  except in markdown (where trailing spaces are line breaks).
This commit is contained in:
Wesam Abousaid
2026-05-18 20:00:51 +02:00
parent cbb87bff3f
commit ccac453cdb
13 changed files with 378 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
---
name: Documentation issue
about: Something here is wrong, outdated, or misleading
title: "[doc] "
labels: ["doc-bug"]
---
## What's wrong
<!--
- Which page/section is affected? Paste a link to the line if you can.
- What does it currently say?
- What's actually correct?
-->
## Source for the correction
<!--
Link to the primary source that backs the correction:
- opencode.ai/docs/...
- github.com/anomalyco/opencode/...
- A release note, commit, or schema
If you don't have a primary source, that's fine — just say so and we'll dig.
-->
## Suggested fix (optional)
<!-- Paste a diff or describe the change you'd like to see. Or open a PR. -->
+11
View File
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: OpenCode itself — bugs, features, install issues
url: https://github.com/anomalyco/opencode/issues
about: This repo is a community guide. For bugs in the OpenCode tool, file there.
- name: OpenCode docs
url: https://opencode.ai/docs
about: Official documentation.
- name: OpenCode community Discord
url: https://discord.gg/opencode
about: Real-time chat with the OpenCode community.
+25
View File
@@ -0,0 +1,25 @@
---
name: Content request
about: Suggest a new section, walkthrough, or specialized-agent prompt
title: "[content] "
labels: ["content-request"]
---
## What you want covered
<!--
- A new MCP server walkthrough? Link the server.
- A new specialized-agent role? Describe the role.
- A new workflow recipe? Describe the workflow.
-->
## Why it matters
<!-- One paragraph. Who benefits, what they'd do with it. -->
## Are you willing to draft it?
- [ ] Yes — I'll open a PR
- [ ] No — but I can review one
<!-- See CONTRIBUTING.md for the style guide. -->
+30
View File
@@ -0,0 +1,30 @@
## What this changes
<!-- 1-3 sentences. What and why. -->
## Type
- [ ] Fact correction (something here is out of date or wrong)
- [ ] New content (doc, MCP walkthrough, specialized-agent prompt, etc.)
- [ ] Restructure / cleanup
- [ ] Typo / formatting / lint fix
## Sources
<!--
For factual changes, link to the primary source you used:
- opencode.ai/docs/...
- github.com/anomalyco/opencode/...
- A specific release note or commit
Drive-by claims without sources will get held until they can be verified.
-->
## Checklist
- [ ] I read [`CONTRIBUTING.md`](../CONTRIBUTING.md)
- [ ] Every factual claim cites a source (in the PR or inline in the doc)
- [ ] In-page anchors and cross-doc links still resolve
- [ ] No trailing whitespace; code fences have language tags
- [ ] Emoji follow the [`AGENTS.md` policy](../AGENTS.md#style-conventions) (H2 navigation + callout prefixes only)
- [ ] If I touched the README, I updated the "Last reviewed" line at the bottom
+13
View File
@@ -0,0 +1,13 @@
opencode
anomalyco
opncd
mkdir
typecheck
keybind
keybinds
keybindings
codeagent
toolset
async
codespell
markdownlint
+15
View File
@@ -0,0 +1,15 @@
{
"ignorePatterns": [
{ "pattern": "^https://github.com/anomalyco/opencode/issues" },
{ "pattern": "^https://github.com/anomalyco/opencode/security/advisories" },
{ "pattern": "^https?://localhost" },
{ "pattern": "^http://server.local" },
{ "pattern": "^\\.\\./\\.\\./issues" },
{ "pattern": "^\\.\\./\\.\\./discussions" }
],
"timeout": "15s",
"retryOn429": true,
"retryCount": 3,
"fallbackRetryDelay": "30s",
"aliveStatusCodes": [200, 206, 301, 302, 403, 429]
}
+54
View File
@@ -0,0 +1,54 @@
name: Lint docs
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
markdownlint:
name: markdownlint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Run markdownlint-cli2
uses: DavidAnson/markdownlint-cli2-action@v20
with:
globs: |
**/*.md
!node_modules
link-check:
name: Link check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Markdown link check
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: "yes"
use-verbose-mode: "yes"
config-file: ".github/markdown-link-check.json"
# Only changed files on PR; everything on push
check-modified-files-only: ${{ github.event_name == 'pull_request' && 'yes' || 'no' }}
base-branch: main
spellcheck:
name: Spell check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: codespell
uses: codespell-project/actions-codespell@v2
with:
# Tune by adding words to .github/codespell-ignore.txt
ignore_words_file: .github/codespell-ignore.txt
# Skip files we don't author
skip: ./LICENSE,./.git,./node_modules