Skip to content
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/docs_audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Describe what the documentation should say or cover after fixing this issue.
- [ ] Issue is assigned to the correct docs milestone
- [ ] Release-gate evidence is linked when the SOT domain is `build-test` or `release-versioning`
- [ ] Private-plugin findings do not leak confidential repository paths, URLs, or implementation details into public docs
- [ ] If AI coding context is affected: `AI_WIKI_INTEGRATION_PLAYBOOK.md` and `ai_context/developer_llm_wiki/*` references are reviewed for sync and drift

## Additional Context

Expand Down
41 changes: 41 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,47 @@ Pflichtregeln:
3. Änderungen, die Architektur, Betrieb, Prozesse oder Governance betreffen, müssen die zugehörigen Wiki-Inhalte synchron halten.
4. Fehlende Wiki-Inhalte sind als Lücke zu melden und in den Arbeitsartefakten/PR-Hinweisen zu markieren statt stillschweigend zu ignorieren.

## 0.1) Developer LLM Wiki fuer GitHub Copilot auf GitHub (MUST)

Wenn GitHub Copilot als Coding Agent auf GitHub implementiert, reviewt oder refactort, muss es das Developer LLM Wiki aktiv als Vibe-Coding-Kontext nutzen.

Pflichtablauf:

1. Zuerst `AI_WIKI_INTEGRATION_PLAYBOOK.md` lesen.
2. Vor Codeaenderungen die relevanten Developer-Wiki-Artefakte aus `ai_context/developer_llm_wiki/` konsultieren:
- `INDEX.md`
- `MODULES_AND_APIS.md`
- `BUILD_TEST_CI_AND_OPERATIONS.md`
- `GOVERNANCE_AND_ROADMAP.md`
3. `ai_context/developer_llm_wiki/WIKI_STATUS.json` als Frische-/Health-Signal pruefen (`generated_at`, `source_count`, Delta-Status).
4. Wiki-Kontext nach Task-Typ priorisieren:
- API-/Modularbeit → `MODULES_AND_APIS.md`
- Build/CI/Test → `BUILD_TEST_CI_AND_OPERATIONS.md`
- Governance/Roadmap/Release → `GOVERNANCE_AND_ROADMAP.md`
- C/C++-Implementierung → `MODULES_AND_APIS.md` plus `memory_management_policy.md`, `OOP_AND_SOC_PRINCIPLES.md`, `FUNCTION_CLASSIFICATION.md`
- allgemeiner Einstieg/Link-Hub → `INDEX.md`
5. Bei Konflikten gilt: Root-SOT und Modulquellen vor kompilierter Wiki-Synthese.
6. Wenn Wiki-Artefakte fehlen, stale wirken oder der Aufgabe widersprechen, diese Luecke explizit nennen statt das Wiki still zu ignorieren.

Task-spezifische Mindestregeln:

