@ps-neko/nekowork 0.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +112 -0
- package/CLAUDE.md +81 -0
- package/LICENSE +21 -0
- package/README.md +283 -0
- package/REVIEW.md +96 -0
- package/RULES.md +51 -0
- package/SOUL.md +21 -0
- package/WORKING-CONTEXT.md +52 -0
- package/agent.yaml +219 -0
- package/agents/architect.md +57 -0
- package/agents/code-reviewer.md +60 -0
- package/agents/codex-challenger.md +53 -0
- package/agents/codex-reviewer.md +56 -0
- package/agents/debugger.md +33 -0
- package/agents/doc-writer.md +51 -0
- package/agents/executor.md +41 -0
- package/agents/planner.md +49 -0
- package/agents/research.md +50 -0
- package/agents/security-reviewer.md +47 -0
- package/agents/test-engineer.md +41 -0
- package/bridge/mcp-server.js +301 -0
- package/commands/claude-led-codex-review.md +29 -0
- package/docs/ADVANCED.md +321 -0
- package/docs/AI-DEVELOPMENT-LIFECYCLE.md +105 -0
- package/docs/ARCHITECTURE.md +205 -0
- package/docs/AUDIT.md +114 -0
- package/docs/AUTH-MIGRATION.md +282 -0
- package/docs/CHANGELOG.md +97 -0
- package/docs/CLI-STAGES.md +89 -0
- package/docs/CODEMAPS/README.md +15 -0
- package/docs/CODEMAPS/agents.md +22 -0
- package/docs/CODEMAPS/bridge.md +18 -0
- package/docs/CODEMAPS/hooks.md +28 -0
- package/docs/CODEMAPS/manifests.md +14 -0
- package/docs/CODEMAPS/rules.md +22 -0
- package/docs/CODEMAPS/schemas.md +21 -0
- package/docs/CODEMAPS/scripts.md +158 -0
- package/docs/CODEMAPS/skills.md +29 -0
- package/docs/CODEMAPS/tests.md +98 -0
- package/docs/CORE-INVARIANTS.md +38 -0
- package/docs/DEMO.md +110 -0
- package/docs/EXAMPLE-PROJECT.md +92 -0
- package/docs/PORTING.md +154 -0
- package/docs/PRODUCT-PRINCIPLES.md +303 -0
- package/docs/PUBLISH-ALPHA.md +106 -0
- package/docs/QUICKSTART.md +344 -0
- package/docs/RELEASE-READINESS.md +140 -0
- package/docs/RISK-CLASSIFIER.md +50 -0
- package/docs/RUNBOOK.md +146 -0
- package/docs/SECURITY.md +79 -0
- package/docs/SETUP.md +142 -0
- package/docs/WHY-NEKOWORK.md +64 -0
- package/docs/case-studies/README.md +16 -0
- package/docs/case-studies/SINDRESORHUS-IS-PLAIN-OBJ.md +141 -0
- package/docs/dev-log/2026-04-29-p1-recovery.md +142 -0
- package/docs/dev-log/2026-04-29-week1-4.md +81 -0
- package/docs/examples/GITHUB-ACTIONS-HARDENING.md +86 -0
- package/docs/examples/QUALITY-LIFECYCLE-SMOKE.md +32 -0
- package/docs/examples/TRADING-DASHBOARD-MOCK.md +65 -0
- package/docs/workflows-stash/README.md +32 -0
- package/docs/workflows-stash/harness-review.yml +166 -0
- package/docs/workflows-stash/harness-validate.yml +48 -0
- package/examples/github-actions-hardening/.github/workflows/hardened-validate.yml +38 -0
- package/examples/github-actions-hardening/README.md +31 -0
- package/examples/github-actions-hardening/case-study/ASK.md +26 -0
- package/examples/github-actions-hardening/case-study/GATE_STATUS.md +28 -0
- package/examples/github-actions-hardening/case-study/PLAN.md +25 -0
- package/examples/github-actions-hardening/case-study/SHIP_READY.md +21 -0
- package/examples/github-actions-hardening/case-study/TASK.md +30 -0
- package/examples/github-actions-hardening/case-study/TEAM_HANDOFFS.md +37 -0
- package/examples/github-actions-hardening/case-study/VERIFY_SUMMARY.md +35 -0
- package/examples/github-actions-hardening/case-study/WORK_SUMMARY.md +24 -0
- package/examples/github-actions-hardening/package.json +12 -0
- package/examples/github-actions-hardening/scripts/check.mjs +43 -0
- package/examples/quality-lifecycle-smoke/README.md +30 -0
- package/examples/quality-lifecycle-smoke/case-study/ASK.md +24 -0
- package/examples/quality-lifecycle-smoke/case-study/GATE_STATUS.md +10 -0
- package/examples/quality-lifecycle-smoke/case-study/PLAN.md +19 -0
- package/examples/quality-lifecycle-smoke/case-study/SHIP_READY.md +11 -0
- package/examples/quality-lifecycle-smoke/case-study/TASK.md +19 -0
- package/examples/quality-lifecycle-smoke/case-study/TEAM_HANDOFFS.md +21 -0
- package/examples/quality-lifecycle-smoke/case-study/VERIFY_SUMMARY.md +44 -0
- package/examples/quality-lifecycle-smoke/case-study/WORK_SUMMARY.md +19 -0
- package/examples/quality-lifecycle-smoke/package.json +8 -0
- package/examples/quality-lifecycle-smoke/scripts/check.mjs +44 -0
- package/examples/trading-dashboard-mock/README.md +33 -0
- package/examples/trading-dashboard-mock/case-study/ASK.md +24 -0
- package/examples/trading-dashboard-mock/case-study/GATE_STATUS.md +28 -0
- package/examples/trading-dashboard-mock/case-study/PLAN.md +23 -0
- package/examples/trading-dashboard-mock/case-study/SHIP_READY.md +21 -0
- package/examples/trading-dashboard-mock/case-study/TASK.md +29 -0
- package/examples/trading-dashboard-mock/case-study/TEAM_HANDOFFS.md +49 -0
- package/examples/trading-dashboard-mock/case-study/VERIFY_SUMMARY.md +35 -0
- package/examples/trading-dashboard-mock/case-study/WORK_SUMMARY.md +27 -0
- package/examples/trading-dashboard-mock/fixtures/market.json +9 -0
- package/examples/trading-dashboard-mock/index.html +76 -0
- package/examples/trading-dashboard-mock/package.json +9 -0
- package/examples/trading-dashboard-mock/scripts/check.mjs +54 -0
- package/examples/trading-dashboard-mock/src/app.js +83 -0
- package/examples/trading-dashboard-mock/src/styles.css +227 -0
- package/hooks/hooks.json +44 -0
- package/hooks/scripts/config-protection.js +34 -0
- package/hooks/scripts/gateguard-fact-force.js +146 -0
- package/hooks/scripts/persistent-mode.mjs +27 -0
- package/hooks/scripts/pre-bash-dispatcher.js +63 -0
- package/hooks/scripts/quality-gate.js +106 -0
- package/manifests/install-components.json +195 -0
- package/manifests/install-modules.json +101 -0
- package/manifests/install-profiles.json +134 -0
- package/package.json +96 -0
- package/rules/common/coding-style.md +71 -0
- package/rules/common/security.md +69 -0
- package/rules/common/testing.md +58 -0
- package/rules/python/coding-style.md +80 -0
- package/rules/python/testing.md +86 -0
- package/rules/typescript/coding-style.md +97 -0
- package/rules/typescript/security.md +67 -0
- package/rules/typescript/testing.md +78 -0
- package/schemas/agent-yaml.schema.json +168 -0
- package/schemas/agent.schema.json +32 -0
- package/schemas/handoff.schema.json +105 -0
- package/schemas/hooks.schema.json +35 -0
- package/schemas/install-components.schema.json +46 -0
- package/schemas/install-modules.schema.json +39 -0
- package/schemas/install-profiles.schema.json +32 -0
- package/schemas/install-state.schema.json +42 -0
- package/schemas/routing.schema.json +42 -0
- package/schemas/skill.schema.json +19 -0
- package/scripts/agents/dispatch.js +144 -0
- package/scripts/agents/runners/claude.js +214 -0
- package/scripts/agents/runners/codex.js +233 -0
- package/scripts/agents/runners/gemini.js +92 -0
- package/scripts/agents/runners/mock.js +107 -0
- package/scripts/auth/github-import-gh.js +52 -0
- package/scripts/auth/github-login.js +79 -0
- package/scripts/auth/github-logout.js +21 -0
- package/scripts/auth/github-status.js +46 -0
- package/scripts/build-claude.js +101 -0
- package/scripts/build-codemaps.js +286 -0
- package/scripts/build-codex.js +93 -0
- package/scripts/build-cursor.js +132 -0
- package/scripts/build-gemini.js +117 -0
- package/scripts/build-opencode.js +117 -0
- package/scripts/ci/catalog.js +120 -0
- package/scripts/ci/check-markers.js +48 -0
- package/scripts/ci/security-hardening.js +270 -0
- package/scripts/ci/validate-agents.js +88 -0
- package/scripts/ci/validate-hooks.js +99 -0
- package/scripts/ci/validate-manifests.js +128 -0
- package/scripts/ci/validate-skills.js +93 -0
- package/scripts/cli.js +1134 -0
- package/scripts/core/auth-guard.js +22 -0
- package/scripts/core/build-roots.js +11 -0
- package/scripts/core/cli-resolver.js +64 -0
- package/scripts/core/execution-workspace.js +84 -0
- package/scripts/core/git-mutation-guard.js +79 -0
- package/scripts/core/install-state.js +125 -0
- package/scripts/core/json-extractor.js +32 -0
- package/scripts/core/subprocess.js +74 -0
- package/scripts/daemon/wait.js +278 -0
- package/scripts/demo-external-project.js +222 -0
- package/scripts/demo-quick-run.js +193 -0
- package/scripts/demo-review.js +204 -0
- package/scripts/doctor.js +296 -0
- package/scripts/install-apply.js +185 -0
- package/scripts/install-plan.js +411 -0
- package/scripts/lib/acceptance-criteria.js +105 -0
- package/scripts/lib/costs.js +82 -0
- package/scripts/lib/instincts.js +194 -0
- package/scripts/lib/keychain.js +85 -0
- package/scripts/lib/profile-policy.js +134 -0
- package/scripts/lib/profile-safety.js +81 -0
- package/scripts/lib/risk-classifier.js +145 -0
- package/scripts/lib/router.js +138 -0
- package/scripts/lib/severity.js +99 -0
- package/scripts/lib/token-vault.js +136 -0
- package/scripts/orchestrators/apply.js +225 -0
- package/scripts/orchestrators/ask.js +143 -0
- package/scripts/orchestrators/gate.js +179 -0
- package/scripts/orchestrators/ralph.js +179 -0
- package/scripts/orchestrators/review.js +452 -0
- package/scripts/orchestrators/run.js +151 -0
- package/scripts/orchestrators/ship.js +339 -0
- package/scripts/orchestrators/team-lite.js +270 -0
- package/scripts/orchestrators/team.js +244 -0
- package/scripts/orchestrators/verify.js +306 -0
- package/scripts/orchestrators/work.js +207 -0
- package/scripts/portability/simulate-port.js +220 -0
- package/scripts/repair.js +184 -0
- package/scripts/sync-claude-md.js +220 -0
- package/scripts/verify/claude-live.js +30 -0
- package/scripts/verify/codex-live.js +60 -0
- package/scripts/verify/gemini-live.js +48 -0
- package/scripts/verify/runtime.js +105 -0
- package/skills/claude-led-codex-review/SKILL.md +133 -0
- package/skills/plan-eng-review/SKILL.md +51 -0
- package/skills/porting/SKILL.md +69 -0
- package/skills/ralph/SKILL.md +48 -0
- package/skills/release-readiness/SKILL.md +62 -0
- package/skills/review/SKILL.md +42 -0
- package/skills/security-hardening/SKILL.md +59 -0
- package/skills/ship/SKILL.md +44 -0
- package/skills/tdd-workflow/SKILL.md +42 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# typescript/testing — TS/JS 테스트 룰
|
|
2
|
+
|
|
3
|
+
> [common/testing.md](../common/testing.md) 의 TS/JS 확장.
|
|
4
|
+
|
|
5
|
+
## 1. 프레임워크
|
|
6
|
+
|
|
7
|
+
- 단위 / 통합: **node:test** (repo default). Vitest 는 필요할 때 프로젝트별 devDependency 로 추가.
|
|
8
|
+
- E2E: **Playwright**.
|
|
9
|
+
- 노드 코어 스크립트(`scripts/`): `node --test` 로 충분.
|
|
10
|
+
|
|
11
|
+
## 2. 파일 위치
|
|
12
|
+
|
|
13
|
+
- 단위: `tests/unit/<area>.test.js` (이 레포는 ESM `.js`).
|
|
14
|
+
- 통합: `tests/integration/<scenario>.test.js`.
|
|
15
|
+
- E2E: `tests/e2e/<flow>.spec.ts`.
|
|
16
|
+
- 픽스처: `tests/fixtures/<area>/`.
|
|
17
|
+
|
|
18
|
+
## 3. node:test 패턴
|
|
19
|
+
|
|
20
|
+
```js
|
|
21
|
+
import { test, beforeEach } from 'node:test';
|
|
22
|
+
import assert from 'node:assert/strict';
|
|
23
|
+
|
|
24
|
+
beforeEach(() => { /* reset */ });
|
|
25
|
+
|
|
26
|
+
test('router: critical routes to opus', () => {
|
|
27
|
+
assert.equal(route({ severity: 'critical' }), 'opus');
|
|
28
|
+
});
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
- table case 는 배열 + `for ... of` 로 작성.
|
|
32
|
+
- 모듈 mock 이 꼭 필요하면 테스트 대상의 의존성 주입 경계를 먼저 검토.
|
|
33
|
+
|
|
34
|
+
## 4. node:test 실행
|
|
35
|
+
|
|
36
|
+
이 레포의 `tests/unit/*.test.js` 는 다음 형태:
|
|
37
|
+
|
|
38
|
+
```js
|
|
39
|
+
import { test } from 'node:test';
|
|
40
|
+
import assert from 'node:assert/strict';
|
|
41
|
+
import { route } from '../../scripts/lib/router.js';
|
|
42
|
+
|
|
43
|
+
test('router: critical → opus', () => {
|
|
44
|
+
assert.equal(route({ severity: 'critical' }), 'opus');
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
실행: `node --test tests/unit/*.test.js`.
|
|
49
|
+
|
|
50
|
+
## 5. 모킹
|
|
51
|
+
|
|
52
|
+
- 외부 의존(SDK, 네트워크) 만 mock. 자체 모듈은 가능한 한 실 구현.
|
|
53
|
+
- mock 함수가 필요하면 `node:test` 의 `mock.fn()` 또는 작은 fake 구현을 사용.
|
|
54
|
+
- `nock` / `msw` 로 HTTP 모킹.
|
|
55
|
+
|
|
56
|
+
## 6. 비동기 테스트
|
|
57
|
+
|
|
58
|
+
- `async () => { ... }` 로 작성, await 누락 방지.
|
|
59
|
+
- 타임아웃 명시 (`{ timeout: 10000 }`) — 기본 5000ms 보다 길어야 하면 이유 주석.
|
|
60
|
+
|
|
61
|
+
## 7. E2E (Playwright)
|
|
62
|
+
|
|
63
|
+
- 파일: `tests/e2e/<flow>.spec.ts`.
|
|
64
|
+
- Trace + 스크린샷 + 비디오 자동 첨부 (`use: { trace: 'retain-on-failure' }`).
|
|
65
|
+
- CI 에서 워커 1, 로컬에서 multiple OK.
|
|
66
|
+
- 데이터: 격리된 테스트 사용자 또는 세션.
|
|
67
|
+
|
|
68
|
+
## 8. 커버리지
|
|
69
|
+
|
|
70
|
+
- Node/V8 coverage: `node --test --experimental-test-coverage tests/unit/*.test.js`.
|
|
71
|
+
- v8 또는 istanbul 기반 라인 80% 이상.
|
|
72
|
+
- `coverage/` 는 `.gitignore`. `lcov.info` 만 CI 아티팩트로.
|
|
73
|
+
|
|
74
|
+
## 9. 에이전트 지원
|
|
75
|
+
|
|
76
|
+
- 새 기능 / 버그 수정: `tdd-guide` 에이전트 (skills/tdd-workflow).
|
|
77
|
+
- E2E 흐름: `e2e-runner` 에이전트.
|
|
78
|
+
- 실패 분석: `debugger` 에이전트.
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/Ps-Neko/NEKOWORK/main/schemas/agent-yaml.schema.json",
|
|
4
|
+
"title": "agent.yaml (gitagent/0.1.0)",
|
|
5
|
+
"description": "단일 매니페스트. ECC gitagent 스펙 차용 + HARNESS 확장.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["spec_version", "name", "version", "description"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"spec_version": { "type": "string", "const": "gitagent/0.1.0" },
|
|
11
|
+
"name": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
12
|
+
"runtime_name": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
13
|
+
"version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+(-[a-z0-9.-]+)?$" },
|
|
14
|
+
"description": { "type": "string", "minLength": 10 },
|
|
15
|
+
"license": { "type": "string" },
|
|
16
|
+
"homepage": { "type": "string", "format": "uri" },
|
|
17
|
+
"authors": { "type": "array", "items": { "type": "string" } },
|
|
18
|
+
|
|
19
|
+
"agents": { "type": "array", "items": { "type": "string" } },
|
|
20
|
+
"skills": { "type": "array", "items": { "type": "string" } },
|
|
21
|
+
"commands": { "type": "array", "items": { "type": "string" } },
|
|
22
|
+
|
|
23
|
+
"hooks": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"required": ["file"],
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"properties": {
|
|
28
|
+
"file": { "type": "string" },
|
|
29
|
+
"toggles_env_prefix": { "type": "string" },
|
|
30
|
+
"active": { "type": "array", "items": { "type": "string" } }
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
"mcp": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"required": ["gateway"],
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"properties": {
|
|
39
|
+
"gateway": { "type": "string" },
|
|
40
|
+
"external_servers": {
|
|
41
|
+
"type": "array",
|
|
42
|
+
"items": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"required": ["name"],
|
|
45
|
+
"additionalProperties": false,
|
|
46
|
+
"properties": {
|
|
47
|
+
"name": { "type": "string" },
|
|
48
|
+
"pin": { "type": "string" },
|
|
49
|
+
"type": { "enum": ["stdio", "http"] },
|
|
50
|
+
"url": { "type": "string", "format": "uri" }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
"harnesses": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"required": ["name", "output_dir", "builder"],
|
|
62
|
+
"additionalProperties": true,
|
|
63
|
+
"properties": {
|
|
64
|
+
"name": { "type": "string" },
|
|
65
|
+
"output_dir": { "type": "string" },
|
|
66
|
+
"builder": { "type": "string" },
|
|
67
|
+
"config_format": { "enum": ["json", "toml", "yaml", "summary"] },
|
|
68
|
+
"plugin_manifest": { "type": "string" },
|
|
69
|
+
"event_adapter": { "enum": ["required", "optional", "none"] },
|
|
70
|
+
"output_format": { "type": "string" }
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
"profiles": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"required": ["default", "available"],
|
|
78
|
+
"additionalProperties": false,
|
|
79
|
+
"properties": {
|
|
80
|
+
"default": { "type": "string" },
|
|
81
|
+
"available": { "type": "array", "items": { "type": "string" } }
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
|
|
85
|
+
"modules": { "type": "array", "items": { "type": "string" } },
|
|
86
|
+
|
|
87
|
+
"build": {
|
|
88
|
+
"type": "object",
|
|
89
|
+
"additionalProperties": false,
|
|
90
|
+
"properties": {
|
|
91
|
+
"prepack": { "type": "array", "items": { "type": "string" } },
|
|
92
|
+
"post_install": { "type": "array", "items": { "type": "string" } }
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
"verification": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"additionalProperties": false,
|
|
99
|
+
"properties": {
|
|
100
|
+
"catalog_validators": { "type": "array", "items": { "type": "string" } },
|
|
101
|
+
"marker_check": { "type": "string" },
|
|
102
|
+
"required_coverage_pct": { "type": "number", "minimum": 0, "maximum": 100 }
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
"security": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"additionalProperties": true
|
|
109
|
+
},
|
|
110
|
+
|
|
111
|
+
"auth": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"additionalProperties": false,
|
|
114
|
+
"properties": {
|
|
115
|
+
"mode": { "enum": ["delegated-first", "oauth-first", "vault-only"] },
|
|
116
|
+
"token_store": {
|
|
117
|
+
"type": "object",
|
|
118
|
+
"additionalProperties": false,
|
|
119
|
+
"properties": {
|
|
120
|
+
"kind": { "enum": ["encrypted-file", "os-keychain"] },
|
|
121
|
+
"path": { "type": "string" },
|
|
122
|
+
"fallback": { "enum": ["encrypted-file", "os-keychain"] }
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"providers": {
|
|
126
|
+
"type": "object",
|
|
127
|
+
"additionalProperties": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"required": ["flow"],
|
|
130
|
+
"additionalProperties": false,
|
|
131
|
+
"properties": {
|
|
132
|
+
"flow": { "enum": ["delegated_cli_auth", "oauth_device", "oauth_pkce", "api_key_vault"] },
|
|
133
|
+
"command": { "type": "string" },
|
|
134
|
+
"auth_check": { "type": "string" },
|
|
135
|
+
"disallow_env_keys": { "type": "array", "items": { "type": "string" } },
|
|
136
|
+
"scopes": { "type": "array", "items": { "type": "string" } },
|
|
137
|
+
"client_id_env": { "type": "string" },
|
|
138
|
+
"vault_key": { "type": "string" },
|
|
139
|
+
"fallback": { "enum": ["delegated_cli_auth", "oauth_device", "oauth_pkce", "api_key_vault"] }
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"policy": {
|
|
144
|
+
"type": "object",
|
|
145
|
+
"additionalProperties": false,
|
|
146
|
+
"properties": {
|
|
147
|
+
"block_subscription_override": { "type": "boolean" },
|
|
148
|
+
"require_human_approval_for_scope_escalation": { "type": "boolean" },
|
|
149
|
+
"redact_tokens_in_audit": { "type": "boolean" },
|
|
150
|
+
"deny_static_api_keys_in_repo": { "type": "boolean" }
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
"routing": {
|
|
157
|
+
"type": "object",
|
|
158
|
+
"additionalProperties": true
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
"state": {
|
|
162
|
+
"type": "object",
|
|
163
|
+
"additionalProperties": true
|
|
164
|
+
},
|
|
165
|
+
|
|
166
|
+
"tags": { "type": "array", "items": { "type": "string" } }
|
|
167
|
+
}
|
|
168
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/Ps-Neko/NEKOWORK/main/schemas/agent.schema.json",
|
|
4
|
+
"title": "Agent Frontmatter Schema",
|
|
5
|
+
"description": "agents/<name>.md frontmatter 검증",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["name", "description", "provider", "model", "level"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"name": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
11
|
+
"description": { "type": "string", "minLength": 10, "maxLength": 280 },
|
|
12
|
+
"provider": { "enum": ["claude", "codex", "gemini", "auto"] },
|
|
13
|
+
"model": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"examples": ["opus", "sonnet", "haiku", "gpt-5-codex", "gemini-2.5-pro"]
|
|
16
|
+
},
|
|
17
|
+
"level": { "type": "integer", "minimum": 0, "maximum": 3 },
|
|
18
|
+
"disallowedTools": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": { "enum": ["Read", "Write", "Edit", "Bash", "Network", "MCP"] },
|
|
21
|
+
"uniqueItems": true
|
|
22
|
+
},
|
|
23
|
+
"trigger": { "type": "array", "items": { "type": "string" } },
|
|
24
|
+
"hand_off_to": { "type": "array", "items": { "type": "string" } },
|
|
25
|
+
"fact_forcing": { "type": "boolean" },
|
|
26
|
+
"sandbox": { "enum": ["read-only", "workspace-write", "danger"] },
|
|
27
|
+
"network_access": { "type": "boolean" },
|
|
28
|
+
"hand_off_input": { "type": "array", "items": { "type": "string" } },
|
|
29
|
+
"hand_off_output": { "type": "string" },
|
|
30
|
+
"output_schema": { "type": "string" }
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/Ps-Neko/NEKOWORK/main/schemas/handoff.schema.json",
|
|
4
|
+
"title": "Handoff JSON",
|
|
5
|
+
"description": "단계 간 구조화된 핸드오프. 마크다운 5필드와 별도로 JSON 첨부 가능.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["stage", "agent", "decided", "files"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"stage": {
|
|
11
|
+
"enum": ["question-gate", "ideate", "plan", "implement", "self-review", "codex-review", "codex-challenge", "ship"]
|
|
12
|
+
},
|
|
13
|
+
"agent": { "type": "string" },
|
|
14
|
+
"round": { "type": "integer", "minimum": 1 },
|
|
15
|
+
"session_id": { "type": "string" },
|
|
16
|
+
"team_stage": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"pattern": "^team-[a-z0-9-]+$"
|
|
19
|
+
},
|
|
20
|
+
"timestamp": { "type": "string", "format": "date-time" },
|
|
21
|
+
"duration_ms": { "type": "integer", "minimum": 0 },
|
|
22
|
+
"provider": { "enum": ["mock", "claude", "codex", "gemini", "local"] },
|
|
23
|
+
"model": { "type": "string" },
|
|
24
|
+
"profile": { "type": "string" },
|
|
25
|
+
"decided": { "type": "string", "minLength": 1 },
|
|
26
|
+
"rejected": { "type": "string" },
|
|
27
|
+
"risks": { "type": "string" },
|
|
28
|
+
"files": {
|
|
29
|
+
"type": "array",
|
|
30
|
+
"items": { "type": "string" }
|
|
31
|
+
},
|
|
32
|
+
"remaining": { "type": "string" },
|
|
33
|
+
"issues": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"items": { "$ref": "#/$defs/Issue" }
|
|
36
|
+
},
|
|
37
|
+
"verdict": {
|
|
38
|
+
"enum": ["block", "approve_with_fixes", "approve"]
|
|
39
|
+
},
|
|
40
|
+
"confidence": {
|
|
41
|
+
"type": "number",
|
|
42
|
+
"minimum": 0,
|
|
43
|
+
"maximum": 1
|
|
44
|
+
},
|
|
45
|
+
"risk_level": {
|
|
46
|
+
"enum": ["low", "medium", "high", "critical"]
|
|
47
|
+
},
|
|
48
|
+
"questions": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"items": { "type": "string", "minLength": 1 }
|
|
51
|
+
},
|
|
52
|
+
"success_criteria": {
|
|
53
|
+
"type": "array",
|
|
54
|
+
"items": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"required": ["id", "desc"],
|
|
57
|
+
"additionalProperties": false,
|
|
58
|
+
"properties": {
|
|
59
|
+
"id": { "type": "string", "minLength": 1 },
|
|
60
|
+
"desc": { "type": "string", "minLength": 1 },
|
|
61
|
+
"passes": { "type": "boolean" },
|
|
62
|
+
"source": { "type": "string" }
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"assumptions": {
|
|
67
|
+
"type": "array",
|
|
68
|
+
"items": { "type": "string", "minLength": 1 }
|
|
69
|
+
},
|
|
70
|
+
"requires_human_gate": {
|
|
71
|
+
"type": "boolean"
|
|
72
|
+
},
|
|
73
|
+
"prdSeed": {
|
|
74
|
+
"type": "object",
|
|
75
|
+
"additionalProperties": true
|
|
76
|
+
},
|
|
77
|
+
"diffPath": {
|
|
78
|
+
"type": "string"
|
|
79
|
+
},
|
|
80
|
+
"executionWorkspace": {
|
|
81
|
+
"type": "string"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"$defs": {
|
|
85
|
+
"Issue": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"required": ["severity", "category", "summary"],
|
|
88
|
+
"additionalProperties": false,
|
|
89
|
+
"properties": {
|
|
90
|
+
"severity": { "enum": ["critical", "high", "medium", "low", "info"] },
|
|
91
|
+
"category": { "enum": ["security", "correctness", "performance", "style", "test", "docs"] },
|
|
92
|
+
"file": { "type": "string" },
|
|
93
|
+
"line": { "type": "integer", "minimum": 0 },
|
|
94
|
+
"claim": { "type": "string" },
|
|
95
|
+
"evidence": { "type": "string" },
|
|
96
|
+
"summary": { "type": "string", "minLength": 1, "maxLength": 200 },
|
|
97
|
+
"why": { "type": "string" },
|
|
98
|
+
"required_fix": { "type": ["string", "null"] },
|
|
99
|
+
"suggested_fix": { "type": ["string", "null"] },
|
|
100
|
+
"confidence": { "type": "number", "minimum": 0, "maximum": 1 },
|
|
101
|
+
"gate_required": { "type": "boolean" }
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/Ps-Neko/NEKOWORK/main/schemas/hooks.schema.json",
|
|
4
|
+
"title": "Hooks Definition Schema",
|
|
5
|
+
"description": "hooks/hooks.json 단일 정의 파일 검증",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["version"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": { "type": "string" },
|
|
11
|
+
"version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+" },
|
|
12
|
+
"PreToolUse": { "type": "array", "items": { "$ref": "#/$defs/HookEntry" } },
|
|
13
|
+
"PostToolUse": { "type": "array", "items": { "$ref": "#/$defs/HookEntry" } },
|
|
14
|
+
"PreCompact": { "type": "array", "items": { "$ref": "#/$defs/HookEntry" } },
|
|
15
|
+
"Stop": { "type": "array", "items": { "$ref": "#/$defs/HookEntry" } },
|
|
16
|
+
"SessionStart": { "type": "array", "items": { "$ref": "#/$defs/HookEntry" } },
|
|
17
|
+
"SessionEnd": { "type": "array", "items": { "$ref": "#/$defs/HookEntry" } },
|
|
18
|
+
"UserPromptSubmit": { "type": "array", "items": { "$ref": "#/$defs/HookEntry" } },
|
|
19
|
+
"PostToolUseFailure": { "type": "array", "items": { "$ref": "#/$defs/HookEntry" } }
|
|
20
|
+
},
|
|
21
|
+
"$defs": {
|
|
22
|
+
"HookEntry": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"required": ["hook"],
|
|
25
|
+
"additionalProperties": false,
|
|
26
|
+
"properties": {
|
|
27
|
+
"hook": { "type": "string", "pattern": "^scripts/.*\\.(js|mjs|cjs|sh)$" },
|
|
28
|
+
"matcher": { "type": "string" },
|
|
29
|
+
"timeout_ms": { "type": "integer", "minimum": 100, "maximum": 60000 },
|
|
30
|
+
"env_toggle": { "type": "string", "pattern": "^HARNESS_HOOK_[A-Z_]+$" },
|
|
31
|
+
"comment": { "type": "string" }
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/Ps-Neko/NEKOWORK/main/schemas/install-components.schema.json",
|
|
4
|
+
"title": "Install Components",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["version", "components"],
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "type": "string" },
|
|
10
|
+
"version": { "type": "string" },
|
|
11
|
+
"components": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"required": ["type"],
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"properties": {
|
|
18
|
+
"type": {
|
|
19
|
+
"enum": ["rule", "rule_set", "agent", "skill", "command", "hook", "platform"]
|
|
20
|
+
},
|
|
21
|
+
"source": { "type": "string" },
|
|
22
|
+
"target": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"additionalProperties": { "type": "string" }
|
|
25
|
+
},
|
|
26
|
+
"marker_managed": { "type": "boolean" },
|
|
27
|
+
"event": {
|
|
28
|
+
"enum": [
|
|
29
|
+
"PreToolUse",
|
|
30
|
+
"PostToolUse",
|
|
31
|
+
"PreCompact",
|
|
32
|
+
"Stop",
|
|
33
|
+
"SessionStart",
|
|
34
|
+
"SessionEnd",
|
|
35
|
+
"UserPromptSubmit",
|
|
36
|
+
"PostToolUseFailure"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"matcher": { "type": "string" },
|
|
40
|
+
"builder": { "type": "string" },
|
|
41
|
+
"output_dir": { "type": "string" }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/Ps-Neko/NEKOWORK/main/schemas/install-modules.schema.json",
|
|
4
|
+
"title": "Install Modules",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["version", "modules"],
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "type": "string" },
|
|
10
|
+
"version": { "type": "string" },
|
|
11
|
+
"modules": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"required": ["description", "components", "level"],
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"properties": {
|
|
18
|
+
"description": { "type": "string", "minLength": 10 },
|
|
19
|
+
"components": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*:[a-z][a-z0-9-]*$" },
|
|
22
|
+
"minItems": 1,
|
|
23
|
+
"uniqueItems": true
|
|
24
|
+
},
|
|
25
|
+
"level": { "type": "integer", "minimum": 0, "maximum": 3 },
|
|
26
|
+
"required": { "type": "boolean" },
|
|
27
|
+
"depends_on": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" }
|
|
30
|
+
},
|
|
31
|
+
"env_toggles": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"additionalProperties": { "type": "string" }
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/Ps-Neko/NEKOWORK/main/schemas/install-profiles.schema.json",
|
|
4
|
+
"title": "Install Profiles",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["version", "profiles"],
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"$schema": { "type": "string" },
|
|
10
|
+
"version": { "type": "string" },
|
|
11
|
+
"profiles": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"minProperties": 1,
|
|
14
|
+
"additionalProperties": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"required": ["description", "modules"],
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"properties": {
|
|
19
|
+
"description": { "type": "string", "minLength": 10 },
|
|
20
|
+
"modules": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
23
|
+
"minItems": 1,
|
|
24
|
+
"uniqueItems": true
|
|
25
|
+
},
|
|
26
|
+
"defaults": { "type": "object", "additionalProperties": true },
|
|
27
|
+
"post_install_note": { "type": "string" }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/Ps-Neko/NEKOWORK/main/schemas/install-state.schema.json",
|
|
4
|
+
"title": "Install State",
|
|
5
|
+
"description": "현재 설치된 컴포넌트 상태를 영속 저장. ~/.harness/install-state.json",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["version", "harness_version", "profile", "installed_at", "components"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": { "type": "string" },
|
|
11
|
+
"version": { "type": "string" },
|
|
12
|
+
"harness_version": { "type": "string" },
|
|
13
|
+
"profile": { "type": "string" },
|
|
14
|
+
"installed_at": { "type": "string", "format": "date-time" },
|
|
15
|
+
"last_updated": { "type": "string", "format": "date-time" },
|
|
16
|
+
"components": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"additionalProperties": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"required": ["installed_at", "source_sha256", "targets"],
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"properties": {
|
|
23
|
+
"installed_at": { "type": "string", "format": "date-time" },
|
|
24
|
+
"source_sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
25
|
+
"targets": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"required": ["harness", "path"],
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"properties": {
|
|
32
|
+
"harness": { "type": "string" },
|
|
33
|
+
"path": { "type": "string" },
|
|
34
|
+
"sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/Ps-Neko/NEKOWORK/main/schemas/routing.schema.json",
|
|
4
|
+
"title": "Agent Routing Decision Trace",
|
|
5
|
+
"description": ".harness/state/sessions/<id>/routing.jsonl 의 한 줄 형식",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["timestamp", "stage", "input_summary", "decision"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"timestamp": { "type": "string", "format": "date-time" },
|
|
11
|
+
"stage": {
|
|
12
|
+
"enum": ["ideate", "plan", "implement", "self-review", "codex-review", "codex-challenge", "ship"]
|
|
13
|
+
},
|
|
14
|
+
"input_summary": { "type": "string", "maxLength": 280 },
|
|
15
|
+
"decision": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": ["agent", "model", "provider"],
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"properties": {
|
|
20
|
+
"agent": { "type": "string" },
|
|
21
|
+
"model": { "type": "string" },
|
|
22
|
+
"provider": { "enum": ["claude", "codex", "gemini", "auto"] },
|
|
23
|
+
"rationale": { "type": "string" }
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"alternatives": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"items": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"required": ["agent", "model"],
|
|
31
|
+
"properties": {
|
|
32
|
+
"agent": { "type": "string" },
|
|
33
|
+
"model": { "type": "string" },
|
|
34
|
+
"rejected_because": { "type": "string" }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"eco_mode": { "type": "boolean" },
|
|
39
|
+
"risk_level": { "enum": ["low", "medium", "high", "critical"] },
|
|
40
|
+
"blast_radius": { "type": "integer" }
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/Ps-Neko/NEKOWORK/main/schemas/skill.schema.json",
|
|
4
|
+
"title": "Skill Frontmatter Schema",
|
|
5
|
+
"description": "skills/<name>/SKILL.md frontmatter 검증",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["name", "description", "origin", "level"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"name": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" },
|
|
11
|
+
"description": { "type": "string", "minLength": 10, "maxLength": 280 },
|
|
12
|
+
"origin": { "type": "string", "examples": ["harness-core", "ECC", "OMC", "user"] },
|
|
13
|
+
"level": { "type": "integer", "minimum": 0, "maximum": 3 },
|
|
14
|
+
"prerequisites": { "type": "array", "items": { "type": "string" } },
|
|
15
|
+
"conflicts": { "type": "array", "items": { "type": "string" } },
|
|
16
|
+
"auto_inject_keywords": { "type": "array", "items": { "type": "string" } },
|
|
17
|
+
"tags": { "type": "array", "items": { "type": "string" } }
|
|
18
|
+
}
|
|
19
|
+
}
|