San Jose, CA
"GENERATORS – PERMIT REQUIREMENTS Temporary Construction Generators (on skids or trailers AND with tanks < 60 gal.) need no special permits. • Must comply with standard noise requirements and be independent of building power systems. • Must submit Registration Form to SJFD if <55 gal. total is stored on site, or HMBP if >55 gal."
"Permanently mounted Emergency & Stand-by generators need the following approvals:"
This indicates if the generator feeds house wiring, permit required.
If you ran an extension cord under the garage door to power something, probably not.
Not exactly for "construction".
If, inside garage, that extension cord plugged into a generator input it wouldn't be visible. Of course the modification to wiring was supposed to be permitted.
I'm not finding it now, but discussion of ESS said that portable energy systems, like used at events, would be addressed. Certainly electrical and fire safety matters if setting up a system for public events.
So long as your home-built vehicle/trailer housing batteries doesn't start a fire that spreads to your house ... if a charred Fiskar Karma is in your garage I don't think your insurance company can deny fire coverage but if your DIY lithium battery starts the fire maybe they would.
Proposals for future codes:
"Proposal RB171-16 for Future 2018 IRC"
"Unlisted Battery 2nd Use (B2U) outdoors only"
(i.e. repurposed EV batteries)
"Battery systems located outdoors: min. 5 feet from buildings"
I think the interest in reusing electric vehicle batteries for home grid power storage will keep DIY possible.
Locating batteries in a shed 5 feet from the house is good if there is any chance of them catching fire (maybe further would be better.)