Skip to content

docs(agents): remove stale KV known-deviation; align openai example with credential_key - #808

Merged
seonghobae merged 2 commits into
mainfrom
devin/1787305632-kv-credentials-docs
Aug 24, 2026
Merged

docs(agents): remove stale KV known-deviation; align openai example with credential_key#808
seonghobae merged 2 commits into
mainfrom
devin/1787305632-kv-credentials-docs

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

AGENTS.md still listed a "Known deviation to migrate" claiming ModelClient reads provider API keys from os.environ.get(agent.api_key_env) and CONTEXTUAL_ORCHESTRATOR_* tokens from __main__.py. That is no longer true: runtime provider secrets and server bearer tokens are already resolved through the KV credential registry via get_credential(). This change updates the cross-agent guidance and the example OpenAI agent pool to match the current implementation.

What changed

  • In AGENTS.md:
    • Replaced the stale "Known deviation" bullet with a statement that orchestrator.py and __main__.py already use get_credential.
    • Kept the note that api_key_env is still accepted as a legacy field whose string value is treated as a KV credential name, never an environment variable.
    • In the "This repo: the org LLM gateway" section, replaced the old env-read callout with the list of provider keys (OPENAI_API_KEY, BYTEZ_API_KEY, NVIDIA_NIM_API_KEY, NVIDIA_NIM_API_KEY_SUB, OPENROUTER_API_KEY) that must be seeded into the KV at bootstrap for auto-discovery and routing.
  • In examples/agents.openai.json: switched from the legacy api_key_env field to the modern credential_key field. ModelAgent.from_dict accepts both, and credential_name resolves to api_key_env when present, otherwise credential_key.

Why

The stale guidance in AGENTS.md directed every new agent to "move these to KV-backed reads", which is already done. That creates confusion and can lead to redundant or conflicting PRs. The example file should teach the preferred field name (credential_key) while the legacy field remains for backward compatibility.

Verification

  • git diff --check passes.
  • python -m compileall -q passes on the changed source.
  • Loaded examples/agents.openai.json through ModelAgent.from_dict and confirmed each agent's credential_name resolves to OPENAI_API_KEY with api_key_env unset.
  • No runtime behavior changed.

Link to Devin session: https://app.devin.ai/sessions/05803abb7bbd445d96eec3961f56817a


Open in Devin Review

…ith credential_key

AGENTS.md still claimed ModelClient reads os.environ.get(agent.api_key_env). The runtime already resolves provider keys and server tokens from the KV registry via get_credential(). Update the guidance and the example agent pool to use the modern credential_key field.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author
Original prompt from Automation

당신은 ContextualWisdomLab 조직의 자율 개발 루프를 수행합니다. 이 세션은 스케줄에 의해 무인으로 시작되며, 사람에게 중간 보고를 하지 않습니다. 실행 결과를 보고하지 말고 다음 루프 작업을 계속하십시오. 질문으로 멈추지 말고, 판단 가능한 것은 스스로 판단해 진행하십시오.

#``# 0. 대상 선택

  • 저장소는 고정되어 있지 않습니다. 매 실행마다 ContextualWisdomLab 조직에서 소유자가 온전한 권리를 가진 저장소들을 살펴보고, 레버리지가 큰 순서대로 작업 대상을 스스로 선택하십시오.
  • 저장소를 선택할 때에는 이름이 아니라 제품·책임·재사용 경계와 기존 문서·구현 구조, 소비 저장소까지 대조해 실제 PR 위치가 맞는지 확인하십시오.
  • 참고 저장소:
    • @ContextualWisdomLab/.github
    • @ContextualWisdomLab/contextual-orchestrator
    • @ContextualWisdomLab/TEPP
    • @ContextualWisdomLab/fast-mlsirm
    • @ContextualWisdomLab/keyverse
    • @ContextualWisdomLab/RankWeave
    • @ContextualWisdomLab/ThreadWeave
    • @ContextualWisdomLab/disksage
    • @ContextualWisdomLab/wardnet
    • @ContextualWisdomLab/LineageWeave
    • naruon 저장소 및 조직 중앙 .github 와의 연계를 항상 고려하십시오.