- API-/Modularbeit: zuerst `ai_context/developer_llm_wiki/MODULES_AND_APIS.md`, danach relevante `ai_context/api_contracts/*.md` und modulnahe `src/<module>/*.md`.
- Build/CI/Test: zuerst `ai_context/developer_llm_wiki/BUILD_TEST_CI_AND_OPERATIONS.md`; bei Fehlern zusaetzlich immer konkrete GitHub-Actions-Logs und betroffene Workflow-Dateien pruefen.
- Governance/Roadmap/Release: zuerst `ai_context/developer_llm_wiki/GOVERNANCE_AND_ROADMAP.md`, danach Root-SOT-Dateien (`ROADMAP.md`, `FUTURE_ENHANCEMENTS.md`, `RELEASE_STRATEGY.md`, `BRANCHING_STRATEGY.md`, `VERSIONING.md`).
- C/C++-Arbeit: zuerst `ai_context/developer_llm_wiki/MODULES_AND_APIS.md`, danach `ai_context/memory_management_policy.md`, `ai_context/OOP_AND_SOC_PRINCIPLES.md`, `ai_context/FUNCTION_CLASSIFICATION.md` sowie die einschlaegigen `.github/instructions/*cpp*` Regeln.
- Public API / Header-Vertraege: zusaetzlich zuerst relevante `ai_context/api_contracts/*.md` und Doxygen-/Thread-Safety-/Ownership-Pflichten pruefen.
- Internal Core / Implementierungslogik: Ownership, RAII, `detail::`-Grenzen und unbeabsichtigte API-Flaechenerweiterungen gegen `memory_management_policy.md` und `OOP_AND_SOC_PRINCIPLES.md` pruefen.
- Concurrency / Performance: Locking, Atomics, Hot-Path-Klassifikation, Timeout/Cancellation und Benchmark-Bezug gegen `FUNCTION_CLASSIFICATION.md` und C++-Best-Practice-Regeln pruefen.
- Plugin-Boundaries / Extensibility: Adapter-/Interface-Grenzen sowie Public-vs-Private-Grenzen gegen `OOP_AND_SOC_PRINCIPLES.md` und `GOVERNANCE_AND_ROADMAP.md` pruefen.
- Einordnungshilfe:
- `include/**` oder externe Vertragsaenderung → Public API
- `src/**`, interne Header oder `detail::` → Internal Core
- Locking/Atomics/Latenz/Benchmarks/Timeouts → Concurrency / Performance
- Plugin-Interfaces/Adapter/Edition-Grenzen → Plugin-Boundaries / Extensibility
- Wenn mehrere C++-Subtypen zugleich betroffen sind, gelten alle relevanten Wiki-/Governance-Pflichten kumulativ.

Details und Dateizwecke: [AI_WIKI_CONTEXT.md](copilot/AI_WIKI_CONTEXT.md)

## 1) Ziel

Roadmap-Einträge müssen so konkret sein, dass Copilot **produktiven Sourcecode** statt Stub/Rumpf erzeugen kann.
Expand Down
148 changes: 148 additions & 0 deletions .github/copilot/AI_WIKI_CONTEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# Developer LLM Wiki Context for GitHub Copilot

Use this module when GitHub Copilot on GitHub is implementing, refactoring, reviewing, or debugging code in ThemisDB.

## Goal

- Make the curated Developer LLM Wiki a first-class context source for GitHub Copilot coding tasks.
- Reduce ad-hoc repository scanning when relevant wiki syntheses already exist.
- Keep Copilot anchored to source-of-truth precedence instead of treating wiki pages as independent truth.

## Required Read Order

1. [../../AI_WIKI_INTEGRATION_PLAYBOOK.md](../../AI_WIKI_INTEGRATION_PLAYBOOK.md)
2. [../../ai_context/developer_llm_wiki/INDEX.md](../../ai_context/developer_llm_wiki/INDEX.md)
3. One or more task-specific wiki pages:
- [../../ai_context/developer_llm_wiki/MODULES_AND_APIS.md](../../ai_context/developer_llm_wiki/MODULES_AND_APIS.md)
- [../../ai_context/developer_llm_wiki/BUILD_TEST_CI_AND_OPERATIONS.md](../../ai_context/developer_llm_wiki/BUILD_TEST_CI_AND_OPERATIONS.md)
- [../../ai_context/developer_llm_wiki/GOVERNANCE_AND_ROADMAP.md](../../ai_context/developer_llm_wiki/GOVERNANCE_AND_ROADMAP.md)
4. [../../ai_context/developer_llm_wiki/WIKI_STATUS.json](../../ai_context/developer_llm_wiki/WIKI_STATUS.json) as freshness/sync evidence

## File Selection Rules

### Module and API work
- Start with `MODULES_AND_APIS.md`
- Cross-check with module-local `src/<module>/ROADMAP.md`, `FUTURE_ENHANCEMENTS.md`, `README.md`
- Then consult API contract pages under `ai_context/api_contracts/` when the change touches public interfaces:
- `api.md`
- `llm.md`
- `index.md`
- `storage.md`
- `transaction.md`
- `auth.md`
- Prefer module/API wiki context before broad repository search when the task asks to implement, extend, or review an API contract.

### Build, test, CI, and operations work
- Start with `BUILD_TEST_CI_AND_OPERATIONS.md`
- Cross-check with `.github/workflows/*.yml`, `scripts/*`, and root build docs
- For CI/build failures, inspect the failing GitHub Actions run/job first, then use the wiki to narrow the relevant workflow/build files.
- Prioritize workflow/package/dependency sections in the wiki before scanning unrelated modules.

### Governance, roadmap, release, and process work
- Start with `GOVERNANCE_AND_ROADMAP.md`
- Cross-check with `ROADMAP.md`, `FUTURE_ENHANCEMENTS.md`, `RELEASE_STRATEGY.md`, `BRANCHING_STRATEGY.md`, `VERSIONING.md`
- Treat root governance files as the final authority for branch names, release lanes, documentation sync, and acceptance gates.
- Use the wiki as an index into those root governance sources, not as a replacement for them.

### C and C++ implementation work
- Start with `MODULES_AND_APIS.md`
- Then consult:
- `../../ai_context/memory_management_policy.md`
- `../../ai_context/OOP_AND_SOC_PRINCIPLES.md`
- `../../ai_context/FUNCTION_CLASSIFICATION.md`
- Cross-check with:
- `../../.github/instructions/cpp-best-practices.instructions.md`
- `../../.github/instructions/cpp-language-service-tools.instructions.md`
- `../../.github/instructions/documentation-enforcement.instructions.md`
- For public C++ API changes, also read the relevant file in `../../ai_context/api_contracts/` before editing.
- Prefer the wiki and instruction files to establish invariants, ownership, and test expectations before touching `.cpp`/`.h`/`.hpp` files.

#### Public C++ API work
- Prioritize `ai_context/api_contracts/*.md` after `MODULES_AND_APIS.md`.
- Verify public/header-level stability, ownership, thread-safety, deprecation, and documentation expectations before editing `include/**`.
- Cross-check with `FUNCTION_CLASSIFICATION.md` for public API level and `documentation-enforcement.instructions.md` for Doxygen obligations.
- Default file order:
1. `developer_llm_wiki/MODULES_AND_APIS.md`
2. relevant `ai_context/api_contracts/*.md`
3. `ai_context/FUNCTION_CLASSIFICATION.md`
4. public headers in `include/**`
5. affected tests and module docs
- Must verify: ownership/lifetime contract, `@thread_safety`, deprecation/versioning impact, and whether the change expands the supported public surface.

#### Internal core C++ work
- Prioritize `memory_management_policy.md` and `OOP_AND_SOC_PRINCIPLES.md` after `MODULES_AND_APIS.md`.
- Focus on invariants, ownership transfer, adapter boundaries, and whether logic belongs in `include/**`, `src/**`, or `detail::`.
- Verify that any internal helper/API drift does not accidentally widen the public surface.
- Default file order:
1. `developer_llm_wiki/MODULES_AND_APIS.md`
2. `ai_context/memory_management_policy.md`
3. `ai_context/OOP_AND_SOC_PRINCIPLES.md`
4. internal headers / `src/**`
5. focused module tests
- Must verify: RAII ownership, `detail::` boundaries, exception/result-handling pattern, and no accidental promotion of internal helpers into public headers.

#### Concurrency and performance C++ work
- Prioritize `FUNCTION_CLASSIFICATION.md` and `memory_management_policy.md` after `MODULES_AND_APIS.md`.
- Check thread-safety class, locking expectations, timeout/cancellation behavior, and hot-path criticality before editing.
- Cross-check with `cpp-best-practices.instructions.md` for lock ordering, atomics, false-sharing, and profiling-first constraints.
- Default file order:
1. `developer_llm_wiki/MODULES_AND_APIS.md`
2. `ai_context/FUNCTION_CLASSIFICATION.md`
3. `ai_context/memory_management_policy.md`
4. C++ best-practice instruction file
5. relevant benchmarks / concurrency tests / target sources
- Must verify: thread-safety class, lock ordering, atomic vs mutex choice, timeout/cancellation semantics, and whether the path is P0/P1/P2.

#### Plugin boundary and extensibility C++ work
- Prioritize `OOP_AND_SOC_PRINCIPLES.md` and `GOVERNANCE_AND_ROADMAP.md` after `MODULES_AND_APIS.md`.
- Verify public/private boundary rules, adapter/plugin interface contracts, and that no private implementation details leak into Community/Minimal surfaces.
- Treat plugin-related interface additions as governance-sensitive changes, not just local refactors.
- Default file order:
1. `developer_llm_wiki/MODULES_AND_APIS.md`
2. `ai_context/OOP_AND_SOC_PRINCIPLES.md`
3. `developer_llm_wiki/GOVERNANCE_AND_ROADMAP.md`
4. plugin interface headers/docs
5. affected governance/release docs when surface policy changes
- Must verify: adapter boundary, edition/public-private boundary, repository-vs-plugin ownership, and whether the change belongs in public SDK docs or private plugin space.

## C++ Subtype Routing Heuristics

- If the task edits `include/**` or changes documented external behavior, treat it as **Public C++ API work**.
- If the task edits `src/**`, `detail::`, or internal helper headers without intended external contract change, treat it as **Internal core C++ work**.
- If the task changes mutexes, atomics, scheduling, batching, benchmarks, latency-sensitive code, or timeout behavior, treat it as **Concurrency and performance C++ work**.
- If the task changes adapters, plugin interfaces, extensibility seams, SDK exposure, or edition boundaries, treat it as **Plugin boundary and extensibility C++ work**.
- If multiple C++ subtypes apply, read all relevant subtype inputs and use the strictest boundary/documentation requirements among them.

### General onboarding or multi-area tasks
- Start with `INDEX.md`
- Follow its links before falling back to broad repository search

## Task-Type Priority Matrix

| Task type | Read first | Then verify against |
|---|---|---|
| API / module implementation | `developer_llm_wiki/MODULES_AND_APIS.md` | `src/<module>/*.md`, `ai_context/api_contracts/*.md`, headers/tests |
| CI / build / workflow triage | `developer_llm_wiki/BUILD_TEST_CI_AND_OPERATIONS.md` | GitHub Actions logs, `.github/workflows/*.yml`, `scripts/*` |
| Governance / roadmap / release | `developer_llm_wiki/GOVERNANCE_AND_ROADMAP.md` | `ROADMAP.md`, `FUTURE_ENHANCEMENTS.md`, `RELEASE_STRATEGY.md`, `BRANCHING_STRATEGY.md`, `VERSIONING.md` |
| C++ public API | `developer_llm_wiki/MODULES_AND_APIS.md` | `ai_context/api_contracts/*.md`, `FUNCTION_CLASSIFICATION.md`, headers/tests |
| C++ internal core | `developer_llm_wiki/MODULES_AND_APIS.md` | `memory_management_policy.md`, `OOP_AND_SOC_PRINCIPLES.md`, module sources/tests |
| C++ concurrency / performance | `developer_llm_wiki/MODULES_AND_APIS.md` | `FUNCTION_CLASSIFICATION.md`, `memory_management_policy.md`, C++ instruction files, benchmarks/tests |
| C++ plugin boundary | `developer_llm_wiki/MODULES_AND_APIS.md` | `OOP_AND_SOC_PRINCIPLES.md`, `GOVERNANCE_AND_ROADMAP.md`, plugin docs/interfaces |
| Multi-area / discovery | `developer_llm_wiki/INDEX.md` | linked task-specific wiki pages and primary sources |

## Freshness and Trust Rules

- Check `WIKI_STATUS.json` for:
- `generated_at`
- `source_count`
- delta metadata (`added_count`, `removed_count`, `changed_count`)
- Treat the Developer LLM Wiki as compiled guidance, not primary truth.
- If root SOT, module docs, tests, or code disagree with the wiki, prefer the primary source and report wiki drift.
- If the needed wiki page is missing, stale, or irrelevant, state that explicitly in the task output.

## GitHub Copilot Behavior Expectations

- On GitHub coding tasks, cite the consulted wiki page(s) when they materially informed the implementation.
- Do not claim the wiki was used unless the referenced files were actually consulted.
- Use the wiki to narrow search space, identify likely files, and recover module/build/governance context faster.
- Still verify behavior against code, tests, and workflows before making changes.
10 changes: 10 additions & 0 deletions .github/copilot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@ cp -r .vscode.example .vscode
2. Read the team workflow in [AI_CUSTOMIZATION_WORKFLOW.md](AI_CUSTOMIZATION_WORKFLOW.md).
3. Follow links into the relevant module guides.
4. Use [VSCODE_CONTEXT.md](VSCODE_CONTEXT.md) for local environment setup.
5. Use [AI_WIKI_CONTEXT.md](AI_WIKI_CONTEXT.md) when GitHub Copilot on GitHub should ground coding work in the Developer LLM Wiki.

## AI Workflow Quick Links

- Team workflow playbook: [AI_CUSTOMIZATION_WORKFLOW.md](AI_CUSTOMIZATION_WORKFLOW.md)
- PR AI report template: [PR_AI_REPORT_TEMPLATE.md](PR_AI_REPORT_TEMPLATE.md)
- Review severity policy: [REVIEW_SEVERITY_POLICY.md](REVIEW_SEVERITY_POLICY.md)
- Developer wiki context for GitHub Copilot: [AI_WIKI_CONTEXT.md](AI_WIKI_CONTEXT.md)
- Agents: [../agents/themisdb-implementer.agent.md](../agents/themisdb-implementer.agent.md), [../agents/themisdb-reviewer.agent.md](../agents/themisdb-reviewer.agent.md)
- Prompts: [../prompts/roadmap-to-production.prompt.md](../prompts/roadmap-to-production.prompt.md), [../prompts/build-triage-windows-release.prompt.md](../prompts/build-triage-windows-release.prompt.md), [../prompts/pr-diff-findings-review.prompt.md](../prompts/pr-diff-findings-review.prompt.md), [../prompts/security-hardening-review.prompt.md](../prompts/security-hardening-review.prompt.md), [../prompts/api-change-impact-review.prompt.md](../prompts/api-change-impact-review.prompt.md), [../prompts/release-readiness-check.prompt.md](../prompts/release-readiness-check.prompt.md), [../prompts/compose-ai-pr-report.prompt.md](../prompts/compose-ai-pr-report.prompt.md), [../prompts/verify-high-exception-record.prompt.md](../prompts/verify-high-exception-record.prompt.md)

Expand Down Expand Up @@ -156,6 +158,14 @@ cp -r .vscode.example .vscode
- Debugging workflows.
- Formatting support.

### AI_WIKI_CONTEXT.md

- Required Developer LLM Wiki read order for GitHub Copilot on GitHub.
- Which curated wiki files to use for module/API, CI/build, governance, and C/C++ tasks.
- Which C++ workflow profile to use for public API, internal core, concurrency/performance, and plugin-boundary work.
- Freshness checks via `WIKI_STATUS.json`.
- Source-of-truth fallback rules when wiki synthesis drifts.

### PROMPT_ENGINEERING.md

- Step-by-step decomposition for implementation prompts.
Expand Down
Loading
Loading