Skip to content

feat(funding): keep unknown industry and purpose as pre-application checks - #36

Merged
jhjh0512 merged 13 commits into
mainfrom
feat/funding-pre-application-checks
Sep 28, 2026
Merged

jhjh0512 merged 13 commits into
mainfrom
feat/funding-pre-application-checks

Conversation

@jhjh0512

@jhjh0512 jhjh0512 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

관련: ADR 0006(#33) 4절 "업종·용도 규칙 변경". 별도 Issue는 없다.

#33 위에 쌓은 PR이다. 이 PR은 AGENTS.md와 funding.md에서 ADR 0006 파일을 링크한다. 그래서 base를 #33의 branch로 두었다. #33이 병합되고 그 branch가 지워지면 GitHub가 base를 main으로 바꾼다. 그 뒤 main을 합쳐 diff를 정리한다. #33보다 먼저 병합하지 않는다.

변경 내용

  • 판정(eligibility.ts): 업종·용도는 공식 출처가 구조화해 주지 않는 조건이다. 그래서 두 조건이 UNKNOWN이어도 현재 후보를 막지 않는다.
    • 대신 manualChecks(화면의 "신청 전 추가 확인")에 업종: …, 용도: … 형태로 더한다. 후보 사유의 "신청 전 N건"에도 이 수를 포함한다.
    • eligibilityVerdict는 그대로 UNKNOWN이다.
    • 사업 단계·지역이 UNKNOWN이면 지금처럼 추가 확인(NEEDS_CONFIRMATION)이다.
    • FAIL이 하나라도 있으면 지금처럼 조건 미충족(NOT_ELIGIBLE)이다.
    • 검수 기한, 접수 종료, 검수자 미지정, 사업자등록 이후, 원문 근거 부족이 이 규칙보다 먼저 적용되는 순서는 그대로다.
    • ADR 4절에 따라 이 규칙은 사람이 기록한 상품과 자동 상품에 똑같이 적용된다.
  • API 응답 형식: 바뀌지 않는다. 새 필드를 만들지 않고 기존 manualChecks를 쓴다.
  • 화면(FundingCandidatesPanel.tsx): 두 그룹의 설명 문구만 새 규칙에 맞게 고쳤다.
    • "현재 검토 후보": 확인되지 않은 업종·용도는 신청 전 추가 확인에 적는다는 설명을 더했다.
    • "추가 확인 필요": 사업 단계·지역이 확인되지 않으면 이 그룹으로 온다고 적었다.
  • 문서:
    • AGENTS.md §3의 8번: 업종·용도만 확인되지 않은 상품은 ADR 0006에 따라 신청 전 확인과 함께 현재 후보로 표시한다는 문장을 더했다.
    • docs/domains/funding.md 판정 절: 조건별 UNKNOWN의 효과를 적었다.
  • 연령 조건: ADR 4절의 "연령은 신청 전 확인"은 이 PR에 넣지 않았다.
    • 개정된 ADR(e71981a)은 K-Startup을 쓰지 않으므로, 지금 연령 값을 주는 자동 출처가 없다.
    • 연령 조건이 있는 상품이 생기면 기존 additionalChecks에 적는다. 그러면 새 스키마 없이 같은 "신청 전 추가 확인" 목록에 나온다.

검증

  • 재현: 새 규칙 테스트 2개는 코드 변경 전에 실패했고, 변경 후 통과한다.
    • 업종·용도 UNKNOWN이면 검토 후보가 되고, 신청 전 확인이 3건 붙는다.
    • 업종 UNKNOWN이면 검토 후보가 된다.
  • 회귀 방지: "사업 단계·지역이 UNKNOWN이면 추가 확인" 테스트 2개를 새로 넣었다. 코드 변경 전과 후 모두 통과한다. 규칙을 지나치게 풀지 않았는지 확인하는 테스트다.
  • npm --prefix app run verify:fast 통과: 카탈로그 검증, Prettier, ESLint, TypeScript, 테스트, build를 포함한다.
    • Vitest: 237 passed, 32 skipped. 건너뛴 테스트는 PostgreSQL이 필요한 묶음 26개와 data/raw/가 없을 때의 원본 대조 테스트 6개다.
  • DB 테스트: 이 작업 환경에는 Docker Compose(PostgreSQL 17)가 없어 verify:db 명령을 돌리지 못했다. 대신 로컬 PostgreSQL 16에 migration을 적용하고 DB 모드를 직접 실행했다(run-tests.ts database, 6b260f1 기준). 결과는 263 passed, 6 skipped(data/raw/ 없음)다.
  • E2E(Playwright): 같은 PostgreSQL 16 테스트 DB에서 desktop·mobile 6개가 모두 통과했다. 작업 환경에 미리 설치된 Chromium을 임시 설정으로 지정했고, 설정 파일은 바꾸지 않았다.
  • ADR 개정 반영: docs(funding): accept ADR 0006 on automating funding candidates #33 branch의 ADR 개정(e71981a)을 합쳤다. 이 PR의 diff는 그대로 6개 파일이고, 개정된 ADR에도 4절의 업종·용도 규칙이 그대로 있다.
  • 링크: AGENTS.md와 funding.md의 상대 링크가 모두 실제 파일을 가리킨다(이 branch 기준).
  • 확인하지 못한 것: 화면을 브라우저로 직접 확인하지는 않았다(빈 상태·모바일). 화면 변경은 설명 문구 두 줄뿐이다. PostgreSQL 17에서의 npm --prefix app run verify는 병합 전에 로컬에서 한 번 돌려 보기를 권한다.

위험·후속

  • 데이터 계약 변경: AGENTS.md §3의 8번을 바꾼다. 근거는 ADR 0006(Accepted)이다.
    • 이제 업종·용도가 확인되지 않은 상품도 현재 후보가 된다. 사용자가 업종·용도를 입력하지 않은 경우도 포함한다.
    • 그 사실은 신청 전 추가 확인 목록과 자격 판정 "미확인"으로 화면에 드러난다.
  • 대출 가정 적용: 현재 후보이면서 상환 계산이 가능한 상품만 적용할 수 있다는 규칙은 그대로다. 따라서 업종·용도가 미확인인 대출 상품도 사용자가 직접 적용할 수 있게 된다.
  • 지금 ACTIVE 카탈로그: 상품 5개 모두 검수자가 지정되지 않아 이 규칙까지 가지 않는다. 사용자에게 보이는 결과는 바뀌지 않는다.
  • 후속(개정된 ADR 0006):

🤖 Generated with Claude Code

https://claude.ai/code/session_015LCE4DgT5qdHP8y8V5qtbL

claude and others added 12 commits September 25, 2026 08:10
Draft ADR 0006 (Proposed) for issue #5. Discovery from the K-Startup
and Bizinfo Open APIs produces catalog drafts with reviewer UNASSIGNED;
demotions (application end date passed, source changed, removed or
closed) apply automatically; promotion to a current candidate still
needs a human-reviewed catalog release. AI interpretation of
announcement text stays out of scope.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015LCE4DgT5qdHP8y8V5qtbL
Rework the draft per the decision to automate both directions:
funding:sync builds the catalog from the K-Startup and Bizinfo APIs and
promotes non-loan announcements whose dates, stage and region come from
structured fields. Industry and purpose UNKNOWN become pre-application
checks instead of blocking. Loans and guarantees stay human-reviewed.
Source failures keep the current release, and auto products drop out
when syncs stop for more than three days.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015LCE4DgT5qdHP8y8V5qtbL
Support programs (grant, space, program) are automated from the
K-Startup API. Policy loans and guarantees have no official API, so
they are automated by crawling the SEMAS and Seoul Shinbo pages under
explicit rules: robots.txt and terms checked per source, public pages
only, once a day, no evasion when blocked. Repayment calculation is
auto-promoted only when the page states a single fixed rate, term,
grace and method; variable-rate loans stay non-calculable. Each track
has its own promotion switch, and a failing source keeps its last
products until they go stale after three days.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015LCE4DgT5qdHP8y8V5qtbL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015LCE4DgT5qdHP8y8V5qtbL
Mark ADR 0006 Accepted with jhjh0512 as owner, and state that the
follow-up doc changes in section 9 land with the implementation PRs
(AGENTS.md section 7), not with this decision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015LCE4DgT5qdHP8y8V5qtbL
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015LCE4DgT5qdHP8y8V5qtbL
…hecks

Per ADR 0006, industry and purpose are conditions no official source
gives in structured form, so an UNKNOWN verdict on them no longer keeps
a product out of the current candidates. They are added to manualChecks
as "업종: ..." / "용도: ..." and counted in the candidate reason, while
eligibilityVerdict stays UNKNOWN. An UNKNOWN business stage or region
still means NEEDS_CONFIRMATION, and any FAIL still means NOT_ELIGIBLE.

AGENTS.md section 3 item 8 now points to ADR 0006 for this case, and
funding.md and the candidate group notes describe the new split.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015LCE4DgT5qdHP8y8V5qtbL
Record the 2026-09-28 checks of real API responses, robots.txt and terms.
K-Startup would surface 116 mostly unrelated current candidates for a Seoul
pre-founder, so support programs are discovered through Bizinfo and promoted
only by a person. Policy loans are crawled from the SEMAS policy fund site,
including its notice list JSON to locate notice pages. Sbiz24's internal API
is not used, and Seoul development funds stay human-managed because their
terms exist only in HWP attachments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jhjh0512
jhjh0512 merged commit 0ba3e2e into main Sep 28, 2026
1 check passed
@jhjh0512
jhjh0512 deleted the feat/funding-pre-application-checks branch September 28, 2026 14:28
jhjh0512 pushed a commit that referenced this pull request Sep 28, 2026
Resolve AGENTS.md and eligibility.ts in favor of this branch: main holds
the squashed #36 version, and this branch already contains #36 plus the
#37 changes on the same lines. The merged tree is identical to ba3ac46.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015LCE4DgT5qdHP8y8V5qtbL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants