@huddle-marketplace/skills 0.2.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/README.md +256 -0
- package/dist/adapters/openclaw.d.ts +42 -0
- package/dist/adapters/openclaw.d.ts.map +1 -0
- package/dist/adapters/openclaw.js +94 -0
- package/dist/adapters/openclaw.js.map +1 -0
- package/dist/base.d.ts +26 -0
- package/dist/base.d.ts.map +1 -0
- package/dist/base.js +97 -0
- package/dist/base.js.map +1 -0
- package/dist/compose.d.ts +87 -0
- package/dist/compose.d.ts.map +1 -0
- package/dist/compose.js +119 -0
- package/dist/compose.js.map +1 -0
- package/dist/index.d.ts +104 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +167 -0
- package/dist/index.js.map +1 -0
- package/dist/jurisdictions/ca-bc/index.d.ts +49 -0
- package/dist/jurisdictions/ca-bc/index.d.ts.map +1 -0
- package/dist/jurisdictions/ca-bc/index.js +212 -0
- package/dist/jurisdictions/ca-bc/index.js.map +1 -0
- package/dist/jurisdictions/ca-ns/index.d.ts +27 -0
- package/dist/jurisdictions/ca-ns/index.d.ts.map +1 -0
- package/dist/jurisdictions/ca-ns/index.js +127 -0
- package/dist/jurisdictions/ca-ns/index.js.map +1 -0
- package/dist/jurisdictions/ca-on/index.d.ts +26 -0
- package/dist/jurisdictions/ca-on/index.d.ts.map +1 -0
- package/dist/jurisdictions/ca-on/index.js +109 -0
- package/dist/jurisdictions/ca-on/index.js.map +1 -0
- package/dist/jurisdictions/ca-qc/index.d.ts +75 -0
- package/dist/jurisdictions/ca-qc/index.d.ts.map +1 -0
- package/dist/jurisdictions/ca-qc/index.js +232 -0
- package/dist/jurisdictions/ca-qc/index.js.map +1 -0
- package/dist/jurisdictions/canadian-template.d.ts +49 -0
- package/dist/jurisdictions/canadian-template.d.ts.map +1 -0
- package/dist/jurisdictions/canadian-template.js +228 -0
- package/dist/jurisdictions/canadian-template.js.map +1 -0
- package/dist/jurisdictions/lifecycle/active-tenancy.d.ts +55 -0
- package/dist/jurisdictions/lifecycle/active-tenancy.d.ts.map +1 -0
- package/dist/jurisdictions/lifecycle/active-tenancy.js +227 -0
- package/dist/jurisdictions/lifecycle/active-tenancy.js.map +1 -0
- package/dist/jurisdictions/lifecycle/homeownership-readiness.d.ts +60 -0
- package/dist/jurisdictions/lifecycle/homeownership-readiness.d.ts.map +1 -0
- package/dist/jurisdictions/lifecycle/homeownership-readiness.js +401 -0
- package/dist/jurisdictions/lifecycle/homeownership-readiness.js.map +1 -0
- package/dist/jurisdictions/us-ca/index.d.ts +65 -0
- package/dist/jurisdictions/us-ca/index.d.ts.map +1 -0
- package/dist/jurisdictions/us-ca/index.js +265 -0
- package/dist/jurisdictions/us-ca/index.js.map +1 -0
- package/dist/jurisdictions/us-cftc/index.d.ts +48 -0
- package/dist/jurisdictions/us-cftc/index.d.ts.map +1 -0
- package/dist/jurisdictions/us-cftc/index.js +192 -0
- package/dist/jurisdictions/us-cftc/index.js.map +1 -0
- package/dist/jurisdictions/us-fl/index.d.ts +43 -0
- package/dist/jurisdictions/us-fl/index.d.ts.map +1 -0
- package/dist/jurisdictions/us-fl/index.js +129 -0
- package/dist/jurisdictions/us-fl/index.js.map +1 -0
- package/dist/jurisdictions/us-ny/index.d.ts +77 -0
- package/dist/jurisdictions/us-ny/index.d.ts.map +1 -0
- package/dist/jurisdictions/us-ny/index.js +344 -0
- package/dist/jurisdictions/us-ny/index.js.map +1 -0
- package/dist/jurisdictions/us-state-factory.d.ts +79 -0
- package/dist/jurisdictions/us-state-factory.d.ts.map +1 -0
- package/dist/jurisdictions/us-state-factory.js +425 -0
- package/dist/jurisdictions/us-state-factory.js.map +1 -0
- package/dist/jurisdictions/us-tx/index.d.ts +43 -0
- package/dist/jurisdictions/us-tx/index.d.ts.map +1 -0
- package/dist/jurisdictions/us-tx/index.js +160 -0
- package/dist/jurisdictions/us-tx/index.js.map +1 -0
- package/dist/mcp/index.d.ts +49 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +211 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/registry/index.d.ts +27 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +47 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/traiga/index.d.ts +24 -0
- package/dist/traiga/index.d.ts.map +1 -0
- package/dist/traiga/index.js +67 -0
- package/dist/traiga/index.js.map +1 -0
- package/dist/types/index.d.ts +814 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +150 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +77 -0
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Homeownership Readiness Skill
|
|
3
|
+
*
|
|
4
|
+
* The core differentiator: assesses a renter's readiness to become a homeowner.
|
|
5
|
+
* Not jurisdiction-specific — applies universally with jurisdiction-aware program matching.
|
|
6
|
+
*
|
|
7
|
+
* Capabilities:
|
|
8
|
+
* - Down payment progress tracking with timeline projection
|
|
9
|
+
* - Mortgage readiness assessment (DTI, credit, employment)
|
|
10
|
+
* - First-time buyer program matching (FHA, VA, USDA, state programs)
|
|
11
|
+
* - Closing cost estimation
|
|
12
|
+
* - Actionable roadmap to homeownership
|
|
13
|
+
*/
|
|
14
|
+
import { BaseSkill } from "../../base.js";
|
|
15
|
+
export class HomeownershipReadinessSkill extends BaseSkill {
|
|
16
|
+
id = "huddle-homeownership-readiness";
|
|
17
|
+
name = "Homeownership Readiness Assessment";
|
|
18
|
+
jurisdiction = "US-CFTC"; // Universal, uses federal as base
|
|
19
|
+
version = "1.0.0";
|
|
20
|
+
capabilities = [
|
|
21
|
+
"homeownership-readiness",
|
|
22
|
+
"buyer-program-matching",
|
|
23
|
+
"closing-cost-estimation",
|
|
24
|
+
];
|
|
25
|
+
async validate(input) {
|
|
26
|
+
if (input.type !== "homeownership-readiness") {
|
|
27
|
+
return this.buildResult([{
|
|
28
|
+
name: "input-type",
|
|
29
|
+
passed: false,
|
|
30
|
+
confidence: 1.0,
|
|
31
|
+
note: `Homeownership readiness skill requires type: "homeownership-readiness", received: ${input.type}`,
|
|
32
|
+
}], input);
|
|
33
|
+
}
|
|
34
|
+
const readiness = input;
|
|
35
|
+
const checks = [
|
|
36
|
+
this.checkDTIRatio(readiness),
|
|
37
|
+
this.checkCreditScore(readiness),
|
|
38
|
+
this.checkDownPaymentProgress(readiness),
|
|
39
|
+
this.checkEmploymentStability(readiness),
|
|
40
|
+
this.checkProgramEligibility(readiness),
|
|
41
|
+
];
|
|
42
|
+
return this.buildResult(checks, input);
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Debt-to-Income Ratio Assessment
|
|
46
|
+
* Front-end DTI (housing only): ideally < 28%
|
|
47
|
+
* Back-end DTI (all debt): ideally < 36%, max 43% for most loans, 50% for FHA
|
|
48
|
+
*/
|
|
49
|
+
checkDTIRatio(input) {
|
|
50
|
+
const monthlyIncome = input.annualIncomeCents / 12;
|
|
51
|
+
const monthlyDebt = input.monthlyDebtCents;
|
|
52
|
+
const dtiPercent = monthlyIncome > 0 ? (monthlyDebt / monthlyIncome) * 100 : 100;
|
|
53
|
+
let passed;
|
|
54
|
+
let note;
|
|
55
|
+
let confidence;
|
|
56
|
+
if (dtiPercent <= 36) {
|
|
57
|
+
passed = true;
|
|
58
|
+
confidence = 1.0;
|
|
59
|
+
note = `DTI ratio ${dtiPercent.toFixed(1)}% is excellent (≤36%). Qualifies for most conventional loans.`;
|
|
60
|
+
}
|
|
61
|
+
else if (dtiPercent <= 43) {
|
|
62
|
+
passed = true;
|
|
63
|
+
confidence = 0.8;
|
|
64
|
+
note = `DTI ratio ${dtiPercent.toFixed(1)}% is acceptable (≤43%). Qualifies for most loans but may limit options.`;
|
|
65
|
+
}
|
|
66
|
+
else if (dtiPercent <= 50) {
|
|
67
|
+
passed = false;
|
|
68
|
+
confidence = 0.6;
|
|
69
|
+
note = `DTI ratio ${dtiPercent.toFixed(1)}% is high. Only FHA loans (up to 50% with compensating factors) may qualify.`;
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
passed = false;
|
|
73
|
+
confidence = 1.0;
|
|
74
|
+
note = `DTI ratio ${dtiPercent.toFixed(1)}% exceeds all program limits. Debt reduction needed before mortgage application.`;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
name: "dti-ratio",
|
|
78
|
+
passed,
|
|
79
|
+
confidence,
|
|
80
|
+
note,
|
|
81
|
+
citation: {
|
|
82
|
+
statute: "Qualified Mortgage Rule (Dodd-Frank)",
|
|
83
|
+
section: "12 CFR § 1026.43(e)",
|
|
84
|
+
summary: "Qualified mortgages generally require DTI ≤ 43%. FHA allows up to 50% with compensating factors. Conventional ideal: ≤ 36%.",
|
|
85
|
+
},
|
|
86
|
+
details: {
|
|
87
|
+
dtiPercent,
|
|
88
|
+
monthlyIncomeCents: Math.round(monthlyIncome),
|
|
89
|
+
monthlyDebtCents: monthlyDebt,
|
|
90
|
+
thresholds: { excellent: 36, acceptable: 43, fhaMax: 50 },
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Credit Score Assessment
|
|
96
|
+
* 740+: Excellent (best rates)
|
|
97
|
+
* 700-739: Good
|
|
98
|
+
* 660-699: Fair (conventional possible)
|
|
99
|
+
* 620-659: FHA eligible
|
|
100
|
+
* 580-619: FHA with 3.5% down
|
|
101
|
+
* 500-579: FHA with 10% down
|
|
102
|
+
* <500: Not mortgage-eligible
|
|
103
|
+
*/
|
|
104
|
+
checkCreditScore(input) {
|
|
105
|
+
const score = input.creditScore;
|
|
106
|
+
if (score === undefined) {
|
|
107
|
+
return {
|
|
108
|
+
name: "credit-score",
|
|
109
|
+
passed: false,
|
|
110
|
+
confidence: 0.0,
|
|
111
|
+
note: "Credit score not provided. This is a critical factor in mortgage eligibility and interest rates.",
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
let passed;
|
|
115
|
+
let note;
|
|
116
|
+
let confidence;
|
|
117
|
+
if (score >= 740) {
|
|
118
|
+
passed = true;
|
|
119
|
+
confidence = 1.0;
|
|
120
|
+
note = `Credit score ${score} is excellent. Qualifies for best mortgage rates across all programs.`;
|
|
121
|
+
}
|
|
122
|
+
else if (score >= 700) {
|
|
123
|
+
passed = true;
|
|
124
|
+
confidence = 0.9;
|
|
125
|
+
note = `Credit score ${score} is good. Qualifies for most programs with competitive rates.`;
|
|
126
|
+
}
|
|
127
|
+
else if (score >= 660) {
|
|
128
|
+
passed = true;
|
|
129
|
+
confidence = 0.8;
|
|
130
|
+
note = `Credit score ${score} is fair. Conventional loans available but rates may be higher.`;
|
|
131
|
+
}
|
|
132
|
+
else if (score >= 620) {
|
|
133
|
+
passed = true;
|
|
134
|
+
confidence = 0.7;
|
|
135
|
+
note = `Credit score ${score} meets FHA minimum (620 for most lenders). Limited conventional options.`;
|
|
136
|
+
}
|
|
137
|
+
else if (score >= 580) {
|
|
138
|
+
passed = true;
|
|
139
|
+
confidence = 0.6;
|
|
140
|
+
note = `Credit score ${score} qualifies for FHA with 3.5% down payment. No conventional loans available.`;
|
|
141
|
+
}
|
|
142
|
+
else if (score >= 500) {
|
|
143
|
+
passed = false;
|
|
144
|
+
confidence = 0.5;
|
|
145
|
+
note = `Credit score ${score} requires 10% down for FHA. Very limited options. Focus on credit improvement.`;
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
passed = false;
|
|
149
|
+
confidence = 1.0;
|
|
150
|
+
note = `Credit score ${score} is below all mortgage program thresholds. Credit repair needed.`;
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
name: "credit-score",
|
|
154
|
+
passed,
|
|
155
|
+
confidence,
|
|
156
|
+
note,
|
|
157
|
+
citation: {
|
|
158
|
+
statute: "FHA Handbook 4000.1",
|
|
159
|
+
section: "II.A.5.b",
|
|
160
|
+
summary: "FHA minimum: 580 for 3.5% down, 500 for 10% down. Conventional typically requires 620+. Best rates at 740+.",
|
|
161
|
+
url: "https://www.hud.gov/program_offices/housing/sfh/handbook_4000-1",
|
|
162
|
+
},
|
|
163
|
+
details: {
|
|
164
|
+
creditScore: score,
|
|
165
|
+
tier: score >= 740 ? "excellent" : score >= 700 ? "good" : score >= 660 ? "fair" : score >= 620 ? "fha-standard" : score >= 580 ? "fha-low" : score >= 500 ? "fha-minimum" : "ineligible",
|
|
166
|
+
},
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Down Payment Progress
|
|
171
|
+
* Tracks savings vs target and projects completion date
|
|
172
|
+
*/
|
|
173
|
+
checkDownPaymentProgress(input) {
|
|
174
|
+
const current = input.currentSavingsCents;
|
|
175
|
+
const target = input.targetDownPaymentCents;
|
|
176
|
+
const progressPercent = target > 0 ? (current / target) * 100 : 0;
|
|
177
|
+
const remaining = Math.max(0, target - current);
|
|
178
|
+
let projectedMonths = null;
|
|
179
|
+
let projectedDate = null;
|
|
180
|
+
if (input.targetPurchaseDate) {
|
|
181
|
+
const targetDate = new Date(input.targetPurchaseDate);
|
|
182
|
+
const now = new Date();
|
|
183
|
+
const monthsRemaining = Math.max(1, (targetDate.getFullYear() - now.getFullYear()) * 12 +
|
|
184
|
+
(targetDate.getMonth() - now.getMonth()));
|
|
185
|
+
const monthlySavingsNeeded = remaining / monthsRemaining;
|
|
186
|
+
projectedMonths = monthsRemaining;
|
|
187
|
+
return {
|
|
188
|
+
name: "down-payment-progress",
|
|
189
|
+
passed: progressPercent >= 100,
|
|
190
|
+
confidence: 0.9,
|
|
191
|
+
note: progressPercent >= 100
|
|
192
|
+
? `Down payment target reached! $${(current / 100).toFixed(2)} saved of $${(target / 100).toFixed(2)} goal.`
|
|
193
|
+
: `${progressPercent.toFixed(1)}% saved ($${(current / 100).toFixed(2)} of $${(target / 100).toFixed(2)}). Need $${(monthlySavingsNeeded / 100).toFixed(2)}/month for ${monthsRemaining} months to reach goal by ${input.targetPurchaseDate}.`,
|
|
194
|
+
details: {
|
|
195
|
+
currentSavingsCents: current,
|
|
196
|
+
targetCents: target,
|
|
197
|
+
progressPercent,
|
|
198
|
+
remainingCents: remaining,
|
|
199
|
+
projectedMonths: monthsRemaining,
|
|
200
|
+
monthlySavingsNeededCents: Math.round(monthlySavingsNeeded),
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
return {
|
|
205
|
+
name: "down-payment-progress",
|
|
206
|
+
passed: progressPercent >= 100,
|
|
207
|
+
confidence: 0.9,
|
|
208
|
+
note: progressPercent >= 100
|
|
209
|
+
? `Down payment target reached! $${(current / 100).toFixed(2)} saved.`
|
|
210
|
+
: `${progressPercent.toFixed(1)}% saved ($${(current / 100).toFixed(2)} of $${(target / 100).toFixed(2)}). $${(remaining / 100).toFixed(2)} remaining.`,
|
|
211
|
+
details: {
|
|
212
|
+
currentSavingsCents: current,
|
|
213
|
+
targetCents: target,
|
|
214
|
+
progressPercent,
|
|
215
|
+
remainingCents: remaining,
|
|
216
|
+
},
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Employment Stability
|
|
221
|
+
* Most lenders require 2 years of stable employment
|
|
222
|
+
*/
|
|
223
|
+
checkEmploymentStability(input) {
|
|
224
|
+
const months = input.employmentMonths;
|
|
225
|
+
if (months === undefined) {
|
|
226
|
+
return {
|
|
227
|
+
name: "employment-stability",
|
|
228
|
+
passed: false,
|
|
229
|
+
confidence: 0.0,
|
|
230
|
+
note: "Employment history not provided. Most lenders require 2 years of stable employment.",
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
const passed = months >= 24;
|
|
234
|
+
return {
|
|
235
|
+
name: "employment-stability",
|
|
236
|
+
passed,
|
|
237
|
+
confidence: passed ? 1.0 : 0.7,
|
|
238
|
+
note: passed
|
|
239
|
+
? `${(months / 12).toFixed(1)} years of employment meets 2-year lender requirement.`
|
|
240
|
+
: `${(months / 12).toFixed(1)} years of employment is below the typical 2-year requirement. Some programs accept shorter history with compensating factors.`,
|
|
241
|
+
citation: {
|
|
242
|
+
statute: "Fannie Mae Selling Guide",
|
|
243
|
+
section: "B3-3.1-01",
|
|
244
|
+
summary: "Standard requirement: 2 years of stable employment history. Self-employed borrowers may need additional documentation.",
|
|
245
|
+
url: "https://selling-guide.fanniemae.com/Selling-Guide/Origination-thru-Closing/Subpart-B3-Underwriting-Borrowers/Chapter-B3-3-Income-Assessment/",
|
|
246
|
+
},
|
|
247
|
+
details: { employmentMonths: months, requiredMonths: 24 },
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* First-Time Buyer Program Matching
|
|
252
|
+
* Evaluates eligibility for FHA, VA, USDA, and conventional programs
|
|
253
|
+
*/
|
|
254
|
+
checkProgramEligibility(input) {
|
|
255
|
+
const programs = this.matchPrograms(input);
|
|
256
|
+
const eligiblePrograms = programs.filter((p) => p.eligible);
|
|
257
|
+
const passed = eligiblePrograms.length > 0;
|
|
258
|
+
const programSummary = programs.map((p) => `${p.eligible ? "✓" : "✗"} ${p.name}: ${p.reason} (min ${p.minDownPaymentPercent}% down, ${p.minCreditScore}+ credit)`).join("\n ");
|
|
259
|
+
return {
|
|
260
|
+
name: "program-eligibility",
|
|
261
|
+
passed,
|
|
262
|
+
confidence: 0.8,
|
|
263
|
+
note: passed
|
|
264
|
+
? `Eligible for ${eligiblePrograms.length} program(s):\n ${programSummary}`
|
|
265
|
+
: `Not currently eligible for any programs:\n ${programSummary}`,
|
|
266
|
+
details: {
|
|
267
|
+
programs,
|
|
268
|
+
eligibleCount: eligiblePrograms.length,
|
|
269
|
+
},
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
matchPrograms(input) {
|
|
273
|
+
const score = input.creditScore ?? 0;
|
|
274
|
+
const dti = input.annualIncomeCents > 0
|
|
275
|
+
? (input.monthlyDebtCents / (input.annualIncomeCents / 12)) * 100
|
|
276
|
+
: 100;
|
|
277
|
+
const programs = [];
|
|
278
|
+
// FHA
|
|
279
|
+
const fhaEligible = score >= 580 && dti <= 50;
|
|
280
|
+
programs.push({
|
|
281
|
+
name: "FHA Loan",
|
|
282
|
+
eligible: fhaEligible,
|
|
283
|
+
reason: fhaEligible
|
|
284
|
+
? "Credit and DTI meet FHA requirements"
|
|
285
|
+
: score < 580
|
|
286
|
+
? `Credit score ${score} below FHA minimum (580)`
|
|
287
|
+
: `DTI ${dti.toFixed(1)}% exceeds FHA max (50%)`,
|
|
288
|
+
minDownPaymentPercent: score >= 580 ? 3.5 : 10,
|
|
289
|
+
maxDTI: 50,
|
|
290
|
+
minCreditScore: 580,
|
|
291
|
+
url: "https://www.hud.gov/buying/loans",
|
|
292
|
+
});
|
|
293
|
+
// VA (if veteran)
|
|
294
|
+
if (input.veteranStatus) {
|
|
295
|
+
const vaEligible = score >= 620 && dti <= 41;
|
|
296
|
+
programs.push({
|
|
297
|
+
name: "VA Loan",
|
|
298
|
+
eligible: vaEligible,
|
|
299
|
+
reason: vaEligible
|
|
300
|
+
? "Veteran status confirmed, credit and DTI qualify"
|
|
301
|
+
: `${score < 620 ? "Credit below 620" : "DTI above 41%"}`,
|
|
302
|
+
minDownPaymentPercent: 0,
|
|
303
|
+
maxDTI: 41,
|
|
304
|
+
minCreditScore: 620,
|
|
305
|
+
url: "https://www.va.gov/housing-assistance/home-loans/",
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
// USDA (if rural)
|
|
309
|
+
if (input.ruralArea) {
|
|
310
|
+
const usdaEligible = score >= 640 && dti <= 41;
|
|
311
|
+
programs.push({
|
|
312
|
+
name: "USDA Loan",
|
|
313
|
+
eligible: usdaEligible,
|
|
314
|
+
reason: usdaEligible
|
|
315
|
+
? "Rural area confirmed, credit and DTI qualify"
|
|
316
|
+
: `${score < 640 ? "Credit below 640" : "DTI above 41%"}`,
|
|
317
|
+
minDownPaymentPercent: 0,
|
|
318
|
+
maxDTI: 41,
|
|
319
|
+
minCreditScore: 640,
|
|
320
|
+
url: "https://www.rd.usda.gov/programs-services/single-family-housing-programs",
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
// Conventional (Fannie Mae HomeReady / Freddie Mac Home Possible)
|
|
324
|
+
if (input.firstTimeBuyer) {
|
|
325
|
+
const conventionalEligible = score >= 620 && dti <= 45;
|
|
326
|
+
programs.push({
|
|
327
|
+
name: "Conventional (HomeReady/Home Possible)",
|
|
328
|
+
eligible: conventionalEligible,
|
|
329
|
+
reason: conventionalEligible
|
|
330
|
+
? "First-time buyer, credit and DTI qualify for 3% down programs"
|
|
331
|
+
: `${score < 620 ? "Credit below 620" : "DTI above 45%"}`,
|
|
332
|
+
minDownPaymentPercent: 3,
|
|
333
|
+
maxDTI: 45,
|
|
334
|
+
minCreditScore: 620,
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
// Standard Conventional
|
|
338
|
+
const stdConventional = score >= 660 && dti <= 43;
|
|
339
|
+
programs.push({
|
|
340
|
+
name: "Conventional Loan",
|
|
341
|
+
eligible: stdConventional,
|
|
342
|
+
reason: stdConventional
|
|
343
|
+
? "Credit and DTI meet conventional requirements"
|
|
344
|
+
: `${score < 660 ? "Credit below 660 (conventional minimum varies)" : "DTI above 43%"}`,
|
|
345
|
+
minDownPaymentPercent: score >= 740 ? 5 : 10,
|
|
346
|
+
maxDTI: 43,
|
|
347
|
+
minCreditScore: 660,
|
|
348
|
+
});
|
|
349
|
+
return programs;
|
|
350
|
+
}
|
|
351
|
+
checkToRemediation(check) {
|
|
352
|
+
switch (check.name) {
|
|
353
|
+
case "dti-ratio":
|
|
354
|
+
return {
|
|
355
|
+
action: "reduce_debt",
|
|
356
|
+
description: "Pay down existing debts to reduce DTI ratio below 43%. Target: monthly debt payments < 36% of gross monthly income.",
|
|
357
|
+
urgency: "recommended",
|
|
358
|
+
automatable: false,
|
|
359
|
+
};
|
|
360
|
+
case "credit-score":
|
|
361
|
+
return {
|
|
362
|
+
action: "improve_credit",
|
|
363
|
+
description: "Focus on credit improvement: pay bills on time, reduce credit utilization below 30%, dispute errors on credit report.",
|
|
364
|
+
urgency: "recommended",
|
|
365
|
+
automatable: false,
|
|
366
|
+
};
|
|
367
|
+
case "down-payment-progress":
|
|
368
|
+
return {
|
|
369
|
+
action: "increase_savings",
|
|
370
|
+
description: "Increase monthly savings contribution. Consider Huddle's mission contribution feature to accelerate progress.",
|
|
371
|
+
urgency: "recommended",
|
|
372
|
+
automatable: true,
|
|
373
|
+
};
|
|
374
|
+
case "employment-stability":
|
|
375
|
+
return {
|
|
376
|
+
action: "maintain_employment",
|
|
377
|
+
description: "Maintain current employment for at least 2 years total. Avoid job changes during mortgage application process.",
|
|
378
|
+
urgency: "recommended",
|
|
379
|
+
automatable: false,
|
|
380
|
+
};
|
|
381
|
+
case "program-eligibility":
|
|
382
|
+
return {
|
|
383
|
+
action: "improve_qualification",
|
|
384
|
+
description: "Address the weakest qualification factor (credit, DTI, or down payment) to unlock at least one mortgage program.",
|
|
385
|
+
urgency: "required",
|
|
386
|
+
automatable: false,
|
|
387
|
+
};
|
|
388
|
+
default:
|
|
389
|
+
return super.checkToRemediation(check);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
getMetadata() {
|
|
393
|
+
return {
|
|
394
|
+
...super.getMetadata(),
|
|
395
|
+
description: "Comprehensive homeownership readiness assessment: DTI ratio, credit score, down payment progress, employment stability, and mortgage program matching (FHA, VA, USDA, conventional).",
|
|
396
|
+
tags: ["homeownership", "mortgage", "readiness", "fha", "va", "usda", "down-payment"],
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
export const homeownershipReadinessSkill = new HomeownershipReadinessSkill();
|
|
401
|
+
//# sourceMappingURL=homeownership-readiness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"homeownership-readiness.js","sourceRoot":"","sources":["../../../src/jurisdictions/lifecycle/homeownership-readiness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAsB1C,MAAM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AAE,kHAAkH;oBAC/H,OAAO,EAAE,UAAU;oBACnB,WAAW,EAAE,KAAK;iBACnB,CAAC;YACJ;gBACE,OAAO,KAAK,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IAEQ,WAAW;QAClB,OAAO;YACL,GAAG,KAAK,CAAC,WAAW,EAAE;YACtB,WAAW,EAAE,sLAAsL;YACnM,IAAI,EAAE,CAAC,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,CAAC;SACtF,CAAC;IACJ,CAAC;CACF;AAED,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,2BAA2B,EAAE,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* US-CA — California Civil Code § 1950.5 & AB-1482 (Tenant Protection Act)
|
|
3
|
+
*
|
|
4
|
+
* California has some of the strongest tenant protections in the US:
|
|
5
|
+
* - Security deposit limited to 2 months' rent (unfurnished) or 3 months (furnished)
|
|
6
|
+
* → As of July 2024 (AB 12): limited to 1 month for ALL units
|
|
7
|
+
* - 21-day return deadline after move-out
|
|
8
|
+
* - Itemized statement of deductions required
|
|
9
|
+
* - Rent increases capped at 5% + CPI or 10% (whichever is lower) under AB-1482
|
|
10
|
+
* - Just cause eviction protections after 12 months
|
|
11
|
+
* - Landlord must pay interest on deposit in some cities (SF, LA, Berkeley, etc.)
|
|
12
|
+
*/
|
|
13
|
+
import { BaseSkill } from "../../base.js";
|
|
14
|
+
import type { SkillInput, SkillResult, SkillCheck, SkillCapability, RemediationStep, SkillMetadata } from "../../types/index.js";
|
|
15
|
+
export declare class USCASkill extends BaseSkill {
|
|
16
|
+
readonly id = "huddle-compliance-us-ca";
|
|
17
|
+
readonly name = "California Civil Code \u00A7 1950.5 & AB-1482";
|
|
18
|
+
readonly jurisdiction: "US-CA";
|
|
19
|
+
readonly version = "1.0.0";
|
|
20
|
+
readonly capabilities: SkillCapability[];
|
|
21
|
+
validate(input: SkillInput): Promise<SkillResult>;
|
|
22
|
+
private validateDeposit;
|
|
23
|
+
/**
|
|
24
|
+
* Civil Code § 1950.5(c): Deposit Limit
|
|
25
|
+
* AB 12 (effective July 1, 2024): Maximum 1 month's rent for ALL units
|
|
26
|
+
* Previously: 2 months (unfurnished) / 3 months (furnished)
|
|
27
|
+
*/
|
|
28
|
+
private checkDepositLimit;
|
|
29
|
+
/**
|
|
30
|
+
* Civil Code § 1950.5(g): 21-Day Return
|
|
31
|
+
* Landlord must return deposit within 21 calendar days of move-out
|
|
32
|
+
*/
|
|
33
|
+
private checkReturnTimeline;
|
|
34
|
+
/**
|
|
35
|
+
* Civil Code § 1950.5(g)(2): Itemized Deductions
|
|
36
|
+
* Must provide itemized statement with receipts for any deduction over $125
|
|
37
|
+
*/
|
|
38
|
+
private checkItemizedDeductions;
|
|
39
|
+
/**
|
|
40
|
+
* Civil Code § 1950.5(m): Non-Refundable Fee Prohibition
|
|
41
|
+
* No portion of a security deposit may be designated as non-refundable
|
|
42
|
+
*/
|
|
43
|
+
private checkNonRefundableFeeProhibition;
|
|
44
|
+
/**
|
|
45
|
+
* Civil Code § 1950.5(f): Receipt Requirement
|
|
46
|
+
* Landlord must provide receipt for deposit and inspection rights
|
|
47
|
+
*/
|
|
48
|
+
private checkReceiptRequirement;
|
|
49
|
+
private validateRentIncrease;
|
|
50
|
+
/**
|
|
51
|
+
* AB-1482 (Tenant Protection Act of 2019): Rent Increase Cap
|
|
52
|
+
* Maximum increase: 5% + local CPI or 10%, whichever is LOWER
|
|
53
|
+
* Applies to most residential units (exemptions for new construction <15 years, single-family homes)
|
|
54
|
+
*/
|
|
55
|
+
private checkRentCapAB1482;
|
|
56
|
+
/**
|
|
57
|
+
* Civil Code § 827: Notice Requirement for Rent Increases
|
|
58
|
+
* 30-day notice for increases ≤ 10%; 90-day notice for increases > 10%
|
|
59
|
+
*/
|
|
60
|
+
private checkNoticeRequirement;
|
|
61
|
+
protected checkToRemediation(check: SkillCheck): RemediationStep;
|
|
62
|
+
getMetadata(): SkillMetadata;
|
|
63
|
+
}
|
|
64
|
+
export declare const usCaSkill: USCASkill;
|
|
65
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jurisdictions/us-ca/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,UAAU,EACV,eAAe,EAGf,eAAe,EACf,aAAa,EACd,MAAM,sBAAsB,CAAC;AAE9B,qBAAa,SAAU,SAAQ,SAAS;IACtC,QAAQ,CAAC,EAAE,6BAA6B;IACxC,QAAQ,CAAC,IAAI,mDAA8C;IAC3D,QAAQ,CAAC,YAAY,EAAG,OAAO,CAAU;IACzC,QAAQ,CAAC,OAAO,WAAW;IAC3B,QAAQ,CAAC,YAAY,EAAE,eAAe,EAAE,CAKtC;IAEI,QAAQ,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC;YAoBzC,eAAe;IAY7B;;;;OAIG;IACH,OAAO,CAAC,iBAAiB;IA8BzB;;;OAGG;IACH,OAAO,CAAC,mBAAmB;IAgB3B;;;OAGG;IACH,OAAO,CAAC,uBAAuB;IAc/B;;;OAGG;IACH,OAAO,CAAC,gCAAgC;IAcxC;;;OAGG;IACH,OAAO,CAAC,uBAAuB;YAkBjB,oBAAoB;IASlC;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAqC1B;;;OAGG;IACH,OAAO,CAAC,sBAAsB;cA0BX,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,eAAe;IA4BhE,WAAW,IAAI,aAAa;CAMtC;AAED,eAAO,MAAM,SAAS,WAAkB,CAAC"}
|