Skip to content

feat(skill): add built-in legal-risk-assessment skill for contract and deal risk evaluation#1953

Open
bj456736 wants to merge 4 commits into
MoonshotAI:mainfrom
bj456736:feat/legal-risk-assessment-skill
Open

feat(skill): add built-in legal-risk-assessment skill for contract and deal risk evaluation#1953
bj456736 wants to merge 4 commits into
MoonshotAI:mainfrom
bj456736:feat/legal-risk-assessment-skill

Conversation

@bj456736

Copy link
Copy Markdown
Contributor

Summary

Add a new builtin skill /legal-risk-assessment that helps users evaluate, classify, and document legal risks using a structured severity-by-likelihood framework.

Features

  • 5x5 Risk Matrix: Severity (1-5) × Likelihood (1-5) with scoring 1-25
  • Color-coded Risk Levels:
    • 🟢 GREEN (1-4): Low Risk — accept, document, monitor periodically
    • 🟡 YELLOW (5-9): Medium Risk — mitigate, monitor actively, assign owner
    • 🟠 ORANGE (10-15): High Risk — escalate to senior counsel, develop mitigation plan
    • 🔴 RED (16-25): Critical Risk — immediate escalation, engage outside counsel
  • Structured Assessment Flow: gather context → identify risks → score → recommend actions
  • Standard Memo Format: structured risk assessment memo template
  • Escalation Guidelines: clear criteria for when to engage outside counsel (mandatory / strongly recommended / consider)

Usage

Users can invoke the skill via:

  • /legal-risk-assessment
  • /skill:legal-risk-assessment

Scope

Registered in both agent-core and agent-core-v2 builtin skill catalogs.

Testing

  • Skill parser tests pass
  • Builtin sub-skill tests pass
  • Skill prompt tests pass
  • TypeScript compilation clean (no new errors)

Notes

  • Does not provide legal advice — assessments should be reviewed by qualified legal professionals
  • Framework is a starting point that organizations should customize to their specific risk appetite

qer added 4 commits July 18, 2026 18:06
When vis-server binds to 0.0.0.0 or :: (all interfaces), the startup
banner and CLI output now display the actual LAN IP addresses that
other devices on the same network can use to connect. This enables
lan-range remote control from phones, tablets, or other machines.

Changes:
- Add isAllInterfaces() and getLocalNetworkAddresses() to config.ts
- Add lanUrls field to StartedVisServer in start.ts
- Update formatStartupBanner() to list LAN URLs when applicable
- Update vis CLI handler to print LAN access URLs
- Add unit tests for isAllInterfaces and getLocalNetworkAddresses
…d deal risk evaluation

Add a new builtin skill `/legal-risk-assessment` that helps users evaluate,
classify, and document legal risks using a structured severity-by-likelihood
framework.

Features:
- 5x5 risk matrix (Severity x Likelihood) with scoring 1-25
- Color-coded risk levels: GREEN (1-4), YELLOW (5-9), ORANGE (10-15), RED (16-25)
- Structured assessment flow: gather context → identify risks → score → recommend
- Risk classification with recommended actions per level
- Standard risk assessment memo format
- Escalation guidelines for outside counsel engagement

Registered in both agent-core and agent-core-v2 builtin skill catalogs.
@pkg-pr-new

pkg-pr-new Bot commented Jul 20, 2026

Copy link
Copy Markdown
pnpm dlx https://pkg.pr.new/@moonshot-ai/kimi-code@cc5d0d2
npx https://pkg.pr.new/@moonshot-ai/kimi-code@cc5d0d2

commit: cc5d0d2

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cc5d0d20b7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

port: info.port,
host,
url: `http://${hostForUrl(host)}:${info.port}/`,
lanUrls: isAllInterfaces(host) ? getLocalNetworkAddresses(info.port) : undefined,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include auth context in LAN URLs

When host is 0.0.0.0 or ::, resolveVisAuthToken(host) requires auth, but the newly advertised LAN URLs are emitted without the token. The SPA only learns the bearer token from token/vis_token URL params or existing localStorage, so a fresh phone/tablet opening one of these LAN links loads the shell but all /api calls return 401, making the advertised remote-control URL unusable unless the user manually edits it.

Useful? React with 👍 / 👎.

Comment on lines +40 to +41
const addresses = getLocalNetworkAddresses(3001);
expect(addresses.length).toBeGreaterThan(0);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Mock network interfaces in config tests

This new test depends on the host having at least one non-internal IPv4 interface. CI containers, offline sandboxes, and IPv6-only machines can legitimately expose only loopback or IPv6 entries from os.networkInterfaces(), so getLocalNetworkAddresses() returns [] and the test flakes/fails even though the implementation is behaving consistently for that environment; mock the OS network interface seam instead of asserting on the runner's real network setup.

Useful? React with 👍 / 👎.

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.

1 participant