#``# 1. 기본 루프 (중간 보고 없이 반복)
열린 PR마다: 리뷰 확인 → 수정 → Checks 재검증 → 병합 → 다음 개발.

  1. 대상 저장소의 열린 PR과 Issue를 모두 수집합니다.
  2. 각 PR의 리뷰 코멘트와 GitHub Checks 상태를 확인하고, 실패가 있으면 원인을 추적(Root Cause Analysis)해 근본 원인을 고칩니다.
  3. not-merge-ready 상태의 PR은 직접 merge-ready 상태로 만듭니다.
  4. Stacking 가능한 PR은 Stacking 하여 효율을 높입니다. Stacking 된 PR에서 중앙 OpenCode Agent가 리뷰를 하지 않으면 ContextualWisdomLab/.github 저장소를 수정합니다.
  5. 병합 가능한 PR은 병합합니다. 조직 내 유관 프로젝트의 PR이 있으면 함께 처리합니다(대개 원인이 엮여 있습니다).
  6. PR과 Issue가 모두 소진되면, 구매자가 체감할 제품 Gap을 찾아 개발을 이어가고 새 PR을 만들어 같은 루프를 반복합니다.
  7. 소프트웨어를 완성하기 위한 Loop을 스스로 지속적으로 작성/제거하며 갱신하십시오. ADR과 Goal을 수시로 설정/변경/업데이트하고, Goal 수정이 불가능하면 Loop을 갱신하십시오.
  8. 이 예약 프롬프트 자체가 개선되어야 한다고 판단되면 Devin Automation을 업데이트해 프롬프트를 개선하십시오.

기준: 이 소프트웨어를 200억 달러에 판매할 수 있다는 자신이 있어야 합니다. 상용 소프트웨어 수준을 목표로 하십시오.

#``# 2. Gap 베이스라인 문서
ADR 및 리서치 자료, 현행 데이터를 근거로 기능 명세, PRD, TRD, UML 등을 도출하고 Gap을 찾으십시오. 현행 PR을 포함해 점검한 결과를 docs/product-technical-gap-baseline.md에 작성/갱신하고, 그 문서에 적힌 Gap을 개발하는 것도 루프에 포함합니다.

#``# 3. 아키텍처 원칙

  • 조직 중앙 .github, naruon, 기타 저장소와 연결 가능한 구조. 따로 또 같이 쓰는 모듈러 MSA: 개별 소프트웨어로도 동작하고, 모듈로 반입해도 훌륭히 동작해야 합니다.
  • 단일 소프트웨어가 Monolithic 하게 비대해지면 과감히 저장소를 분리하십시오.
  • 소프트웨어 이름과 내부 호출자 이름이 크게 다르면(옛 이름 잔존 등) 교체하십시오.
  • 코드 장애 ... (3993 chars truncated...)

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@opencode-agent opencode-agent Bot added priority: medium Normal-priority or P2 work status: needs-review Open pull request requiring current-head review or checks type: docs Documentation, ADR, PRD, or technical writing labels Aug 22, 2026
@seonghobae
seonghobae enabled auto-merge (squash) August 24, 2026 00:53
@seonghobae

Copy link
Copy Markdown
Contributor

Merge-gate evidence (2026-08-24): All required checks green on current head except strix, failing closed on org-wide NVIDIA NIM quota exhaustion (litellm.RateLimitError: Nvidia_nimException — runs 32646490187/32707494858; systemic serialization fix in ContextualWisdomLab/.github#1297). External provider-capacity blocker, not a diff finding. Full local suite green on this head.

@seonghobae
seonghobae merged commit 0077b76 into main Aug 24, 2026
29 of 30 checks passed
@seonghobae
seonghobae deleted the devin/1787305632-kv-credentials-docs branch August 24, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: medium Normal-priority or P2 work status: needs-review Open pull request requiring current-head review or checks type: docs Documentation, ADR, PRD, or technical writing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant