workq-mcp 0.1.3 → 0.1.5
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/lib/natural-git.mjs +10 -8
- package/package.json +1 -1
package/lib/natural-git.mjs
CHANGED
|
@@ -240,21 +240,21 @@ function extractCliFacts(file) {
|
|
|
240
240
|
const facts = [];
|
|
241
241
|
if (/\bworkq\s+connect\b/.test(file.content)) facts.push("사용자는 터미널에서 현재 로컬 git 저장소를 Work Q 프로젝트에 연결한다.");
|
|
242
242
|
if (/\bworkq\s+bootstrap\b/.test(file.content)) facts.push("사용자는 현재 저장소를 분석해 프로젝트 컨텍스트와 기능 지도를 Work Q에 초기 등록한다.");
|
|
243
|
-
if (/\bworkq\s+natural-git\b/.test(file.content)) facts.push("사용자는 현재 저장소의 구현을 기능 중심 자연어 명세로 변환해 Work Q
|
|
243
|
+
if (/\bworkq\s+natural-git\b/.test(file.content)) facts.push("사용자는 현재 저장소의 구현을 기능 중심 자연어 명세로 변환해 Work Q 자연어 명세 저장소에 업로드한다.");
|
|
244
244
|
if (/\bworkq\s+reset\b/.test(file.content)) facts.push("사용자는 프로젝트 키를 다시 확인한 뒤 Work Q에 저장된 프로젝트 데이터를 초기화한다.");
|
|
245
245
|
if (/\bworkq\s+mcp\b/.test(file.content)) facts.push("사용자는 데스크톱 AI 클라이언트가 연결할 수 있는 Work Q MCP bridge를 실행한다.");
|
|
246
246
|
if (/git\s*\(\s*\[\s*["']rev-parse["']|git\s+rev-parse/.test(file.content)) facts.push("명령 실행 시 현재 저장소의 로컬 경로, 현재 브랜치, 현재 커밋을 읽어 Work Q에 전달한다.");
|
|
247
|
-
if (/remote["']?,\s*["']get-url|git\s+remote\s+get-url/.test(file.content)) facts.push("명령 실행 시 원격 GitHub 저장소 주소를 읽어 프로젝트의
|
|
247
|
+
if (/remote["']?,\s*["']get-url|git\s+remote\s+get-url/.test(file.content)) facts.push("명령 실행 시 원격 GitHub 저장소 주소를 읽어 프로젝트의 소유자와 저장소 이름을 구분한다.");
|
|
248
248
|
if (/WORKQ_MCP_TOKEN|WORKQ_MCP_TOKEN_FILE/.test(file.content)) facts.push("MCP 인증 토큰은 환경 변수 또는 토큰 파일에서 읽어 Work Q API 호출에 사용한다.");
|
|
249
|
-
if (/WORKQ_MCP_URL/.test(file.content)) facts.push("Work Q MCP API 주소는
|
|
249
|
+
if (/WORKQ_MCP_URL/.test(file.content)) facts.push("Work Q MCP API 주소는 외부 설정으로 바꿀 수 있고, 없으면 기본 운영 주소를 사용한다.");
|
|
250
250
|
return unique(facts, 14);
|
|
251
251
|
}
|
|
252
252
|
|
|
253
253
|
function extractCliRules(file) {
|
|
254
254
|
if (!isCliEntryFile(file)) return [];
|
|
255
255
|
const rules = [];
|
|
256
|
-
if (/--project-key/.test(file.content)) rules.push("
|
|
257
|
-
if (/--confirm-project-key/.test(file.content)) rules.push("프로젝트 초기화는 실수를 막기 위해 같은 프로젝트
|
|
256
|
+
if (/--project-key/.test(file.content)) rules.push("프로젝트 식별값은 연결, 초기 분석, 자연어 명세 업로드, 초기화 명령에서 필수 입력이다.");
|
|
257
|
+
if (/--confirm-project-key/.test(file.content)) rules.push("프로젝트 초기화는 실수를 막기 위해 같은 프로젝트 식별값을 확인값으로 한 번 더 요구한다.");
|
|
258
258
|
if (/Only github\.com remotes are supported|github\.com/.test(file.content)) rules.push("원격 저장소는 GitHub 주소만 지원한다.");
|
|
259
259
|
if (/WORKQ_MCP_TOKEN_FILE|\.workq\/mcp-token/.test(file.content)) rules.push("직접 토큰이 없으면 지정된 토큰 파일을 읽고, 기본 토큰 파일 경로를 사용한다.");
|
|
260
260
|
if (/throw new Error/.test(file.content)) rules.push("필수 입력이나 연결 정보가 없으면 조용히 진행하지 않고 사용자에게 오류를 알린다.");
|
|
@@ -388,12 +388,14 @@ function sourceFileToDoc(file) {
|
|
|
388
388
|
const functionalFacts = extractFunctionalFacts(file, structure);
|
|
389
389
|
const designFacts = extractDesignFacts(file);
|
|
390
390
|
const verificationFacts = buildVerificationFacts(file, structure);
|
|
391
|
+
const cliRules = extractCliRules(file);
|
|
392
|
+
const environmentFacts = extractEnvironmentFacts(file);
|
|
391
393
|
const coreRules = unique(
|
|
392
394
|
[
|
|
393
395
|
...dataModelFacts,
|
|
394
|
-
...
|
|
395
|
-
...
|
|
396
|
-
...functionalFacts.filter((item) => /반복문|선택 상태|자동 생성|결과 영역|HTTP 요청|필수|초기화|GitHub|토큰/.test(item))
|
|
396
|
+
...cliRules,
|
|
397
|
+
...environmentFacts,
|
|
398
|
+
...(cliRules.length ? [] : functionalFacts.filter((item) => /반복문|선택 상태|자동 생성|결과 영역|HTTP 요청|필수|초기화|GitHub|토큰/.test(item)))
|
|
397
399
|
],
|
|
398
400
|
12
|
|
399
401
|
);
|